@hedia/web-public 3.8.0-1187 → 3.8.0-1189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`f75e3a29f44687e1f70d614896cd110448349bd9`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d66a61bc-8079-4d54-9954-e7c5cbe0c215`,e._sentryDebugIdIdentifier=`sentry-dbid-d66a61bc-8079-4d54-9954-e7c5cbe0c215`)}catch{}})();var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var p=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=ne(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var j=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ae={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ae,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,j)}catch(e){j(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.3`})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ee(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ee(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),g=s(((e,t)=>{t.exports=h()})),_=s((e=>{var t=m();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.3`})),v=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=s((e=>{var t=g(),n=m(),r=v();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),ee=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=ee&&e[ee]||e[`@@iterator`],typeof e==`function`?e:null)}var ne=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var ie=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function M(e){return{current:e}}function N(e){0>ce||(e.current=se[ce],se[ce]=null,ce--)}function P(e,t){ce++,se[ce]=e.current,e.current=t}var le=M(null),ue=M(null),de=M(null),fe=M(null);function pe(e,t){switch(P(de,t),P(ue,e),P(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gu(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gu(t),e=Ku(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(le),P(le,e)}function me(){N(le),N(ue),N(de)}function he(e){e.memoizedState!==null&&P(fe,e);var t=le.current,n=Ku(t,e.type);t!==n&&(P(ue,e),P(le,n))}function ge(e){ue.current===e&&(N(le),N(ue)),fe.current===e&&(N(fe),Rd._currentValue=oe)}var F,_e;function I(e){if(F===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||``,_e=-1<e.stack.indexOf(`
1
+ (function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`d22cf5c9a168c1d9c471ed0186e413c08110107d`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ca2374be-a3de-40dc-bdd8-2d0e149cb898`,e._sentryDebugIdIdentifier=`sentry-dbid-ca2374be-a3de-40dc-bdd8-2d0e149cb898`)}catch{}})();var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var p=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=ne(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var j=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ae={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ae,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,j)}catch(e){j(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.3`})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ee(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ee(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),g=s(((e,t)=>{t.exports=h()})),_=s((e=>{var t=m();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.3`})),v=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=s((e=>{var t=g(),n=m(),r=v();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),ee=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=ee&&e[ee]||e[`@@iterator`],typeof e==`function`?e:null)}var ne=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var ie=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function M(e){return{current:e}}function N(e){0>ce||(e.current=se[ce],se[ce]=null,ce--)}function P(e,t){ce++,se[ce]=e.current,e.current=t}var le=M(null),ue=M(null),de=M(null),fe=M(null);function pe(e,t){switch(P(de,t),P(ue,e),P(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gu(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gu(t),e=Ku(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(le),P(le,e)}function me(){N(le),N(ue),N(de)}function he(e){e.memoizedState!==null&&P(fe,e);var t=le.current,n=Ku(t,e.type);t!==n&&(P(ue,e),P(le,n))}function ge(e){ue.current===e&&(N(le),N(ue)),fe.current===e&&(N(fe),Rd._currentValue=oe)}var F,_e;function I(e){if(F===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||``,_e=-1<e.stack.indexOf(`
2
2
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
3
  `+F+e+_e}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
4
  `),l=s.split(`
@@ -864,7 +864,7 @@ This can also happen if there are multiple copies of '@react-navigation' package
864
864
  - object (Lottie JSON).
865
865
  Received: ${typeof e}`);return}r?(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),o4&&this.resize(),this._drainPlayerEvents(),this._marker&&this._dotLottieCore.set_marker(this._marker),setTimeout(()=>{this._eventManager.dispatch({type:`frame`,currentFrame:this.currentFrame})},0),this._dotLottieCore.render(),this._drainPlayerEvents(),this._draw(),this._stateMachineId?this.stateMachineLoad(this._stateMachineId)&&this.stateMachineStart()&&this._startAnimationLoop():this._dotLottieCore.is_playing()&&this._startAnimationLoop(),o4&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(_4.observe(this._canvas,this),b4(this._canvas)||this.freeze()),this._renderConfig.autoResize&&v4.observe(this._canvas,this))):this._drainPlayerEvents()}_loadFromSrc(e){this._fetchData(e).then(e=>this._loadFromData(e)).catch(t=>this._dispatchError(`Failed to load animation data from URL: ${e}. ${t}`))}get buffer(){return this._dotLottieCore?this._dotLottieCore.get_pixel_buffer():null}get activeAnimationId(){return this._dotLottieCore?.animation_id()??void 0}get activeThemeId(){return this._dotLottieCore?.theme_id()??void 0}get layout(){if(this._dotLottieCore)return{align:[this._dotLottieCore.layout_align_x(),this._dotLottieCore.layout_align_y()],fit:E7t(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??``}get manifest(){try{let e=this._dotLottieCore?.manifest_string();if(this._dotLottieCore===null||!e)return null;let t=JSON.parse(e);return Object.keys(t).length===0?null:t}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(!(!this._dotLottieCore||!this._dotLottieCore.has_segment()))return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?T7t(this._dotLottieCore.mode()):`forward`}get isFrozen(){return this._isFrozen}get isStateMachineRunning(){return this._isStateMachineRunning}get backgroundColor(){return this._backgroundColor??``}get autoplay(){return this._dotLottieCore?.autoplay()??!1}get useFrameInterpolation(){return this._dotLottieCore?.use_frame_interpolation()??!1}get speed(){return this._dotLottieCore?.speed()??0}get isReady(){return this._dotLottieCore!==null}get isLoaded(){return this._dotLottieCore?.is_loaded()??!1}get isPlaying(){return this._dotLottieCore?.is_playing()??!1}get isPaused(){return this._dotLottieCore?.is_paused()??!1}get isStopped(){return this._dotLottieCore?.is_stopped()??!1}get currentFrame(){return this._dotLottieCore?Math.round(this._dotLottieCore.current_frame()*100)/100:0}get loopCount(){return this._dotLottieCore?.current_loop_count()??0}get totalFrames(){return this._dotLottieCore?.total_frames()??0}get duration(){return this._dotLottieCore?.duration()??0}get segmentDuration(){return this._dotLottieCore?.segment_duration()??0}get canvas(){return this._canvas}load(e){this._dotLottieCore!==null&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(e.autoplay??!1),this._dotLottieCore.set_loop(e.loop??!1),this._dotLottieCore.set_loop_count(e.loopCount??0),this._dotLottieCore.set_mode(w7t(e.mode??`forward`)),this._dotLottieCore.set_speed(e.speed??1),this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation??!0),e.segment&&e.segment.length===2?this._dotLottieCore.set_segment(e.segment[0],e.segment[1]):this._dotLottieCore.clear_segment(),this._marker=e.marker??``,this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(e.layout?.fit??`contain`,e.layout?.align?.[0]??.5,e.layout?.align?.[1]??.5),e.data?this._canvas?this._loadFromData(e.data):this._pendingLoad={data:e.data}:e.src&&(this._canvas?this._loadFromSrc(e.src):this._pendingLoad={src:e.src}),this.setBackgroundColor(e.backgroundColor??``))}_draw(){if(!(this._dotLottieCore===null||this._canvas===null)&&(!this._context&&`getContext`in this._canvas&&typeof this._canvas.getContext==`function`&&(typeof HTMLCanvasElement<`u`&&this._canvas instanceof HTMLCanvasElement||typeof OffscreenCanvas<`u`&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext(`2d`)),this._context)){let e=this._dotLottieCore.get_pixel_buffer(),t=this._canvas.width*this._canvas.height*4;if(e.byteLength!==t){this._lastExpectedBufferSize===t?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=t),this._bufferMismatchCount===10&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${t} bytes for canvas ${this._canvas.width}x${this._canvas.height}, but got ${e.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`);return}this._bufferMismatchCount=0,this._lastExpectedBufferSize=t;let n=null,r=new Uint8ClampedArray(e.buffer,e.byteOffset,e.byteLength);typeof ImageData>`u`?(n=this._context.createImageData(this._canvas.width,this._canvas.height),n.data.set(r)):n=new ImageData(r,this._canvas.width,this._canvas.height),this._context.putImageData(n,0,0)}}_cleanupCanvas(){this._canvas&&o4&&this._canvas instanceof HTMLCanvasElement&&(_4.unobserve(this._canvas),v4.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&o4&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(_4.observe(this._canvas,this),b4(this._canvas)||this.freeze()),this._renderConfig.autoResize&&v4.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._dotLottieCore.resize(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}_setupRendererOnCanvas(){this._context=null}_stopAnimationLoop(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null)}_startAnimationLoop(){this._animationFrameId===null&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.is_playing()||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._animationLoop.bind(this)))}_animationLoop(){if(this._dotLottieCore===null){this._stopAnimationLoop();return}if(!this._dotLottieCore.is_playing()&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let e=this._isStateMachineRunning?this._dotLottieCore.sm_tick():this._dotLottieCore.tick();this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),e&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._animationLoop.bind(this))}catch(e){console.error(`Error in animation frame:`,e),this._eventManager.dispatch({type:`renderError`,error:e}),e instanceof WebAssembly.RuntimeError&&this.destroy()}}play(){if(this._dotLottieCore===null||!this.isLoaded)return;this._stopAnimationLoop();let e=this._dotLottieCore.play();this._drainPlayerEvents(),(e||this._dotLottieCore.is_playing())&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&o4&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!b4(this._canvas)&&this.freeze()}pause(){this._dotLottieCore!==null&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(this._dotLottieCore===null)return;let e=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),e&&(this._eventManager.dispatch({type:`frame`,currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(e){if(this._dotLottieCore!==null&&this._dotLottieCore.seek(e)){let e=this._dotLottieCore.render();this._drainPlayerEvents(),e&&this._draw()}}setSpeed(e){this._dotLottieCore!==null&&this._dotLottieCore.set_speed(e)}setBackgroundColor(e){this._dotLottieCore!==null&&(o4&&this._canvas instanceof HTMLCanvasElement?this._canvas.style.backgroundColor=e:this._dotLottieCore.set_background_color(_7t(e)),this._backgroundColor=e)}setLoop(e){this._dotLottieCore!==null&&this._dotLottieCore.set_loop(e)}setLoopCount(e){this._dotLottieCore!==null&&this._dotLottieCore.set_loop_count(e)}setUseFrameInterpolation(e){this._dotLottieCore!==null&&this._dotLottieCore.set_use_frame_interpolation(e)}addEventListener(e,t){this._eventManager.addEventListener(e,t)}removeEventListener(e,t){this._eventManager.removeEventListener(e,t)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._dotLottieCore?.free(),this._dotLottieCore=null,this._context=null,this._eventManager.dispatch({type:`destroy`}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){this._animationFrameId!==null&&(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:`freeze`}))}unfreeze(){this._animationFrameId===null&&(this._isFrozen=!1,this._eventManager.dispatch({type:`unfreeze`}),this._startAnimationLoop())}resize(){if(!(!this._dotLottieCore||!this.isLoaded||!this._canvas)){if(o4&&this._canvas instanceof HTMLCanvasElement){let e=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:t,width:n}=this._canvas.getBoundingClientRect();t!==0&&n!==0&&(this._canvas.width=n*e,this._canvas.height=t*e)}this._dotLottieCore.resize(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}}setCanvas(e){if(!(!e||this._canvas===e)&&(this._canvas&&this._cleanupCanvas(),this._canvas=e,this._initializeCanvas(),this._pendingLoad)){let e=this._pendingLoad;this._pendingLoad=null,e.data?this._loadFromData(e.data):e.src&&this._loadFromSrc(e.src)}}setTransform(e){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.set_transform(new Float32Array(e));return t&&this._dotLottieCore.render()&&this._draw(),t}getTransform(){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_transform();return Array.from(e)}setSegment(e,t){this._dotLottieCore!==null&&this._dotLottieCore.set_segment(e,t)}setMode(e){this._dotLottieCore!==null&&this._dotLottieCore.set_mode(w7t(e))}setRenderConfig(e){let{devicePixelRatio:t,freezeOnOffscreen:n,quality:r,...i}=e;this._renderConfig={...this._renderConfig,...i,devicePixelRatio:t||y4(),freezeOnOffscreen:n??!0,...r!==void 0&&{quality:r}},r!==void 0&&this._dotLottieCore&&this._dotLottieCore.set_quality(r),o4&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?v4.observe(this._canvas,this):v4.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(_4.observe(this._canvas,this),b4(this._canvas)||this.freeze()):(_4.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(e){this._dotLottieCore===null||this._dotLottieCore.animation_id()===e||!this._canvas||(this._dotLottieCore.load_animation_from_id(e,this._canvas.width,this._canvas.height)?(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),this.resize(),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${e}`))}setMarker(e){this._dotLottieCore!==null&&(this._marker=e,this._dotLottieCore.set_marker(e))}markers(){let e=this._dotLottieCore?.markers();return e&&Array.isArray(e)?e:[]}setTheme(e){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.set_theme(e);return t&&(this._dotLottieCore.render(),this._draw()),t}resetTheme(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.reset_theme();return e&&(this._dotLottieCore.render(),this._draw()),e}setThemeData(e){if(this._dotLottieCore===null)return!1;let t=typeof e==`string`?e:JSON.stringify(e),n=this._dotLottieCore.set_theme_data(t);return n&&(this._dotLottieCore.render(),this._draw()),n}setSlots(e){this._dotLottieCore!==null&&this._dotLottieCore.set_slots_str(JSON.stringify(e))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(e){return Array.isArray(e)&&e.length>0&&typeof e[0]==`object`&&e[0]!==null&&`t`in e[0]&&`s`in e[0]}getSlotIds(){if(!this._dotLottieCore)return[];let e=this._dotLottieCore.get_slot_ids();return Array.isArray(e)?e:[]}getSlotType(e){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_slot_type(e);if(t)return t}getSlot(e){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_slot_str(e);if(t)try{return JSON.parse(t)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._isKeyframeArray(t),r=JSON.stringify({a:+!!n,k:t}),i=this._dotLottieCore.set_slot_str(e,r);return this._dotLottieCore.render(),this._draw(),i}setScalarSlot(e,t){if(this._dotLottieCore===null)return!1;let n=JSON.stringify({a:typeof t==`number`?0:1,k:t}),r=this._dotLottieCore.set_slot_str(e,n);return this._dotLottieCore.render(),this._draw(),r}setVectorSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._isKeyframeArray(t),r=JSON.stringify({a:+!!n,k:t}),i=this._dotLottieCore.set_slot_str(e,r);return this._dotLottieCore.render(),this._draw(),i}setGradientSlot(e,t,n){if(this._dotLottieCore===null)return!1;let r=this._isKeyframeArray(t),i=JSON.stringify({k:{a:+!!r,k:t},p:n}),a=this._dotLottieCore.set_slot_str(e,i);return this._dotLottieCore.render(),this._draw(),a}setTextSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._dotLottieCore.get_slot_str(e),r=t;if(n){let e=JSON.parse(n);if(e&&`k`in e&&Array.isArray(e.k)){let n=e.k[0];`s`in n&&typeof n.s==`object`&&(r={...n.s,...t})}}let i=JSON.stringify({a:0,k:[{t:0,s:r}]}),a=this._dotLottieCore.set_slot_str(e,i);return this._dotLottieCore.render(),this._draw(),a}resetSlot(e){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.reset_slot(e);return this._dotLottieCore.render(),this._draw(),t}clearSlot(e){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.clear_slot(e);return this._dotLottieCore.render(),this._draw(),t}resetSlots(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),e}clearSlots(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),e}setLayout(e){this._dotLottieCore!==null&&this._dotLottieCore.set_layout(e.fit??`contain`,e.align?.[0]??.5,e.align?.[1]??.5)}setViewport(e,t,n,r){return this._dotLottieCore===null?!1:this._dotLottieCore.set_viewport(e,t,n,r)}static setWasmUrl(e){C7t.setWasmUrl(e)}static async registerFont(e,t){try{await C7t.load();let n;if(typeof t==`string`){let e=await fetch(t);if(!e.ok)return console.error(`Failed to fetch font from URL: ${t}. Status: ${e.status}`),!1;n=new Uint8Array(await e.arrayBuffer())}else n=t instanceof Uint8Array?t:new Uint8Array(t);let r=c7t(e,n);return r||console.error(`Failed to register font "${e}". Font data may be invalid.`),r}catch(t){return console.error(`Error registering font "${e}":`,t),!1}}animationSize(){let e=this._dotLottieCore?.animation_size();return{width:e?.[0]??0,height:e?.[1]??0}}getLayerBoundingBox(e){let t=this._dotLottieCore?.get_layer_bounds(e);if(t&&t.length===8)return Array.from(t)}static transformThemeToLottieSlots(e,t){return``}stateMachineLoad(e){return this._dotLottieCore?this._dotLottieCore.state_machine_load_from_id(e):!1}stateMachineLoadData(e){return this._dotLottieCore?this._dotLottieCore.state_machine_load(e):!1}stateMachineSetConfig(e){this._stateMachineConfig=e}stateMachineStart(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),e&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),e}stateMachineStop(){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.sm_stop();return this._drainSmEvents(),e&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.is_playing()||this._stopAnimationLoop()),e}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??``}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??``}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??``}stateMachineOverrideState(e,t=!1){return this._dotLottieCore?.sm_override_current_state(e,t)??!1}stateMachineGet(e){return this._dotLottieCore?.get_state_machine(e)??``}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let e=this._dotLottieCore.sm_framework_setup();return Array.isArray(e)?e:[]}stateMachineSetBooleanInput(e,t){return this._dotLottieCore?.sm_set_boolean_input(e,t)??!1}stateMachineSetNumericInput(e,t){return this._dotLottieCore?.sm_set_numeric_input(e,t)??!1}stateMachineSetStringInput(e,t){return this._dotLottieCore?.sm_set_string_input(e,t)??!1}stateMachineGetBooleanInput(e){return this._dotLottieCore?.sm_get_boolean_input(e)??void 0}stateMachineGetNumericInput(e){return this._dotLottieCore?.sm_get_numeric_input(e)??void 0}stateMachineGetStringInput(e){return this._dotLottieCore?.sm_get_string_input(e)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let e=this._dotLottieCore.sm_get_inputs();return Array.isArray(e)?e:[]}stateMachineFireEvent(e){this._dotLottieCore?.sm_fire(e)}stateMachinePostClickEvent(e,t){this._dotLottieCore?.sm_post_click(e,t)}stateMachinePostPointerUpEvent(e,t){this._dotLottieCore?.sm_post_pointer_up(e,t)}stateMachinePostPointerDownEvent(e,t){this._dotLottieCore?.sm_post_pointer_down(e,t)}stateMachinePostPointerMoveEvent(e,t){this._dotLottieCore?.sm_post_pointer_move(e,t)}stateMachinePostPointerEnterEvent(e,t){this._dotLottieCore?.sm_post_pointer_enter(e,t)}stateMachinePostPointerExitEvent(e,t){this._dotLottieCore?.sm_post_pointer_exit(e,t)}_onClick(e){let t=x4(e);t&&this.stateMachinePostClickEvent(t.x,t.y)}_onPointerUp(e){let t=x4(e);t&&this.stateMachinePostPointerUpEvent(t.x,t.y)}_onPointerDown(e){let t=x4(e);t&&this.stateMachinePostPointerDownEvent(t.x,t.y)}_onPointerMove(e){let t=x4(e);t&&this.stateMachinePostPointerMoveEvent(t.x,t.y)}_onPointerEnter(e){let t=x4(e);t&&this.stateMachinePostPointerEnterEvent(t.x,t.y)}_onPointerLeave(e){let t=x4(e);t&&this.stateMachinePostPointerExitEvent(t.x,t.y)}_setupStateMachineListeners(){if(o4&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieCore!==null&&this.isLoaded){let e=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),e.includes(`Click`)&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener(`click`,this._boundOnClick)),e.includes(`PointerUp`)&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener(`pointerup`,this._boundOnPointerUp)),e.includes(`PointerDown`)&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener(`pointerdown`,this._boundOnPointerDown)),e.includes(`PointerMove`)&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener(`pointermove`,this._boundOnPointerMove)),e.includes(`PointerEnter`)&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener(`pointerenter`,this._boundOnPointerEnter)),e.includes(`PointerExit`)&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener(`pointerleave`,this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){o4&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&=(this._canvas.removeEventListener(`click`,this._boundOnClick),null),this._boundOnPointerUp&&=(this._canvas.removeEventListener(`pointerup`,this._boundOnPointerUp),null),this._boundOnPointerDown&&=(this._canvas.removeEventListener(`pointerdown`,this._boundOnPointerDown),null),this._boundOnPointerMove&&=(this._canvas.removeEventListener(`pointermove`,this._boundOnPointerMove),null),this._boundOnPointerEnter&&=(this._canvas.removeEventListener(`pointerenter`,this._boundOnPointerEnter),null),this._boundOnPointerLeave&&=(this._canvas.removeEventListener(`pointerleave`,this._boundOnPointerLeave),null))}},O7t=class{constructor(){if(typeof Worker>`u`)throw Error(`Worker is not supported in this environment.`);let e=new Blob([new Uint8Array([34,117,115,101,32,115,116,114,105,99,116,34,59,40,40,41,61,62,123,118,97,114,32,111,116,61,79,98,106,101,99,116,46,100,101,102,105,110,101,80,114,111,112,101,114,116,121,59,118,97,114,32,115,116,61,40,110,44,116,44,101,41,61,62,116,32,105,110,32,110,63,111,116,40,110,44,116,44,123,101,110,117,109,101,114,97,98,108,101,58,33,48,44,99,111,110,102,105,103,117,114,97,98,108,101,58,33,48,44,119,114,105,116,97,98,108,101,58,33,48,44,118,97,108,117,101,58,101,125,41,58,110,91,116,93,61,101,59,118,97,114,32,108,61,40,110,44,116,44,101,41,61,62,115,116,40,110,44,116,121,112,101,111,102,32,116,33,61,34,115,121,109,98,111,108,34,63,116,43,34,34,58,116,44,101,41,59,118,97,114,32,70,61,99,108,97,115,115,123,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,123,114,101,116,117,114,110,32,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,125,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,123,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,125,125,44,79,61,99,108,97,115,115,123,99,111,110,115,116,114,117,99,116,111,114,40,41,123,108,40,116,104,105,115,44,34,95,108,97,115,116,72,97,110,100,108,101,73,100,34,44,48,41,59,108,40,116,104,105,115,44,34,95,108,97,115,116,73,109,109,101,100,105,97,116,101,34,44,110,117,108,108,41,125,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,62,61,78,117,109,98,101,114,46,77,65,88,95,83,65,70,69,95,73,78,84,69,71,69,82,38,38,40,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,61,48,41,44,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,43,61,49,44,116,104,105,115,46,95,108,97,115,116,73,109,109,101,100,105,97,116,101,61,115,101,116,73,109,109,101,100,105,97,116,101,40,40,41,61,62,123,116,40,68,97,116,101,46,110,111,119,40,41,41,125,41,44,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,125,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,123,116,104,105,115,46,95,108,97,115,116,73,109,109,101,100,105,97,116,101,38,38,99,108,101,97,114,73,109,109,101,100,105,97,116,101,40,116,104,105,115,46,95,108,97,115,116,73,109,109,101,100,105,97,116,101,41,125,125,44,82,61,99,108,97,115,115,123,99,111,110,115,116,114,117,99,116,111,114,40,41,123,108,40,116,104,105,115,44,34,95,115,116,114,97,116,101,103,121,34,41,59,116,104,105,115,46,95,115,116,114,97,116,101,103,121,61,116,121,112,101,111,102,32,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,61,61,34,102,117,110,99,116,105,111,110,34,63,110,101,119,32,70,58,110,101,119,32,79,125,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,115,116,114,97,116,101,103,121,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,125,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,123,116,104,105,115,46,95,115,116,114,97,116,101,103,121,46,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,41,125,125,59,118,97,114,32,102,61,116,121,112,101,111,102,32,119,105,110,100,111,119,60,34,117,34,38,38,116,121,112,101,111,102,32,119,105,110,100,111,119,46,100,111,99,117,109,101,110,116,60,34,117,34,59,118,97,114,32,84,61,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,91,56,48,44,55,53,44,51,44,52,93,41,44,72,61,91,34,118,34,44,34,105,112,34,44,34,111,112,34,44,34,108,97,121,101,114,115,34,44,34,102,114,34,44,34,119,34,44,34,104,34,93,44,122,61,34,48,46,55,48,46,48,34,44,68,61,34,64,108,111,116,116,105,101,102,105,108,101,115,47,100,111,116,108,111,116,116,105,101,45,119,101,98,34,44,74,61,46,55,53,44,106,61,52,59,118,97,114,32,111,44,89,61,116,121,112,101,111,102,32,84,101,120,116,68,101,99,111,100,101,114,60,34,117,34,63,110,101,119,32,84,101,120,116,68,101,99,111,100,101,114,40,34,117,116,102,45,56,34,44,123,105,103,110,111,114,101,66,79,77,58,33,48,44,102,97,116,97,108,58,33,48,125,41,58,123,100,101,99,111,100,101,58,40,41,61,62,123,116,104,114,111,119,32,69,114,114,111,114,40,34,84,101,120,116,68,101,99,111,100,101,114,32,110,111,116,32,97,118,97,105,108,97,98,108,101,34,41,125,125,59,116,121,112,101,111,102,32,84,101,120,116,68,101,99,111,100,101,114,60,34,117,34,38,38,89,46,100,101,99,111,100,101,40,41,59,118,97,114,32,67,61,110,117,108,108,59,102,117,110,99,116,105,111,110,32,120,40,41,123,114,101,116,117,114,110,40,67,61,61,61,110,117,108,108,124,124,67,46,98,121,116,101,76,101,110,103,116,104,61,61,61,48,41,38,38,40,67,61,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,111,46,109,101,109,111,114,121,46,98,117,102,102,101,114,41,41,44,67,125,102,117,110,99,116,105,111,110,32,117,40,110,44,116,41,123,114,101,116,117,114,110,32,110,61,110,62,62,62,48,44,89,46,100,101,99,111,100,101,40,120,40,41,46,115,117,98,97,114,114,97,121,40,110,44,110,43,116,41,41,125,102,117,110,99,116,105,111,110,32,88,40,110,41,123,108,101,116,32,116,61,111,46,95,95,101,120,116,101,114,110,114,101,102,95,116,97,98,108,101,95,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,41,59,114,101,116,117,114,110,32,111,46,95,95,119,98,105,110,100,103,101,110,95,101,120,112,111,114,116,95,51,46,115,101,116,40,116,44,110,41,44,116,125,102,117,110,99,116,105,111,110,32,105,116,40,110,44,116,41,123,116,114,121,123,114,101,116,117,114,110,32,110,46,97,112,112,108,121,40,116,104,105,115,44,116,41,125,99,97,116,99,104,40,101,41,123,108,101,116,32,114,61,88,40,101,41,59,111,46,95,95,119,98,105,110,100,103,101,110,95,101,120,110,95,115,116,111,114,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,114,41,125,125,118,97,114,32,99,61,48,44,80,61,116,121,112,101,111,102,32,84,101,120,116,69,110,99,111,100,101,114,60,34,117,34,63,110,101,119,32,84,101,120,116,69,110,99,111,100,101,114,40,34,117,116,102,45,56,34,41,58,123,101,110,99,111,100,101,58,40,41,61,62,123,116,104,114,111,119,32,69,114,114,111,114,40,34,84,101,120,116,69,110,99,111,100,101,114,32,110,111,116,32,97,118,97,105,108,97,98,108,101,34,41,125,125,44,97,116,61,116,121,112,101,111,102,32,80,46,101,110,99,111,100,101,73,110,116,111,61,61,34,102,117,110,99,116,105,111,110,34,63,102,117,110,99,116,105,111,110,40,110,44,116,41,123,114,101,116,117,114,110,32,80,46,101,110,99,111,100,101,73,110,116,111,40,110,44,116,41,125,58,102,117,110,99,116,105,111,110,40,110,44,116,41,123,108,101,116,32,101,61,80,46,101,110,99,111,100,101,40,110,41,59,114,101,116,117,114,110,32,116,46,115,101,116,40,101,41,44,123,114,101,97,100,58,110,46,108,101,110,103,116,104,44,119,114,105,116,116,101,110,58,101,46,108,101,110,103,116,104,125,125,59,102,117,110,99,116,105,111,110,32,100,40,110,44,116,44,101,41,123,105,102,40,101,61,61,61,118,111,105,100,32,48,41,123,108,101,116,32,112,61,80,46,101,110,99,111,100,101,40,110,41,44,103,61,116,40,112,46,108,101,110,103,116,104,44,49,41,62,62,62,48,59,114,101,116,117,114,110,32,120,40,41,46,115,117,98,97,114,114,97,121,40,103,44,103,43,112,46,108,101,110,103,116,104,41,46,115,101,116,40,112,41,44,99,61,112,46,108,101,110,103,116,104,44,103,125,108,101,116,32,114,61,110,46,108,101,110,103,116,104,44,115,61,116,40,114,44,49,41,62,62,62,48,44,105,61,120,40,41,44,95,61,48,59,102,111,114,40,59,95,60,114,59,95,43,43,41,123,108,101,116,32,112,61,110,46,99,104,97,114,67,111,100,101,65,116,40,95,41,59,105,102,40,112,62,49,50,55,41,98,114,101,97,107,59,105,91,115,43,95,93,61,112,125,105,102,40,95,33,61,61,114,41,123,95,33,61,61,48,38,38,40,110,61,110,46,115,108,105,99,101,40,95,41,41,44,115,61,101,40,115,44,114,44,114,61,95,43,110,46,108,101,110,103,116,104,42,51,44,49,41,62,62,62,48,59,108,101,116,32,112,61,120,40,41,46,115,117,98,97,114,114,97,121,40,115,43,95,44,115,43,114,41,44,103,61,97,116,40,110,44,112,41,59,95,43,61,103,46,119,114,105,116,116,101,110,44,115,61,101,40,115,44,114,44,95,44,49,41,62,62,62,48,125,114,101,116,117,114,110,32,99,61,95,44,115,125,118,97,114,32,121,61,110,117,108,108,59,102,117,110,99,116,105,111,110,32,76,40,41,123,114,101,116,117,114,110,40,121,61,61,61,110,117,108,108,124,124,121,46,98,117,102,102,101,114,46,100,101,116,97,99,104,101,100,61,61,61,33,48,124,124,121,46,98,117,102,102,101,114,46,100,101,116,97,99,104,101,100,61,61,61,118,111,105,100,32,48,38,38,121,46,98,117,102,102,101,114,33,61,61,111,46,109,101,109,111,114,121,46,98,117,102,102,101,114,41,38,38,40,121,61,110,101,119,32,68,97,116,97,86,105,101,119,40,111,46,109,101,109,111,114,121,46,98,117,102,102,101,114,41,41,44,121,125,102,117,110,99,116,105,111,110,32,95,116,40,110,41,123,114,101,116,117,114,110,32,110,61,61,110,117,108,108,125,118,97,114,32,73,61,110,117,108,108,59,102,117,110,99,116,105,111,110,32,99,116,40,41,123,114,101,116,117,114,110,40,73,61,61,61,110,117,108,108,124,124,73,46,98,121,116,101,76,101,110,103,116,104,61,61,61,48,41,38,38,40,73,61,110,101,119,32,70,108,111,97,116,51,50,65,114,114,97,121,40,111,46,109,101,109,111,114,121,46,98,117,102,102,101,114,41,41,44,73,125,102,117,110,99,116,105,111,110,32,100,116,40,110,44,116,41,123,108,101,116,32,101,61,116,40,110,46,108,101,110,103,116,104,42,52,44,52,41,62,62,62,48,59,114,101,116,117,114,110,32,99,116,40,41,46,115,101,116,40,110,44,101,47,52,41,44,99,61,110,46,108,101,110,103,116,104,44,101,125,102,117,110,99,116,105,111,110,32,66,40,110,44,116,41,123,108,101,116,32,101,61,116,40,110,46,108,101,110,103,116,104,42,49,44,49,41,62,62,62,48,59,114,101,116,117,114,110,32,120,40,41,46,115,101,116,40,110,44,101,47,49,41,44,99,61,110,46,108,101,110,103,116,104,44,101,125,102,117,110,99,116,105,111,110,32,108,116,40,110,44,116,41,123,108,101,116,32,101,61,116,40,110,46,108,101,110,103,116,104,42,52,44,52,41,62,62,62,48,59,102,111,114,40,108,101,116,32,114,61,48,59,114,60,110,46,108,101,110,103,116,104,59,114,43,43,41,123,108,101,116,32,115,61,88,40,110,91,114,93,41,59,76,40,41,46,115,101,116,85,105,110,116,51,50,40,101,43,52,42,114,44,115,44,33,48,41,125,114,101,116,117,114,110,32,99,61,110,46,108,101,110,103,116,104,44,101,125,102,117,110,99,116,105,111,110,32,90,40,110,44,116,41,123,108,101,116,32,101,61,100,40,110,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,44,115,61,66,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,114,101,103,105,115,116,101,114,95,102,111,110,116,40,101,44,114,44,115,44,105,41,33,61,61,48,125,118,97,114,32,118,61,79,98,106,101,99,116,46,102,114,101,101,122,101,40,123,70,111,114,119,97,114,100,58,48,44,48,58,34,70,111,114,119,97,114,100,34,44,82,101,118,101,114,115,101,58,49,44,49,58,34,82,101,118,101,114,115,101,34,44,66,111,117,110,99,101,58,50,44,50,58,34,66,111,117,110,99,101,34,44,82,101,118,101,114,115,101,66,111,117,110,99,101,58,51,44,51,58,34,82,101,118,101,114,115,101,66,111,117,110,99,101,34,125,41,44,75,61,116,121,112,101,111,102,32,70,105,110,97,108,105,122,97,116,105,111,110,82,101,103,105,115,116,114,121,62,34,117,34,63,123,114,101,103,105,115,116,101,114,58,40,41,61,62,123,125,44,117,110,114,101,103,105,115,116,101,114,58,40,41,61,62,123,125,125,58,110,101,119,32,70,105,110,97,108,105,122,97,116,105,111,110,82,101,103,105,115,116,114,121,40,110,61,62,111,46,95,95,119,98,103,95,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,102,114,101,101,40,110,62,62,62,48,44,49,41,41,44,107,61,99,108,97,115,115,123,95,95,100,101,115,116,114,111,121,95,105,110,116,111,95,114,97,119,40,41,123,108,101,116,32,116,61,116,104,105,115,46,95,95,119,98,103,95,112,116,114,59,114,101,116,117,114,110,32,116,104,105,115,46,95,95,119,98,103,95,112,116,114,61,48,44,75,46,117,110,114,101,103,105,115,116,101,114,40,116,104,105,115,41,44,116,125,102,114,101,101,40,41,123,108,101,116,32,116,61,116,104,105,115,46,95,95,100,101,115,116,114,111,121,95,105,110,116,111,95,114,97,119,40,41,59,111,46,95,95,119,98,103,95,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,102,114,101,101,40,116,44,48,41,125,99,108,101,97,114,95,115,108,111,116,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,108,101,97,114,95,115,108,111,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,105,115,95,112,108,97,121,105,110,103,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,105,115,95,112,108,97,121,105,110,103,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,105,115,95,115,116,111,112,112,101,100,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,105,115,95,115,116,111,112,112,101,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,108,97,121,111,117,116,95,102,105,116,40,41,123,108,101,116,32,116,44,101,59,116,114,121,123,108,101,116,32,114,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,97,121,111,117,116,95,102,105,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,59,114,101,116,117,114,110,32,116,61,114,91,48,93,44,101,61,114,91,49,93,44,117,40,114,91,48,93,44,114,91,49,93,41,125,102,105,110,97,108,108,121,123,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,44,101,44,49,41,125,125,108,111,111,112,95,99,111,117,110,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,111,111,112,95,99,111,117,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,62,62,62,48,125,112,111,108,108,95,101,118,101,110,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,112,111,108,108,95,101,118,101,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,114,101,115,101,116,95,115,108,111,116,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,114,101,115,101,116,95,115,108,111,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,115,101,116,95,108,97,121,111,117,116,40,116,44,101,44,114,41,123,108,101,116,32,115,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,108,97,121,111,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,115,44,105,44,101,44,114,41,33,61,61,48,125,115,101,116,95,109,97,114,107,101,114,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,109,97,114,107,101,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,125,99,108,101,97,114,95,115,108,111,116,115,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,108,101,97,114,95,115,108,111,116,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,104,97,115,95,115,101,103,109,101,110,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,104,97,115,95,115,101,103,109,101,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,105,115,95,99,111,109,112,108,101,116,101,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,105,115,95,99,111,109,112,108,101,116,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,105,115,95,116,119,101,101,110,105,110,103,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,105,115,95,116,119,101,101,110,105,110,103,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,114,101,115,101,116,95,115,108,111,116,115,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,114,101,115,101,116,95,115,108,111,116,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,114,101,115,101,116,95,116,104,101,109,101,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,114,101,115,101,116,95,116,104,101,109,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,115,101,103,109,101,110,116,95,101,110,100,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,103,109,101,110,116,95,101,110,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,101,116,95,113,117,97,108,105,116,121,40,116,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,113,117,97,108,105,116,121,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,33,61,61,48,125,115,101,116,95,115,101,103,109,101,110,116,40,116,44,101,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,115,101,103,109,101,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,33,61,61,48,125,115,116,97,116,105,99,32,117,110,108,111,97,100,95,102,111,110,116,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,117,110,108,111,97,100,95,102,111,110,116,40,101,44,114,41,33,61,61,48,125,97,110,105,109,97,116,105,111,110,95,105,100,40,41,123,108,101,116,32,116,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,97,110,105,109,97,116,105,111,110,95,105,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,44,101,59,114,101,116,117,114,110,32,116,91,48,93,33,61,61,48,38,38,40,101,61,117,40,116,91,48,93,44,116,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,91,48,93,44,116,91,49,93,42,49,44,49,41,41,44,101,125,99,108,101,97,114,95,109,97,114,107,101,114,40,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,108,101,97,114,95,109,97,114,107,101,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,101,109,105,116,95,111,110,95,108,111,111,112,40,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,101,109,105,116,95,111,110,95,108,111,111,112,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,103,101,116,95,115,108,111,116,95,105,100,115,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,115,108,111,116,95,105,100,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,103,101,116,95,115,108,111,116,95,115,116,114,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,44,115,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,115,108,111,116,95,115,116,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,44,105,59,114,101,116,117,114,110,32,115,91,48,93,33,61,61,48,38,38,40,105,61,117,40,115,91,48,93,44,115,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,115,91,48,93,44,115,91,49,93,42,49,44,49,41,41,44,105,125,109,97,114,107,101,114,95,110,97,109,101,115,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,109,97,114,107,101,114,95,110,97,109,101,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,101,116,95,97,117,116,111,112,108,97,121,40,116,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,97,117,116,111,112,108,97,121,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,125,115,101,116,95,115,108,111,116,95,115,116,114,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,44,105,61,100,40,101,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,95,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,115,108,111,116,95,115,116,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,105,44,95,41,33,61,61,48,125,115,101,116,95,118,105,101,119,112,111,114,116,40,116,44,101,44,114,44,115,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,118,105,101,119,112,111,114,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,44,114,44,115,41,33,61,61,48,125,116,111,116,97,108,95,102,114,97,109,101,115,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,116,111,116,97,108,95,102,114,97,109,101,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,99,108,101,97,114,95,115,101,103,109,101,110,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,108,101,97,114,95,115,101,103,109,101,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,99,117,114,114,101,110,116,95,102,114,97,109,101,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,117,114,114,101,110,116,95,102,114,97,109,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,103,101,116,95,115,108,111,116,95,116,121,112,101,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,44,115,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,115,108,111,116,95,116,121,112,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,44,105,59,114,101,116,117,114,110,32,115,91,48,93,33,61,61,48,38,38,40,105,61,117,40,115,91,48,93,44,115,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,115,91,48,93,44,115,91,49,93,42,49,44,49,41,41,44,105,125,103,101,116,95,115,108,111,116,115,95,115,116,114,40,41,123,108,101,116,32,116,44,101,59,116,114,121,123,108,101,116,32,114,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,115,108,111,116,115,95,115,116,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,59,114,101,116,117,114,110,32,116,61,114,91,48,93,44,101,61,114,91,49,93,44,117,40,114,91,48,93,44,114,91,49,93,41,125,102,105,110,97,108,108,121,123,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,44,101,44,49,41,125,125,103,101,116,95,116,114,97,110,115,102,111,114,109,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,116,114,97,110,115,102,111,114,109,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,114,101,113,117,101,115,116,95,102,114,97,109,101,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,114,101,113,117,101,115,116,95,102,114,97,109,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,101,103,109,101,110,116,95,115,116,97,114,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,103,109,101,110,116,95,115,116,97,114,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,101,116,95,115,108,111,116,115,95,115,116,114,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,115,108,111,116,115,95,115,116,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,115,101,116,95,116,101,120,116,95,115,108,111,116,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,44,105,61,100,40,101,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,95,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,116,101,120,116,95,115,108,111,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,105,44,95,41,33,61,61,48,125,115,101,116,95,116,114,97,110,115,102,111,114,109,40,116,41,123,108,101,116,32,101,61,100,116,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,116,114,97,110,115,102,111,114,109,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,115,109,95,103,101,116,95,105,110,112,117,116,115,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,103,101,116,95,105,110,112,117,116,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,109,95,112,111,108,108,95,101,118,101,110,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,108,108,95,101,118,101,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,109,95,112,111,115,116,95,99,108,105,99,107,40,116,44,101,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,115,116,95,99,108,105,99,107,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,125,97,110,105,109,97,116,105,111,110,95,115,105,122,101,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,97,110,105,109,97,116,105,111,110,95,115,105,122,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,99,117,114,114,101,110,116,95,109,97,114,107,101,114,40,41,123,108,101,116,32,116,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,117,114,114,101,110,116,95,109,97,114,107,101,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,44,101,59,114,101,116,117,114,110,32,116,91,48,93,33,61,61,48,38,38,40,101,61,117,40,116,91,48,93,44,116,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,91,48,93,44,116,91,49,93,42,49,44,49,41,41,44,101,125,108,97,121,111,117,116,95,97,108,105,103,110,95,120,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,97,121,111,117,116,95,97,108,105,103,110,95,120,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,108,97,121,111,117,116,95,97,108,105,103,110,95,121,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,97,121,111,117,116,95,97,108,105,103,110,95,121,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,108,111,97,100,95,97,110,105,109,97,116,105,111,110,40,116,44,101,44,114,41,123,108,101,116,32,115,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,111,97,100,95,97,110,105,109,97,116,105,111,110,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,115,44,105,44,101,44,114,41,33,61,61,48,125,108,111,111,112,95,97,110,105,109,97,116,105,111,110,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,111,111,112,95,97,110,105,109,97,116,105,111,110,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,115,101,116,95,99,111,108,111,114,95,115,108,111,116,40,116,44,101,44,114,44,115,41,123,108,101,116,32,105,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,95,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,99,111,108,111,114,95,115,108,111,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,105,44,95,44,101,44,114,44,115,41,33,61,61,48,125,115,101,116,95,108,111,111,112,95,99,111,117,110,116,40,116,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,108,111,111,112,95,99,111,117,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,125,115,101,116,95,116,104,101,109,101,95,100,97,116,97,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,116,104,101,109,101,95,100,97,116,97,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,115,109,95,114,101,115,101,116,95,105,110,112,117,116,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,114,101,115,101,116,95,105,110,112,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,125,109,97,110,105,102,101,115,116,95,115,116,114,105,110,103,40,41,123,108,101,116,32,116,44,101,59,116,114,121,123,108,101,116,32,114,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,109,97,110,105,102,101,115,116,95,115,116,114,105,110,103,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,59,114,101,116,117,114,110,32,116,61,114,91,48,93,44,101,61,114,91,49,93,44,117,40,114,91,48,93,44,114,91,49,93,41,125,102,105,110,97,108,108,121,123,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,44,101,44,49,41,125,125,115,101,116,95,115,99,97,108,97,114,95,115,108,111,116,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,115,99,97,108,97,114,95,115,108,111,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,101,41,33,61,61,48,125,115,101,116,95,118,101,99,116,111,114,95,115,108,111,116,40,116,44,101,44,114,41,123,108,101,116,32,115,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,118,101,99,116,111,114,95,115,108,111,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,115,44,105,44,101,44,114,41,33,61,61,48,125,98,97,99,107,103,114,111,117,110,100,95,99,111,108,111,114,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,98,97,99,107,103,114,111,117,110,100,95,99,111,108,111,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,62,62,62,48,125,103,101,116,95,108,97,121,101,114,95,98,111,117,110,100,115,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,108,97,121,101,114,95,98,111,117,110,100,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,125,103,101,116,95,112,105,120,101,108,95,98,117,102,102,101,114,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,112,105,120,101,108,95,98,117,102,102,101,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,101,103,109,101,110,116,95,100,117,114,97,116,105,111,110,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,103,109,101,110,116,95,100,117,114,97,116,105,111,110,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,109,95,99,117,114,114,101,110,116,95,115,116,97,116,101,40,41,123,108,101,116,32,116,44,101,59,116,114,121,123,108,101,116,32,114,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,99,117,114,114,101,110,116,95,115,116,97,116,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,59,114,101,116,117,114,110,32,116,61,114,91,48,93,44,101,61,114,91,49,93,44,117,40,114,91,48,93,44,114,91,49,93,41,125,102,105,110,97,108,108,121,123,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,44,101,44,49,41,125,125,115,116,97,116,101,95,109,97,99,104,105,110,101,95,105,100,40,41,123,108,101,116,32,116,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,116,97,116,101,95,109,97,99,104,105,110,101,95,105,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,44,101,59,114,101,116,117,114,110,32,116,91,48,93,33,61,61,48,38,38,40,101,61,117,40,116,91,48,93,44,116,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,91,48,93,44,116,91,49,93,42,49,44,49,41,41,44,101,125,103,101,116,95,115,116,97,116,101,95,109,97,99,104,105,110,101,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,44,115,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,103,101,116,95,115,116,97,116,101,95,109,97,99,104,105,110,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,44,105,59,114,101,116,117,114,110,32,115,91,48,93,33,61,61,48,38,38,40,105,61,117,40,115,91,48,93,44,115,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,115,91,48,93,44,115,91,49,93,42,49,44,49,41,41,44,105,125,115,101,116,95,112,111,115,105,116,105,111,110,95,115,108,111,116,40,116,44,101,44,114,41,123,108,101,116,32,115,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,112,111,115,105,116,105,111,110,95,115,108,111,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,115,44,105,44,101,44,114,41,33,61,61,48,125,99,117,114,114,101,110,116,95,108,111,111,112,95,99,111,117,110,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,117,114,114,101,110,116,95,108,111,111,112,95,99,111,117,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,62,62,62,48,125,115,109,95,102,114,97,109,101,119,111,114,107,95,115,101,116,117,112,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,102,114,97,109,101,119,111,114,107,95,115,101,116,117,112,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,117,112,40,116,44,101,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,117,112,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,125,115,116,97,116,101,95,109,97,99,104,105,110,101,95,108,111,97,100,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,116,97,116,101,95,109,97,99,104,105,110,101,95,108,111,97,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,108,111,97,100,95,100,111,116,108,111,116,116,105,101,95,100,97,116,97,40,116,44,101,44,114,41,123,108,101,116,32,115,61,66,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,111,97,100,95,100,111,116,108,111,116,116,105,101,95,100,97,116,97,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,115,44,105,44,101,44,114,41,33,61,61,48,125,115,109,95,103,101,116,95,115,116,114,105,110,103,95,105,110,112,117,116,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,44,115,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,103,101,116,95,115,116,114,105,110,103,95,105,110,112,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,44,105,59,114,101,116,117,114,110,32,115,91,48,93,33,61,61,48,38,38,40,105,61,117,40,115,91,48,93,44,115,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,115,91,48,93,44,115,91,49,93,42,49,44,49,41,41,44,105,125,115,109,95,115,101,116,95,115,116,114,105,110,103,95,105,110,112,117,116,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,44,105,61,100,40,101,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,95,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,115,101,116,95,115,116,114,105,110,103,95,105,110,112,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,105,44,95,41,33,61,61,48,125,115,101,116,95,98,97,99,107,103,114,111,117,110,100,95,99,111,108,111,114,40,116,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,98,97,99,107,103,114,111,117,110,100,95,99,111,108,111,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,33,61,61,48,125,115,109,95,103,101,116,95,98,111,111,108,101,97,110,95,105,110,112,117,116,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,44,115,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,103,101,116,95,98,111,111,108,101,97,110,95,105,110,112,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,59,114,101,116,117,114,110,32,115,61,61,61,49,54,55,55,55,50,49,53,63,118,111,105,100,32,48,58,115,33,61,61,48,125,115,109,95,103,101,116,95,110,117,109,101,114,105,99,95,105,110,112,117,116,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,44,115,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,103,101,116,95,110,117,109,101,114,105,99,95,105,110,112,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,59,114,101,116,117,114,110,32,115,61,61,61,52,50,57,52,57,54,55,50,57,55,63,118,111,105,100,32,48,58,115,125,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,100,111,119,110,40,116,44,101,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,100,111,119,110,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,125,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,101,120,105,116,40,116,44,101,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,101,120,105,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,125,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,109,111,118,101,40,116,44,101,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,109,111,118,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,125,115,109,95,115,101,116,95,98,111,111,108,101,97,110,95,105,110,112,117,116,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,115,101,116,95,98,111,111,108,101,97,110,95,105,110,112,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,101,41,33,61,61,48,125,115,109,95,115,101,116,95,110,117,109,101,114,105,99,95,105,110,112,117,116,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,115,101,116,95,110,117,109,101,114,105,99,95,105,110,112,117,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,101,41,33,61,61,48,125,115,116,97,116,101,95,109,97,99,104,105,110,101,95,117,110,108,111,97,100,40,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,116,97,116,101,95,109,97,99,104,105,110,101,95,117,110,108,111,97,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,101,110,116,101,114,40,116,44,101,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,101,110,116,101,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,125,99,108,101,97,114,95,98,97,99,107,103,114,111,117,110,100,95,99,111,108,111,114,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,108,101,97,114,95,98,97,99,107,103,114,111,117,110,100,95,99,111,108,111,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,108,111,97,100,95,97,110,105,109,97,116,105,111,110,95,102,114,111,109,95,105,100,40,116,44,101,44,114,41,123,108,101,116,32,115,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,111,97,100,95,97,110,105,109,97,116,105,111,110,95,102,114,111,109,95,105,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,115,44,105,44,101,44,114,41,33,61,61,48,125,115,109,95,112,111,108,108,95,105,110,116,101,114,110,97,108,95,101,118,101,110,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,112,111,108,108,95,105,110,116,101,114,110,97,108,95,101,118,101,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,114,101,115,101,116,95,99,117,114,114,101,110,116,95,108,111,111,112,95,99,111,117,110,116,40,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,114,101,115,101,116,95,99,117,114,114,101,110,116,95,108,111,111,112,95,99,111,117,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,109,95,111,118,101,114,114,105,100,101,95,99,117,114,114,101,110,116,95,115,116,97,116,101,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,111,118,101,114,114,105,100,101,95,99,117,114,114,101,110,116,95,115,116,97,116,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,101,41,33,61,61,48,125,115,116,97,116,101,95,109,97,99,104,105,110,101,95,108,111,97,100,95,102,114,111,109,95,105,100,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,116,97,116,101,95,109,97,99,104,105,110,101,95,108,111,97,100,95,102,114,111,109,95,105,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,115,101,116,95,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,116,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,125,99,111,110,115,116,114,117,99,116,111,114,40,41,123,108,101,116,32,116,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,110,101,119,40,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,95,119,98,103,95,112,116,114,61,116,62,62,62,48,44,75,46,114,101,103,105,115,116,101,114,40,116,104,105,115,44,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,104,105,115,41,44,116,104,105,115,125,109,111,100,101,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,109,111,100,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,112,108,97,121,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,112,108,97,121,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,115,101,101,107,40,116,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,101,107,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,33,61,61,48,125,115,116,111,112,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,116,111,112,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,116,105,99,107,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,116,105,99,107,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,99,108,101,97,114,40,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,99,108,101,97,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,112,97,117,115,101,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,112,97,117,115,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,115,112,101,101,100,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,112,101,101,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,119,105,100,116,104,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,119,105,100,116,104,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,62,62,62,48,125,104,101,105,103,104,116,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,104,101,105,103,104,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,62,62,62,48,125,114,101,110,100,101,114,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,114,101,110,100,101,114,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,114,101,115,105,122,101,40,116,44,101,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,114,101,115,105,122,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,41,33,61,61,48,125,109,97,114,107,101,114,115,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,109,97,114,107,101,114,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,109,95,102,105,114,101,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,102,105,114,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,115,109,95,115,116,111,112,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,115,116,111,112,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,115,109,95,116,105,99,107,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,116,105,99,107,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,97,117,116,111,112,108,97,121,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,97,117,116,111,112,108,97,121,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,100,117,114,97,116,105,111,110,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,100,117,114,97,116,105,111,110,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,125,115,101,116,95,108,111,111,112,40,116,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,108,111,111,112,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,125,115,101,116,95,109,111,100,101,40,116,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,109,111,100,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,125,115,109,95,115,116,97,114,116,40,116,44,101,41,123,108,101,116,32,114,61,108,116,40,101,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,115,116,97,114,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,114,44,115,41,33,61,61,48,125,116,104,101,109,101,95,105,100,40,41,123,108,101,116,32,116,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,116,104,101,109,101,95,105,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,44,101,59,114,101,116,117,114,110,32,116,91,48,93,33,61,61,48,38,38,40,101,61,117,40,116,91,48,93,44,116,91,49,93,41,46,115,108,105,99,101,40,41,44,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,91,48,93,44,116,91,49,93,42,49,44,49,41,41,44,101,125,105,110,116,101,114,115,101,99,116,40,116,44,101,44,114,41,123,108,101,116,32,115,61,100,40,114,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,105,110,116,101,114,115,101,99,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,44,101,44,115,44,105,41,33,61,61,48,125,105,115,95,108,111,97,100,101,100,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,105,115,95,108,111,97,100,101,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,105,115,95,112,97,117,115,101,100,40,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,105,115,95,112,97,117,115,101,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,33,61,61,48,125,108,111,97,100,95,102,111,110,116,40,116,44,101,41,123,108,101,116,32,114,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,115,61,99,44,105,61,66,40,101,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,95,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,108,111,97,100,95,102,111,110,116,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,114,44,115,44,105,44,95,41,33,61,61,48,125,115,101,116,95,102,114,97,109,101,40,116,41,123,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,102,114,97,109,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,33,61,61,48,125,115,101,116,95,115,112,101,101,100,40,116,41,123,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,115,112,101,101,100,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,116,41,125,115,101,116,95,116,104,101,109,101,40,116,41,123,108,101,116,32,101,61,100,40,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,114,61,99,59,114,101,116,117,114,110,32,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,101,116,95,116,104,101,109,101,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,44,101,44,114,41,33,61,61,48,125,115,109,95,115,116,97,116,117,115,40,41,123,108,101,116,32,116,44,101,59,116,114,121,123,108,101,116,32,114,61,111,46,100,111,116,108,111,116,116,105,101,112,108,97,121,101,114,119,97,115,109,95,115,109,95,115,116,97,116,117,115,40,116,104,105,115,46,95,95,119,98,103,95,112,116,114,41,59,114,101,116,117,114,110,32,116,61,114,91,48,93,44,101,61,114,91,49,93,44,117,40,114,91,48,93,44,114,91,49,93,41,125,102,105,110,97,108,108,121,123,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,116,44,101,44,49,41,125,125,125,59,97,115,121,110,99,32,102,117,110,99,116,105,111,110,32,112,116,40,110,44,116,41,123,105,102,40,116,121,112,101,111,102,32,82,101,115,112,111,110,115,101,61,61,34,102,117,110,99,116,105,111,110,34,38,38,110,32,105,110,115,116,97,110,99,101,111,102,32,82,101,115,112,111,110,115,101,41,123,105,102,40,116,121,112,101,111,102,32,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,83,116,114,101,97,109,105,110,103,61,61,34,102,117,110,99,116,105,111,110,34,41,116,114,121,123,114,101,116,117,114,110,32,97,119,97,105,116,32,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,83,116,114,101,97,109,105,110,103,40,110,44,116,41,125,99,97,116,99,104,40,114,41,123,105,102,40,110,46,104,101,97,100,101,114,115,46,103,101,116,40,34,67,111,110,116,101,110,116,45,84,121,112,101,34,41,33,61,34,97,112,112,108,105,99,97,116,105,111,110,47,119,97,115,109,34,41,99,111,110,115,111,108,101,46,119,97,114,110,40,34,96,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,83,116,114,101,97,109,105,110,103,96,32,102,97,105,108,101,100,32,98,101,99,97,117,115,101,32,121,111,117,114,32,115,101,114,118,101,114,32,100,111,101,115,32,110,111,116,32,115,101,114,118,101,32,87,97,115,109,32,119,105,116,104,32,96,97,112,112,108,105,99,97,116,105,111,110,47,119,97,115,109,96,32,77,73,77,69,32,116,121,112,101,46,32,70,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32,96,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,96,32,119,104,105,99,104,32,105,115,32,115,108,111,119,101,114,46,32,79,114,105,103,105,110,97,108,32,101,114,114,111,114,58,92,110,34,44,114,41,59,101,108,115,101,32,116,104,114,111,119,32,114,125,108,101,116,32,101,61,97,119,97,105,116,32,110,46,97,114,114,97,121,66,117,102,102,101,114,40,41,59,114,101,116,117,114,110,32,97,119,97,105,116,32,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,40,101,44,116,41,125,101,108,115,101,123,108,101,116,32,101,61,97,119,97,105,116,32,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,40,110,44,116,41,59,114,101,116,117,114,110,32,101,32,105,110,115,116,97,110,99,101,111,102,32,87,101,98,65,115,115,101,109,98,108,121,46,73,110,115,116,97,110,99,101,63,123,105,110,115,116,97,110,99,101,58,101,44,109,111,100,117,108,101,58,110,125,58,101,125,125,102,117,110,99,116,105,111,110,32,104,116,40,41,123,108,101,116,32,110,61,123,125,59,114,101,116,117,114,110,32,110,46,119,98,103,61,123,125,44,110,46,119,98,103,46,95,95,119,98,103,95,98,117,102,102,101,114,95,54,48,57,99,99,51,101,101,101,53,49,101,100,49,53,56,61,102,117,110,99,116,105,111,110,40,116,41,123,114,101,116,117,114,110,32,116,46,98,117,102,102,101,114,125,44,110,46,119,98,103,46,95,95,119,98,103,95,101,114,114,111,114,95,55,53,51,52,98,56,101,57,97,51,54,102,49,97,98,52,61,102,117,110,99,116,105,111,110,40,116,44,101,41,123,108,101,116,32,114,44,115,59,116,114,121,123,114,61,116,44,115,61,101,44,99,111,110,115,111,108,101,46,101,114,114,111,114,40,117,40,116,44,101,41,41,125,102,105,110,97,108,108,121,123,111,46,95,95,119,98,105,110,100,103,101,110,95,102,114,101,101,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,40,114,44,115,44,49,41,125,125,44,110,46,119,98,103,46,95,95,119,98,103,95,110,101,119,95,52,48,53,101,50,50,102,51,57,48,53,55,54,99,101,50,61,102,117,110,99,116,105,111,110,40,41,123,114,101,116,117,114,110,32,110,101,119,32,79,98,106,101,99,116,125,44,110,46,119,98,103,46,95,95,119,98,103,95,110,101,119,95,55,56,102,101,98,49,48,56,98,54,52,55,50,55,49,51,61,102,117,110,99,116,105,111,110,40,41,123,114,101,116,117,114,110,32,110,101,119,32,65,114,114,97,121,125,44,110,46,119,98,103,46,95,95,119,98,103,95,110,101,119,95,56,97,54,102,50,51,56,97,54,101,99,101,56,54,101,97,61,102,117,110,99,116,105,111,110,40,41,123,114,101,116,117,114,110,32,110,101,119,32,69,114,114,111,114,125,44,110,46,119,98,103,46,95,95,119,98,103,95,110,101,119,119,105,116,104,98,121,116,101,111,102,102,115,101,116,97,110,100,108,101,110,103,116,104,95,100,57,55,101,54,51,55,101,98,101,49,52,53,97,57,97,61,102,117,110,99,116,105,111,110,40,116,44,101,44,114,41,123,114,101,116,117,114,110,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,116,44,101,62,62,62,48,44,114,62,62,62,48,41,125,44,110,46,119,98,103,46,95,95,119,98,103,95,110,101,119,119,105,116,104,108,101,110,103,116,104,95,53,97,53,101,102,101,51,49,51,99,102,100,53,57,102,49,61,102,117,110,99,116,105,111,110,40,116,41,123,114,101,116,117,114,110,32,110,101,119,32,70,108,111,97,116,51,50,65,114,114,97,121,40,116,62,62,62,48,41,125,44,110,46,119,98,103,46,95,95,119,98,103,95,110,111,119,95,56,48,55,101,53,52,99,51,57,54,51,54,99,51,52,57,61,102,117,110,99,116,105,111,110,40,41,123,114,101,116,117,114,110,32,68,97,116,101,46,110,111,119,40,41,125,44,110,46,119,98,103,46,95,95,119,98,103,95,112,117,115,104,95,55,51,55,99,102,99,56,99,49,52,51,50,99,50,99,54,61,102,117,110,99,116,105,111,110,40,116,44,101,41,123,114,101,116,117,114,110,32,116,46,112,117,115,104,40,101,41,125,44,110,46,119,98,103,46,95,95,119,98,103,95,115,101,116,95,98,98,56,99,101,99,102,54,97,54,50,98,57,102,52,54,61,102,117,110,99,116,105,111,110,40,41,123,114,101,116,117,114,110,32,105,116,40,102,117,110,99,116,105,111,110,40,116,44,101,44,114,41,123,114,101,116,117,114,110,32,82,101,102,108,101,99,116,46,115,101,116,40,116,44,101,44,114,41,125,44,97,114,103,117,109,101,110,116,115,41,125,44,110,46,119,98,103,46,95,95,119,98,103,95,115,101,116,105,110,100,101,120,95,52,101,55,51,97,102,100,99,100,57,98,98,57,53,99,100,61,102,117,110,99,116,105,111,110,40,116,44,101,44,114,41,123,116,91,101,62,62,62,48,93,61,114,125,44,110,46,119,98,103,46,95,95,119,98,103,95,115,116,97,99,107,95,48,101,100,55,53,100,54,56,53,55,53,98,48,102,51,99,61,102,117,110,99,116,105,111,110,40,116,44,101,41,123,108,101,116,32,114,61,101,46,115,116,97,99,107,44,115,61,100,40,114,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,105,61,99,59,76,40,41,46,115,101,116,73,110,116,51,50,40,116,43,52,42,49,44,105,44,33,48,41,44,76,40,41,46,115,101,116,73,110,116,51,50,40,116,43,52,42,48,44,115,44,33,48,41,125,44,110,46,119,98,103,46,95,95,119,98,105,110,100,103,101,110,95,105,110,105,116,95,101,120,116,101,114,110,114,101,102,95,116,97,98,108,101,61,102,117,110,99,116,105,111,110,40,41,123,108,101,116,32,116,61,111,46,95,95,119,98,105,110,100,103,101,110,95,101,120,112,111,114,116,95,51,44,101,61,116,46,103,114,111,119,40,52,41,59,116,46,115,101,116,40,48,44,118,111,105,100,32,48,41,44,116,46,115,101,116,40,101,43,48,44,118,111,105,100,32,48,41,44,116,46,115,101,116,40,101,43,49,44,110,117,108,108,41,44,116,46,115,101,116,40,101,43,50,44,33,48,41,44,116,46,115,101,116,40,101,43,51,44,33,49,41,125,44,110,46,119,98,103,46,95,95,119,98,105,110,100,103,101,110,95,109,101,109,111,114,121,61,102,117,110,99,116,105,111,110,40,41,123,114,101,116,117,114,110,32,111,46,109,101,109,111,114,121,125,44,110,46,119,98,103,46,95,95,119,98,105,110,100,103,101,110,95,110,117,109,98,101,114,95,110,101,119,61,102,117,110,99,116,105,111,110,40,116,41,123,114,101,116,117,114,110,32,116,125,44,110,46,119,98,103,46,95,95,119,98,105,110,100,103,101,110,95,115,116,114,105,110,103,95,103,101,116,61,102,117,110,99,116,105,111,110,40,116,44,101,41,123,108,101,116,32,114,61,101,44,115,61,116,121,112,101,111,102,32,114,61,61,34,115,116,114,105,110,103,34,63,114,58,118,111,105,100,32,48,59,118,97,114,32,105,61,95,116,40,115,41,63,48,58,100,40,115,44,111,46,95,95,119,98,105,110,100,103,101,110,95,109,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,44,111,46,95,95,119,98,105,110,100,103,101,110,95,114,101,97,108,108,111,99,95,99,111,109,109,97,110,100,95,101,120,112,111,114,116,41,44,95,61,99,59,76,40,41,46,115,101,116,73,110,116,51,50,40,116,43,52,42,49,44,95,44,33,48,41,44,76,40,41,46,115,101,116,73,110,116,51,50,40,116,43,52,42,48,44,105,44,33,48,41,125,44,110,46,119,98,103,46,95,95,119,98,105,110,100,103,101,110,95,115,116,114,105,110,103,95,110,101,119,61,102,117,110,99,116,105,111,110,40,116,44,101,41,123,114,101,116,117,114,110,32,117,40,116,44,101,41,125,44,110,46,119,98,103,46,95,95,119,98,105,110,100,103,101,110,95,116,104,114,111,119,61,102,117,110,99,116,105,111,110,40,116,44,101,41,123,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,117,40,116,44,101,41,41,125,44,110,125,102,117,110,99,116,105,111,110,32,117,116,40,110,44,116,41,123,114,101,116,117,114,110,32,111,61,110,46,101,120,112,111,114,116,115,44,81,46,95,95,119,98,105,110,100,103,101,110,95,119,97,115,109,95,109,111,100,117,108,101,61,116,44,121,61,110,117,108,108,44,73,61,110,117,108,108,44,67,61,110,117,108,108,44,111,46,95,95,119,98,105,110,100,103,101,110,95,115,116,97,114,116,40,41,44,111,125,97,115,121,110,99,32,102,117,110,99,116,105,111,110,32,81,40,110,41,123,105,102,40,111,33,61,61,118,111,105,100,32,48,41,114,101,116,117,114,110,32,111,59,105,102,40,116,121,112,101,111,102,32,110,60,34,117,34,38,38,40,79,98,106,101,99,116,46,103,101,116,80,114,111,116,111,116,121,112,101,79,102,40,110,41,61,61,61,79,98,106,101,99,116,46,112,114,111,116,111,116,121,112,101,63,123,109,111,100,117,108,101,95,111,114,95,112,97,116,104,58,110,125,61,110,58,99,111,110,115,111,108,101,46,119,97,114,110,40,34,117,115,105,110,103,32,100,101,112,114,101,99,97,116,101,100,32,112,97,114,97,109,101,116,101,114,115,32,102,111,114,32,116,104,101,32,105,110,105,116,105,97,108,105,122,97,116,105,111,110,32,102,117,110,99,116,105,111,110,59,32,112,97,115,115,32,97,32,115,105,110,103,108,101,32,111,98,106,101,99,116,32,105,110,115,116,101,97,100,34,41,41,44,116,121,112,101,111,102,32,110,62,34,117,34,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,87,65,83,77,32,109,111,100,117,108,101,32,85,82,76,32,109,117,115,116,32,98,101,32,112,114,111,118,105,100,101,100,32,118,105,97,32,68,111,116,76,111,116,116,105,101,87,97,115,109,76,111,97,100,101,114,32,111,114,32,115,101,116,87,97,115,109,85,114,108,40,41,46,34,41,59,108,101,116,32,116,61,104,116,40,41,59,40,116,121,112,101,111,102,32,110,61,61,34,115,116,114,105,110,103,34,124,124,116,121,112,101,111,102,32,82,101,113,117,101,115,116,61,61,34,102,117,110,99,116,105,111,110,34,38,38,110,32,105,110,115,116,97,110,99,101,111,102,32,82,101,113,117,101,115,116,124,124,116,121,112,101,111,102,32,85,82,76,61,61,34,102,117,110,99,116,105,111,110,34,38,38,110,32,105,110,115,116,97,110,99,101,111,102,32,85,82,76,41,38,38,40,110,61,102,101,116,99,104,40,110,41,41,59,108,101,116,123,105,110,115,116,97,110,99,101,58,101,44,109,111,100,117,108,101,58,114,125,61,97,119,97,105,116,32,112,116,40,97,119,97,105,116,32,110,44,116,41,59,114,101,116,117,114,110,32,117,116,40,101,44,114,41,125,118,97,114,32,113,61,81,59,118,97,114,32,65,61,99,108,97,115,115,123,99,111,110,115,116,114,117,99,116,111,114,40,41,123,108,40,116,104,105,115,44,34,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,34,44,110,101,119,32,77,97,112,41,125,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,44,101,41,123,108,101,116,32,114,61,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,103,101,116,40,116,41,59,114,124,124,40,114,61,110,101,119,32,83,101,116,44,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,115,101,116,40,116,44,114,41,41,44,114,46,97,100,100,40,101,41,125,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,44,101,41,123,108,101,116,32,114,61,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,103,101,116,40,116,41,59,114,38,38,40,101,63,40,114,46,100,101,108,101,116,101,40,101,41,44,114,46,115,105,122,101,61,61,61,48,38,38,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,100,101,108,101,116,101,40,116,41,41,58,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,100,101,108,101,116,101,40,116,41,41,125,100,105,115,112,97,116,99,104,40,116,41,123,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,103,101,116,40,116,46,116,121,112,101,41,63,46,102,111,114,69,97,99,104,40,114,61,62,114,40,116,41,41,125,114,101,109,111,118,101,65,108,108,69,118,101,110,116,76,105,115,116,101,110,101,114,115,40,41,123,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,99,108,101,97,114,40,41,125,125,59,118,97,114,32,109,61,99,108,97,115,115,32,109,123,115,116,97,116,105,99,32,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,123,105,102,40,109,46,95,111,98,115,101,114,118,101,114,41,114,101,116,117,114,110,59,108,101,116,32,116,61,101,61,62,123,101,46,102,111,114,69,97,99,104,40,114,61,62,123,108,101,116,32,115,61,109,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,103,101,116,40,114,46,116,97,114,103,101,116,41,59,115,38,38,40,114,46,105,115,73,110,116,101,114,115,101,99,116,105,110,103,63,115,46,117,110,102,114,101,101,122,101,40,41,58,115,46,102,114,101,101,122,101,40,41,41,125,41,125,59,109,46,95,111,98,115,101,114,118,101,114,61,110,101,119,32,73,110,116,101,114,115,101,99,116,105,111,110,79,98,115,101,114,118,101,114,40,116,44,123,116,104,114,101,115,104,111,108,100,58,48,125,41,125,115,116,97,116,105,99,32,111,98,115,101,114,118,101,40,116,44,101,41,123,109,46,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,44,33,109,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,104,97,115,40,116,41,38,38,40,109,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,101,116,40,116,44,101,41,44,109,46,95,111,98,115,101,114,118,101,114,63,46,111,98,115,101,114,118,101,40,116,41,41,125,115,116,97,116,105,99,32,117,110,111,98,115,101,114,118,101,40,116,41,123,109,46,95,111,98,115,101,114,118,101,114,63,46,117,110,111,98,115,101,114,118,101,40,116,41,44,109,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,100,101,108,101,116,101,40,116,41,44,109,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,105,122,101,61,61,61,48,38,38,40,109,46,95,111,98,115,101,114,118,101,114,63,46,100,105,115,99,111,110,110,101,99,116,40,41,44,109,46,95,111,98,115,101,114,118,101,114,61,110,117,108,108,41,125,125,59,108,40,109,44,34,95,111,98,115,101,114,118,101,114,34,44,110,117,108,108,41,44,108,40,109,44,34,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,34,44,110,101,119,32,77,97,112,41,59,118,97,114,32,119,61,109,59,118,97,114,32,104,61,99,108,97,115,115,32,104,123,115,116,97,116,105,99,32,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,123,105,102,40,104,46,95,111,98,115,101,114,118,101,114,41,114,101,116,117,114,110,59,108,101,116,32,116,61,101,61,62,123,101,46,102,111,114,69,97,99,104,40,114,61,62,123,108,101,116,32,115,61,104,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,103,101,116,40,114,46,116,97,114,103,101,116,41,59,105,102,40,33,115,41,114,101,116,117,114,110,59,108,101,116,91,105,44,95,93,61,115,59,99,108,101,97,114,84,105,109,101,111,117,116,40,95,41,59,108,101,116,32,112,61,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,123,105,46,114,101,115,105,122,101,40,41,125,44,49,48,48,41,59,104,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,101,116,40,114,46,116,97,114,103,101,116,44,91,105,44,112,93,41,125,41,125,59,104,46,95,111,98,115,101,114,118,101,114,61,110,101,119,32,82,101,115,105,122,101,79,98,115,101,114,118,101,114,40,116,41,125,115,116,97,116,105,99,32,111,98,115,101,114,118,101,40,116,44,101,41,123,104,46,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,44,33,104,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,104,97,115,40,116,41,38,38,40,104,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,101,116,40,116,44,91,101,44,48,93,41,44,104,46,95,111,98,115,101,114,118,101,114,63,46,111,98,115,101,114,118,101,40,116,41,41,125,115,116,97,116,105,99,32,117,110,111,98,115,101,114,118,101,40,116,41,123,108,101,116,32,101,61,104,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,103,101,116,40,116,41,59,105,102,40,101,41,123,108,101,116,32,114,61,101,91,49,93,59,114,38,38,99,108,101,97,114,84,105,109,101,111,117,116,40,114,41,125,104,46,95,111,98,115,101,114,118,101,114,63,46,117,110,111,98,115,101,114,118,101,40,116,41,44,104,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,100,101,108,101,116,101,40,116,41,44,33,104,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,105,122,101,38,38,104,46,95,111,98,115,101,114,118,101,114,38,38,40,104,46,95,111,98,115,101,114,118,101,114,46,100,105,115,99,111,110,110,101,99,116,40,41,44,104,46,95,111,98,115,101,114,118,101,114,61,110,117,108,108,41,125,125,59,108,40,104,44,34,95,111,98,115,101,114,118,101,114,34,44,110,117,108,108,41,44,108,40,104,44,34,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,34,44,110,101,119,32,77,97,112,41,59,118,97,114,32,98,61,104,59,102,117,110,99,116,105,111,110,32,109,116,40,110,41,123,114,101,116,117,114,110,47,94,35,40,91,92,100,97,45,102,93,123,54,125,124,91,92,100,97,45,102,93,123,56,125,41,36,47,105,117,46,116,101,115,116,40,110,41,125,102,117,110,99,116,105,111,110,32,101,116,40,110,41,123,105,102,40,33,109,116,40,110,41,41,114,101,116,117,114,110,32,48,59,108,101,116,32,116,61,110,46,114,101,112,108,97,99,101,40,34,35,34,44,34,34,41,59,114,101,116,117,114,110,32,116,61,116,46,108,101,110,103,116,104,61,61,61,54,63,96,36,123,116,125,102,102,96,58,116,44,112,97,114,115,101,73,110,116,40,116,44,49,54,41,125,102,117,110,99,116,105,111,110,32,36,40,110,41,123,105,102,40,110,46,98,121,116,101,76,101,110,103,116,104,60,52,41,114,101,116,117,114,110,33,49,59,108,101,116,32,116,61,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,110,46,115,108,105,99,101,40,48,44,84,46,98,121,116,101,76,101,110,103,116,104,41,41,59,102,111,114,40,108,101,116,32,101,61,48,59,101,60,84,46,108,101,110,103,116,104,59,101,43,61,49,41,105,102,40,84,91,101,93,33,61,61,116,91,101,93,41,114,101,116,117,114,110,33,49,59,114,101,116,117,114,110,33,48,125,102,117,110,99,116,105,111,110,32,116,116,40,110,41,123,114,101,116,117,114,110,32,72,46,101,118,101,114,121,40,116,61,62,79,98,106,101,99,116,46,104,97,115,79,119,110,40,110,44,116,41,41,125,102,117,110,99,116,105,111,110,32,86,40,110,41,123,105,102,40,116,121,112,101,111,102,32,110,61,61,34,115,116,114,105,110,103,34,41,116,114,121,123,114,101,116,117,114,110,32,116,116,40,74,83,79,78,46,112,97,114,115,101,40,110,41,41,125,99,97,116,99,104,123,114,101,116,117,114,110,33,49,125,101,108,115,101,32,114,101,116,117,114,110,32,116,116,40,110,41,125,102,117,110,99,116,105,111,110,32,78,40,41,123,114,101,116,117,114,110,32,49,43,40,40,102,63,119,105,110,100,111,119,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,58,49,41,45,49,41,42,74,125,102,117,110,99,116,105,111,110,32,83,40,110,41,123,108,101,116,32,116,61,110,46,103,101,116,66,111,117,110,100,105,110,103,67,108,105,101,110,116,82,101,99,116,40,41,44,101,61,119,105,110,100,111,119,46,105,110,110,101,114,72,101,105,103,104,116,124,124,100,111,99,117,109,101,110,116,46,100,111,99,117,109,101,110,116,69,108,101,109,101,110,116,46,99,108,105,101,110,116,72,101,105,103,104,116,44,114,61,119,105,110,100,111,119,46,105,110,110,101,114,87,105,100,116,104,124,124,100,111,99,117,109,101,110,116,46,100,111,99,117,109,101,110,116,69,108,101,109,101,110,116,46,99,108,105,101,110,116,87,105,100,116,104,59,114,101,116,117,114,110,33,40,116,46,98,111,116,116,111,109,60,48,124,124,116,46,116,111,112,62,101,124,124,116,46,114,105,103,104,116,60,48,124,124,116,46,108,101,102,116,62,114,41,125,102,117,110,99,116,105,111,110,32,69,40,110,41,123,108,101,116,32,116,61,110,46,116,97,114,103,101,116,59,105,102,40,116,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,123,108,101,116,32,101,61,116,46,103,101,116,66,111,117,110,100,105,110,103,67,108,105,101,110,116,82,101,99,116,40,41,59,105,102,40,101,46,119,105,100,116,104,61,61,61,48,124,124,101,46,104,101,105,103,104,116,61,61,61,48,124,124,116,46,119,105,100,116,104,61,61,61,48,124,124,116,46,104,101,105,103,104,116,61,61,61,48,41,114,101,116,117,114,110,32,110,117,108,108,59,108,101,116,32,114,61,116,46,119,105,100,116,104,47,101,46,119,105,100,116,104,44,115,61,116,46,104,101,105,103,104,116,47,101,46,104,101,105,103,104,116,44,105,61,40,110,46,99,108,105,101,110,116,88,45,101,46,108,101,102,116,41,42,114,44,95,61,40,110,46,99,108,105,101,110,116,89,45,101,46,116,111,112,41,42,115,59,114,101,116,117,114,110,33,78,117,109,98,101,114,46,105,115,70,105,110,105,116,101,40,105,41,124,124,33,78,117,109,98,101,114,46,105,115,70,105,110,105,116,101,40,95,41,124,124,78,117,109,98,101,114,46,105,115,78,97,78,40,105,41,124,124,78,117,109,98,101,114,46,105,115,78,97,78,40,95,41,63,110,117,108,108,58,123,120,58,105,44,121,58,95,125,125,114,101,116,117,114,110,32,110,117,108,108,125,102,117,110,99,116,105,111,110,32,110,116,40,110,41,123,108,101,116,32,116,61,110,46,114,101,112,108,97,99,101,40,34,79,112,101,110,85,114,108,58,32,34,44,34,34,41,44,101,61,116,46,105,110,100,101,120,79,102,40,34,32,124,32,84,97,114,103,101,116,58,32,34,41,44,114,44,115,59,101,61,61,61,45,49,63,40,114,61,116,44,115,61,34,95,98,108,97,110,107,34,41,58,40,114,61,116,46,115,117,98,115,116,114,105,110,103,40,48,44,101,41,44,115,61,116,46,115,117,98,115,116,114,105,110,103,40,101,43,49,49,41,41,44,119,105,110,100,111,119,46,111,112,101,110,40,114,44,115,41,125,102,117,110,99,116,105,111,110,32,114,116,40,110,44,116,44,101,41,123,108,101,116,32,114,61,110,117,108,108,44,115,61,116,59,114,101,116,117,114,110,123,108,111,97,100,40,41,123,114,101,116,117,114,110,32,114,124,124,40,114,61,110,40,123,109,111,100,117,108,101,95,111,114,95,112,97,116,104,58,115,125,41,46,116,104,101,110,40,40,41,61,62,123,125,41,46,99,97,116,99,104,40,97,115,121,110,99,32,105,61,62,123,99,111,110,115,111,108,101,46,119,97,114,110,40,96,80,114,105,109,97,114,121,32,87,65,83,77,32,108,111,97,100,32,102,97,105,108,101,100,32,102,114,111,109,32,36,123,115,125,58,32,36,123,105,46,109,101,115,115,97,103,101,125,96,41,44,99,111,110,115,111,108,101,46,119,97,114,110,40,96,65,116,116,101,109,112,116,105,110,103,32,116,111,32,108,111,97,100,32,87,65,83,77,32,102,114,111,109,32,98,97,99,107,117,112,32,85,82,76,58,32,36,123,101,125,96,41,59,116,114,121,123,97,119,97,105,116,32,110,40,123,109,111,100,117,108,101,95,111,114,95,112,97,116,104,58,101,125,41,125,99,97,116,99,104,40,95,41,123,116,104,114,111,119,32,99,111,110,115,111,108,101,46,101,114,114,111,114,40,96,80,114,105,109,97,114,121,32,87,65,83,77,32,85,82,76,32,102,97,105,108,101,100,58,32,36,123,105,46,109,101,115,115,97,103,101,125,96,41,44,99,111,110,115,111,108,101,46,101,114,114,111,114,40,96,66,97,99,107,117,112,32,87,65,83,77,32,85,82,76,32,102,97,105,108,101,100,58,32,36,123,95,46,109,101,115,115,97,103,101,125,96,41,44,114,61,110,117,108,108,44,110,101,119,32,69,114,114,111,114,40,34,87,65,83,77,32,108,111,97,100,105,110,103,32,102,97,105,108,101,100,32,102,114,111,109,32,97,108,108,32,115,111,117,114,99,101,115,46,34,41,125,125,41,41,44,114,125,44,115,101,116,87,97,115,109,85,114,108,40,105,41,123,105,33,61,61,115,38,38,40,115,61,105,44,114,61,110,117,108,108,41,125,125,125,118,97,114,32,85,61,114,116,40,113,44,96,104,116,116,112,115,58,47,47,99,100,110,46,106,115,100,101,108,105,118,114,46,110,101,116,47,110,112,109,47,36,123,68,125,64,36,123,122,125,47,100,105,115,116,47,100,111,116,108,111,116,116,105,101,45,112,108,97,121,101,114,46,119,97,115,109,96,44,96,104,116,116,112,115,58,47,47,117,110,112,107,103,46,99,111,109,47,36,123,68,125,64,36,123,122,125,47,100,105,115,116,47,100,111,116,108,111,116,116,105,101,45,112,108,97,121,101,114,46,119,97,115,109,96,41,44,87,61,110,61,62,123,115,119,105,116,99,104,40,110,41,123,99,97,115,101,34,114,101,118,101,114,115,101,34,58,114,101,116,117,114,110,32,118,46,82,101,118,101,114,115,101,59,99,97,115,101,34,98,111,117,110,99,101,34,58,114,101,116,117,114,110,32,118,46,66,111,117,110,99,101,59,99,97,115,101,34,114,101,118,101,114,115,101,45,98,111,117,110,99,101,34,58,114,101,116,117,114,110,32,118,46,82,101,118,101,114,115,101,66,111,117,110,99,101,59,100,101,102,97,117,108,116,58,114,101,116,117,114,110,32,118,46,70,111,114,119,97,114,100,125,125,44,102,116,61,110,61,62,123,115,119,105,116,99,104,40,110,41,123,99,97,115,101,32,118,46,82,101,118,101,114,115,101,58,114,101,116,117,114,110,34,114,101,118,101,114,115,101,34,59,99,97,115,101,32,118,46,66,111,117,110,99,101,58,114,101,116,117,114,110,34,98,111,117,110,99,101,34,59,99,97,115,101,32,118,46,82,101,118,101,114,115,101,66,111,117,110,99,101,58,114,101,116,117,114,110,34,114,101,118,101,114,115,101,45,98,111,117,110,99,101,34,59,100,101,102,97,117,108,116,58,114,101,116,117,114,110,34,102,111,114,119,97,114,100,34,125,125,44,103,116,61,110,61,62,123,115,119,105,116,99,104,40,110,41,123,99,97,115,101,34,99,111,110,116,97,105,110,34,58,114,101,116,117,114,110,34,99,111,110,116,97,105,110,34,59,99,97,115,101,34,99,111,118,101,114,34,58,114,101,116,117,114,110,34,99,111,118,101,114,34,59,99,97,115,101,34,102,105,108,108,34,58,114,101,116,117,114,110,34,102,105,108,108,34,59,99,97,115,101,34,102,105,116,45,104,101,105,103,104,116,34,58,114,101,116,117,114,110,34,102,105,116,45,104,101,105,103,104,116,34,59,99,97,115,101,34,102,105,116,45,119,105,100,116,104,34,58,114,101,116,117,114,110,34,102,105,116,45,119,105,100,116,104,34,59,99,97,115,101,34,110,111,110,101,34,58,114,101,116,117,114,110,34,110,111,110,101,34,59,100,101,102,97,117,108,116,58,114,101,116,117,114,110,34,99,111,110,116,97,105,110,34,125,125,44,77,61,99,108,97,115,115,123,99,111,110,115,116,114,117,99,116,111,114,40,116,41,123,108,40,116,104,105,115,44,34,95,99,97,110,118,97,115,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,112,101,110,100,105,110,103,76,111,97,100,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,99,111,110,116,101,120,116,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,101,118,101,110,116,77,97,110,97,103,101,114,34,41,59,108,40,116,104,105,115,44,34,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,102,114,97,109,101,77,97,110,97,103,101,114,34,41,59,108,40,116,104,105,115,44,34,95,100,111,116,76,111,116,116,105,101,67,111,114,101,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,115,116,97,116,101,77,97,99,104,105,110,101,73,100,34,44,34,34,41,59,108,40,116,104,105,115,44,34,95,115,116,97,116,101,77,97,99,104,105,110,101,67,111,110,102,105,103,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,34,44,33,49,41,59,108,40,116,104,105,115,44,34,95,114,101,110,100,101,114,67,111,110,102,105,103,34,44,123,125,41,59,108,40,116,104,105,115,44,34,95,105,115,70,114,111,122,101,110,34,44,33,49,41,59,108,40,116,104,105,115,44,34,95,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,98,111,117,110,100,79,110,67,108,105,99,107,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,85,112,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,68,111,119,110,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,77,111,118,101,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,69,110,116,101,114,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,76,101,97,118,101,34,44,110,117,108,108,41,59,108,40,116,104,105,115,44,34,95,98,117,102,102,101,114,77,105,115,109,97,116,99,104,67,111,117,110,116,34,44,48,41,59,108,40,116,104,105,115,44,34,95,108,97,115,116,69,120,112,101,99,116,101,100,66,117,102,102,101,114,83,105,122,101,34,44,48,41,59,108,40,116,104,105,115,44,34,95,109,97,114,107,101,114,34,44,34,34,41,59,116,104,105,115,46,95,99,97,110,118,97,115,61,116,46,99,97,110,118,97,115,63,63,110,117,108,108,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,61,110,101,119,32,65,44,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,61,110,101,119,32,82,44,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,61,123,46,46,46,116,46,114,101,110,100,101,114,67,111,110,102,105,103,44,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,58,116,46,114,101,110,100,101,114,67,111,110,102,105,103,63,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,124,124,78,40,41,44,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,58,116,46,114,101,110,100,101,114,67,111,110,102,105,103,63,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,63,63,33,48,125,44,116,104,105,115,46,95,105,110,105,116,87,97,115,109,40,41,46,116,104,101,110,40,40,41,61,62,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,116,104,105,115,46,95,99,114,101,97,116,101,67,111,114,101,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,97,117,116,111,112,108,97,121,40,116,46,97,117,116,111,112,108,97,121,63,63,33,49,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,111,111,112,40,116,46,108,111,111,112,63,63,33,49,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,111,111,112,95,99,111,117,110,116,40,116,46,108,111,111,112,67,111,117,110,116,63,63,48,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,109,111,100,101,40,87,40,116,46,109,111,100,101,63,63,34,102,111,114,119,97,114,100,34,41,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,112,101,101,100,40,116,46,115,112,101,101,100,63,63,49,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,116,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,63,63,33,48,41,44,116,46,115,101,103,109,101,110,116,38,38,116,46,115,101,103,109,101,110,116,46,108,101,110,103,116,104,61,61,61,50,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,101,103,109,101,110,116,40,116,46,115,101,103,109,101,110,116,91,48,93,44,116,46,115,101,103,109,101,110,116,91,49,93,41,44,116,104,105,115,46,95,109,97,114,107,101,114,61,116,46,109,97,114,107,101,114,63,63,34,34,44,116,104,105,115,46,95,109,97,114,107,101,114,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,109,97,114,107,101,114,40,116,104,105,115,46,95,109,97,114,107,101,114,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,97,121,111,117,116,40,116,46,108,97,121,111,117,116,63,46,102,105,116,63,63,34,99,111,110,116,97,105,110,34,44,116,46,108,97,121,111,117,116,63,46,97,108,105,103,110,63,46,91,48,93,63,63,46,53,44,116,46,108,97,121,111,117,116,63,46,97,108,105,103,110,63,46,91,49,93,63,63,46,53,41,44,116,104,105,115,46,95,115,116,97,116,101,77,97,99,104,105,110,101,73,100,61,116,46,115,116,97,116,101,77,97,99,104,105,110,101,73,100,63,63,34,34,44,116,104,105,115,46,95,115,116,97,116,101,77,97,99,104,105,110,101,67,111,110,102,105,103,61,116,46,115,116,97,116,101,77,97,99,104,105,110,101,67,111,110,102,105,103,63,63,110,117,108,108,44,116,104,105,115,46,95,111,110,67,111,114,101,67,114,101,97,116,101,100,40,41,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,114,101,97,100,121,34,125,41,44,116,46,100,97,116,97,63,116,104,105,115,46,95,99,97,110,118,97,115,63,116,104,105,115,46,95,108,111,97,100,70,114,111,109,68,97,116,97,40,116,46,100,97,116,97,41,58,116,104,105,115,46,95,112,101,110,100,105,110,103,76,111,97,100,61,123,100,97,116,97,58,116,46,100,97,116,97,125,58,116,46,115,114,99,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,63,116,104,105,115,46,95,108,111,97,100,70,114,111,109,83,114,99,40,116,46,115,114,99,41,58,116,104,105,115,46,95,112,101,110,100,105,110,103,76,111,97,100,61,123,115,114,99,58,116,46,115,114,99,125,41,44,116,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,38,38,116,104,105,115,46,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,116,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,41,125,41,46,99,97,116,99,104,40,101,61,62,123,99,111,110,115,111,108,101,46,101,114,114,111,114,40,34,91,100,111,116,108,111,116,116,105,101,45,119,101,98,93,32,73,110,105,116,105,97,108,105,122,97,116,105,111,110,32,102,97,105,108,101,100,58,34,44,101,41,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,108,111,97,100,69,114,114,111,114,34,44,101,114,114,111,114,58,110,101,119,32,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,108,111,97,100,32,119,97,115,109,32,109,111,100,117,108,101,58,32,36,123,101,125,96,41,125,41,125,41,125,97,115,121,110,99,32,95,105,110,105,116,87,97,115,109,40,41,123,114,101,116,117,114,110,32,85,46,108,111,97,100,40,41,125,95,99,114,101,97,116,101,67,111,114,101,40,41,123,114,101,116,117,114,110,32,110,101,119,32,107,125,95,111,110,67,111,114,101,67,114,101,97,116,101,100,40,41,123,125,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,59,108,101,116,32,116,59,102,111,114,40,59,40,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,112,111,108,108,95,101,118,101,110,116,40,41,41,33,61,61,110,117,108,108,38,38,116,33,61,61,118,111,105,100,32,48,59,41,123,108,101,116,32,101,61,116,59,115,119,105,116,99,104,40,101,46,116,121,112,101,41,123,99,97,115,101,34,76,111,97,100,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,108,111,97,100,34,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,76,111,97,100,69,114,114,111,114,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,108,111,97,100,69,114,114,111,114,34,44,101,114,114,111,114,58,110,101,119,32,69,114,114,111,114,40,34,102,97,105,108,101,100,32,116,111,32,108,111,97,100,34,41,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,80,108,97,121,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,112,108,97,121,34,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,80,97,117,115,101,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,112,97,117,115,101,34,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,83,116,111,112,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,111,112,34,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,70,114,97,109,101,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,102,114,97,109,101,34,44,99,117,114,114,101,110,116,70,114,97,109,101,58,101,46,102,114,97,109,101,78,111,63,63,48,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,82,101,110,100,101,114,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,114,101,110,100,101,114,34,44,99,117,114,114,101,110,116,70,114,97,109,101,58,101,46,102,114,97,109,101,78,111,63,63,48,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,76,111,111,112,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,108,111,111,112,34,44,108,111,111,112,67,111,117,110,116,58,101,46,108,111,111,112,67,111,117,110,116,63,63,48,125,41,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,67,111,109,112,108,101,116,101,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,99,111,109,112,108,101,116,101,34,125,41,44,48,41,59,98,114,101,97,107,59,100,101,102,97,117,108,116,58,98,114,101,97,107,125,125,125,95,100,114,97,105,110,83,109,69,118,101,110,116,115,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,59,108,101,116,32,116,59,102,111,114,40,59,40,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,109,95,112,111,108,108,95,101,118,101,110,116,40,41,41,33,61,61,110,117,108,108,38,38,116,33,61,61,118,111,105,100,32,48,59,41,123,108,101,116,32,114,61,116,59,115,119,105,116,99,104,40,114,46,116,121,112,101,41,123,99,97,115,101,34,83,116,97,114,116,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,123,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,61,33,48,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,34,125,41,44,116,104,105,115,46,95,115,116,97,114,116,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,125,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,83,116,111,112,34,58,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,123,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,61,33,49,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,111,112,34,125,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,105,115,95,112,108,97,121,105,110,103,40,41,124,124,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,125,44,48,41,59,98,114,101,97,107,59,99,97,115,101,34,67,117,115,116,111,109,69,118,101,110,116,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,67,117,115,116,111,109,69,118,101,110,116,34,44,101,118,101,110,116,78,97,109,101,58,114,46,109,101,115,115,97,103,101,63,63,34,34,125,41,59,98,114,101,97,107,59,99,97,115,101,34,66,111,111,108,101,97,110,73,110,112,117,116,67,104,97,110,103,101,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,66,111,111,108,101,97,110,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,105,110,112,117,116,78,97,109,101,58,114,46,110,97,109,101,63,63,34,34,44,110,101,119,86,97,108,117,101,58,114,46,110,101,119,86,97,108,117,101,44,111,108,100,86,97,108,117,101,58,114,46,111,108,100,86,97,108,117,101,125,41,59,98,114,101,97,107,59,99,97,115,101,34,78,117,109,101,114,105,99,73,110,112,117,116,67,104,97,110,103,101,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,78,117,109,101,114,105,99,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,105,110,112,117,116,78,97,109,101,58,114,46,110,97,109,101,63,63,34,34,44,110,101,119,86,97,108,117,101,58,114,46,110,101,119,86,97,108,117,101,44,111,108,100,86,97,108,117,101,58,114,46,111,108,100,86,97,108,117,101,125,41,59,98,114,101,97,107,59,99,97,115,101,34,83,116,114,105,110,103,73,110,112,117,116,67,104,97,110,103,101,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,114,105,110,103,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,105,110,112,117,116,78,97,109,101,58,114,46,110,97,109,101,63,63,34,34,44,110,101,119,86,97,108,117,101,58,114,46,110,101,119,86,97,108,117,101,44,111,108,100,86,97,108,117,101,58,114,46,111,108,100,86,97,108,117,101,125,41,59,98,114,101,97,107,59,99,97,115,101,34,73,110,112,117,116,70,105,114,101,100,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,73,110,112,117,116,70,105,114,101,100,34,44,105,110,112,117,116,78,97,109,101,58,114,46,110,97,109,101,63,63,34,34,125,41,59,98,114,101,97,107,59,99,97,115,101,34,84,114,97,110,115,105,116,105,111,110,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,84,114,97,110,115,105,116,105,111,110,34,44,102,114,111,109,83,116,97,116,101,58,114,46,112,114,101,118,105,111,117,115,83,116,97,116,101,63,63,34,34,44,116,111,83,116,97,116,101,58,114,46,110,101,119,83,116,97,116,101,63,63,34,34,125,41,59,98,114,101,97,107,59,99,97,115,101,34,83,116,97,116,101,69,110,116,101,114,101,100,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,110,116,101,114,101,100,34,44,115,116,97,116,101,58,114,46,115,116,97,116,101,63,63,34,34,125,41,59,98,114,101,97,107,59,99,97,115,101,34,83,116,97,116,101,69,120,105,116,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,120,105,116,34,44,115,116,97,116,101,58,114,46,115,116,97,116,101,63,63,34,34,125,41,59,98,114,101,97,107,59,99,97,115,101,34,69,114,114,111,114,34,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,69,114,114,111,114,34,44,101,114,114,111,114,58,114,46,109,101,115,115,97,103,101,63,63,34,34,125,41,59,98,114,101,97,107,59,100,101,102,97,117,108,116,58,98,114,101,97,107,125,125,108,101,116,32,101,59,102,111,114,40,59,40,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,109,95,112,111,108,108,95,105,110,116,101,114,110,97,108,95,101,118,101,110,116,40,41,41,33,61,61,110,117,108,108,38,38,101,33,61,61,118,111,105,100,32,48,59,41,123,108,101,116,32,114,61,101,59,105,102,40,114,46,116,121,112,101,61,61,61,34,77,101,115,115,97,103,101,34,41,123,108,101,116,32,115,61,114,46,109,101,115,115,97,103,101,63,63,34,34,59,102,38,38,115,46,115,116,97,114,116,115,87,105,116,104,40,34,79,112,101,110,85,114,108,58,32,34,41,63,110,116,40,115,41,58,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,115,116,97,116,101,77,97,99,104,105,110,101,73,110,116,101,114,110,97,108,77,101,115,115,97,103,101,34,44,109,101,115,115,97,103,101,58,115,125,41,125,125,125,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,116,41,123,99,111,110,115,111,108,101,46,101,114,114,111,114,40,116,41,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,108,111,97,100,69,114,114,111,114,34,44,101,114,114,111,114,58,110,101,119,32,69,114,114,111,114,40,116,41,125,41,125,97,115,121,110,99,32,95,102,101,116,99,104,68,97,116,97,40,116,41,123,108,101,116,32,101,61,97,119,97,105,116,32,102,101,116,99,104,40,116,41,59,105,102,40,33,101,46,111,107,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,102,101,116,99,104,32,97,110,105,109,97,116,105,111,110,32,100,97,116,97,32,102,114,111,109,32,85,82,76,58,32,36,123,116,125,46,32,36,123,101,46,115,116,97,116,117,115,125,58,32,36,123,101,46,115,116,97,116,117,115,84,101,120,116,125,96,41,59,108,101,116,32,114,61,97,119,97,105,116,32,101,46,97,114,114,97,121,66,117,102,102,101,114,40,41,59,114,101,116,117,114,110,32,36,40,114,41,63,114,58,110,101,119,32,84,101,120,116,68,101,99,111,100,101,114,40,41,46,100,101,99,111,100,101,40,114,41,125,95,108,111,97,100,70,114,111,109,68,97,116,97,40,116,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,59,105,102,40,33,116,104,105,115,46,95,99,97,110,118,97,115,41,123,99,111,110,115,111,108,101,46,119,97,114,110,40,34,91,100,111,116,108,111,116,116,105,101,45,119,101,98,93,32,67,97,110,110,111,116,32,108,111,97,100,32,97,110,105,109,97,116,105,111,110,32,119,105,116,104,111,117,116,32,99,97,110,118,97,115,46,32,67,97,108,108,32,115,101,116,67,97,110,118,97,115,40,41,32,102,105,114,115,116,46,34,41,59,114,101,116,117,114,110,125,108,101,116,32,101,61,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,114,61,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,44,115,61,33,49,59,105,102,40,116,121,112,101,111,102,32,116,61,61,34,115,116,114,105,110,103,34,41,123,105,102,40,33,86,40,116,41,41,123,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,34,73,110,118,97,108,105,100,32,76,111,116,116,105,101,32,74,83,79,78,32,115,116,114,105,110,103,58,32,84,104,101,32,112,114,111,118,105,100,101,100,32,115,116,114,105,110,103,32,100,111,101,115,32,110,111,116,32,99,111,110,102,111,114,109,32,116,111,32,116,104,101,32,76,111,116,116,105,101,32,74,83,79,78,32,102,111,114,109,97,116,46,34,41,59,114,101,116,117,114,110,125,115,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,95,97,110,105,109,97,116,105,111,110,40,116,44,101,44,114,41,125,101,108,115,101,32,105,102,40,116,32,105,110,115,116,97,110,99,101,111,102,32,65,114,114,97,121,66,117,102,102,101,114,41,123,105,102,40,33,36,40,116,41,41,123,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,34,73,110,118,97,108,105,100,32,100,111,116,76,111,116,116,105,101,32,65,114,114,97,121,66,117,102,102,101,114,58,32,84,104,101,32,112,114,111,118,105,100,101,100,32,65,114,114,97,121,66,117,102,102,101,114,32,100,111,101,115,32,110,111,116,32,99,111,110,102,111,114,109,32,116,111,32,116,104,101,32,100,111,116,76,111,116,116,105,101,32,102,111,114,109,97,116,46,34,41,59,114,101,116,117,114,110,125,115,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,95,100,111,116,108,111,116,116,105,101,95,100,97,116,97,40,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,116,41,44,101,44,114,41,125,101,108,115,101,32,105,102,40,116,121,112,101,111,102,32,116,61,61,34,111,98,106,101,99,116,34,41,123,105,102,40,33,86,40,116,41,41,123,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,34,73,110,118,97,108,105,100,32,76,111,116,116,105,101,32,74,83,79,78,32,111,98,106,101,99,116,58,32,84,104,101,32,112,114,111,118,105,100,101,100,32,111,98,106,101,99,116,32,100,111,101,115,32,110,111,116,32,99,111,110,102,111,114,109,32,116,111,32,116,104,101,32,76,111,116,116,105,101,32,74,83,79,78,32,102,111,114,109,97,116,46,34,41,59,114,101,116,117,114,110,125,115,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,95,97,110,105,109,97,116,105,111,110,40,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,116,41,44,101,44,114,41,125,101,108,115,101,123,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,96,85,110,115,117,112,112,111,114,116,101,100,32,100,97,116,97,32,116,121,112,101,32,102,111,114,32,97,110,105,109,97,116,105,111,110,32,100,97,116,97,46,32,69,120,112,101,99,116,101,100,58,10,32,32,32,32,32,32,32,32,32,32,45,32,115,116,114,105,110,103,32,40,76,111,116,116,105,101,32,74,83,79,78,41,44,10,32,32,32,32,32,32,32,32,32,32,45,32,65,114,114,97,121,66,117,102,102,101,114,32,40,100,111,116,76,111,116,116,105,101,41,44,10,32,32,32,32,32,32,32,32,32,32,45,32,111,98,106,101,99,116,32,40,76,111,116,116,105,101,32,74,83,79,78,41,46,10,32,32,32,32,32,32,32,32,32,32,82,101,99,101,105,118,101,100,58,32,36,123,116,121,112,101,111,102,32,116,125,96,41,59,114,101,116,117,114,110,125,115,63,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,113,117,97,108,105,116,121,33,61,61,118,111,105,100,32,48,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,113,117,97,108,105,116,121,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,113,117,97,108,105,116,121,41,44,102,38,38,116,104,105,115,46,114,101,115,105,122,101,40,41,44,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,116,104,105,115,46,95,109,97,114,107,101,114,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,109,97,114,107,101,114,40,116,104,105,115,46,95,109,97,114,107,101,114,41,44,115,101,116,84,105,109,101,111,117,116,40,40,41,61,62,123,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,102,114,97,109,101,34,44,99,117,114,114,101,110,116,70,114,97,109,101,58,116,104,105,115,46,99,117,114,114,101,110,116,70,114,97,109,101,125,41,125,44,48,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,116,104,105,115,46,95,115,116,97,116,101,77,97,99,104,105,110,101,73,100,63,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,76,111,97,100,40,116,104,105,115,46,95,115,116,97,116,101,77,97,99,104,105,110,101,73,100,41,38,38,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,40,41,38,38,116,104,105,115,46,95,115,116,97,114,116,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,58,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,95,112,108,97,121,105,110,103,40,41,38,38,116,104,105,115,46,95,115,116,97,114,116,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,44,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,38,38,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,38,38,40,119,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,116,104,105,115,41,44,83,40,116,104,105,115,46,95,99,97,110,118,97,115,41,124,124,116,104,105,115,46,102,114,101,101,122,101,40,41,41,44,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,97,117,116,111,82,101,115,105,122,101,38,38,98,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,116,104,105,115,41,41,41,58,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,125,95,108,111,97,100,70,114,111,109,83,114,99,40,116,41,123,116,104,105,115,46,95,102,101,116,99,104,68,97,116,97,40,116,41,46,116,104,101,110,40,101,61,62,116,104,105,115,46,95,108,111,97,100,70,114,111,109,68,97,116,97,40,101,41,41,46,99,97,116,99,104,40,101,61,62,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,108,111,97,100,32,97,110,105,109,97,116,105,111,110,32,100,97,116,97,32,102,114,111,109,32,85,82,76,58,32,36,123,116,125,46,32,36,123,101,125,96,41,41,125,103,101,116,32,98,117,102,102,101,114,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,112,105,120,101,108,95,98,117,102,102,101,114,40,41,58,110,117,108,108,125,103,101,116,32,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,97,110,105,109,97,116,105,111,110,95,105,100,40,41,63,63,118,111,105,100,32,48,125,103,101,116,32,97,99,116,105,118,101,84,104,101,109,101,73,100,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,116,104,101,109,101,95,105,100,40,41,63,63,118,111,105,100,32,48,125,103,101,116,32,108,97,121,111,117,116,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,123,97,108,105,103,110,58,91,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,97,121,111,117,116,95,97,108,105,103,110,95,120,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,97,121,111,117,116,95,97,108,105,103,110,95,121,40,41,93,44,102,105,116,58,103,116,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,97,121,111,117,116,95,102,105,116,40,41,41,125,125,103,101,116,32,109,97,114,107,101,114,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,99,117,114,114,101,110,116,95,109,97,114,107,101,114,40,41,63,63,34,34,125,103,101,116,32,109,97,110,105,102,101,115,116,40,41,123,116,114,121,123,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,109,97,110,105,102,101,115,116,95,115,116,114,105,110,103,40,41,59,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,124,124,33,116,41,114,101,116,117,114,110,32,110,117,108,108,59,108,101,116,32,101,61,74,83,79,78,46,112,97,114,115,101,40,116,41,59,114,101,116,117,114,110,32,79,98,106,101,99,116,46,107,101,121,115,40,101,41,46,108,101,110,103,116,104,61,61,61,48,63,110,117,108,108,58,101,125,99,97,116,99,104,123,114,101,116,117,114,110,32,110,117,108,108,125,125,103,101,116,32,114,101,110,100,101,114,67,111,110,102,105,103,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,125,103,101,116,32,115,101,103,109,101,110,116,40,41,123,105,102,40,33,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,124,124,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,104,97,115,95,115,101,103,109,101,110,116,40,41,41,41,114,101,116,117,114,110,91,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,103,109,101,110,116,95,115,116,97,114,116,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,103,109,101,110,116,95,101,110,100,40,41,93,125,103,101,116,32,108,111,111,112,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,108,111,111,112,95,97,110,105,109,97,116,105,111,110,40,41,63,63,33,49,125,103,101,116,32,109,111,100,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,102,116,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,109,111,100,101,40,41,41,58,34,102,111,114,119,97,114,100,34,125,103,101,116,32,105,115,70,114,111,122,101,110,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,105,115,70,114,111,122,101,110,125,103,101,116,32,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,125,103,101,116,32,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,63,63,34,34,125,103,101,116,32,97,117,116,111,112,108,97,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,97,117,116,111,112,108,97,121,40,41,63,63,33,49,125,103,101,116,32,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,41,63,63,33,49,125,103,101,116,32,115,112,101,101,100,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,112,101,101,100,40,41,63,63,48,125,103,101,116,32,105,115,82,101,97,100,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,125,103,101,116,32,105,115,76,111,97,100,101,100,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,105,115,95,108,111,97,100,101,100,40,41,63,63,33,49,125,103,101,116,32,105,115,80,108,97,121,105,110,103,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,105,115,95,112,108,97,121,105,110,103,40,41,63,63,33,49,125,103,101,116,32,105,115,80,97,117,115,101,100,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,105,115,95,112,97,117,115,101,100,40,41,63,63,33,49,125,103,101,116,32,105,115,83,116,111,112,112,101,100,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,105,115,95,115,116,111,112,112,101,100,40,41,63,63,33,49,125,103,101,116,32,99,117,114,114,101,110,116,70,114,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,77,97,116,104,46,114,111,117,110,100,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,117,114,114,101,110,116,95,102,114,97,109,101,40,41,42,49,48,48,41,47,49,48,48,58,48,125,103,101,116,32,108,111,111,112,67,111,117,110,116,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,99,117,114,114,101,110,116,95,108,111,111,112,95,99,111,117,110,116,40,41,63,63,48,125,103,101,116,32,116,111,116,97,108,70,114,97,109,101,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,116,111,116,97,108,95,102,114,97,109,101,115,40,41,63,63,48,125,103,101,116,32,100,117,114,97,116,105,111,110,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,100,117,114,97,116,105,111,110,40,41,63,63,48,125,103,101,116,32,115,101,103,109,101,110,116,68,117,114,97,116,105,111,110,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,101,103,109,101,110,116,95,100,117,114,97,116,105,111,110,40,41,63,63,48,125,103,101,116,32,99,97,110,118,97,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,99,97,110,118,97,115,125,108,111,97,100,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,40,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,44,116,104,105,115,46,95,99,108,101,97,110,117,112,67,97,110,118,97,115,40,41,44,116,104,105,115,46,95,105,115,70,114,111,122,101,110,61,33,49,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,97,117,116,111,112,108,97,121,40,116,46,97,117,116,111,112,108,97,121,63,63,33,49,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,111,111,112,40,116,46,108,111,111,112,63,63,33,49,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,111,111,112,95,99,111,117,110,116,40,116,46,108,111,111,112,67,111,117,110,116,63,63,48,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,109,111,100,101,40,87,40,116,46,109,111,100,101,63,63,34,102,111,114,119,97,114,100,34,41,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,112,101,101,100,40,116,46,115,112,101,101,100,63,63,49,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,116,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,63,63,33,48,41,44,116,46,115,101,103,109,101,110,116,38,38,116,46,115,101,103,109,101,110,116,46,108,101,110,103,116,104,61,61,61,50,63,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,101,103,109,101,110,116,40,116,46,115,101,103,109,101,110,116,91,48,93,44,116,46,115,101,103,109,101,110,116,91,49,93,41,58,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,108,101,97,114,95,115,101,103,109,101,110,116,40,41,44,116,104,105,115,46,95,109,97,114,107,101,114,61,116,46,109,97,114,107,101,114,63,63,34,34,44,116,104,105,115,46,95,109,97,114,107,101,114,63,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,109,97,114,107,101,114,40,116,104,105,115,46,95,109,97,114,107,101,114,41,58,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,108,101,97,114,95,109,97,114,107,101,114,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,97,121,111,117,116,40,116,46,108,97,121,111,117,116,63,46,102,105,116,63,63,34,99,111,110,116,97,105,110,34,44,116,46,108,97,121,111,117,116,63,46,97,108,105,103,110,63,46,91,48,93,63,63,46,53,44,116,46,108,97,121,111,117,116,63,46,97,108,105,103,110,63,46,91,49,93,63,63,46,53,41,44,116,46,100,97,116,97,63,116,104,105,115,46,95,99,97,110,118,97,115,63,116,104,105,115,46,95,108,111,97,100,70,114,111,109,68,97,116,97,40,116,46,100,97,116,97,41,58,116,104,105,115,46,95,112,101,110,100,105,110,103,76,111,97,100,61,123,100,97,116,97,58,116,46,100,97,116,97,125,58,116,46,115,114,99,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,63,116,104,105,115,46,95,108,111,97,100,70,114,111,109,83,114,99,40,116,46,115,114,99,41,58,116,104,105,115,46,95,112,101,110,100,105,110,103,76,111,97,100,61,123,115,114,99,58,116,46,115,114,99,125,41,44,116,104,105,115,46,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,116,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,63,63,34,34,41,41,125,95,100,114,97,119,40,41,123,105,102,40,33,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,124,124,116,104,105,115,46,95,99,97,110,118,97,115,61,61,61,110,117,108,108,41,38,38,40,33,116,104,105,115,46,95,99,111,110,116,101,120,116,38,38,34,103,101,116,67,111,110,116,101,120,116,34,105,110,32,116,104,105,115,46,95,99,97,110,118,97,115,38,38,116,121,112,101,111,102,32,116,104,105,115,46,95,99,97,110,118,97,115,46,103,101,116,67,111,110,116,101,120,116,61,61,34,102,117,110,99,116,105,111,110,34,38,38,40,116,121,112,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,60,34,117,34,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,124,124,116,121,112,101,111,102,32,79,102,102,115,99,114,101,101,110,67,97,110,118,97,115,60,34,117,34,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,79,102,102,115,99,114,101,101,110,67,97,110,118,97,115,41,38,38,40,116,104,105,115,46,95,99,111,110,116,101,120,116,61,116,104,105,115,46,95,99,97,110,118,97,115,46,103,101,116,67,111,110,116,101,120,116,40,34,50,100,34,41,41,44,116,104,105,115,46,95,99,111,110,116,101,120,116,41,41,123,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,112,105,120,101,108,95,98,117,102,102,101,114,40,41,44,101,61,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,42,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,42,106,59,105,102,40,116,46,98,121,116,101,76,101,110,103,116,104,33,61,61,101,41,123,116,104,105,115,46,95,108,97,115,116,69,120,112,101,99,116,101,100,66,117,102,102,101,114,83,105,122,101,61,61,61,101,63,116,104,105,115,46,95,98,117,102,102,101,114,77,105,115,109,97,116,99,104,67,111,117,110,116,43,61,49,58,40,116,104,105,115,46,95,98,117,102,102,101,114,77,105,115,109,97,116,99,104,67,111,117,110,116,61,49,44,116,104,105,115,46,95,108,97,115,116,69,120,112,101,99,116,101,100,66,117,102,102,101,114,83,105,122,101,61,101,41,44,116,104,105,115,46,95,98,117,102,102,101,114,77,105,115,109,97,116,99,104,67,111,117,110,116,61,61,61,49,48,38,38,99,111,110,115,111,108,101,46,119,97,114,110,40,96,91,100,111,116,108,111,116,116,105,101,45,119,101,98,93,32,80,101,114,115,105,115,116,101,110,116,32,98,117,102,102,101,114,32,115,105,122,101,32,109,105,115,109,97,116,99,104,32,100,101,116,101,99,116,101,100,46,32,69,120,112,101,99,116,101,100,32,36,123,101,125,32,98,121,116,101,115,32,102,111,114,32,99,97,110,118,97,115,32,36,123,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,125,120,36,123,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,125,44,32,98,117,116,32,103,111,116,32,36,123,116,46,98,121,116,101,76,101,110,103,116,104,125,32,98,121,116,101,115,46,32,84,104,105,115,32,109,97,121,32,105,110,100,105,99,97,116,101,32,97,32,87,65,83,77,32,109,101,109,111,114,121,32,97,108,108,111,99,97,116,105,111,110,32,105,115,115,117,101,32,111,114,32,105,110,118,97,108,105,100,32,99,97,110,118,97,115,32,100,105,109,101,110,115,105,111,110,115,46,96,41,59,114,101,116,117,114,110,125,116,104,105,115,46,95,98,117,102,102,101,114,77,105,115,109,97,116,99,104,67,111,117,110,116,61,48,44,116,104,105,115,46,95,108,97,115,116,69,120,112,101,99,116,101,100,66,117,102,102,101,114,83,105,122,101,61,101,59,108,101,116,32,114,61,110,117,108,108,44,115,61,110,101,119,32,85,105,110,116,56,67,108,97,109,112,101,100,65,114,114,97,121,40,116,46,98,117,102,102,101,114,44,116,46,98,121,116,101,79,102,102,115,101,116,44,116,46,98,121,116,101,76,101,110,103,116,104,41,59,116,121,112,101,111,102,32,73,109,97,103,101,68,97,116,97,62,34,117,34,63,40,114,61,116,104,105,115,46,95,99,111,110,116,101,120,116,46,99,114,101,97,116,101,73,109,97,103,101,68,97,116,97,40,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,44,114,46,100,97,116,97,46,115,101,116,40,115,41,41,58,114,61,110,101,119,32,73,109,97,103,101,68,97,116,97,40,115,44,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,44,116,104,105,115,46,95,99,111,110,116,101,120,116,46,112,117,116,73,109,97,103,101,68,97,116,97,40,114,44,48,44,48,41,125,125,95,99,108,101,97,110,117,112,67,97,110,118,97,115,40,41,123,116,104,105,115,46,95,99,97,110,118,97,115,38,38,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,38,38,40,119,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,44,98,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,44,116,104,105,115,46,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,41,125,95,105,110,105,116,105,97,108,105,122,101,67,97,110,118,97,115,40,41,123,116,104,105,115,46,95,115,101,116,117,112,82,101,110,100,101,114,101,114,79,110,67,97,110,118,97,115,40,41,44,116,104,105,115,46,95,99,97,110,118,97,115,38,38,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,38,38,116,104,105,115,46,105,115,76,111,97,100,101,100,38,38,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,38,38,40,119,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,116,104,105,115,41,44,83,40,116,104,105,115,46,95,99,97,110,118,97,115,41,124,124,116,104,105,115,46,102,114,101,101,122,101,40,41,41,44,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,97,117,116,111,82,101,115,105,122,101,38,38,98,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,116,104,105,115,41,44,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,38,38,116,104,105,115,46,95,115,101,116,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,41,44,116,104,105,115,46,95,99,97,110,118,97,115,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,38,38,116,104,105,115,46,105,115,76,111,97,100,101,100,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,115,105,122,101,40,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,125,95,115,101,116,117,112,82,101,110,100,101,114,101,114,79,110,67,97,110,118,97,115,40,41,123,116,104,105,115,46,95,99,111,110,116,101,120,116,61,110,117,108,108,125,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,123,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,33,61,61,110,117,108,108,38,38,40,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,41,44,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,61,110,117,108,108,41,125,95,115,116,97,114,116,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,123,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,61,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,38,38,33,116,104,105,115,46,95,105,115,70,114,111,122,101,110,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,95,112,108,97,121,105,110,103,40,41,124,124,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,41,38,38,40,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,61,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,76,111,111,112,46,98,105,110,100,40,116,104,105,115,41,41,41,125,95,97,110,105,109,97,116,105,111,110,76,111,111,112,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,123,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,59,114,101,116,117,114,110,125,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,95,112,108,97,121,105,110,103,40,41,38,38,33,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,41,123,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,59,114,101,116,117,114,110,125,116,114,121,123,108,101,116,32,116,61,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,63,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,109,95,116,105,99,107,40,41,58,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,116,105,99,107,40,41,59,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,63,116,104,105,115,46,95,100,114,97,105,110,83,109,69,118,101,110,116,115,40,41,58,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,116,38,38,116,104,105,115,46,95,100,114,97,119,40,41,44,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,61,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,76,111,111,112,46,98,105,110,100,40,116,104,105,115,41,41,125,99,97,116,99,104,40,116,41,123,99,111,110,115,111,108,101,46,101,114,114,111,114,40,34,69,114,114,111,114,32,105,110,32,97,110,105,109,97,116,105,111,110,32,102,114,97,109,101,58,34,44,116,41,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,114,101,110,100,101,114,69,114,114,111,114,34,44,101,114,114,111,114,58,116,125,41,44,116,32,105,110,115,116,97,110,99,101,111,102,32,87,101,98,65,115,115,101,109,98,108,121,46,82,117,110,116,105,109,101,69,114,114,111,114,38,38,116,104,105,115,46,100,101,115,116,114,111,121,40,41,125,125,112,108,97,121,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,124,124,33,116,104,105,115,46,105,115,76,111,97,100,101,100,41,114,101,116,117,114,110,59,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,112,108,97,121,40,41,59,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,40,116,124,124,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,95,112,108,97,121,105,110,103,40,41,41,38,38,40,116,104,105,115,46,95,105,115,70,114,111,122,101,110,61,33,49,44,116,104,105,115,46,95,115,116,97,114,116,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,41,44,116,104,105,115,46,95,99,97,110,118,97,115,38,38,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,38,38,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,38,38,33,83,40,116,104,105,115,46,95,99,97,110,118,97,115,41,38,38,116,104,105,115,46,102,114,101,101,122,101,40,41,125,112,97,117,115,101,40,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,112,97,117,115,101,40,41,44,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,41,125,115,116,111,112,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,116,111,112,40,41,59,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,44,116,38,38,40,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,102,114,97,109,101,34,44,99,117,114,114,101,110,116,70,114,97,109,101,58,116,104,105,115,46,99,117,114,114,101,110,116,70,114,97,109,101,125,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,125,115,101,116,70,114,97,109,101,40,116,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,59,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,101,107,40,116,41,41,123,108,101,116,32,114,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,59,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,114,38,38,116,104,105,115,46,95,100,114,97,119,40,41,125,125,115,101,116,83,112,101,101,100,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,112,101,101,100,40,116,41,125,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,40,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,63,116,104,105,115,46,95,99,97,110,118,97,115,46,115,116,121,108,101,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,61,116,58,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,98,97,99,107,103,114,111,117,110,100,95,99,111,108,111,114,40,101,116,40,116,41,41,44,116,104,105,115,46,95,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,61,116,41,125,115,101,116,76,111,111,112,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,111,111,112,40,116,41,125,115,101,116,76,111,111,112,67,111,117,110,116,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,111,111,112,95,99,111,117,110,116,40,116,41,125,115,101,116,85,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,117,115,101,95,102,114,97,109,101,95,105,110,116,101,114,112,111,108,97,116,105,111,110,40,116,41,125,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,44,101,41,123,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,44,101,41,125,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,44,101,41,123,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,44,101,41,125,100,101,115,116,114,111,121,40,41,123,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,44,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,61,33,49,44,116,104,105,115,46,95,99,108,101,97,110,117,112,67,97,110,118,97,115,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,102,114,101,101,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,110,117,108,108,44,116,104,105,115,46,95,99,111,110,116,101,120,116,61,110,117,108,108,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,100,101,115,116,114,111,121,34,125,41,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,114,101,109,111,118,101,65,108,108,69,118,101,110,116,76,105,115,116,101,110,101,114,115,40,41,44,116,104,105,115,46,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,125,102,114,101,101,122,101,40,41,123,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,33,61,61,110,117,108,108,38,38,40,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,44,116,104,105,115,46,95,105,115,70,114,111,122,101,110,61,33,48,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,102,114,101,101,122,101,34,125,41,41,125,117,110,102,114,101,101,122,101,40,41,123,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,61,61,61,110,117,108,108,38,38,40,116,104,105,115,46,95,105,115,70,114,111,122,101,110,61,33,49,44,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,116,121,112,101,58,34,117,110,102,114,101,101,122,101,34,125,41,44,116,104,105,115,46,95,115,116,97,114,116,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,41,125,114,101,115,105,122,101,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,124,124,33,116,104,105,115,46,105,115,76,111,97,100,101,100,124,124,33,116,104,105,115,46,95,99,97,110,118,97,115,41,114,101,116,117,114,110,59,105,102,40,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,123,108,101,116,32,101,61,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,124,124,119,105,110,100,111,119,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,124,124,49,44,123,104,101,105,103,104,116,58,114,44,119,105,100,116,104,58,115,125,61,116,104,105,115,46,95,99,97,110,118,97,115,46,103,101,116,66,111,117,110,100,105,110,103,67,108,105,101,110,116,82,101,99,116,40,41,59,114,33,61,61,48,38,38,115,33,61,61,48,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,61,115,42,101,44,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,61,114,42,101,41,125,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,115,105,122,101,40,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,125,115,101,116,67,97,110,118,97,115,40,116,41,123,105,102,40,33,40,33,116,124,124,116,104,105,115,46,95,99,97,110,118,97,115,61,61,61,116,41,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,38,38,116,104,105,115,46,95,99,108,101,97,110,117,112,67,97,110,118,97,115,40,41,44,116,104,105,115,46,95,99,97,110,118,97,115,61,116,44,116,104,105,115,46,95,105,110,105,116,105,97,108,105,122,101,67,97,110,118,97,115,40,41,44,116,104,105,115,46,95,112,101,110,100,105,110,103,76,111,97,100,41,41,123,108,101,116,32,101,61,116,104,105,115,46,95,112,101,110,100,105,110,103,76,111,97,100,59,116,104,105,115,46,95,112,101,110,100,105,110,103,76,111,97,100,61,110,117,108,108,44,101,46,100,97,116,97,63,116,104,105,115,46,95,108,111,97,100,70,114,111,109,68,97,116,97,40,101,46,100,97,116,97,41,58,101,46,115,114,99,38,38,116,104,105,115,46,95,108,111,97,100,70,114,111,109,83,114,99,40,101,46,115,114,99,41,125,125,115,101,116,84,114,97,110,115,102,111,114,109,40,116,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,33,49,59,108,101,116,32,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,116,114,97,110,115,102,111,114,109,40,110,101,119,32,70,108,111,97,116,51,50,65,114,114,97,121,40,116,41,41,59,114,101,116,117,114,110,32,101,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,38,38,116,104,105,115,46,95,100,114,97,119,40,41,44,101,125,103,101,116,84,114,97,110,115,102,111,114,109,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,116,114,97,110,115,102,111,114,109,40,41,59,114,101,116,117,114,110,32,65,114,114,97,121,46,102,114,111,109,40,116,41,125,115,101,116,83,101,103,109,101,110,116,40,116,44,101,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,101,103,109,101,110,116,40,116,44,101,41,125,115,101,116,77,111,100,101,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,109,111,100,101,40,87,40,116,41,41,125,115,101,116,82,101,110,100,101,114,67,111,110,102,105,103,40,116,41,123,108,101,116,123,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,58,101,44,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,58,114,44,113,117,97,108,105,116,121,58,115,44,46,46,46,105,125,61,116,59,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,61,123,46,46,46,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,44,46,46,46,105,44,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,58,101,124,124,78,40,41,44,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,58,114,63,63,33,48,44,46,46,46,115,33,61,61,118,111,105,100,32,48,38,38,123,113,117,97,108,105,116,121,58,115,125,125,44,115,33,61,61,118,111,105,100,32,48,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,113,117,97,108,105,116,121,40,115,41,44,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,38,38,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,97,117,116,111,82,101,115,105,122,101,63,98,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,116,104,105,115,41,58,98,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,44,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,63,40,119,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,116,104,105,115,41,44,83,40,116,104,105,115,46,95,99,97,110,118,97,115,41,124,124,116,104,105,115,46,102,114,101,101,122,101,40,41,41,58,40,119,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,44,116,104,105,115,46,95,105,115,70,114,111,122,101,110,38,38,116,104,105,115,46,117,110,102,114,101,101,122,101,40,41,41,41,125,108,111,97,100,65,110,105,109,97,116,105,111,110,40,116,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,124,124,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,97,110,105,109,97,116,105,111,110,95,105,100,40,41,61,61,61,116,124,124,33,116,104,105,115,46,95,99,97,110,118,97,115,41,114,101,116,117,114,110,59,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,95,97,110,105,109,97,116,105,111,110,95,102,114,111,109,95,105,100,40,116,44,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,63,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,113,117,97,108,105,116,121,33,61,61,118,111,105,100,32,48,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,113,117,97,108,105,116,121,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,113,117,97,108,105,116,121,41,44,116,104,105,115,46,114,101,115,105,122,101,40,41,44,116,104,105,115,46,95,100,114,97,105,110,80,108,97,121,101,114,69,118,101,110,116,115,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,58,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,108,111,97,100,32,97,110,105,109,97,116,105,111,110,32,119,105,116,104,32,105,100,58,32,36,123,116,125,96,41,125,115,101,116,77,97,114,107,101,114,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,40,116,104,105,115,46,95,109,97,114,107,101,114,61,116,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,109,97,114,107,101,114,40,116,41,41,125,109,97,114,107,101,114,115,40,41,123,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,109,97,114,107,101,114,115,40,41,59,114,101,116,117,114,110,32,116,38,38,65,114,114,97,121,46,105,115,65,114,114,97,121,40,116,41,63,116,58,91,93,125,115,101,116,84,104,101,109,101,40,116,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,116,104,101,109,101,40,116,41,59,114,101,116,117,114,110,32,101,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,44,101,125,114,101,115,101,116,84,104,101,109,101,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,115,101,116,95,116,104,101,109,101,40,41,59,114,101,116,117,114,110,32,116,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,44,116,125,115,101,116,84,104,101,109,101,68,97,116,97,40,116,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,101,61,116,121,112,101,111,102,32,116,61,61,34,115,116,114,105,110,103,34,63,116,58,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,116,41,44,114,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,116,104,101,109,101,95,100,97,116,97,40,101,41,59,114,101,116,117,114,110,32,114,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,44,114,125,115,101,116,83,108,111,116,115,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,108,111,116,115,95,115,116,114,40,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,116,41,41,38,38,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,41,125,95,105,115,75,101,121,102,114,97,109,101,65,114,114,97,121,40,116,41,123,114,101,116,117,114,110,32,65,114,114,97,121,46,105,115,65,114,114,97,121,40,116,41,38,38,116,46,108,101,110,103,116,104,62,48,38,38,116,121,112,101,111,102,32,116,91,48,93,61,61,34,111,98,106,101,99,116,34,38,38,116,91,48,93,33,61,61,110,117,108,108,38,38,34,116,34,105,110,32,116,91,48,93,38,38,34,115,34,105,110,32,116,91,48,93,125,103,101,116,83,108,111,116,73,100,115,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,91,93,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,115,108,111,116,95,105,100,115,40,41,59,114,101,116,117,114,110,32,65,114,114,97,121,46,105,115,65,114,114,97,121,40,116,41,63,116,58,91,93,125,103,101,116,83,108,111,116,84,121,112,101,40,116,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,59,108,101,116,32,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,115,108,111,116,95,116,121,112,101,40,116,41,59,105,102,40,101,41,114,101,116,117,114,110,32,101,125,103,101,116,83,108,111,116,40,116,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,59,108,101,116,32,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,115,108,111,116,95,115,116,114,40,116,41,59,105,102,40,101,41,116,114,121,123,114,101,116,117,114,110,32,74,83,79,78,46,112,97,114,115,101,40,101,41,125,99,97,116,99,104,123,114,101,116,117,114,110,125,125,103,101,116,83,108,111,116,115,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,123,125,59,116,114,121,123,114,101,116,117,114,110,32,74,83,79,78,46,112,97,114,115,101,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,115,108,111,116,115,95,115,116,114,40,41,41,125,99,97,116,99,104,123,114,101,116,117,114,110,123,125,125,125,115,101,116,67,111,108,111,114,83,108,111,116,40,116,44,101,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,114,61,116,104,105,115,46,95,105,115,75,101,121,102,114,97,109,101,65,114,114,97,121,40,101,41,44,115,61,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,123,97,58,114,63,49,58,48,44,107,58,101,125,41,44,105,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,108,111,116,95,115,116,114,40,116,44,115,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,105,125,115,101,116,83,99,97,108,97,114,83,108,111,116,40,116,44,101,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,115,61,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,123,97,58,116,121,112,101,111,102,32,101,33,61,34,110,117,109,98,101,114,34,63,49,58,48,44,107,58,101,125,41,44,105,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,108,111,116,95,115,116,114,40,116,44,115,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,105,125,115,101,116,86,101,99,116,111,114,83,108,111,116,40,116,44,101,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,114,61,116,104,105,115,46,95,105,115,75,101,121,102,114,97,109,101,65,114,114,97,121,40,101,41,44,115,61,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,123,97,58,114,63,49,58,48,44,107,58,101,125,41,44,105,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,108,111,116,95,115,116,114,40,116,44,115,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,105,125,115,101,116,71,114,97,100,105,101,110,116,83,108,111,116,40,116,44,101,44,114,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,115,61,116,104,105,115,46,95,105,115,75,101,121,102,114,97,109,101,65,114,114,97,121,40,101,41,44,105,61,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,123,107,58,123,97,58,115,63,49,58,48,44,107,58,101,125,44,112,58,114,125,41,44,95,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,108,111,116,95,115,116,114,40,116,44,105,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,95,125,115,101,116,84,101,120,116,83,108,111,116,40,116,44,101,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,114,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,103,101,116,95,115,108,111,116,95,115,116,114,40,116,41,44,115,61,101,59,105,102,40,114,41,123,108,101,116,32,112,61,74,83,79,78,46,112,97,114,115,101,40,114,41,59,105,102,40,112,38,38,34,107,34,105,110,32,112,38,38,65,114,114,97,121,46,105,115,65,114,114,97,121,40,112,46,107,41,41,123,108,101,116,32,103,61,112,46,107,91,48,93,59,34,115,34,105,110,32,103,38,38,116,121,112,101,111,102,32,103,46,115,61,61,34,111,98,106,101,99,116,34,38,38,40,115,61,123,46,46,46,103,46,115,44,46,46,46,101,125,41,125,125,108,101,116,32,105,61,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,123,97,58,48,44,107,58,91,123,116,58,48,44,115,125,93,125,41,44,95,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,115,108,111,116,95,115,116,114,40,116,44,105,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,95,125,114,101,115,101,116,83,108,111,116,40,116,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,115,101,116,95,115,108,111,116,40,116,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,101,125,99,108,101,97,114,83,108,111,116,40,116,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,108,101,97,114,95,115,108,111,116,40,116,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,101,125,114,101,115,101,116,83,108,111,116,115,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,115,101,116,95,115,108,111,116,115,40,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,116,125,99,108,101,97,114,83,108,111,116,115,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,108,101,97,114,95,115,108,111,116,115,40,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,44,116,104,105,115,46,95,100,114,97,119,40,41,44,116,125,115,101,116,76,97,121,111,117,116,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,108,97,121,111,117,116,40,116,46,102,105,116,63,63,34,99,111,110,116,97,105,110,34,44,116,46,97,108,105,103,110,63,46,91,48,93,63,63,46,53,44,116,46,97,108,105,103,110,63,46,91,49,93,63,63,46,53,41,125,115,101,116,86,105,101,119,112,111,114,116,40,116,44,101,44,114,44,115,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,63,33,49,58,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,95,118,105,101,119,112,111,114,116,40,116,44,101,44,114,44,115,41,125,115,116,97,116,105,99,32,115,101,116,87,97,115,109,85,114,108,40,116,41,123,85,46,115,101,116,87,97,115,109,85,114,108,40,116,41,125,115,116,97,116,105,99,32,97,115,121,110,99,32,114,101,103,105,115,116,101,114,70,111,110,116,40,116,44,101,41,123,116,114,121,123,97,119,97,105,116,32,85,46,108,111,97,100,40,41,59,108,101,116,32,114,59,105,102,40,116,121,112,101,111,102,32,101,61,61,34,115,116,114,105,110,103,34,41,123,108,101,116,32,105,61,97,119,97,105,116,32,102,101,116,99,104,40,101,41,59,105,102,40,33,105,46,111,107,41,114,101,116,117,114,110,32,99,111,110,115,111,108,101,46,101,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,102,101,116,99,104,32,102,111,110,116,32,102,114,111,109,32,85,82,76,58,32,36,123,101,125,46,32,83,116,97,116,117,115,58,32,36,123,105,46,115,116,97,116,117,115,125,96,41,44,33,49,59,114,61,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,97,119,97,105,116,32,105,46,97,114,114,97,121,66,117,102,102,101,114,40,41,41,125,101,108,115,101,32,101,32,105,110,115,116,97,110,99,101,111,102,32,85,105,110,116,56,65,114,114,97,121,63,114,61,101,58,114,61,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,101,41,59,108,101,116,32,115,61,90,40,116,44,114,41,59,114,101,116,117,114,110,32,115,124,124,99,111,110,115,111,108,101,46,101,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,114,101,103,105,115,116,101,114,32,102,111,110,116,32,34,36,123,116,125,34,46,32,70,111,110,116,32,100,97,116,97,32,109,97,121,32,98,101,32,105,110,118,97,108,105,100,46,96,41,44,115,125,99,97,116,99,104,40,114,41,123,114,101,116,117,114,110,32,99,111,110,115,111,108,101,46,101,114,114,111,114,40,96,69,114,114,111,114,32,114,101,103,105,115,116,101,114,105,110,103,32,102,111,110,116,32,34,36,123,116,125,34,58,96,44,114,41,44,33,49,125,125,97,110,105,109,97,116,105,111,110,83,105,122,101,40,41,123,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,97,110,105,109,97,116,105,111,110,95,115,105,122,101,40,41,59,114,101,116,117,114,110,123,119,105,100,116,104,58,116,63,46,91,48,93,63,63,48,44,104,101,105,103,104,116,58,116,63,46,91,49,93,63,63,48,125,125,103,101,116,76,97,121,101,114,66,111,117,110,100,105,110,103,66,111,120,40,116,41,123,108,101,116,32,101,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,103,101,116,95,108,97,121,101,114,95,98,111,117,110,100,115,40,116,41,59,105,102,40,101,38,38,101,46,108,101,110,103,116,104,61,61,61,56,41,114,101,116,117,114,110,32,65,114,114,97,121,46,102,114,111,109,40,101,41,125,115,116,97,116,105,99,32,116,114,97,110,115,102,111,114,109,84,104,101,109,101,84,111,76,111,116,116,105,101,83,108,111,116,115,40,116,44,101,41,123,114,101,116,117,114,110,34,34,125,115,116,97,116,101,77,97,99,104,105,110,101,76,111,97,100,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,116,97,116,101,95,109,97,99,104,105,110,101,95,108,111,97,100,95,102,114,111,109,95,105,100,40,116,41,58,33,49,125,115,116,97,116,101,77,97,99,104,105,110,101,76,111,97,100,68,97,116,97,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,116,97,116,101,95,109,97,99,104,105,110,101,95,108,111,97,100,40,116,41,58,33,49,125,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,67,111,110,102,105,103,40,116,41,123,116,104,105,115,46,95,115,116,97,116,101,77,97,99,104,105,110,101,67,111,110,102,105,103,61,116,125,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,40,41,123,105,102,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,61,61,61,110,117,108,108,41,114,101,116,117,114,110,33,49,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,109,95,115,116,97,114,116,40,116,104,105,115,46,95,115,116,97,116,101,77,97,99,104,105,110,101,67,111,110,102,105,103,63,46,111,112,101,110,85,114,108,80,111,108,105,99,121,63,46,114,101,113,117,105,114,101,85,115,101,114,73,110,116,101,114,97,99,116,105,111,110,63,63,33,48,44,116,104,105,115,46,95,115,116,97,116,101,77,97,99,104,105,110,101,67,111,110,102,105,103,63,46,111,112,101,110,85,114,108,80,111,108,105,99,121,63,46,119,104,105,116,101,108,105,115,116,63,63,91,93,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,114,97,105,110,83,109,69,118,101,110,116,115,40,41,44,116,38,38,40,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,61,33,48,44,116,104,105,115,46,95,115,101,116,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,44,116,104,105,115,46,95,115,116,97,114,116,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,41,44,116,125,115,116,97,116,101,77,97,99,104,105,110,101,83,116,111,112,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,33,49,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,109,95,115,116,111,112,40,41,59,114,101,116,117,114,110,32,116,104,105,115,46,95,100,114,97,105,110,83,109,69,118,101,110,116,115,40,41,44,116,38,38,40,116,104,105,115,46,95,105,115,83,116,97,116,101,77,97,99,104,105,110,101,82,117,110,110,105,110,103,61,33,49,44,116,104,105,115,46,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,44,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,95,112,108,97,121,105,110,103,40,41,124,124,116,104,105,115,46,95,115,116,111,112,65,110,105,109,97,116,105,111,110,76,111,111,112,40,41,41,44,116,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,83,116,97,116,117,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,115,116,97,116,117,115,40,41,63,63,34,34,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,67,117,114,114,101,110,116,83,116,97,116,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,99,117,114,114,101,110,116,95,115,116,97,116,101,40,41,63,63,34,34,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,65,99,116,105,118,101,73,100,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,116,97,116,101,95,109,97,99,104,105,110,101,95,105,100,40,41,63,63,34,34,125,115,116,97,116,101,77,97,99,104,105,110,101,79,118,101,114,114,105,100,101,83,116,97,116,101,40,116,44,101,61,33,49,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,111,118,101,114,114,105,100,101,95,99,117,114,114,101,110,116,95,115,116,97,116,101,40,116,44,101,41,63,63,33,49,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,103,101,116,95,115,116,97,116,101,95,109,97,99,104,105,110,101,40,116,41,63,63,34,34,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,76,105,115,116,101,110,101,114,115,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,91,93,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,109,95,102,114,97,109,101,119,111,114,107,95,115,101,116,117,112,40,41,59,114,101,116,117,114,110,32,65,114,114,97,121,46,105,115,65,114,114,97,121,40,116,41,63,116,58,91,93,125,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,66,111,111,108,101,97,110,73,110,112,117,116,40,116,44,101,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,115,101,116,95,98,111,111,108,101,97,110,95,105,110,112,117,116,40,116,44,101,41,63,63,33,49,125,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,78,117,109,101,114,105,99,73,110,112,117,116,40,116,44,101,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,115,101,116,95,110,117,109,101,114,105,99,95,105,110,112,117,116,40,116,44,101,41,63,63,33,49,125,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,83,116,114,105,110,103,73,110,112,117,116,40,116,44,101,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,115,101,116,95,115,116,114,105,110,103,95,105,110,112,117,116,40,116,44,101,41,63,63,33,49,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,66,111,111,108,101,97,110,73,110,112,117,116,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,103,101,116,95,98,111,111,108,101,97,110,95,105,110,112,117,116,40,116,41,63,63,118,111,105,100,32,48,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,78,117,109,101,114,105,99,73,110,112,117,116,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,103,101,116,95,110,117,109,101,114,105,99,95,105,110,112,117,116,40,116,41,63,63,118,111,105,100,32,48,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,83,116,114,105,110,103,73,110,112,117,116,40,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,103,101,116,95,115,116,114,105,110,103,95,105,110,112,117,116,40,116,41,63,63,118,111,105,100,32,48,125,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,73,110,112,117,116,115,40,41,123,105,102,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,114,101,116,117,114,110,91,93,59,108,101,116,32,116,61,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,109,95,103,101,116,95,105,110,112,117,116,115,40,41,59,114,101,116,117,114,110,32,65,114,114,97,121,46,105,115,65,114,114,97,121,40,116,41,63,116,58,91,93,125,115,116,97,116,101,77,97,99,104,105,110,101,70,105,114,101,69,118,101,110,116,40,116,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,102,105,114,101,40,116,41,125,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,67,108,105,99,107,69,118,101,110,116,40,116,44,101,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,112,111,115,116,95,99,108,105,99,107,40,116,44,101,41,125,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,116,44,101,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,117,112,40,116,44,101,41,125,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,116,44,101,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,100,111,119,110,40,116,44,101,41,125,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,116,44,101,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,109,111,118,101,40,116,44,101,41,125,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,116,44,101,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,101,110,116,101,114,40,116,44,101,41,125,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,116,44,101,41,123,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,63,46,115,109,95,112,111,115,116,95,112,111,105,110,116,101,114,95,101,120,105,116,40,116,44,101,41,125,95,111,110,67,108,105,99,107,40,116,41,123,108,101,116,32,101,61,69,40,116,41,59,101,38,38,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,67,108,105,99,107,69,118,101,110,116,40,101,46,120,44,101,46,121,41,125,95,111,110,80,111,105,110,116,101,114,85,112,40,116,41,123,108,101,116,32,101,61,69,40,116,41,59,101,38,38,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,101,46,120,44,101,46,121,41,125,95,111,110,80,111,105,110,116,101,114,68,111,119,110,40,116,41,123,108,101,116,32,101,61,69,40,116,41,59,101,38,38,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,101,46,120,44,101,46,121,41,125,95,111,110,80,111,105,110,116,101,114,77,111,118,101,40,116,41,123,108,101,116,32,101,61,69,40,116,41,59,101,38,38,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,101,46,120,44,101,46,121,41,125,95,111,110,80,111,105,110,116,101,114,69,110,116,101,114,40,116,41,123,108,101,116,32,101,61,69,40,116,41,59,101,38,38,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,101,46,120,44,101,46,121,41,125,95,111,110,80,111,105,110,116,101,114,76,101,97,118,101,40,116,41,123,108,101,116,32,101,61,69,40,116,41,59,101,38,38,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,101,46,120,44,101,46,121,41,125,95,115,101,116,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,123,105,102,40,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,38,38,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,33,61,61,110,117,108,108,38,38,116,104,105,115,46,105,115,76,111,97,100,101,100,41,123,108,101,116,32,116,61,116,104,105,115,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,76,105,115,116,101,110,101,114,115,40,41,59,116,104,105,115,46,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,44,116,46,105,110,99,108,117,100,101,115,40,34,67,108,105,99,107,34,41,38,38,40,116,104,105,115,46,95,98,111,117,110,100,79,110,67,108,105,99,107,61,116,104,105,115,46,95,111,110,67,108,105,99,107,46,98,105,110,100,40,116,104,105,115,41,44,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,99,108,105,99,107,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,67,108,105,99,107,41,41,44,116,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,85,112,34,41,38,38,40,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,85,112,61,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,85,112,46,98,105,110,100,40,116,104,105,115,41,44,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,117,112,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,85,112,41,41,44,116,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,68,111,119,110,34,41,38,38,40,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,68,111,119,110,61,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,68,111,119,110,46,98,105,110,100,40,116,104,105,115,41,44,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,100,111,119,110,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,68,111,119,110,41,41,44,116,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,77,111,118,101,34,41,38,38,40,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,77,111,118,101,61,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,77,111,118,101,46,98,105,110,100,40,116,104,105,115,41,44,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,109,111,118,101,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,77,111,118,101,41,41,44,116,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,69,110,116,101,114,34,41,38,38,40,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,69,110,116,101,114,61,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,69,110,116,101,114,46,98,105,110,100,40,116,104,105,115,41,44,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,101,110,116,101,114,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,69,110,116,101,114,41,41,44,116,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,69,120,105,116,34,41,38,38,40,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,76,101,97,118,101,61,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,76,101,97,118,101,46,98,105,110,100,40,116,104,105,115,41,44,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,108,101,97,118,101,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,76,101,97,118,101,41,41,125,125,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,123,102,38,38,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,38,38,40,116,104,105,115,46,95,98,111,117,110,100,79,110,67,108,105,99,107,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,99,108,105,99,107,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,67,108,105,99,107,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,67,108,105,99,107,61,110,117,108,108,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,85,112,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,117,112,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,85,112,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,85,112,61,110,117,108,108,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,68,111,119,110,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,100,111,119,110,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,68,111,119,110,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,68,111,119,110,61,110,117,108,108,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,77,111,118,101,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,109,111,118,101,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,77,111,118,101,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,77,111,118,101,61,110,117,108,108,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,69,110,116,101,114,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,101,110,116,101,114,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,69,110,116,101,114,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,69,110,116,101,114,61,110,117,108,108,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,76,101,97,118,101,38,38,40,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,108,101,97,118,101,34,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,76,101,97,118,101,41,44,116,104,105,115,46,95,98,111,117,110,100,79,110,80,111,105,110,116,101,114,76,101,97,118,101,61,110,117,108,108,41,41,125,125,59,118,97,114,32,97,61,110,101,119,32,77,97,112,44,118,116,61,123,114,101,97,100,121,58,110,61,62,116,61,62,123,108,101,116,32,101,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,82,101,97,100,121,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,101,41,125,44,99,111,109,112,108,101,116,101,58,110,61,62,116,61,62,123,108,101,116,32,101,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,67,111,109,112,108,101,116,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,101,41,125,44,108,111,97,100,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,76,111,97,100,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,108,111,97,100,69,114,114,111,114,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,76,111,97,100,69,114,114,111,114,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,114,101,110,100,101,114,69,114,114,111,114,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,82,101,110,100,101,114,69,114,114,111,114,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,108,111,111,112,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,76,111,111,112,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,112,108,97,121,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,80,108,97,121,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,112,97,117,115,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,80,97,117,115,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,111,112,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,111,112,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,102,114,97,109,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,70,114,97,109,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,114,101,110,100,101,114,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,82,101,110,100,101,114,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,102,114,101,101,122,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,70,114,101,101,122,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,117,110,102,114,101,101,122,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,85,110,102,114,101,101,122,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,100,101,115,116,114,111,121,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,68,101,115,116,114,111,121,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,116,111,112,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,83,116,111,112,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,84,114,97,110,115,105,116,105,111,110,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,84,114,97,110,115,105,116,105,111,110,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,110,116,101,114,101,100,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,110,116,101,114,101,100,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,120,105,116,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,120,105,116,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,67,117,115,116,111,109,69,118,101,110,116,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,67,117,115,116,111,109,69,118,101,110,116,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,69,114,114,111,114,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,69,114,114,111,114,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,66,111,111,108,101,97,110,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,66,111,111,108,101,97,110,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,78,117,109,101,114,105,99,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,78,117,109,101,114,105,99,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,116,114,105,110,103,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,83,116,114,105,110,103,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,73,110,112,117,116,70,105,114,101,100,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,73,110,112,117,116,70,105,114,101,100,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,73,110,116,101,114,110,97,108,77,101,115,115,97,103,101,58,110,61,62,116,61,62,123,108,101,116,32,114,61,123,105,100,58,34,34,44,109,101,116,104,111,100,58,34,111,110,83,116,97,116,101,77,97,99,104,105,110,101,73,110,116,101,114,110,97,108,77,101,115,115,97,103,101,34,44,114,101,115,117,108,116,58,123,105,110,115,116,97,110,99,101,73,100,58,110,44,101,118,101,110,116,58,116,125,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,41,125,125,44,71,61,123,115,101,116,84,114,97,110,115,102,111,114,109,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,101,116,84,114,97,110,115,102,111,114,109,40,110,46,112,97,114,97,109,115,46,116,114,97,110,115,102,111,114,109,41,125,44,103,101,116,84,114,97,110,115,102,111,114,109,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,103,101,116,84,114,97,110,115,102,111,114,109,40,41,125,44,103,101,116,68,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,83,116,97,116,101,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,123,115,116,97,116,101,58,123,108,111,111,112,67,111,117,110,116,58,101,46,108,111,111,112,67,111,117,110,116,44,105,115,76,111,97,100,101,100,58,101,46,105,115,76,111,97,100,101,100,44,105,115,80,97,117,115,101,100,58,101,46,105,115,80,97,117,115,101,100,44,105,115,80,108,97,121,105,110,103,58,101,46,105,115,80,108,97,121,105,110,103,44,105,115,83,116,111,112,112,101,100,58,101,46,105,115,83,116,111,112,112,101,100,44,105,115,70,114,111,122,101,110,58,101,46,105,115,70,114,111,122,101,110,44,108,111,111,112,58,101,46,108,111,111,112,44,109,111,100,101,58,101,46,109,111,100,101,44,115,112,101,101,100,58,101,46,115,112,101,101,100,44,99,117,114,114,101,110,116,70,114,97,109,101,58,101,46,99,117,114,114,101,110,116,70,114,97,109,101,44,116,111,116,97,108,70,114,97,109,101,115,58,101,46,116,111,116,97,108,70,114,97,109,101,115,44,100,117,114,97,116,105,111,110,58,101,46,100,117,114,97,116,105,111,110,44,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,58,101,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,44,114,101,110,100,101,114,67,111,110,102,105,103,58,101,46,114,101,110,100,101,114,67,111,110,102,105,103,44,109,97,114,107,101,114,58,101,46,109,97,114,107,101,114,44,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,58,101,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,44,109,97,114,107,101,114,115,58,101,46,109,97,114,107,101,114,115,40,41,44,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,58,101,46,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,44,97,99,116,105,118,101,84,104,101,109,101,73,100,58,101,46,97,99,116,105,118,101,84,104,101,109,101,73,100,44,97,117,116,111,112,108,97,121,58,101,46,97,117,116,111,112,108,97,121,44,115,101,103,109,101,110,116,58,101,46,115,101,103,109,101,110,116,44,108,97,121,111,117,116,58,101,46,108,97,121,111,117,116,44,115,101,103,109,101,110,116,68,117,114,97,116,105,111,110,58,101,46,115,101,103,109,101,110,116,68,117,114,97,116,105,111,110,44,105,115,82,101,97,100,121,58,101,46,105,115,82,101,97,100,121,44,109,97,110,105,102,101,115,116,58,101,46,109,97,110,105,102,101,115,116,125,125,125,44,115,101,116,76,97,121,111,117,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,108,97,121,111,117,116,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,76,97,121,111,117,116,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,76,105,115,116,101,110,101,114,115,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,76,105,115,116,101,110,101,114,115,40,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,40,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,116,111,112,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,116,97,116,101,77,97,99,104,105,110,101,83,116,111,112,40,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,76,111,97,100,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,115,116,97,116,101,77,97,99,104,105,110,101,73,100,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,116,97,116,101,77,97,99,104,105,110,101,76,111,97,100,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,76,111,97,100,68,97,116,97,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,115,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,116,97,116,101,77,97,99,104,105,110,101,76,111,97,100,68,97,116,97,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,67,108,105,99,107,69,118,101,110,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,120,44,114,61,110,46,112,97,114,97,109,115,46,121,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,67,108,105,99,107,69,118,101,110,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,120,44,114,61,110,46,112,97,114,97,109,115,46,121,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,120,44,114,61,110,46,112,97,114,97,109,115,46,121,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,120,44,114,61,110,46,112,97,114,97,109,115,46,121,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,120,44,114,61,110,46,112,97,114,97,109,115,46,121,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,120,44,114,61,110,46,112,97,114,97,109,115,46,121,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,80,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,78,117,109,101,114,105,99,73,110,112,117,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,110,97,109,101,44,114,61,110,46,112,97,114,97,109,115,46,118,97,108,117,101,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,78,117,109,101,114,105,99,73,110,112,117,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,66,111,111,108,101,97,110,73,110,112,117,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,110,97,109,101,44,114,61,110,46,112,97,114,97,109,115,46,118,97,108,117,101,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,66,111,111,108,101,97,110,73,110,112,117,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,67,111,110,102,105,103,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,99,111,110,102,105,103,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,67,111,110,102,105,103,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,83,116,114,105,110,103,73,110,112,117,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,110,97,109,101,44,114,61,110,46,112,97,114,97,109,115,46,118,97,108,117,101,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,83,101,116,83,116,114,105,110,103,73,110,112,117,116,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,78,117,109,101,114,105,99,73,110,112,117,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,110,97,109,101,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,78,117,109,101,114,105,99,73,110,112,117,116,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,66,111,111,108,101,97,110,73,110,112,117,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,110,97,109,101,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,66,111,111,108,101,97,110,73,110,112,117,116,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,83,116,114,105,110,103,73,110,112,117,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,110,97,109,101,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,83,116,114,105,110,103,73,110,112,117,116,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,73,110,112,117,116,115,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,73,110,112,117,116,115,40,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,70,105,114,101,69,118,101,110,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,110,97,109,101,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,116,97,116,101,77,97,99,104,105,110,101,70,105,114,101,69,118,101,110,116,40,101,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,83,116,97,116,117,115,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,83,116,97,116,117,115,40,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,67,117,114,114,101,110,116,83,116,97,116,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,67,117,114,114,101,110,116,83,116,97,116,101,40,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,65,99,116,105,118,101,73,100,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,65,99,116,105,118,101,73,100,40,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,79,118,101,114,114,105,100,101,83,116,97,116,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,115,116,97,116,101,44,114,61,110,46,112,97,114,97,109,115,46,105,109,109,101,100,105,97,116,101,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,115,46,115,116,97,116,101,77,97,99,104,105,110,101,79,118,101,114,114,105,100,101,83,116,97,116,101,40,101,44,114,41,125,44,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,115,116,97,116,101,77,97,99,104,105,110,101,73,100,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,116,97,116,101,77,97,99,104,105,110,101,71,101,116,40,101,41,125,44,99,114,101,97,116,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,99,111,110,102,105,103,44,114,61,110,46,112,97,114,97,109,115,46,119,105,100,116,104,44,115,61,110,46,112,97,114,97,109,115,46,104,101,105,103,104,116,59,105,102,40,97,46,104,97,115,40,116,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,97,108,114,101,97,100,121,32,101,120,105,115,116,115,46,96,41,59,108,101,116,32,105,61,110,101,119,32,77,40,101,41,59,114,101,116,117,114,110,32,105,46,99,97,110,118,97,115,38,38,40,105,46,99,97,110,118,97,115,46,104,101,105,103,104,116,61,115,44,105,46,99,97,110,118,97,115,46,119,105,100,116,104,61,114,41,44,97,46,115,101,116,40,116,44,105,41,44,91,34,99,111,109,112,108,101,116,101,34,44,34,102,114,97,109,101,34,44,34,108,111,97,100,34,44,34,108,111,97,100,69,114,114,111,114,34,44,34,114,101,110,100,101,114,69,114,114,111,114,34,44,34,108,111,111,112,34,44,34,112,97,117,115,101,34,44,34,112,108,97,121,34,44,34,115,116,111,112,34,44,34,100,101,115,116,114,111,121,34,44,34,102,114,101,101,122,101,34,44,34,117,110,102,114,101,101,122,101,34,44,34,114,101,110,100,101,114,34,44,34,114,101,97,100,121,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,114,116,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,111,112,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,84,114,97,110,115,105,116,105,111,110,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,110,116,101,114,101,100,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,97,116,101,69,120,105,116,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,67,117,115,116,111,109,69,118,101,110,116,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,69,114,114,111,114,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,66,111,111,108,101,97,110,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,78,117,109,101,114,105,99,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,83,116,114,105,110,103,73,110,112,117,116,86,97,108,117,101,67,104,97,110,103,101,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,73,110,112,117,116,70,105,114,101,100,34,44,34,115,116,97,116,101,77,97,99,104,105,110,101,73,110,116,101,114,110,97,108,77,101,115,115,97,103,101,34,93,46,102,111,114,69,97,99,104,40,112,61,62,123,105,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,112,44,118,116,91,112,93,40,116,41,41,125,41,44,123,105,110,115,116,97,110,99,101,73,100,58,116,125,125,44,100,101,115,116,114,111,121,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,101,38,38,40,101,46,100,101,115,116,114,111,121,40,41,44,97,46,100,101,108,101,116,101,40,116,41,41,125,44,102,114,101,101,122,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,101,46,102,114,101,101,122,101,40,41,125,44,108,111,97,100,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,99,111,110,102,105,103,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,108,111,97,100,40,101,41,125,44,108,111,97,100,65,110,105,109,97,116,105,111,110,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,97,110,105,109,97,116,105,111,110,73,100,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,108,111,97,100,65,110,105,109,97,116,105,111,110,40,101,41,125,44,115,101,116,84,104,101,109,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,116,104,101,109,101,73,100,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,101,116,84,104,101,109,101,40,101,41,125,44,115,101,116,84,104,101,109,101,68,97,116,97,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,116,104,101,109,101,68,97,116,97,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,114,46,115,101,116,84,104,101,109,101,68,97,116,97,40,101,41,125,44,112,97,117,115,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,112,97,117,115,101,40,41,125,44,112,108,97,121,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,112,108,97,121,40,41,125,44,114,101,103,105,115,116,101,114,70,111,110,116,58,97,115,121,110,99,32,110,61,62,123,108,101,116,123,102,111,110,116,78,97,109,101,58,116,44,102,111,110,116,83,111,117,114,99,101,58,101,125,61,110,46,112,97,114,97,109,115,59,114,101,116,117,114,110,32,77,46,114,101,103,105,115,116,101,114,70,111,110,116,40,116,44,101,41,125,44,114,101,115,105,122,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,119,105,100,116,104,44,114,61,110,46,112,97,114,97,109,115,46,104,101,105,103,104,116,44,115,61,97,46,103,101,116,40,116,41,59,105,102,40,33,115,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,115,46,99,97,110,118,97,115,38,38,40,115,46,99,97,110,118,97,115,46,104,101,105,103,104,116,61,114,44,115,46,99,97,110,118,97,115,46,119,105,100,116,104,61,101,41,44,115,46,114,101,115,105,122,101,40,41,125,44,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,101,41,125,44,115,101,116,83,108,111,116,115,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,101,46,115,101,116,83,108,111,116,115,40,110,46,112,97,114,97,109,115,46,115,108,111,116,115,41,125,44,103,101,116,83,108,111,116,73,100,115,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,103,101,116,83,108,111,116,73,100,115,40,41,125,44,103,101,116,83,108,111,116,84,121,112,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,103,101,116,83,108,111,116,84,121,112,101,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,41,125,44,103,101,116,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,103,101,116,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,41,125,44,103,101,116,83,108,111,116,115,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,103,101,116,83,108,111,116,115,40,41,125,44,115,101,116,67,111,108,111,114,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,101,116,67,111,108,111,114,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,44,110,46,112,97,114,97,109,115,46,118,97,108,117,101,41,125,44,115,101,116,83,99,97,108,97,114,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,101,116,83,99,97,108,97,114,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,44,110,46,112,97,114,97,109,115,46,118,97,108,117,101,41,125,44,115,101,116,86,101,99,116,111,114,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,101,116,86,101,99,116,111,114,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,44,110,46,112,97,114,97,109,115,46,118,97,108,117,101,41,125,44,115,101,116,71,114,97,100,105,101,110,116,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,101,116,71,114,97,100,105,101,110,116,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,44,110,46,112,97,114,97,109,115,46,118,97,108,117,101,44,110,46,112,97,114,97,109,115,46,99,111,108,111,114,83,116,111,112,67,111,117,110,116,41,125,44,115,101,116,84,101,120,116,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,115,101,116,84,101,120,116,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,44,110,46,112,97,114,97,109,115,46,118,97,108,117,101,41,125,44,114,101,115,101,116,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,114,101,115,101,116,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,41,125,44,99,108,101,97,114,83,108,111,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,99,108,101,97,114,83,108,111,116,40,110,46,112,97,114,97,109,115,46,115,108,111,116,73,100,41,125,44,114,101,115,101,116,83,108,111,116,115,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,114,101,115,101,116,83,108,111,116,115,40,41,125,44,99,108,101,97,114,83,108,111,116,115,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,101,46,99,108,101,97,114,83,108,111,116,115,40,41,125,44,115,101,116,70,114,97,109,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,102,114,97,109,101,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,70,114,97,109,101,40,101,41,125,44,115,101,116,77,111,100,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,109,111,100,101,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,77,111,100,101,40,101,41,125,44,115,101,116,82,101,110,100,101,114,67,111,110,102,105,103,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,114,101,110,100,101,114,67,111,110,102,105,103,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,82,101,110,100,101,114,67,111,110,102,105,103,40,101,41,125,44,115,101,116,83,101,103,109,101,110,116,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,115,101,103,109,101,110,116,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,83,101,103,109,101,110,116,40,101,91,48,93,44,101,91,49,93,41,125,44,115,101,116,83,112,101,101,100,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,115,112,101,101,100,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,83,112,101,101,100,40,101,41,125,44,115,101,116,85,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,85,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,40,101,41,125,44,115,101,116,87,97,115,109,85,114,108,58,110,61,62,123,77,46,115,101,116,87,97,115,109,85,114,108,40,110,46,112,97,114,97,109,115,46,117,114,108,41,125,44,115,116,111,112,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,101,46,115,116,111,112,40,41,125,44,117,110,102,114,101,101,122,101,58,110,61,62,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,101,46,117,110,102,114,101,101,122,101,40,41,125,44,115,101,116,86,105,101,119,112,111,114,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,120,44,114,61,110,46,112,97,114,97,109,115,46,121,44,115,61,110,46,112,97,114,97,109,115,46,119,105,100,116,104,44,105,61,110,46,112,97,114,97,109,115,46,104,101,105,103,104,116,44,95,61,97,46,103,101,116,40,116,41,59,105,102,40,33,95,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,101,116,117,114,110,32,95,46,115,101,116,86,105,101,119,112,111,114,116,40,101,44,114,44,115,44,105,41,125,44,97,110,105,109,97,116,105,111,110,83,105,122,101,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,97,46,103,101,116,40,116,41,59,105,102,40,33,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,108,101,116,123,104,101,105,103,104,116,58,114,44,119,105,100,116,104,58,115,125,61,101,46,97,110,105,109,97,116,105,111,110,83,105,122,101,40,41,59,114,101,116,117,114,110,123,104,101,105,103,104,116,58,114,44,119,105,100,116,104,58,115,125,125,44,115,101,116,77,97,114,107,101,114,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,109,97,114,107,101,114,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,77,97,114,107,101,114,40,101,41,125,44,115,101,116,76,111,111,112,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,108,111,111,112,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,76,111,111,112,40,101,41,125,44,115,101,116,76,111,111,112,67,111,117,110,116,40,110,41,123,108,101,116,32,116,61,110,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,44,101,61,110,46,112,97,114,97,109,115,46,108,111,111,112,67,111,117,110,116,44,114,61,97,46,103,101,116,40,116,41,59,105,102,40,33,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,116,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,114,46,115,101,116,76,111,111,112,67,111,117,110,116,40,101,41,125,125,59,102,117,110,99,116,105,111,110,32,119,116,40,110,41,123,108,101,116,32,116,61,110,46,109,101,116,104,111,100,59,105,102,40,79,98,106,101,99,116,46,104,97,115,79,119,110,40,71,44,116,41,38,38,116,121,112,101,111,102,32,71,91,116,93,61,61,34,102,117,110,99,116,105,111,110,34,41,114,101,116,117,114,110,32,71,91,116,93,40,110,41,59,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,77,101,116,104,111,100,32,36,123,83,116,114,105,110,103,40,116,41,125,32,105,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,32,105,110,32,99,111,109,109,97,110,100,115,46,96,41,125,115,101,108,102,46,111,110,109,101,115,115,97,103,101,61,97,115,121,110,99,32,110,61,62,123,116,114,121,123,108,101,116,32,116,61,97,119,97,105,116,32,119,116,40,110,46,100,97,116,97,41,44,101,61,123,105,100,58,110,46,100,97,116,97,46,105,100,44,109,101,116,104,111,100,58,110,46,100,97,116,97,46,109,101,116,104,111,100,44,114,101,115,117,108,116,58,116,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,101,41,125,99,97,116,99,104,40,116,41,123,108,101,116,32,101,61,123,105,100,58,110,46,100,97,116,97,46,105,100,44,109,101,116,104,111,100,58,110,46,100,97,116,97,46,109,101,116,104,111,100,44,101,114,114,111,114,58,116,46,109,101,115,115,97,103,101,125,59,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,101,41,125,125,59,118,97,114,32,98,116,61,34,34,44,74,116,61,98,116,59,125,41,40,41,59,10])],{type:`application/javascript`}),t=URL.createObjectURL(e),n=new Worker(t);return URL.revokeObjectURL(t),n}},k7t=class{constructor(){a4(this,`_workers`,new Map),a4(this,`_animationWorkerMap`,new Map)}getWorker(e){return this._workers.has(e)||this._workers.set(e,new O7t),this._workers.get(e)}assignAnimationToWorker(e,t){this._animationWorkerMap.set(e,t)}unassignAnimationFromWorker(e){this._animationWorkerMap.delete(e)}sendMessage(e,t,n){this.getWorker(e).postMessage(t,n||[])}broadcastMessage(e,t){this._workers.forEach(n=>{n.postMessage(e,t||[])})}terminateWorker(e){let t=this._workers.get(e);t&&(t.terminate(),this._workers.delete(e))}};function A7t(e,t){if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement){let{height:n,width:r}=e.getBoundingClientRect();if(n!==0&&r!==0)return{width:r*t,height:n*t}}return{width:e.width,height:e.height}}function j7t(){return Date.now().toString(36)+Math.random().toString(36).substr(2,9)}var M7t=class e{constructor(t){if(a4(this,`_eventManager`,new h7t),a4(this,`_id`,void 0),a4(this,`_worker`,void 0),a4(this,`_canvas`,void 0),a4(this,`_dotLottieInstanceState`,{loopCount:0,markers:[],autoplay:!1,backgroundColor:``,currentFrame:0,duration:0,loop:!1,mode:`forward`,segment:[0,0],segmentDuration:0,speed:1,totalFrames:0,isLoaded:!1,isPlaying:!1,isPaused:!1,isStopped:!0,isFrozen:!1,useFrameInterpolation:!1,renderConfig:{devicePixelRatio:y4()},activeAnimationId:``,activeThemeId:``,layout:void 0,marker:``,isReady:!1,manifest:null}),a4(this,`_created`,!1),a4(this,`_boundOnClick`,null),a4(this,`_boundOnPointerUp`,null),a4(this,`_boundOnPointerDown`,null),a4(this,`_boundOnPointerMove`,null),a4(this,`_boundOnPointerEnter`,null),a4(this,`_boundOnPointerLeave`,null),a4(this,`_pendingConfig`,null),t.canvas){let e=typeof HTMLCanvasElement<`u`&&t.canvas instanceof HTMLCanvasElement,n=typeof OffscreenCanvas<`u`&&t.canvas instanceof OffscreenCanvas;if(!e&&!n)throw Error(`Worker-based DotLottie requires HTMLCanvasElement or OffscreenCanvas`)}this._canvas=t.canvas??null,this._id=`dotlottie-${j7t()}`;let n=t.workerId||`defaultWorker`;this._worker=e._workerManager.getWorker(n),e._workerManager.assignAnimationToWorker(this._id,n),e._wasmUrl&&this._sendMessage(`setWasmUrl`,{url:e._wasmUrl});let r={...t,renderConfig:{...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||y4(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0}};this._pendingConfig=r,this._canvas&&(this._create(r),this._pendingConfig=null),this._worker.addEventListener(`message`,this._handleWorkerEvent.bind(this))}async _handleWorkerEvent(e){let t=e.data;if(!t.id&&(t.method===`onLoad`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event),o4&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&(_4.observe(this._canvas,this),b4(this._canvas)||await this.freeze()),this._dotLottieInstanceState.renderConfig.autoResize&&v4.observe(this._canvas,this))),t.method===`onComplete`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onDestroy`&&t.result.instanceId===this._id&&this._eventManager.dispatch(t.result.event),t.method===`onUnfreeze`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._dotLottieInstanceState.isFrozen=!1,this._eventManager.dispatch(t.result.event)),t.method===`onFrame`&&t.result.instanceId===this._id&&(this._dotLottieInstanceState.currentFrame=t.result.event.currentFrame,this._eventManager.dispatch(t.result.event)),t.method===`onRender`&&t.result.instanceId===this._id&&this._eventManager.dispatch(t.result.event),t.method===`onFreeze`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onPause`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onPlay`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStop`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onLoadError`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onRenderError`&&t.result.instanceId===this._id&&this._eventManager.dispatch(t.result.event),t.method===`onReady`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onLoop`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineStart`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._setupStateMachineListeners(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineStop`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._cleanupStateMachineListeners(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineTransition`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineStateEntered`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineStateExit`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineCustomEvent`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineError`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineBooleanInputValueChange`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineNumericInputValueChange`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineStringInputValueChange`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineInputFired`&&t.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(t.result.event)),t.method===`onStateMachineInternalMessage`&&t.result.instanceId===this._id)){await this._updateDotLottieInstanceState();let e=t.result.event;e.message.startsWith(`OpenUrl: `)&&x7t(e.message)}}async _create(e){if(!this._canvas)return;let t;t=this._canvas instanceof HTMLCanvasElement?this._canvas.transferControlToOffscreen():this._canvas;let{instanceId:n}=await this._sendMessage(`create`,{instanceId:this._id,config:{...e,canvas:t},...A7t(this._canvas,e.renderConfig?.devicePixelRatio||y4())},[t]);if(n!==this._id)throw Error(`Instance ID mismatch`);this._created=!0,await this._updateDotLottieInstanceState()}get loopCount(){return this._dotLottieInstanceState.loopCount}get isLoaded(){return this._dotLottieInstanceState.isLoaded}get isPlaying(){return this._dotLottieInstanceState.isPlaying}get isPaused(){return this._dotLottieInstanceState.isPaused}get isStopped(){return this._dotLottieInstanceState.isStopped}get currentFrame(){return this._dotLottieInstanceState.currentFrame}get isFrozen(){return this._dotLottieInstanceState.isFrozen}get segmentDuration(){return this._dotLottieInstanceState.segmentDuration}get totalFrames(){return this._dotLottieInstanceState.totalFrames}get segment(){return this._dotLottieInstanceState.segment}get speed(){return this._dotLottieInstanceState.speed}get duration(){return this._dotLottieInstanceState.duration}get isReady(){return this._dotLottieInstanceState.isReady}get mode(){return this._dotLottieInstanceState.mode}get canvas(){return this._canvas}async setCanvas(e){let t=typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement,n=typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas;if(!t&&!n)throw Error(`Worker-based DotLottie requires HTMLCanvasElement or OffscreenCanvas`);if(this._canvas!==e){if(this._created&&this._canvas!==null)throw Error(`Cannot change canvas after worker instance is already created with a different canvas.`);this._canvas=e,!this._created&&this._pendingConfig&&(await this._create(this._pendingConfig),this._pendingConfig=null)}}get autoplay(){return this._dotLottieInstanceState.autoplay}get backgroundColor(){return this._dotLottieInstanceState.backgroundColor}get loop(){return this._dotLottieInstanceState.loop}get useFrameInterpolation(){return this._dotLottieInstanceState.useFrameInterpolation}get renderConfig(){return this._dotLottieInstanceState.renderConfig}get manifest(){return this._dotLottieInstanceState.manifest}get activeAnimationId(){return this._dotLottieInstanceState.activeAnimationId}get marker(){return this._dotLottieInstanceState.marker}get activeThemeId(){return this._dotLottieInstanceState.activeThemeId}get layout(){return this._dotLottieInstanceState.layout}async play(){this._created&&(await this._sendMessage(`play`,{instanceId:this._id}),await this._updateDotLottieInstanceState(),o4&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&!b4(this._canvas)&&await this.freeze())}async pause(){this._created&&(await this._sendMessage(`pause`,{instanceId:this._id}),await this._updateDotLottieInstanceState())}async stop(){this._created&&(await this._sendMessage(`stop`,{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setSpeed(e){this._created&&(await this._sendMessage(`setSpeed`,{instanceId:this._id,speed:e}),await this._updateDotLottieInstanceState())}async setMode(e){this._created&&(await this._sendMessage(`setMode`,{instanceId:this._id,mode:e}),await this._updateDotLottieInstanceState())}async setFrame(e){this._created&&(await this._sendMessage(`setFrame`,{frame:e,instanceId:this._id}),await this._updateDotLottieInstanceState())}async setSegment(e,t){this._created&&(await this._sendMessage(`setSegment`,{instanceId:this._id,segment:[e,t]}),await this._updateDotLottieInstanceState())}async setRenderConfig(e){if(!this._created)return;let{devicePixelRatio:t,freezeOnOffscreen:n,quality:r,...i}=e;await this._sendMessage(`setRenderConfig`,{instanceId:this._id,renderConfig:{...this._dotLottieInstanceState.renderConfig,...i,devicePixelRatio:t||y4(),freezeOnOffscreen:n??!0,...r!==void 0&&{quality:r}}}),await this._updateDotLottieInstanceState(),o4&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.autoResize?v4.observe(this._canvas,this):v4.unobserve(this._canvas),this._dotLottieInstanceState.renderConfig.freezeOnOffscreen?(_4.observe(this._canvas,this),b4(this._canvas)||await this.freeze()):(_4.unobserve(this._canvas),this._dotLottieInstanceState.isFrozen&&await this.unfreeze()))}async setUseFrameInterpolation(e){this._created&&(await this._sendMessage(`setUseFrameInterpolation`,{instanceId:this._id,useFrameInterpolation:e}),await this._updateDotLottieInstanceState())}async setTheme(e){if(!this._created)return!1;let t=this._sendMessage(`setTheme`,{instanceId:this._id,themeId:e});return await this._updateDotLottieInstanceState(),t}async load(e){if(!this._created){this._pendingConfig&&={...this._pendingConfig,...e};return}await this._sendMessage(`load`,{config:e,instanceId:this._id}),await this._updateDotLottieInstanceState()}async setLoop(e){this._created&&(await this._sendMessage(`setLoop`,{instanceId:this._id,loop:e}),await this._updateDotLottieInstanceState())}async setLoopCount(e){this._created&&(await this._sendMessage(`setLoopCount`,{instanceId:this._id,loopCount:e}),await this._updateDotLottieInstanceState())}async resize(){if(!this._created||!this._canvas)return;let{height:e,width:t}=A7t(this._canvas,this._dotLottieInstanceState.renderConfig.devicePixelRatio||y4());await this._sendMessage(`resize`,{height:e,instanceId:this._id,width:t}),await this._updateDotLottieInstanceState()}async destroy(){this._created&&(this._created=!1,await this._sendMessage(`destroy`,{instanceId:this._id}),this._cleanupStateMachineListeners(),e._workerManager.unassignAnimationFromWorker(this._id),this._eventManager.removeAllEventListeners(),o4&&this._canvas instanceof HTMLCanvasElement&&(_4.unobserve(this._canvas),v4.unobserve(this._canvas)))}async freeze(){this._created&&(await this._sendMessage(`freeze`,{instanceId:this._id}),await this._updateDotLottieInstanceState())}async unfreeze(){this._created&&(await this._sendMessage(`unfreeze`,{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setBackgroundColor(e){this._created&&(await this._sendMessage(`setBackgroundColor`,{instanceId:this._id,backgroundColor:e}),await this._updateDotLottieInstanceState())}async loadAnimation(e){this._created&&(await this._sendMessage(`loadAnimation`,{animationId:e,instanceId:this._id}),await this._updateDotLottieInstanceState())}async setLayout(e){this._created&&(await this._sendMessage(`setLayout`,{instanceId:this._id,layout:e}),await this._updateDotLottieInstanceState())}async setSlots(e){this._created&&await this._sendMessage(`setSlots`,{instanceId:this._id,slots:e})}async getSlotIds(){return this._created?this._sendMessage(`getSlotIds`,{instanceId:this._id}):[]}async getSlotType(e){if(this._created)return this._sendMessage(`getSlotType`,{instanceId:this._id,slotId:e})}async getSlot(e){if(this._created)return this._sendMessage(`getSlot`,{instanceId:this._id,slotId:e})}async getSlots(){return this._created?this._sendMessage(`getSlots`,{instanceId:this._id}):{}}async setColorSlot(e,t){return this._created?this._sendMessage(`setColorSlot`,{instanceId:this._id,slotId:e,value:t}):!1}async setScalarSlot(e,t){return this._created?this._sendMessage(`setScalarSlot`,{instanceId:this._id,slotId:e,value:t}):!1}async setVectorSlot(e,t){return this._created?this._sendMessage(`setVectorSlot`,{instanceId:this._id,slotId:e,value:t}):!1}async setGradientSlot(e,t,n){return this._created?this._sendMessage(`setGradientSlot`,{instanceId:this._id,slotId:e,value:t,colorStopCount:n}):!1}async setTextSlot(e,t){return this._created?this._sendMessage(`setTextSlot`,{instanceId:this._id,slotId:e,value:t}):!1}async resetSlot(e){return this._created?this._sendMessage(`resetSlot`,{instanceId:this._id,slotId:e}):!1}async clearSlot(e){return this._created?this._sendMessage(`clearSlot`,{instanceId:this._id,slotId:e}):!1}async resetSlots(){return this._created?this._sendMessage(`resetSlots`,{instanceId:this._id}):!1}async clearSlots(){return this._created?this._sendMessage(`clearSlots`,{instanceId:this._id}):!1}async _updateDotLottieInstanceState(){this._created&&(this._dotLottieInstanceState=(await this._sendMessage(`getDotLottieInstanceState`,{instanceId:this._id})).state)}markers(){return this._dotLottieInstanceState.markers}async setMarker(e){this._created&&(await this._sendMessage(`setMarker`,{instanceId:this._id,marker:e}),await this._updateDotLottieInstanceState())}async setThemeData(e){if(!this._created)return!1;let t=await this._sendMessage(`setThemeData`,{instanceId:this._id,themeData:e});return await this._updateDotLottieInstanceState(),t}async setViewport(e,t,n,r){return this._created?this._sendMessage(`setViewport`,{x:e,y:t,width:n,height:r,instanceId:this._id}):!1}async animationSize(){return this._created?this._sendMessage(`animationSize`,{instanceId:this._id}):{height:0,width:0}}async setTransform(e){return this._created?this._sendMessage(`setTransform`,{instanceId:this._id,transform:e}):!1}async getTransform(){if(this._created)return this._sendMessage(`getTransform`,{instanceId:this._id})}async _sendMessage(e,t,n){let r={id:`dotlottie-request-${j7t()}`,method:e,params:t};return this._worker.postMessage(r,n||[]),new Promise((t,n)=>{let i=a=>{let o=a.data;o.id===r.id&&(this._worker.removeEventListener(`message`,i),o.error?n(Error(`Failed to execute method ${e}: ${o.error}`)):t(o.result))};this._worker.addEventListener(`message`,i)})}addEventListener(e,t){this._eventManager.addEventListener(e,t)}removeEventListener(e,t){this._eventManager.removeEventListener(e,t)}static setWasmUrl(t){e._wasmUrl=t}static async registerFont(t,n){try{let r=j7t();return e._workerManager.broadcastMessage({id:r,method:`registerFont`,params:{fontName:t,fontSource:n}}),!0}catch(e){return console.error(`Error broadcasting registerFont for "${t}":`,e),!1}}async stateMachineLoad(e){if(!this._created)return!1;let t=await this._sendMessage(`stateMachineLoad`,{instanceId:this._id,stateMachineId:e});return await this._updateDotLottieInstanceState(),t}async stateMachineLoadData(e){if(!this._created)return!1;let t=await this._sendMessage(`stateMachineLoadData`,{instanceId:this._id,stateMachineData:e});return await this._updateDotLottieInstanceState(),t}async stateMachineStart(){if(!this._created)return!1;let e=await this._sendMessage(`stateMachineStart`,{instanceId:this._id});return e&&(this._setupStateMachineListeners(),await this._updateDotLottieInstanceState()),e}async stateMachineStop(){return this._created?(this._cleanupStateMachineListeners(),this._sendMessage(`stateMachineStop`,{instanceId:this._id})):!1}async stateMachineSetNumericInput(e,t){return this._created?this._sendMessage(`stateMachineSetNumericInput`,{instanceId:this._id,name:e,value:t}):!1}async stateMachineSetBooleanInput(e,t){return this._created?this._sendMessage(`stateMachineSetBooleanInput`,{instanceId:this._id,name:e,value:t}):!1}async stateMachineSetConfig(e){this._created&&this._sendMessage(`stateMachineSetConfig`,{instanceId:this._id,config:e})}async stateMachineSetStringInput(e,t){return this._created?this._sendMessage(`stateMachineSetStringInput`,{instanceId:this._id,name:e,value:t}):!1}async stateMachineGetNumericInput(e){if(this._created)return this._sendMessage(`stateMachineGetNumericInput`,{instanceId:this._id,name:e})}async stateMachineGetBooleanInput(e){if(this._created)return this._sendMessage(`stateMachineGetBooleanInput`,{instanceId:this._id,name:e})}async stateMachineGetStringInput(e){if(this._created)return this._sendMessage(`stateMachineGetStringInput`,{instanceId:this._id,name:e})}async stateMachineGetInputs(){if(this._created)return this._sendMessage(`stateMachineGetInputs`,{instanceId:this._id})}async stateMachineFireEvent(e){this._created&&this._sendMessage(`stateMachineFireEvent`,{instanceId:this._id,name:e})}async stateMachineGetStatus(){return this._created?this._sendMessage(`stateMachineGetStatus`,{instanceId:this._id}):``}async stateMachineGetCurrentState(){return this._created?this._sendMessage(`stateMachineGetCurrentState`,{instanceId:this._id}):``}async stateMachineGetActiveId(){return this._created?this._sendMessage(`stateMachineGetActiveId`,{instanceId:this._id}):``}async stateMachineOverrideState(e,t=!1){return this._created?this._sendMessage(`stateMachineOverrideState`,{instanceId:this._id,state:e,immediate:t}):!1}async stateMachineGet(e){return this._created?this._sendMessage(`stateMachineGet`,{instanceId:this._id,stateMachineId:e}):``}async stateMachineGetListeners(){return this._created?this._sendMessage(`stateMachineGetListeners`,{instanceId:this._id}):[]}async stateMachinePostClickEvent(e,t){if(this._created)return this._sendMessage(`stateMachinePostClickEvent`,{instanceId:this._id,x:e,y:t})}async stateMachinePostPointerUpEvent(e,t){if(this._created)return this._sendMessage(`stateMachinePostPointerUpEvent`,{instanceId:this._id,x:e,y:t})}async stateMachinePostPointerDownEvent(e,t){if(this._created)return this._sendMessage(`stateMachinePostPointerDownEvent`,{instanceId:this._id,x:e,y:t})}async stateMachinePostPointerMoveEvent(e,t){if(this._created)return this._sendMessage(`stateMachinePostPointerMoveEvent`,{instanceId:this._id,x:e,y:t})}async stateMachinePostPointerEnterEvent(e,t){if(this._created)return this._sendMessage(`stateMachinePostPointerEnterEvent`,{instanceId:this._id,x:e,y:t})}async stateMachinePostPointerExitEvent(e,t){if(this._created)return this._sendMessage(`stateMachinePostPointerExitEvent`,{instanceId:this._id,x:e,y:t})}_onClick(e){let t=x4(e);t&&this._sendMessage(`stateMachinePostClickEvent`,{instanceId:this._id,x:t.x,y:t.y})}_onPointerUp(e){let t=x4(e);t&&this._sendMessage(`stateMachinePostPointerUpEvent`,{instanceId:this._id,x:t.x,y:t.y})}_onPointerDown(e){let t=x4(e);t&&this._sendMessage(`stateMachinePostPointerDownEvent`,{instanceId:this._id,x:t.x,y:t.y})}_onPointerMove(e){let t=x4(e);t&&this._sendMessage(`stateMachinePostPointerMoveEvent`,{instanceId:this._id,x:t.x,y:t.y})}_onPointerEnter(e){let t=x4(e);t&&this._sendMessage(`stateMachinePostPointerEnterEvent`,{instanceId:this._id,x:t.x,y:t.y})}_onPointerLeave(e){let t=x4(e);t&&this._sendMessage(`stateMachinePostPointerExitEvent`,{instanceId:this._id,x:t.x,y:t.y})}async _setupStateMachineListeners(){if(o4&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded){let e=await this._sendMessage(`stateMachineGetListeners`,{instanceId:this._id});if(e.length===0)return;this._cleanupStateMachineListeners(),e.includes(`Click`)&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener(`click`,this._boundOnClick)),e.includes(`PointerUp`)&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener(`pointerup`,this._boundOnPointerUp)),e.includes(`PointerDown`)&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener(`pointerdown`,this._boundOnPointerDown)),e.includes(`PointerMove`)&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener(`pointermove`,this._boundOnPointerMove)),e.includes(`PointerEnter`)&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener(`pointerenter`,this._boundOnPointerEnter)),e.includes(`PointerExit`)&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener(`pointerleave`,this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){o4&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&=(this._canvas.removeEventListener(`click`,this._boundOnClick),null),this._boundOnPointerUp&&=(this._canvas.removeEventListener(`pointerup`,this._boundOnPointerUp),null),this._boundOnPointerDown&&=(this._canvas.removeEventListener(`pointerdown`,this._boundOnPointerDown),null),this._boundOnPointerMove&&=(this._canvas.removeEventListener(`pointermove`,this._boundOnPointerMove),null),this._boundOnPointerEnter&&=(this._canvas.removeEventListener(`pointerenter`,this._boundOnPointerEnter),null),this._boundOnPointerLeave&&=(this._canvas.removeEventListener(`pointerleave`,this._boundOnPointerLeave),null))}};a4(M7t,`_workerManager`,new k7t),a4(M7t,`_wasmUrl`,``);var N7t=({animationId:e,autoplay:t,backgroundColor:n,className:r,createDotLottie:i,data:a,dotLottieRefCallback:o,layout:s,loop:c,mode:l,playOnHover:u,renderConfig:d,segment:f,speed:p,src:m,stateMachineConfig:h,stateMachineId:g,style:_,themeData:v,themeId:y,useFrameInterpolation:b,workerId:x,...S})=>{let C=(0,H.useRef)(null),w=(0,H.useRef)(null),T=(0,H.useRef)(o),E={speed:p,mode:l,loop:c,useFrameInterpolation:b,segment:f,backgroundColor:n,autoplay:t,themeId:y,workerId:x,src:m,data:a,layout:s,renderConfig:d,animationId:e,stateMachineConfig:h,stateMachineId:g},D=(0,H.useRef)(E);T.current=o,D.current=E;let O=(0,H.useCallback)(e=>{w.current=e,e?C.current=i({...D.current,canvas:e}):(C.current?.destroy(),C.current=null),T.current?.(C.current)},[]);return(0,H.useEffect)(()=>{let e=e=>{u&&(e.type===`mouseenter`&&C.current?.play(),e.type===`mouseleave`&&C.current?.pause())};return w.current?.addEventListener(`mouseenter`,e),w.current?.addEventListener(`mouseleave`,e),()=>{w.current?.removeEventListener(`mouseenter`,e),w.current?.removeEventListener(`mouseleave`,e)}},[u]),(0,H.useEffect)(()=>{C.current?.setSpeed(p??1)},[p]),(0,H.useEffect)(()=>{C.current?.setMode(l??`forward`)},[l]),(0,H.useEffect)(()=>{C.current?.setLoop(c??!1)},[c]),(0,H.useEffect)(()=>{C.current?.setUseFrameInterpolation(b??!0)},[b]),(0,H.useEffect)(()=>{typeof f?.[0]==`number`&&typeof f[1]==`number`&&C.current?.setSegment(f[0],f[1])},[f]),(0,H.useEffect)(()=>{C.current?.setBackgroundColor(n??``)},[n]),(0,H.useEffect)(()=>{C.current?.setRenderConfig(d??{})},[JSON.stringify(d)]),(0,H.useEffect)(()=>{typeof a!=`string`&&typeof a!=`object`||C.current?.load({data:a,...D.current})},[a]),(0,H.useEffect)(()=>{typeof m==`string`&&C.current?.load({src:m,...D.current})},[m]),(0,H.useEffect)(()=>{C.current?.setMarker(S.marker??``)},[S.marker]),(0,H.useEffect)(()=>{C.current?.isLoaded&&C.current.activeAnimationId!==e&&C.current.loadAnimation(e??``)},[e]),(0,H.useEffect)(()=>{typeof y==`string`&&C.current?.setTheme(y)},[y]),(0,H.useEffect)(()=>{C.current?.setThemeData(v??``)},[v]),(0,H.useEffect)(()=>{C.current?.setLayout(s??{})},[s?.fit,s?.align?.[0],s?.align?.[1]]),(0,H.useEffect)(()=>{C.current?.isLoaded&&(typeof g==`string`&&g?C.current.stateMachineLoad(g)&&C.current.stateMachineStart():C.current.stateMachineStop())},[g]),(0,H.useEffect)(()=>{C.current?.stateMachineSetConfig(h??null)},[h]),(0,W.jsx)(`div`,{className:r,...!r&&{style:{width:`100%`,height:`100%`,lineHeight:0,..._}},children:(0,W.jsx)(`canvas`,{ref:O,style:{width:`100%`,height:`100%`},...S})})},P7t=e=>new D7t(e),F7t=e=>(0,W.jsx)(N7t,{...e,createDotLottie:P7t}),S4=(0,H.forwardRef)(({source:e,speed:t,loop:n,webStyle:r,autoPlay:i,hover:a,direction:o,progress:s,onAnimationLoaded:c,onAnimationFailure:l,onAnimationFinish:u,onAnimationLoop:d},f)=>{let[p,m]=(0,H.useState)(null),h=U5t(e),g=(0,H.useCallback)(e=>{m(e)},[]);return(0,H.useEffect)(()=>{if(p)return p.addEventListener(`load`,()=>{c?.()}),p.addEventListener(`loadError`,e=>{l?.(e.error.message)}),p.addEventListener(`complete`,()=>{u?.(!1)}),p.addEventListener(`stop`,()=>{u?.(!0)}),p.addEventListener(`pause`,()=>{u?.(!0)}),p.addEventListener(`loop`,()=>{d?.()}),()=>{p.removeEventListener(`load`),p.removeEventListener(`loadError`),p.removeEventListener(`complete`),p.removeEventListener(`stop`),p.removeEventListener(`pause`),p.removeEventListener(`loop`)}},[p,l,u,c,d]),(0,H.useEffect)(()=>{},[s]),(0,H.useImperativeHandle)(f,()=>({play:(e,t)=>{if(p)try{let n=e!==void 0&&t!==void 0,r=e===void 0&&t===void 0,i=t===e;if(n){if(i){p.setFrame(t),p.play();return}p.setSegment(e,t);return}e!==void 0&&t===void 0&&(p.setFrame(e),p.play()),r&&p.play()}catch(e){console.error(e)}},reset:()=>{p?.setFrame(0)},pause:()=>{p?.pause()},resume:()=>{p?.play()}}),[p]),h?H.createElement(F7t,{dotLottieRefCallback:g,data:h.sourceJson,src:h.sourceDotLottieURI??h.sourceURL??h.sourceName,style:r,autoplay:i,speed:t,loop:n,playOnHover:a,mode:o===-1?`reverse`:`forward`}):null}),I7t={nm:`Main Scene`,ddd:0,h:512,w:512,meta:{g:`@lottiefiles/creator 1.57.1`},layers:[{ty:4,nm:`checkmark`,sr:1,st:0,op:142,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[274.5396270751953,217.37841033935547]},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[100,100],t:0},{o:{x:.167,y:0},i:{x:.667,y:1},s:[40,40],t:17},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[42.12738736065131,42.12738736065131],t:30},{s:[35,35],t:55.5}]},sk:{a:0,k:0},p:{a:1,k:[{o:{x:.766,y:0},i:{x:.667,y:1},s:[258.35069274902344,253.4296],t:0},{s:[247.0721,257.4767],t:30}]},r:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:0},{s:[360],t:34}]},sa:{a:0,k:0},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:30},{s:[100],t:32}]}},shapes:[{ty:`sh`,bm:0,hd:!1,nm:`PATH Shape Path 4`,d:1,ks:{a:0,k:{c:!1,i:[[0,0],[.22160456730762235,0],[0,0]],o:[[0,0],[-.22160456730762235,0],[0,0]],v:[[164.47351800516967,213.2129896662655],[237.48336579287994,282.5929899094671],[401.33688548206123,109.43959041259353]]}}},{ty:`st`,bm:0,hd:!1,nm:`Stroke`,lc:2,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:40},c:{a:0,k:[1,1,1]}},{ty:`tm`,bm:0,hd:!1,nm:`Trim Path`,e:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:30},{s:[100],t:32}]},o:{a:0,k:0},s:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:30},{s:[0],t:32}]},m:1}],ind:1},{ty:4,nm:`Stroke`,sr:1,st:0,op:142,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0]},s:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[80,80],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[80,80],t:18},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[43.2783,43.2783],t:24},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[80,80],t:27},{s:[64.91745,64.91745],t:55}]},sk:{a:0,k:0},p:{a:0,k:[250,250]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},shapes:[{ty:`sh`,bm:0,hd:!1,nm:`Ellipse Path 2`,d:1,ks:{a:0,k:{c:!0,i:[[-109.27619999999999,0],[0,-109.27619999999999],[109.27619999999999,0],[0,109.27619999999999]],o:[[109.27619999999999,0],[0,109.27619999999999],[-109.27619999999999,0],[0,-109.27619999999999]],v:[[0,-198],[198,0],[0,198],[-198,0]]}}},{ty:`st`,bm:0,hd:!1,nm:`Stroke`,lc:2,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:10},c:{a:0,k:[.2902,.3647,.9216]}},{ty:`tm`,bm:0,hd:!1,nm:`Trim Path`,e:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[1],t:0},{s:[100],t:18}]},o:{a:0,k:0},s:{a:0,k:0},m:1}],ind:2},{ty:4,nm:`Cricle`,sr:1,st:0,op:142,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0]},s:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[147.99,147.99],t:18},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[79.3435,80.7645],t:24},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[147.2769,146.2194],t:27},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[147.2769,147.2769],t:31},{s:[119.01525000000001,121.14675],t:55}]},sk:{a:0,k:0},p:{a:0,k:[250,250]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[1],t:18},{s:[80],t:31}]}},shapes:[{ty:`el`,bm:0,hd:!1,nm:`Ellipse Path 3`,d:1,p:{a:0,k:[0,0]},s:{a:0,k:[211,211]}},{ty:`gf`,bm:0,hd:!1,nm:`Fill`,e:{a:0,k:[106.15959500909025,107.07329177198105]},g:{p:2,k:{a:0,k:[0,.2901960784313726,.36470588235294116,.9215686274509803,.9862385321100917,.3803921568627451,.4392156862745098,.8941176470588236,0,1,.9862385321100917,1]}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-107.87948552973407,-106.97939346053636]},r:1,o:{a:0,k:100}}],ind:3}],v:`5.7.0`,fr:30,op:150,ip:0,assets:[]},C4={LEAVING_RECOMMENDATION:I7t,LOADING_RECOMMENDATION:{nm:`Main Scene`,ddd:0,h:500,w:500,meta:{g:`@lottiefiles/creator 1.46.0`},layers:[{ty:4,nm:`Ellipse 2`,sr:1,st:0,op:150,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[67.87977600097668,-208.93170166015636]},s:{a:0,k:[80,80]},sk:{a:0,k:0},p:{a:0,k:[417.3254613281251,303.76822080078136]},r:{a:0,k:90},sa:{a:0,k:0},o:{a:0,k:100}},shapes:[{ty:`sh`,bm:0,hd:!1,nm:`Ellipse Path 2`,d:1,ks:{a:0,k:{c:!0,i:[[-127.48889999999999,0],[0,-127.48889999999999],[127.48889999999999,0],[0,127.48889999999999]],o:[[127.48889999999999,0],[0,127.48889999999999],[-127.48889999999999,0],[0,-127.48889999999999]],v:[[0,-231],[231,0],[0,231],[-231,0]]}}},{ty:`st`,bm:0,hd:!1,nm:`Stroke`,lc:2,lj:2,ml:1,o:{a:0,k:100},w:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[20],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[10],t:6},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[10],t:12},{s:[20],t:18}]},c:{a:0,k:[.2902,.3647,.9216]}},{ty:`tm`,bm:0,hd:!1,nm:`Trim Path`,e:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[10],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[51],t:6},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[99],t:12},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[99],t:18},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[99],t:29},{s:[90],t:30}]},o:{a:0,k:0},s:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:6},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[49],t:12},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[80],t:18},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[96],t:29},{s:[100],t:30}]},m:1}],ind:1},{ty:4,nm:`Ellipse 1`,sr:1,st:0,op:150,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,-5684341886080802e-29]},s:{a:0,k:[80,80]},sk:{a:0,k:0},p:{a:0,k:[250.00000000000006,250]},r:{a:0,k:90},sa:{a:0,k:0},o:{a:0,k:10}},shapes:[{ty:`sh`,bm:0,hd:!1,nm:`Ellipse Path 2`,d:1,ks:{a:0,k:{c:!0,i:[[-127.48889999999999,0],[0,-127.48889999999999],[127.48889999999999,0],[0,127.48889999999999]],o:[[127.48889999999999,0],[0,127.48889999999999],[-127.48889999999999,0],[0,-127.48889999999999]],v:[[0,-231],[231,0],[0,231],[-231,0]]}}},{ty:`st`,bm:0,hd:!1,nm:`Stroke`,lc:2,lj:2,ml:1,o:{a:0,k:100},w:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[20],t:0},{s:[20],t:36}]},c:{a:0,k:[.2902,.3647,.9216]}}],ind:2}],v:`5.7.0`,fr:30,op:30,ip:0,assets:[]},LOADING_SPINNER:{nm:`Main Scene`,ddd:0,h:500,w:500,meta:{g:`@lottiefiles/creator 1.46.0`},layers:[{ty:4,nm:`Ellipse 2`,sr:1,st:0,op:150,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[67.87977600097656,-208.93170166015642]},s:{a:0,k:[80,80]},sk:{a:0,k:0},p:{a:0,k:[417.32546132812513,303.76822080078125]},r:{a:0,k:90},sa:{a:0,k:0},o:{a:0,k:100}},shapes:[{ty:`sh`,bm:0,hd:!1,nm:`Ellipse Path 2`,d:1,ks:{a:0,k:{c:!0,i:[[-127.48889999999999,0],[0,-127.48889999999999],[127.48889999999999,0],[0,127.48889999999999]],o:[[127.48889999999999,0],[0,127.48889999999999],[-127.48889999999999,0],[0,-127.48889999999999]],v:[[0,-231],[231,0],[0,231],[-231,0]]}}},{ty:`st`,bm:0,hd:!1,nm:`Stroke`,lc:2,lj:2,ml:1,o:{a:0,k:100},w:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[20],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[10],t:6},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[10],t:12},{s:[20],t:18}]},c:{a:0,k:[.2902,.3647,.9216]}},{ty:`tm`,bm:0,hd:!1,nm:`Trim Path`,e:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[10],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[51],t:6},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[99],t:12},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[99],t:18},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[99],t:29},{s:[90],t:30}]},o:{a:0,k:0},s:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:6},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[49],t:12},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[80],t:18},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[96],t:29},{s:[100],t:30}]},m:1}],ind:1},{ty:4,nm:`Ellipse 1`,sr:1,st:0,op:150,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,-5684341886080802e-29]},s:{a:0,k:[80,80]},sk:{a:0,k:0},p:{a:0,k:[250.00000000000006,250]},r:{a:0,k:90},sa:{a:0,k:0},o:{a:0,k:10}},shapes:[{ty:`sh`,bm:0,hd:!1,nm:`Ellipse Path 2`,d:1,ks:{a:0,k:{c:!0,i:[[-127.48889999999999,0],[0,-127.48889999999999],[127.48889999999999,0],[0,127.48889999999999]],o:[[127.48889999999999,0],[0,127.48889999999999],[-127.48889999999999,0],[0,-127.48889999999999]],v:[[0,-231],[231,0],[0,231],[-231,0]]}}},{ty:`st`,bm:0,hd:!1,nm:`Stroke`,lc:2,lj:2,ml:1,o:{a:0,k:100},w:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[20],t:0},{s:[20],t:36}]},c:{a:0,k:[.2902,.3647,.9216]}}],ind:2}],v:`5.7.0`,fr:30,op:30,ip:0,assets:[]},CHECKMARK:I7t};V();var w4=()=>{let{COLORS:e}=J();return(0,W.jsx)(B,{style:[L7t.container,{backgroundColor:e.bgPrimary}],children:(0,W.jsx)(S4,{source:C4.LOADING_SPINNER,autoPlay:!0,style:L7t.size,webStyle:L7t.size,speed:.5})})},L7t=R.create({container:{flex:1,justifyContent:`center`,alignItems:`center`},size:{height:48,width:48}});V(),R.create({pagesIndicators:{flexDirection:`row`,justifyContent:`center`,marginVertical:12},dot:{width:8,height:8,borderRadius:4,marginHorizontal:4}}),V();var R7t=({onPress:e,text:t,style:n})=>{let{COLORS:r}=J();return(0,W.jsxs)(Kp,{testID:`scan-food-button`,onPress:e,style:({pressed:e})=>[{opacity:e?.5:1},n],children:[(0,W.jsx)(M2.default,{colors:p0,start:{x:0,y:0},end:{x:1,y:1},style:[R.absoluteFill,{borderRadius:t?16:100}]}),(0,W.jsxs)(B,{style:[z7t.scanFoodButtonContent,{backgroundColor:r.bgButtonSecondary,borderRadius:t?15:100}],children:[(0,W.jsx)(A8t,{}),t&&(0,W.jsx)(X,{style:[z7t.title,{color:r.textButtonSecondary}],children:t})]})]})},z7t=R.create({scanFoodButtonContent:{flex:1,flexDirection:`row`,alignItems:`center`,justifyContent:`center`,gap:8,margin:1,paddingHorizontal:15,paddingVertical:7},title:{...q.Poppins.medium_SM,alignSelf:`center`}});V();var T4=({title:e})=>{let{COLORS:t}=J();return(0,W.jsx)(B,{style:B7t.container,children:(0,W.jsx)(X,{style:[B7t.title,{color:t.labelPrimary}],children:e})})},B7t=R.create({container:{gap:8,marginBottom:8},title:{...q.Poppins.medium_SM}});V();function E4({title:e,message:t,value:n,testID:r,onValueChange:i,style:a}){let{COLORS:o}=J();return(0,W.jsx)(B,{style:[D4.container,a],children:(0,W.jsxs)(B,{style:D4.row,children:[(0,W.jsxs)(B,{style:D4.textContainer,accessible:!0,children:[(0,W.jsx)(X,{style:[D4.title,{color:o.labelPrimary}],children:e}),(0,W.jsx)(X,{style:[D4.description,{color:o.labelSecondary}],children:t})]}),(0,W.jsx)(tm,{testID:`${r}-${n}`,value:n,trackColor:{true:o.bgSliderForeground,false:o.bgSliderBackground},thumbColor:o.toggleKnob,onValueChange:i,accessibilityLabel:e,activeThumbColor:o.toggleKnob,activeTrackColor:o.bgSliderForeground})]})})}var D4=R.create({container:{justifyContent:`space-between`,padding:16,borderRadius:16},row:{flexDirection:`row`,justifyContent:`space-between`},textContainer:{flex:1},title:{...q.Poppins.semiBold_Base,marginBottom:8},description:{...q.Poppins.regular_SM}});V();function O4({message:e,type:t=`error`}){let{COLORS:n}=J();return(0,W.jsx)(B,{style:V7t.container,children:(0,W.jsx)(X,{style:[V7t.text,{color:t===`error`?n.textInputDanger:n.textWarning}],children:e})})}var V7t=R.create({container:{marginTop:8},text:{...q.Poppins.regular_SM,marginHorizontal:16,textAlign:`left`}}),H7t={reachabilityUrl:`/`,reachabilityMethod:`HEAD`,reachabilityHeaders:{},reachabilityTest:e=>Promise.resolve(e.status===200),reachabilityShortTimeout:5*1e3,reachabilityLongTimeout:60*1e3,reachabilityRequestTimeout:15*1e3,reachabilityShouldRun:()=>!0,shouldFetchWiFiSSID:!0,useNativeReachability:!0},k4=`netInfo.networkStatusDidChange`,A4;(function(e){e.unknown=`unknown`,e.none=`none`,e.cellular=`cellular`,e.wifi=`wifi`,e.bluetooth=`bluetooth`,e.ethernet=`ethernet`,e.wimax=`wimax`,e.vpn=`vpn`,e.other=`other`})(A4||={});var j4;(function(e){e[`2g`]=`2g`,e[`3g`]=`3g`,e[`4g`]=`4g`,e[`5g`]=`5g`})(j4||={});var M4=typeof window<`u`,N4=M4&&!window.hasOwnProperty(`tizen`)&&!window.hasOwnProperty(`webOS`)?window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection:void 0,U7t={bluetooth:A4.bluetooth,cellular:A4.cellular,ethernet:A4.ethernet,none:A4.none,other:A4.other,unknown:A4.unknown,wifi:A4.wifi,wimax:A4.wimax,mixed:A4.other},W7t={"2g":j4[`2g`],"3g":j4[`3g`],"4g":j4[`4g`],"slow-2g":j4[`2g`]},G7t=e=>{let t=M4?navigator.onLine:!1,n={isInternetReachable:null};if(!N4)return t?{...n,isConnected:!0,type:A4.other,details:{isConnectionExpensive:!1}}:{...n,isConnected:!1,isInternetReachable:!1,type:A4.none,details:null};let r=N4.saveData,i=N4.type?U7t[N4.type]:t?A4.other:A4.unknown;return i===A4.bluetooth?{...n,isConnected:!0,type:i,details:{isConnectionExpensive:r}}:i===A4.cellular?{...n,isConnected:!0,type:i,details:{isConnectionExpensive:r,cellularGeneration:W7t[N4.effectiveType]||null,carrier:null}}:i===A4.ethernet?{...n,isConnected:!0,type:i,details:{isConnectionExpensive:r,ipAddress:null,subnet:null}}:i===A4.wifi?{...n,isConnected:!0,type:i,details:{isConnectionExpensive:r,ssid:null,bssid:null,strength:null,ipAddress:null,subnet:null,frequency:null,linkSpeed:null,rxLinkSpeed:null,txLinkSpeed:null}}:i===A4.wimax?{...n,isConnected:!0,type:i,details:{isConnectionExpensive:r}}:i===A4.none?{...n,isConnected:!1,isInternetReachable:!1,type:i,details:null}:i===A4.unknown?{...n,isConnected:t,isInternetReachable:null,type:i,details:null}:{...n,isConnected:!0,type:A4.other,details:{isConnectionExpensive:r}}},K7t=[],q7t=[],J7t={addListener(e,t){switch(e){case k4:{let e=()=>{t(G7t())};N4?N4.addEventListener(`change`,e):M4&&(window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,e,!1)),K7t.push(t),q7t.push(e);break}}},removeListeners(e,t){switch(e){case k4:{let e=K7t.indexOf(t),n=q7t[e];N4?N4.removeEventListener(`change`,n):M4&&(window.removeEventListener(`online`,n),window.removeEventListener(`offline`,n)),K7t.splice(e,1),q7t.splice(e,1);break}}},async getCurrentState(e){return G7t(e)},configure(){}};V();var Y7t=new Xf;J7t.addListener(k4,e=>{Y7t.emit(k4,e)});var X7t={...J7t,eventEmitter:Y7t};function P4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z7t=class{constructor(e,t){P4(this,`_configuration`,void 0),P4(this,`_listener`,void 0),P4(this,`_isInternetReachable`,void 0),P4(this,`_currentInternetReachabilityCheckHandler`,null),P4(this,`_currentTimeoutHandle`,null),P4(this,`_setIsInternetReachable`,e=>{this._isInternetReachable!==e&&(this._isInternetReachable=e,this._listener(this._isInternetReachable))}),P4(this,`_setExpectsConnection`,e=>{this._currentInternetReachabilityCheckHandler!==null&&(this._currentInternetReachabilityCheckHandler.cancel(),this._currentInternetReachabilityCheckHandler=null),this._currentTimeoutHandle!==null&&(clearTimeout(this._currentTimeoutHandle),this._currentTimeoutHandle=null),e&&this._configuration.reachabilityShouldRun()?(this._isInternetReachable||this._setIsInternetReachable(null),this._currentInternetReachabilityCheckHandler=this._checkInternetReachability()):this._setIsInternetReachable(!1)}),P4(this,`_checkInternetReachability`,()=>{let e=new AbortController,t=fetch(this._configuration.reachabilityUrl,{headers:this._configuration.reachabilityHeaders,method:this._configuration.reachabilityMethod,cache:`no-cache`,signal:e.signal}),n,r=new Promise((e,t)=>{n=setTimeout(()=>t(`timedout`),this._configuration.reachabilityRequestTimeout)}),i=()=>{},a=new Promise((e,t)=>{i=()=>t(`canceled`)});return{promise:Promise.race([t,r,a]).then(e=>this._configuration.reachabilityTest(e)).then(e=>{this._setIsInternetReachable(e);let t=this._isInternetReachable?this._configuration.reachabilityLongTimeout:this._configuration.reachabilityShortTimeout;this._currentTimeoutHandle=setTimeout(this._checkInternetReachability,t)}).catch(t=>{t===`canceled`?e.abort():(t===`timedout`&&e.abort(),this._setIsInternetReachable(!1),this._currentTimeoutHandle=setTimeout(this._checkInternetReachability,this._configuration.reachabilityShortTimeout))}).then(()=>{clearTimeout(n)},e=>{throw clearTimeout(n),e}),cancel:i}}),P4(this,`update`,e=>{typeof e.isInternetReachable==`boolean`&&this._configuration.useNativeReachability?this._setIsInternetReachable(e.isInternetReachable):this._setExpectsConnection(e.isConnected)}),P4(this,`currentState`,()=>this._isInternetReachable),P4(this,`tearDown`,()=>{this._currentInternetReachabilityCheckHandler!==null&&(this._currentInternetReachabilityCheckHandler.cancel(),this._currentInternetReachabilityCheckHandler=null),this._currentTimeoutHandle!==null&&(clearTimeout(this._currentTimeoutHandle),this._currentTimeoutHandle=null)}),this._configuration=e,this._listener=t}};function F4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q7t=class{constructor(e){F4(this,`_nativeEventSubscription`,null),F4(this,`_subscriptions`,new Set),F4(this,`_latestState`,null),F4(this,`_internetReachability`,void 0),F4(this,`_handleNativeStateUpdate`,e=>{this._internetReachability.update(e);let t=this._convertState(e);this._latestState=t,this._subscriptions.forEach(e=>e(t))}),F4(this,`_handleInternetReachabilityUpdate`,e=>{if(!this._latestState)return;let t={...this._latestState,isInternetReachable:e};this._latestState=t,this._subscriptions.forEach(e=>e(t))}),F4(this,`_fetchCurrentState`,async e=>{let t=await X7t.getCurrentState(e);this._internetReachability.update(t);let n=this._convertState(t);return e||(this._latestState=n,this._subscriptions.forEach(e=>e(n))),n}),F4(this,`_convertState`,e=>typeof e.isInternetReachable==`boolean`?e:{...e,isInternetReachable:this._internetReachability.currentState()}),F4(this,`latest`,e=>e?this._fetchCurrentState(e):this._latestState?Promise.resolve(this._latestState):this._fetchCurrentState()),F4(this,`add`,e=>{this._subscriptions.add(e),this._latestState?e(this._latestState):this.latest().then(e)}),F4(this,`remove`,e=>{this._subscriptions.delete(e)}),F4(this,`tearDown`,()=>{this._internetReachability&&this._internetReachability.tearDown(),this._nativeEventSubscription&&this._nativeEventSubscription.remove(),this._subscriptions.clear()}),this._internetReachability=new Z7t(e,this._handleInternetReachabilityUpdate),this._nativeEventSubscription=X7t.eventEmitter.addListener(k4,this._handleNativeStateUpdate),this._fetchCurrentState()}};V();var $7t=H7t,I4=null,L4=()=>new Q7t($7t),R4=!1,e9t=[];function t9t(e){$7t={...H7t,...e},I4&&=(I4.tearDown(),L4()),z.OS===`ios`&&X7t.configure(e)}function n9t(e){return I4||=L4(),I4.latest(e)}function r9t(){return I4||=L4(),R4?new Promise(e=>{e9t.push(e)}):(R4=!0,I4._fetchCurrentState().then(e=>(e9t.forEach(t=>t(e)),e9t=[],e)).finally(()=>{R4=!1}))}function i9t(e){return I4||=L4(),I4.add(e),()=>{I4&&I4.remove(e)}}function a9t(e){e&&t9t(e);let[t,n]=(0,H.useState)({type:A4.unknown,isConnected:null,isInternetReachable:null,details:null});return(0,H.useEffect)(()=>{let e=i9t(n);return()=>e()},[]),t}function o9t(e=!1,t){let[n,r]=(0,H.useState)(),[i,a]=(0,H.useState)({type:A4.unknown,isConnected:null,isInternetReachable:null,details:null});return(0,H.useEffect)(()=>{if(e)return;let n=new Q7t({...H7t,...t});return r(n),n.add(a),n.tearDown},[e,t]),{netInfo:i,refresh:(0,H.useCallback)(()=>{n&&!R4&&(R4=!0,n._fetchCurrentState().finally(()=>{R4=!1}))},[n])}}var s9t={configure:t9t,fetch:n9t,refresh:r9t,addEventListener:i9t,useNetInfo:a9t,useNetInfoInstance:o9t},c9t=s((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),l9t=s((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),u9t=s((e=>{var t=c9t(),n=l9t(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(xe(e,ArrayBuffer)||e&&xe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(xe(e,SharedArrayBuffer)||e&&xe(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);let i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){let t=e.length<0?0:_(e.length)|0,n=o(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function m(e){if(xe(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}function h(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,s.prototype),r}function g(e){if(s.isBuffer(e)){let t=_(e.length)|0,n=o(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||L(e.length)?o(0):p(e);if(e.type===`Buffer`&&Array.isArray(e.data))return p(e.data)}function _(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(xe(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),xe(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return s.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(xe(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(s.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||xe(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return _e(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return ye(e).length;default:if(i)return r?-1:_e(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return ie(this,t,n);case`utf8`:case`utf-8`:return A(this,t,n);case`ascii`:return ne(this,t,n);case`latin1`:case`binary`:return re(this,t,n);case`base64`:return k(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return j(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)x(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?A(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e?!0:s.compare(this,e)===0},s.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(xe(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<c;++e)if(l[e]!==u[e]){a=l[e],o=u[e];break}return a<o?-1:+(o<a)};function S(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,L(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:C(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function C(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function w(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(L(r))return o;e[n+o]=r}return o}function T(e,t,n,r){return be(_e(t,e.length-n),e,n,r)}function E(e,t,n,r){return be(I(t),e,n,r)}function D(e,t,n,r){return be(ye(t),e,n,r)}function O(e,t,n,r){return be(ve(t,e.length-n),e,n,r)}s.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return w(this,e,t,n);case`utf8`:case`utf-8`:return T(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return E(this,e,t,n);case`base64`:return D(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return O(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return te(r)}var ee=4096;function te(e){let t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function ne(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function re(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function ie(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=Se[e[r]];return i}function j(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}s.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r};function ae(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||ae(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||ae(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||ae(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||ae(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||ae(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||ae(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||ae(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=Ce(function(e){e>>>=0,me(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&he(e,this.length-8);let r=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=Ce(function(e){e>>>=0,me(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&he(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||ae(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||ae(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||ae(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||ae(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||ae(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||ae(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||ae(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=Ce(function(e){e>>>=0,me(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&he(e,this.length-8);let r=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),s.prototype.readBigInt64BE=Ce(function(e){e>>>=0,me(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&he(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||ae(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||ae(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||ae(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||ae(e,8,this.length),n.read(this,e,!1,52,8)};function oe(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;oe(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;oe(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function se(e,t,n,r,i){pe(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function ce(e,t,n,r,i){pe(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}s.prototype.writeBigUInt64LE=Ce(function(e,t=0){return se(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeBigUInt64BE=Ce(function(e,t=0){return ce(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);oe(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);oe(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeBigInt64LE=Ce(function(e,t=0){return se(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),s.prototype.writeBigInt64BE=Ce(function(e,t=0){return ce(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function M(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function N(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)};function P(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=s.isBuffer(e)?e:s.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};var le={};function ue(e,t,n){le[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}ue(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),ue(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),ue(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=de(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=de(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function de(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function fe(e,t,n){me(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&he(t,e.length-(n+1))}function pe(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new le.ERR_OUT_OF_RANGE(`value`,i,e)}fe(r,i,a)}function me(e,t){if(typeof e!=`number`)throw new le.ERR_INVALID_ARG_TYPE(t,`number`,e)}function he(e,t,n){throw Math.floor(e)===e?t<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(me(e,n),new le.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}var ge=/[^+/0-9A-Za-z-_]/g;function F(e){if(e=e.split(`=`)[0],e=e.trim().replace(ge,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function _e(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function I(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function ve(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function ye(e){return t.toByteArray(F(e))}function be(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function xe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function L(e){return e!==e}var Se=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function Ce(e){return typeof BigInt>`u`?we:e}function we(){throw Error(`BigInt not supported`)}}))(),d9t=async e=>{let t=new URL(NK.OAUTH_BASE_URL+`/token`).toString(),n=u9t.Buffer.from(encodeURIComponent(NK.OAUTH_CLIENT_ID)).toString(`base64`);return fetch(t,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Authorization:`Basic `+n,...UK},body:new URLSearchParams({grant_type:`refresh_token`,refresh_token:e}).toString()})},f9t=async()=>{let e=`${NK.HDA_SESSION_URL}/session`,t=await fetch(e,{method:Y.HTTPRequestMethod.GET,headers:{Accept:`application/json`}});return await y0(t,Y.StatusCode.OK,e),t.json()},p9t={accessToken:void 0,refreshToken:void 0,isOnboardingFinished:void 0,hasCompletedSetupFlow:!1,notificationPermissionsStatus:`unknown`,pinCode:void 0,settingsUnlockedTimestamp:null,isPinSetupShouldBeShown:!1,isElevatedAuthConfirmed:!1},m9t={...p9t,accessToken:PK.getString(`access_token`),refreshToken:PK.getString(`refresh_token`),isOnboardingFinished:PK.getBoolean(`isOnboardingFinished`)},z4=kK()(jK(e=>({...m9t,setTokens:({accessToken:t,refreshToken:n})=>{e({accessToken:t,refreshToken:n})},setIsOnboardingFinished:t=>{e({isOnboardingFinished:t,hasCompletedSetupFlow:t})},setIsPinSetupShouldBeShown:t=>{e({isPinSetupShouldBeShown:t})},setHasCompletedSetupFlow:t=>{e({hasCompletedSetupFlow:t})},setNotificationPermissionsStatus:t=>{e({notificationPermissionsStatus:t})},setPINCode(t){e({pinCode:t})},setSettingsUnlockedTimestamp:t=>{e({settingsUnlockedTimestamp:t})},setIsElevatedAuthConfirmed:t=>{e({isElevatedAuthConfirmed:t})},clear:()=>{e(p9t)}}),{name:`AUTH_STORE`,storage:AK(FK),partialize:({settingsUnlockedTimestamp:e,isElevatedAuthConfirmed:t,...n})=>n}));async function h9t(e){if(NK.TRACKING_ENABLED!==`true`)return;let t={...e,uuid:void 0},n={headers:{Accept:`application/json`,"Content-Type":`application/json`,...UK},body:JSON.stringify(t),method:Y.HTTPRequestMethod.POST},r=VK?`/events`:`/projects/${NK.TRACKING_PROJECT_ID}/events`,i=`${NK.TRACKING_BASE_URL}${r}`;await y0(await fetch(i,n),Y.StatusCode.CREATED,i,Y.HTTPRequestMethod.POST)}var B4=function(e){return e.MalformedDataError=`Malformed Data Error`,e.IncorrectDataError=`Incorrect Data Type Error`,e}({});function V4(e){var t=[...arguments].slice(1);throw Error(typeof e==`number`?`[MobX] minified error nr: `+e+(t.length?` `+t.map(String).join(`,`):``)+`. Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts`:`[MobX] `+e)}var g9t={};function H4(){return typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof globalThis<`u`?globalThis:typeof self<`u`?self:g9t}var _9t=Object.assign,U4=Object.getOwnPropertyDescriptor,W4=Object.defineProperty,G4=Object.prototype,v9t=[];Object.freeze(v9t);var y9t={};Object.freeze(y9t);var b9t=typeof Proxy<`u`,x9t=Object.toString();function S9t(){b9t||V4(`Proxy not available`)}function C9t(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var K4=function(){};function q4(e){return typeof e==`function`}function J4(e){switch(typeof e){case`string`:case`symbol`:case`number`:return!0}return!1}function Y4(e){return typeof e==`object`&&!!e}function X4(e){if(!Y4(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var n=Object.hasOwnProperty.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n.toString()===x9t}function w9t(e){var t=e?.constructor;return t?t.name===`GeneratorFunction`||t.displayName===`GeneratorFunction`:!1}function Z4(e,t,n){W4(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function T9t(e,t,n){W4(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Q4(e,t){var n=`isMobX`+e;return t.prototype[n]=!0,function(e){return Y4(e)&&e[n]===!0}}function $4(e){return e!=null&&Object.prototype.toString.call(e)===`[object Map]`}function E9t(e){return Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(e)))===null}function e3(e){return e!=null&&Object.prototype.toString.call(e)===`[object Set]`}var D9t=Object.getOwnPropertySymbols!==void 0;function O9t(e){var t=Object.keys(e);if(!D9t)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return G4.propertyIsEnumerable.call(e,t)})):t}var t3=typeof Reflect<`u`&&Reflect.ownKeys?Reflect.ownKeys:D9t?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function k9t(e){return e===null?null:typeof e==`object`?``+e:e}function n3(e,t){return G4.hasOwnProperty.call(e,t)}var A9t=Object.getOwnPropertyDescriptors||function(e){var t={};return t3(e).forEach(function(n){t[n]=U4(e,n)}),t};function r3(e,t){return!!(e&t)}function i3(e,t,n){return n?e|=t:e&=~t,e}function j9t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function M9t(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,I9t(r.key),r)}}function a3(e,t,n){return t&&M9t(e.prototype,t),n&&M9t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o3(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=L9t(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
866
866
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s3(){return s3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s3.apply(null,arguments)}function N9t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,P9t(e,t)}function P9t(e,t){return P9t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P9t(e,t)}function F9t(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function I9t(e){var t=F9t(e,`string`);return typeof t==`symbol`?t:t+``}function L9t(e,t){if(e){if(typeof e==`string`)return j9t(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j9t(e,t):void 0}}var c3=Symbol(`mobx-stored-annotations`);function l3(e){function t(t,n){if(d3(n))return e.decorate_20223_(t,n);u3(t,n,e)}return Object.assign(t,e)}function u3(e,t,n){n3(e,c3)||Z4(e,c3,s3({},e[c3])),J9t(n)||(e[c3][t]=n)}function R9t(e){return n3(e,c3)||Z4(e,c3,s3({},e[c3])),e[c3]}function d3(e){return typeof e==`object`&&typeof e.kind==`string`}var f3=Symbol(`mobx administration`),p3=function(){function e(e){e===void 0&&(e=`Atom`),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=O3.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return atn(this)},t.reportChanged=function(){L3(),otn(this),R3()},t.toString=function(){return this.name_},a3(e,[{key:`isBeingObserved`,get:function(){return r3(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=i3(this.flags_,e.isBeingObservedMask_,t)}},{key:`isPendingUnobservation`,get:function(){return r3(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=i3(this.flags_,e.isPendingUnobservationMask_,t)}},{key:`diffValue`,get:function(){return+!!r3(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=i3(this.flags_,e.diffValueMask_,t===1)}}])}();p3.isBeingObservedMask_=1,p3.isPendingUnobservationMask_=2,p3.diffValueMask_=4;var z9t=Q4(`Atom`,p3);function B9t(e,t,n){t===void 0&&(t=K4),n===void 0&&(n=K4);var r=new p3(e);return t!==K4&&Atn(r,t),n!==K4&&jtn(r,n),r}function V9t(e,t){return e===t}function H9t(e,t){return knn(e,t)}function U9t(e,t){return knn(e,t,1)}function W9t(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e==1/t:e!==e&&t!==t}var m3={identity:V9t,structural:H9t,default:W9t,shallow:U9t};function h3(e,t,n){return Ktn(e)?e:Array.isArray(e)?x3.array(e,{name:n}):X4(e)?x3.object(e,void 0,{name:n}):$4(e)?x3.map(e,{name:n}):e3(e)?x3.set(e,{name:n}):typeof e==`function`&&!W3(e)&&!q3(e)?w9t(e)?K3(e):U3(n,e):e}function G9t(e,t,n){if(e==null||p6(e)||s6(e)||u6(e)||d6(e))return e;if(Array.isArray(e))return x3.array(e,{name:n,deep:!1});if(X4(e))return x3.object(e,void 0,{name:n,deep:!1});if($4(e))return x3.map(e,{name:n,deep:!1});if(e3(e))return x3.set(e,{name:n,deep:!1})}function g3(e){return e}function K9t(e,t){return knn(e,t)?t:e}var q9t=`override`;function J9t(e){return e.annotationType_===q9t}function _3(e,t){return{annotationType_:e,options_:t,make_:Y9t,extend_:X9t,decorate_20223_:Z9t}}function Y9t(e,t,n,r){var i;return(i=this.options_)!=null&&i.bound?this.extend_(e,t,n,!1)===null?0:1:r===e.target_?this.extend_(e,t,n,!1)===null?0:2:W3(n.value)?1:(W4(r,t,$9t(e,this,t,n,!1)),2)}function X9t(e,t,n,r){var i=$9t(e,this,t,n);return e.defineProperty_(t,i,r)}function Z9t(e,t){var n=t.kind,r=t.name,i=t.addInitializer,a=this,o=function(e){return w3(a.options_?.name??r.toString(),e,a.options_?.autoAction??!1)};if(n==`field`)return function(e){var t,n=e;return W3(n)||(n=o(n)),(t=a.options_)!=null&&t.bound&&(n=n.bind(this),n.isMobxAction=!0),n};if(n==`method`){var s;return W3(e)||(e=o(e)),(s=this.options_)!=null&&s.bound&&i(function(){var e=this,t=e[r].bind(e);t.isMobxAction=!0,e[r]=t}),e}V4(`Cannot apply '`+a.annotationType_+`' to '`+String(r)+`' (kind: `+n+`):`+(`
867
- '`+a.annotationType_+`' can only be used on properties with a function value.`))}function Q9t(e,t,n,r){t.annotationType_,r.value}function $9t(e,t,n,r,i){var a,o;i===void 0&&(i=I3.safeDescriptors),Q9t(e,t,n,r);var s=r.value;return(a=t.options_)!=null&&a.bound&&(s=s.bind(e.proxy_??e.target_)),{value:w3(t.options_?.name??n.toString(),s,t.options_?.autoAction??!1,(o=t.options_)!=null&&o.bound?e.proxy_??e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function een(e,t){return{annotationType_:e,options_:t,make_:ten,extend_:nen,decorate_20223_:ren}}function ten(e,t,n,r){var i;return r===e.target_?this.extend_(e,t,n,!1)===null?0:2:(i=this.options_)!=null&&i.bound&&(!n3(e.target_,t)||!q3(e.target_[t]))&&this.extend_(e,t,n,!1)===null?0:q3(n.value)?1:(W4(r,t,aen(e,this,t,n,!1,!1)),2)}function nen(e,t,n,r){var i=aen(e,this,t,n,this.options_?.bound);return e.defineProperty_(t,i,r)}function ren(e,t){var n,r=t.name,i=t.addInitializer;return q3(e)||(e=K3(e)),(n=this.options_)!=null&&n.bound&&i(function(){var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function ien(e,t,n,r){t.annotationType_,r.value}function aen(e,t,n,r,i,a){a===void 0&&(a=I3.safeDescriptors),ien(e,t,n,r);var o=r.value;return q3(o)||(o=K3(o)),i&&(o=o.bind(e.proxy_??e.target_),o.isMobXFlow=!0),{value:o,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function oen(e,t){return{annotationType_:e,options_:t,make_:sen,extend_:cen,decorate_20223_:len}}function sen(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function cen(e,t,n,r){return uen(e,this,t,n),e.defineComputedProperty_(t,s3({},this.options_,{get:n.get,set:n.set}),r)}function len(e,t){var n=this,r=t.name,i=t.addInitializer;return i(function(){var t=f6(this)[f3],i=s3({},n.options_,{get:e,context:this});i.name||=`ObservableObject.`+r.toString(),t.values_.set(r,new E3(i))}),function(){return this[f3].getObservablePropValue_(r)}}function uen(e,t,n,r){t.annotationType_,r.get}function v3(e,t){return{annotationType_:e,options_:t,make_:den,extend_:fen,decorate_20223_:pen}}function den(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function fen(e,t,n,r){return men(e,this,t,n),e.defineObservableProperty_(t,n.value,this.options_?.enhancer??h3,r)}function pen(e,t){var n=this,r=t.kind,i=t.name,a=new WeakSet;function o(e,t){var r=f6(e)[f3],o=new T3(t,n.options_?.enhancer??h3,`ObservableObject.`+i.toString(),!1);r.values_.set(i,o),a.add(e)}if(r==`accessor`)return{get:function(){return a.has(this)||o(this,e.get.call(this)),this[f3].getObservablePropValue_(i)},set:function(e){return a.has(this)||o(this,e),this[f3].setObservablePropValue_(i,e)},init:function(e){return a.has(this)||o(this,e),e}}}function men(e,t,n,r){t.annotationType_}var hen=`true`,gen=_en();function _en(e){return{annotationType_:hen,options_:e,make_:ven,extend_:yen,decorate_20223_:ben}}function ven(e,t,n,r){var i;if(n.get)return S3.make_(e,t,n,r);if(n.set){var a=w3(t.toString(),n.set);return r===e.target_?e.defineProperty_(t,{configurable:I3.safeDescriptors?e.isPlainObject_:!0,set:a})===null?0:2:(W4(r,t,{configurable:!0,set:a}),2)}if(r!==e.target_&&typeof n.value==`function`){var o;if(w9t(n.value)){var s;return((s=this.options_)!=null&&s.autoBind?K3.bound:K3).make_(e,t,n,r)}return((o=this.options_)!=null&&o.autoBind?U3.bound:U3).make_(e,t,n,r)}var c=this.options_?.deep===!1?x3.ref:x3;return typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),c.make_(e,t,n,r)}function yen(e,t,n,r){var i;return n.get?S3.extend_(e,t,n,r):n.set?e.defineProperty_(t,{configurable:I3.safeDescriptors?e.isPlainObject_:!0,set:w3(t.toString(),n.set)},r):(typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),(this.options_?.deep===!1?x3.ref:x3).extend_(e,t,n,r))}function ben(e,t){V4(`'`+this.annotationType_+`' cannot be used as a decorator`)}var xen=`observable`,Sen=`observable.ref`,Cen=`observable.shallow`,wen=`observable.struct`,Ten={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ten);function y3(e){return e||Ten}var Een=v3(xen),Den=v3(Sen,{enhancer:g3}),Oen=v3(Cen,{enhancer:G9t}),ken=v3(wen,{enhancer:K9t}),Aen=l3(Een);function b3(e){return e.deep===!0?h3:e.deep===!1?g3:Men(e.defaultDecorator)}function jen(e){return e?e.defaultDecorator??_en(e):void 0}function Men(e){return e?e.options_?.enhancer??h3:h3}function Nen(e,t,n){if(d3(t))return Een.decorate_20223_(e,t);if(J4(t)){u3(e,t,Een);return}return Ktn(e)?e:X4(e)?x3.object(e,t,n):Array.isArray(e)?x3.array(e,t):$4(e)?x3.map(e,t):e3(e)?x3.set(e,t):typeof e==`object`&&e?e:x3.box(e,t)}_9t(Nen,Aen);var x3=_9t(Nen,{box:function(e,t){var n=y3(t);return new T3(e,b3(n),n.name,!0,n.equals)},array:function(e,t){var n=y3(t);return(I3.useProxies===!1||n.proxy===!1?Tnn:enn)(e,b3(n),n.name)},map:function(e,t){var n=y3(t);return new inn(e,b3(n),n.name)},set:function(e,t){var n=y3(t);return new cnn(e,b3(n),n.name)},object:function(e,t,n){return h6(function(){return Itn(I3.useProxies===!1||n?.proxy===!1?f6({},n):Jtn({},n),e,t)})},ref:l3(Den),shallow:l3(Oen),deep:Aen,struct:l3(ken)}),Pen=`computed`,Fen=`computed.struct`,Ien=oen(Pen),Len=oen(Fen,{equals:m3.structural}),S3=function(e,t){if(d3(t))return Ien.decorate_20223_(e,t);if(J4(t))return u3(e,t,Ien);if(X4(e))return l3(oen(Pen,e));var n=X4(t)?t:{};return n.get=e,n.name||=e.name||``,new E3(n)};Object.assign(S3,Ien),S3.struct=l3(Len);var C3=0,Ren=1,zen=U4(function(){},`name`)?.configurable??!1,Ben={value:`action`,configurable:!0,writable:!1,enumerable:!1};function w3(e,t,n,r){n===void 0&&(n=!1);function i(){return Ven(e,n,t,r||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},zen&&(Ben.value=e,W4(i,`name`,Ben)),i}function Ven(e,t,n,r,i){var a=Hen(e,t,r,i);try{return n.apply(r,i)}catch(e){throw a.error_=e,e}finally{Uen(a)}}function Hen(e,t,n,r){var i=!1,a=0,o=I3.trackingDerivation,s=!t||!o;L3();var c=I3.allowStateChanges;s&&(j3(),c=Wen(!0));var l=Qen(!0),u={runAsAction_:s,prevDerivation_:o,prevAllowStateChanges_:c,prevAllowStateReads_:l,notifySpy_:i,startTime_:a,actionId_:Ren++,parentActionId_:C3};return C3=u.actionId_,u}function Uen(e){C3!==e.actionId_&&V4(30),C3=e.parentActionId_,e.error_!==void 0&&(I3.suppressReactionErrors=!0),Gen(e.prevAllowStateChanges_),N3(e.prevAllowStateReads_),R3(),e.runAsAction_&&M3(e.prevDerivation_),I3.suppressReactionErrors=!1}function Wen(e){var t=I3.allowStateChanges;return I3.allowStateChanges=e,t}function Gen(e){I3.allowStateChanges=e}var T3=function(e){function t(t,n,r,i,a){var o;return r===void 0&&(r=`ObservableValue`),i===void 0&&(i=!0),a===void 0&&(a=m3.default),o=e.call(this,r)||this,o.enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=r,o.equals=a,o.value_=n(t,void 0,r),o}N9t(t,e);var n=t.prototype;return n.dehanceValue=function(e){return this.dehancer===void 0?e:this.dehancer(e)},n.set=function(e){this.value_,e=this.prepareNewValue_(e),e!==I3.UNCHANGED&&this.setNewValue_(e)},n.prepareNewValue_=function(e){if(X3(this)){var t=Q3(this,{object:this,type:n6,newValue:e});if(!t)return I3.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?I3.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),$3(this)&&t6(this,{type:n6,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Z3(this,e)},n.observe_=function(e,t){return t&&e({observableKind:`value`,debugObjectName:this.name_,object:this,type:n6,newValue:this.value_,oldValue:void 0}),e6(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+`[`+this.value_+`]`},n.valueOf=function(){return k9t(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(p3),E3=function(){function e(e){this.dependenciesState_=O3.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=O3.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new k3(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ken.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||V4(31),this.derivation=e.get,this.name_=e.name||`ComputedValue`,e.set&&(this.setter_=w3(`ComputedValue-setter`,e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?m3.structural:m3.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){ctn(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&V4(32,this.name_,this.derivation),I3.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)qen(this)&&(this.warnAboutUntrackedRead_(),L3(),this.value_=this.computeValue_(!1),R3());else if(atn(this),qen(this)){var e=I3.trackingContext;this.keepAlive_&&!e&&(I3.trackingContext=this),this.trackAndCompute()&&stn(this),I3.trackingContext=e}var t=this.value_;if(A3(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&V4(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else V4(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===O3.NOT_TRACKING_,n=this.computeValue_(!0),r=t||A3(e)||A3(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing=!0;var t=Wen(!1),n;if(e)n=Jen(this,this.derivation,this.scope_);else if(I3.disableErrorBoundaries===!0)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(e){n=new k3(e)}return Gen(t),this.isComputing=!1,n},t.suspend_=function(){this.keepAlive_||(Xen(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return Ttn(function(){var a=n.get();if(!r||t){var o=j3();e({observableKind:`computed`,debugObjectName:n.name_,type:n6,object:n,newValue:a,oldValue:i}),M3(o)}r=!1,i=a})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+`[`+this.derivation.toString()+`]`},t.valueOf=function(){return k9t(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},a3(e,[{key:`isComputing`,get:function(){return r3(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=i3(this.flags_,e.isComputingMask_,t)}},{key:`isRunningSetter`,get:function(){return r3(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=i3(this.flags_,e.isRunningSetterMask_,t)}},{key:`isBeingObserved`,get:function(){return r3(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=i3(this.flags_,e.isBeingObservedMask_,t)}},{key:`isPendingUnobservation`,get:function(){return r3(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=i3(this.flags_,e.isPendingUnobservationMask_,t)}},{key:`diffValue`,get:function(){return+!!r3(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=i3(this.flags_,e.diffValueMask_,t===1)}}])}();E3.isComputingMask_=1,E3.isRunningSetterMask_=2,E3.isBeingObservedMask_=4,E3.isPendingUnobservationMask_=8,E3.diffValueMask_=16;var D3=Q4(`ComputedValue`,E3),O3;(function(e){e[e.NOT_TRACKING_=-1]=`NOT_TRACKING_`,e[e.UP_TO_DATE_=0]=`UP_TO_DATE_`,e[e.POSSIBLY_STALE_=1]=`POSSIBLY_STALE_`,e[e.STALE_=2]=`STALE_`})(O3||={});var Ken;(function(e){e[e.NONE=0]=`NONE`,e[e.LOG=1]=`LOG`,e[e.BREAK=2]=`BREAK`})(Ken||={});var k3=function(e){this.cause=void 0,this.cause=e};function A3(e){return e instanceof k3}function qen(e){switch(e.dependenciesState_){case O3.UP_TO_DATE_:return!1;case O3.NOT_TRACKING_:case O3.STALE_:return!0;case O3.POSSIBLY_STALE_:for(var t=Qen(!0),n=j3(),r=e.observing_,i=r.length,a=0;a<i;a++){var o=r[a];if(D3(o)){if(I3.disableErrorBoundaries)o.get();else try{o.get()}catch{return M3(n),N3(t),!0}if(e.dependenciesState_===O3.STALE_)return M3(n),N3(t),!0}}return $en(e),M3(n),N3(t),!1}}function Jen(e,t,n){var r=Qen(!0);$en(e),e.newObserving_=Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++I3.runId;var i=I3.trackingDerivation;I3.trackingDerivation=e,I3.inBatch++;var a;if(I3.disableErrorBoundaries===!0)a=t.call(n);else try{a=t.call(n)}catch(e){a=new k3(e)}return I3.inBatch--,I3.trackingDerivation=i,Yen(e),N3(r),a}function Yen(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=O3.UP_TO_DATE_,i=0,a=e.unboundDepsCount_,o=0;o<a;o++){var s=n[o];s.diffValue===0&&(s.diffValue=1,i!==o&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}for(n.length=i,e.newObserving_=null,a=t.length;a--;){var c=t[a];c.diffValue===0&&rtn(c,e),c.diffValue=0}for(;i--;){var l=n[i];l.diffValue===1&&(l.diffValue=0,ntn(l,e))}r!==O3.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function Xen(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)rtn(t[n],e);e.dependenciesState_=O3.NOT_TRACKING_}function Zen(e){var t=j3();try{return e()}finally{M3(t)}}function j3(){var e=I3.trackingDerivation;return I3.trackingDerivation=null,e}function M3(e){I3.trackingDerivation=e}function Qen(e){var t=I3.allowStateReads;return I3.allowStateReads=e,t}function N3(e){I3.allowStateReads=e}function $en(e){if(e.dependenciesState_!==O3.UP_TO_DATE_){e.dependenciesState_=O3.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=O3.UP_TO_DATE_}}var P3=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},F3=!0,etn=!1,I3=function(){var e=H4();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(F3=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new P3().version&&(F3=!1),F3?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new P3):(setTimeout(function(){etn||V4(35)},1),new P3)}();function ttn(){if((I3.pendingReactions.length||I3.inBatch||I3.isRunningReactions)&&V4(36),etn=!0,F3){var e=H4();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),I3=new P3}}function ntn(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function rtn(e,t){e.observers_.delete(t),e.observers_.size===0&&itn(e)}function itn(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,I3.pendingUnobservations.push(e))}function L3(){I3.inBatch++}function R3(){if(--I3.inBatch===0){dtn();for(var e=I3.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,n.observers_.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof E3&&n.suspend_())}I3.pendingUnobservations=[]}}function atn(e){var t=I3.trackingDerivation;return t===null?(e.observers_.size===0&&I3.inBatch>0&&itn(e),!1):(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&I3.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function otn(e){e.lowestObserverState_!==O3.STALE_&&(e.lowestObserverState_=O3.STALE_,e.observers_.forEach(function(e){e.dependenciesState_===O3.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=O3.STALE_}))}function stn(e){e.lowestObserverState_!==O3.STALE_&&(e.lowestObserverState_=O3.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===O3.POSSIBLY_STALE_?t.dependenciesState_=O3.STALE_:t.dependenciesState_===O3.UP_TO_DATE_&&(e.lowestObserverState_=O3.UP_TO_DATE_)}))}function ctn(e){e.lowestObserverState_===O3.UP_TO_DATE_&&(e.lowestObserverState_=O3.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===O3.UP_TO_DATE_&&(e.dependenciesState_=O3.POSSIBLY_STALE_,e.onBecomeStale_())}))}var z3=function(){function e(e,t,n,r){e===void 0&&(e=`Reaction`),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=O3.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Ken.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,I3.pendingReactions.push(this),dtn())},t.runReaction_=function(){if(!this.isDisposed){L3(),this.isScheduled=!1;var e=I3.trackingContext;if(I3.trackingContext=this,qen(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}I3.trackingContext=e,R3()}},t.track=function(e){if(!this.isDisposed){L3(),this.isRunning=!0;var t=I3.trackingContext;I3.trackingContext=this;var n=Jen(this,e,void 0);I3.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Xen(this),A3(n)&&this.reportExceptionInDerivation_(n.cause),R3()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_){this.errorHandler_(e,this);return}if(I3.disableErrorBoundaries)throw e;var n=`[mobx] uncaught error in '`+this+`'`;I3.suppressReactionErrors||console.error(n,e),I3.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(L3(),Xen(this),R3()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),e==null||e.removeEventListener==null||e.removeEventListener(`abort`,n)};return e==null||e.addEventListener==null||e.addEventListener(`abort`,n),n[f3]=this,n},t.toString=function(){return`Reaction[`+this.name_+`]`},t.trace=function(e){e===void 0&&(e=!1)},a3(e,[{key:`isDisposed`,get:function(){return r3(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=i3(this.flags_,e.isDisposedMask_,t)}},{key:`isScheduled`,get:function(){return r3(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=i3(this.flags_,e.isScheduledMask_,t)}},{key:`isTrackPending`,get:function(){return r3(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=i3(this.flags_,e.isTrackPendingMask_,t)}},{key:`isRunning`,get:function(){return r3(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=i3(this.flags_,e.isRunningMask_,t)}},{key:`diffValue`,get:function(){return+!!r3(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=i3(this.flags_,e.diffValueMask_,t===1)}}])}();z3.isDisposedMask_=1,z3.isScheduledMask_=2,z3.isTrackPendingMask_=4,z3.isRunningMask_=8,z3.diffValueMask_=16;var ltn=100,utn=function(e){return e()};function dtn(){I3.inBatch>0||I3.isRunningReactions||utn(ftn)}function ftn(){I3.isRunningReactions=!0;for(var e=I3.pendingReactions,t=0;e.length>0;){++t===ltn&&(console.error(`[mobx] cycle in reaction: `+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}I3.isRunningReactions=!1}var B3=Q4(`Reaction`,z3);function ptn(e){var t=utn;utn=function(n){return e(function(){return t(n)})}}function V3(){return!1}function mtn(e){return console.warn(`[mobx.spy] Is a no-op in production builds`),function(){}}var htn=`action`,gtn=`action.bound`,_tn=`autoAction`,vtn=`autoAction.bound`,ytn=`<unnamed action>`,btn=_3(htn),xtn=_3(gtn,{bound:!0}),Stn=_3(_tn,{autoAction:!0}),Ctn=_3(vtn,{autoAction:!0,bound:!0});function wtn(e){return function(t,n){if(q4(t))return w3(t.name||ytn,t,e);if(q4(n))return w3(t,n,e);if(d3(n))return(e?Stn:btn).decorate_20223_(t,n);if(J4(n))return u3(t,n,e?Stn:btn);if(J4(t))return l3(_3(e?_tn:htn,{name:t,autoAction:e}))}}var H3=wtn(!1);Object.assign(H3,btn);var U3=wtn(!0);Object.assign(U3,Stn),H3.bound=l3(xtn),U3.bound=l3(Ctn);function W3(e){return q4(e)&&e.isMobxAction===!0}function Ttn(e,t){var n;t===void 0&&(t=y9t);var r=t?.name??`Autorun`,i=!t.scheduler&&!t.delay,a;if(i)a=new z3(r,function(){this.track(c)},t.onError,t.requiresObservable);else{var o=Dtn(t),s=!1;a=new z3(r,function(){s||(s=!0,o(function(){s=!1,a.isDisposed||a.track(c)}))},t.onError,t.requiresObservable)}function c(){e(a)}return(n=t)!=null&&(n=n.signal)!=null&&n.aborted||a.schedule_(),a.getDisposer_(t?.signal)}var Etn=function(e){return e()};function Dtn(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Etn}var Otn=`onBO`,ktn=`onBUO`;function Atn(e,t,n){return Mtn(Otn,e,t,n)}function jtn(e,t,n){return Mtn(ktn,e,t,n)}function Mtn(e,t,n,r){var i=typeof r==`function`?m6(t,n):m6(t),a=q4(r)?r:n,o=e+`L`;return i[o]?i[o].add(a):i[o]=new Set([a]),function(){var e=i[o];e&&(e.delete(a),e.size===0&&delete i[o])}}var Ntn=`never`,G3=`always`,Ptn=`observed`;function Ftn(e){e.isolateGlobalState===!0&&ttn();var t=e.useProxies,n=e.enforceActions;if(t!==void 0&&(I3.useProxies=t===G3?!0:t===Ntn?!1:typeof Proxy<`u`),t===`ifavailable`&&(I3.verifyProxies=!0),n!==void 0){var r=n===G3?G3:n===Ptn;I3.enforceActions=r,I3.allowStateChanges=!(r===!0||r===G3)}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(function(t){t in e&&(I3[t]=!!e[t])}),I3.allowStateReads=!I3.observableRequiresReaction,e.reactionScheduler&&ptn(e.reactionScheduler)}function Itn(e,t,n,r){var i=A9t(t);return h6(function(){var t=f6(e,r)[f3];t3(i).forEach(function(e){t.extend_(e,i[e],n&&e in n?n[e]:!0)})}),e}function Ltn(e,t){return Rtn(m6(e,t))}function Rtn(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=ztn(e.observing_).map(Rtn)),t}function ztn(e){return Array.from(new Set(e))}var Btn=0;function Vtn(){this.message=`FLOW_CANCELLED`}Vtn.prototype=Object.create(Error.prototype);var Htn=een(`flow`),Utn=een(`flow.bound`,{bound:!0}),K3=Object.assign(function(e,t){if(d3(t))return Htn.decorate_20223_(e,t);if(J4(t))return u3(e,t,Htn);var n=e,r=n.name||`<unnamed flow>`,i=function(){var e=this,t=arguments,i=++Btn,a=H3(r+` - runid: `+i+` - init`,n).apply(e,t),o,s=void 0,c=new Promise(function(e,t){var n=0;o=t;function c(e){s=void 0;var o;try{o=H3(r+` - runid: `+i+` - yield `+ n++,a.next).call(a,e)}catch(e){return t(e)}u(o)}function l(e){s=void 0;var o;try{o=H3(r+` - runid: `+i+` - yield `+ n++,a.throw).call(a,e)}catch(e){return t(e)}u(o)}function u(n){if(q4(n?.then)){n.then(u,t);return}return n.done?e(n.value):(s=Promise.resolve(n.value),s.then(c,l))}c(void 0)});return c.cancel=H3(r+` - runid: `+i+` - cancel`,function(){try{s&&Wtn(s);var e=a.return(void 0),t=Promise.resolve(e.value);t.then(K4,K4),Wtn(t),o(new Vtn)}catch(e){o(e)}}),c};return i.isMobXFlow=!0,i},Htn);K3.bound=l3(Utn);function Wtn(e){q4(e.cancel)&&e.cancel()}function q3(e){return e?.isMobXFlow===!0}function Gtn(e,t){return e?t===void 0?p6(e)||!!e[f3]||z9t(e)||B3(e)||D3(e):p6(e)?e[f3].values_.has(t):!1:!1}function Ktn(e){return Gtn(e)}function J3(e,t){t===void 0&&(t=void 0),L3();try{return e.apply(t)}finally{R3()}}function Y3(e){return e[f3]}var qtn={has:function(e,t){return Y3(e).has_(t)},get:function(e,t){return Y3(e).get_(t)},set:function(e,t,n){return J4(t)?Y3(e).set_(t,n,!0)??!0:!1},deleteProperty:function(e,t){return J4(t)?Y3(e).delete_(t,!0)??!0:!1},defineProperty:function(e,t,n){return Y3(e).defineProperty_(t,n)??!0},ownKeys:function(e){return Y3(e).ownKeys_()},preventExtensions:function(e){V4(13)}};function Jtn(e,t){var n;return S9t(),e=f6(e,t),(n=e[f3]).proxy_??(n.proxy_=new Proxy(e,qtn))}function X3(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Z3(e,t){var n=e.interceptors_||=[];return n.push(t),C9t(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Q3(e,t){var n=j3();try{for(var r=[].concat(e.interceptors_||[]),i=0,a=r.length;i<a&&(t=r[i](t),t&&!t.type&&V4(14),t);i++);return t}finally{M3(n)}}function $3(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function e6(e,t){var n=e.changeListeners_||=[];return n.push(t),C9t(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function t6(e,t){var n=j3(),r=e.changeListeners_;if(r){r=r.slice();for(var i=0,a=r.length;i<a;i++)r[i](t);M3(n)}}function Ytn(e,t,n){return h6(function(){var r=f6(e,n)[f3];t??=R9t(e),t3(t).forEach(function(e){return r.make_(e,t[e])})}),e}var Xtn=`splice`,n6=`update`,Ztn=1e4,Qtn={get:function(e,t){var n=e[f3];return t===f3?n:t===`length`?n.getArrayLength_():typeof t==`string`&&!isNaN(t)?n.get_(parseInt(t)):n3(r6,t)?r6[t]:e[t]},set:function(e,t,n){var r=e[f3];return t===`length`&&r.setArrayLength_(n),typeof t==`symbol`||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){V4(15)}},$tn=function(){function e(e,t,n,r){e===void 0&&(e=`ObservableArray`),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new p3(e),this.enhancer_=function(e,n){return t(e,n,`ObservableArray[..]`)}}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.dehanceValues_=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Z3(this,e)},t.observe_=function(e,t){return t===void 0&&(t=!1),t&&e({observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:`splice`,index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),e6(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){(typeof e!=`number`||isNaN(e)||e<0)&&V4(`Out of range: `+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&V4(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&wnn(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;this.atom_;var i=this.values_.length;if(e===void 0?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=arguments.length===1?i-e:t==null?0:Math.max(0,Math.min(t,i-e)),n===void 0&&(n=v9t),X3(this)){var a=Q3(this,{object:this.proxy_,type:Xtn,index:e,removedCount:t,added:n});if(!a)return v9t;t=a.removedCount,n=a.added}if(n=n.length===0?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_){var o=n.length-t;this.updateArrayLength_(i,o)}var s=this.spliceItemsIntoValues_(e,t,n);return(t!==0||n.length!==0)&&this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){if(n.length<Ztn){var r;return(r=this.values_).splice.apply(r,[e,t].concat(n))}else{var i=this.values_.slice(e,e+t),a=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var s=0;s<a.length;s++)this.values_[e+n.length+s]=a[s];return i}},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&V3(),i=$3(this),a=i||r?{observableKind:`array`,object:this.proxy_,type:n6,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&t6(this,a)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&V3(),i=$3(this),a=i||r?{observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:Xtn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&t6(this,a)},t.get_=function(e){if(this.legacyMode_&&e>=this.values_.length){console.warn(`[mobx] Out of bounds read: `+e);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e])},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&V4(17,e,n.length),e<n.length){this.atom_;var r=n[e];if(X3(this)){var i=Q3(this,{type:n6,object:this.proxy_,index:e,newValue:t});if(!i)return;t=i.newValue}t=this.enhancer_(t,r),t!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{for(var a=Array(e+1-n.length),o=0;o<a.length-1;o++)a[o]=void 0;a[a.length-1]=t,this.spliceWithArray_(n.length,0,a)}},e}();function enn(e,t,n,r){return n===void 0&&(n=`ObservableArray`),r===void 0&&(r=!1),S9t(),h6(function(){var i=new $tn(n,t,r,!1);T9t(i.values_,f3,i);var a=new Proxy(i.values_,Qtn);return i.proxy_=a,e&&e.length&&i.spliceWithArray_(0,0,e),a})}var r6={clear:function(){return this.splice(0)},replace:function(e){var t=this[f3];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){var n=[...arguments].slice(2),r=this[f3];switch(arguments.length){case 0:return[];case 1:return r.spliceWithArray_(e);case 2:return r.spliceWithArray_(e,t)}return r.spliceWithArray_(e,t,n)},spliceWithArray:function(e,t,n){return this[f3].spliceWithArray_(e,t,n)},push:function(){var e=this[f3],t=[...arguments];return e.spliceWithArray_(e.values_.length,0,t),e.values_.length},pop:function(){return this.splice(Math.max(this[f3].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){var e=this[f3],t=[...arguments];return e.spliceWithArray_(0,0,t),e.values_.length},reverse:function(){return I3.trackingDerivation&&V4(37,`reverse`),this.replace(this.slice().reverse()),this},sort:function(){I3.trackingDerivation&&V4(37,`sort`);var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[f3],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1?(this.splice(n,1),!0):!1}};i6(`at`,a6),i6(`concat`,a6),i6(`flat`,a6),i6(`includes`,a6),i6(`indexOf`,a6),i6(`join`,a6),i6(`lastIndexOf`,a6),i6(`slice`,a6),i6(`toString`,a6),i6(`toLocaleString`,a6),i6(`toSorted`,a6),i6(`toSpliced`,a6),i6(`with`,a6),i6(`every`,o6),i6(`filter`,o6),i6(`find`,o6),i6(`findIndex`,o6),i6(`findLast`,o6),i6(`findLastIndex`,o6),i6(`flatMap`,o6),i6(`forEach`,o6),i6(`map`,o6),i6(`some`,o6),i6(`toReversed`,o6),i6(`reduce`,tnn),i6(`reduceRight`,tnn);function i6(e,t){typeof Array.prototype[e]==`function`&&(r6[e]=t(e))}function a6(e){return function(){var t=this[f3];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function o6(e){return function(t,n){var r=this,i=this[f3];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function tnn(e){return function(){var t=this,n=this[f3];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}var nnn=Q4(`ObservableArrayAdministration`,$tn);function s6(e){return Y4(e)&&nnn(e[f3])}var rnn={},c6=`add`,l6=`delete`,inn=function(){function e(e,t,n){var r=this;t===void 0&&(t=h3),n===void 0&&(n=`ObservableMap`),this.enhancer_=void 0,this.name_=void 0,this[f3]=rnn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,q4(Map)||V4(18),h6(function(){r.keysAtom_=B9t(`ObservableMap.keys()`),r.data_=new Map,r.hasMap_=new Map,e&&r.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!I3.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new T3(this.has_(e),g3,`ObservableMap.key?`,!1);this.hasMap_.set(e,r),jtn(r,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(X3(this)){var r=Q3(this,{type:n?n6:c6,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if(this.keysAtom_,X3(this)&&!Q3(this,{type:l6,object:this,name:e}))return!1;if(this.has_(e)){var n=V3(),r=$3(this),i=r||n?{observableKind:`map`,debugObjectName:this.name_,type:l6,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return J3(function(){var n;t.keysAtom_.reportChanged(),(n=t.hasMap_.get(e))==null||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&t6(this,i),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if(t=n.prepareNewValue_(t),t!==I3.UNCHANGED){var r=V3(),i=$3(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:n6,object:this,oldValue:n.value_,name:e,newValue:t}:null;n.setNewValue_(t),i&&t6(this,a)}},t.addValue_=function(e,t){var n=this;this.keysAtom_,J3(function(){var r,i=new T3(t,n.enhancer_,`ObservableMap.key`,!1);n.data_.set(e,i),t=i.value_,(r=n.hasMap_.get(e))==null||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=V3(),i=$3(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:c6,object:this,name:e,newValue:t}:null;i&&t6(this,a)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return ann({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return ann({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n=o3(this),r;!(r=n()).done;){var i=r.value,a=i[0],o=i[1];e.call(t,o,a,this)}},t.merge=function(e){var t=this;return u6(e)&&(e=new Map(e)),J3(function(){X4(e)?O9t(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):$4(e)?(E9t(e)||V4(19,e),e.forEach(function(e,n){return t.set(n,e)})):e!=null&&V4(20,e)}),this},t.clear=function(){var e=this;J3(function(){Zen(function(){for(var t=o3(e.keys()),n;!(n=t()).done;){var r=n.value;e.delete(r)}})})},t.replace=function(e){var t=this;return J3(function(){for(var n=onn(e),r=new Map,i=!1,a=o3(t.data_.keys()),o;!(o=a()).done;){var s=o.value;if(!n.has(s))if(t.delete(s))i=!0;else{var c=t.data_.get(s);r.set(s,c)}}for(var l=o3(n.entries()),u;!(u=l()).done;){var d=u.value,f=d[0],p=d[1],m=t.data_.has(f);if(t.set(f,p),t.data_.has(f)){var h=t.data_.get(f);r.set(f,h),m||(i=!0)}}if(!i)if(t.data_.size!==r.size)t.keysAtom_.reportChanged();else for(var g=t.data_.keys(),_=r.keys(),v=g.next(),y=_.next();!v.done;){if(v.value!==y.value){t.keysAtom_.reportChanged();break}v=g.next(),y=_.next()}t.data_=r}),this},t.toString=function(){return`[object ObservableMap]`},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return e6(this,e)},t.intercept_=function(e){return Z3(this,e)},a3(e,[{key:`size`,get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Map`}}])}(),u6=Q4(`ObservableMap`,inn);function ann(e){return e[Symbol.toStringTag]=`MapIterator`,Nnn(e)}function onn(e){if($4(e)||u6(e))return e;if(Array.isArray(e))return new Map(e);if(X4(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}else return V4(21,e)}var snn={},cnn=function(){function e(e,t,n){var r=this;t===void 0&&(t=h3),n===void 0&&(n=`ObservableSet`),this.name_=void 0,this[f3]=snn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,q4(Set)||V4(22),this.enhancer_=function(e,r){return t(e,r,n)},h6(function(){r.atom_=B9t(r.name_),e&&r.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.clear=function(){var e=this;J3(function(){Zen(function(){for(var t=o3(e.data_.values()),n;!(n=t()).done;){var r=n.value;e.delete(r)}})})},t.forEach=function(e,t){for(var n=o3(this),r;!(r=n()).done;){var i=r.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(this.atom_,X3(this)){var n=Q3(this,{type:c6,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){J3(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r=!1,i=$3(this),a=i||r?{observableKind:`set`,debugObjectName:this.name_,type:c6,object:this,newValue:e}:null;i&&t6(this,a)}return this},t.delete=function(e){var t=this;if(X3(this)&&!Q3(this,{type:l6,object:this,oldValue:e}))return!1;if(this.has(e)){var n=!1,r=$3(this),i=r||n?{observableKind:`set`,debugObjectName:this.name_,type:l6,object:this,oldValue:e}:null;return J3(function(){t.atom_.reportChanged(),t.data_.delete(e)}),r&&t6(this,i),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return lnn({next:function(){var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return lnn({next:function(){var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){return e3(e)&&!d6(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return e3(e)&&!d6(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return e3(e)&&!d6(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return e3(e)&&!d6(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return d6(e)&&(e=new Set(e)),J3(function(){Array.isArray(e)||e3(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):e!=null&&V4(`Cannot initialize set from `+e)}),this},t.observe_=function(e,t){return e6(this,e)},t.intercept_=function(e){return Z3(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return`[object ObservableSet]`},t[Symbol.iterator]=function(){return this.values()},a3(e,[{key:`size`,get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Set`}}])}(),d6=Q4(`ObservableSet`,cnn);function lnn(e){return e[Symbol.toStringTag]=`SetIterator`,Nnn(e)}var unn=Object.create(null),dnn=`remove`,fnn=function(){function e(e,t,n,r){t===void 0&&(t=new Map),r===void 0&&(r=gen),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new p3(`ObservableObject.keys`),this.isPlainObject_=X4(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof E3)return n.set(t),!0;if(X3(this)){var r=Q3(this,{type:n6,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if(t=n.prepareNewValue_(t),t!==I3.UNCHANGED){var i=$3(this),a=i?{type:n6,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;n.setNewValue_(t),i&&t6(this,a)}return!0},t.get_=function(e){return I3.trackingDerivation&&!n3(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return n===void 0&&(n=!1),n3(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!I3.trackingDerivation)return e in this.target_;this.pendingKeys_||=new Map;var t=this.pendingKeys_.get(e);return t||(t=new T3(e in this.target_,g3,`ObservableObject.key?`,!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(t===!0&&(t=this.defaultAnnotation_),t!==!1){if(!(e in this.target_)){var n;if((n=this.target_[c3])!=null&&n[e])return;V4(1,t.annotationType_,this.name_+`.`+e.toString())}for(var r=this.target_;r&&r!==G4;){var i=U4(r,e);if(i){var a=t.make_(this,e,i,r);if(a===0)return;if(a===1)break}r=Object.getPrototypeOf(r)}hnn(this,t,e)}},t.extend_=function(e,t,n,r){if(r===void 0&&(r=!1),n===!0&&(n=this.defaultAnnotation_),n===!1)return this.defineProperty_(e,t,r);var i=n.extend_(this,e,t,r);return i&&hnn(this,n,e),i},t.defineProperty_=function(e,t,n){n===void 0&&(n=!1),this.keysAtom_;try{L3();var r=this.delete_(e);if(!r)return r;if(X3(this)){var i=Q3(this,{object:this.proxy_||this.target_,name:e,type:c6,newValue:t.value});if(!i)return null;var a=i.newValue;t.value!==a&&(t=s3({},t,{value:a}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else W4(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{R3()}return!0},t.defineObservableProperty_=function(e,t,n,r){r===void 0&&(r=!1),this.keysAtom_;try{L3();var i=this.delete_(e);if(!i)return i;if(X3(this)){var a=Q3(this,{object:this.proxy_||this.target_,name:e,type:c6,newValue:t});if(!a)return null;t=a.newValue}var o=mnn(e),s={configurable:I3.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else W4(this.target_,e,s);var c=new T3(t,n,`ObservableObject.key`,!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{R3()}return!0},t.defineComputedProperty_=function(e,t,n){n===void 0&&(n=!1),this.keysAtom_;try{L3();var r=this.delete_(e);if(!r)return r;if(X3(this)&&!Q3(this,{object:this.proxy_||this.target_,name:e,type:c6,newValue:void 0}))return null;t.name||=`ObservableObject.key`,t.context=this.proxy_||this.target_;var i=mnn(e),a={configurable:I3.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,a))return!1}else W4(this.target_,e,a);this.values_.set(e,new E3(t)),this.notifyPropertyAddition_(e,void 0)}finally{R3()}return!0},t.delete_=function(e,t){if(t===void 0&&(t=!1),this.keysAtom_,!n3(this.target_,e))return!0;if(X3(this)&&!Q3(this,{object:this.proxy_||this.target_,name:e,type:dnn}))return null;try{var n;L3();var r=$3(this),i=!1,a=this.values_.get(e),o=void 0;if(!a&&(r||i)&&(o=U4(this.target_,e)?.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof T3&&(o=a.value_),otn(a)),this.keysAtom_.reportChanged(),(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(e in this.target_),r||i){var s={type:dnn,observableKind:`object`,object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:o,name:e};r&&t6(this,s)}}finally{R3()}return!0},t.observe_=function(e,t){return e6(this,e)},t.intercept_=function(e){return Z3(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r=$3(this),i=!1;if(r||i){var a=r||i?{type:c6,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;r&&t6(this,a)}(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),t3(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function f6(e,t){if(n3(e,f3))return e;var n=t?.name??`ObservableObject`;return Z4(e,f3,new fnn(e,new Map,String(n),jen(t))),e}var pnn=Q4(`ObservableObjectAdministration`,fnn);function mnn(e){return unn[e]||(unn[e]={get:function(){return this[f3].getObservablePropValue_(e)},set:function(t){return this[f3].setObservablePropValue_(e,t)}})}function p6(e){return Y4(e)?pnn(e[f3]):!1}function hnn(e,t,n){var r;(r=e.target_[c3])==null||delete r[n]}var gnn=Snn(0),_nn=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),vnn=0,ynn=function(){};function bnn(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__===void 0?e.prototype=t:e.prototype.__proto__=t}bnn(ynn,Array.prototype);var xnn=function(e){function t(t,n,r,i){var a;return r===void 0&&(r=`ObservableArray`),i===void 0&&(i=!1),a=e.call(this)||this,h6(function(){var e=new $tn(r,n,i,!0);e.proxy_=a,T9t(a,f3,e),t&&t.length&&a.spliceWithArray(0,0,t),_nn&&Object.defineProperty(a,"0",gnn)}),a}N9t(t,e);var n=t.prototype;return n.concat=function(){this[f3].atom_.reportObserved();var e=[...arguments];return Array.prototype.concat.apply(this.slice(),e.map(function(e){return s6(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Nnn({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},a3(t,[{key:`length`,get:function(){return this[f3].getArrayLength_()},set:function(e){this[f3].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return`Array`}}])}(ynn);Object.entries(r6).forEach(function(e){var t=e[0],n=e[1];t!==`concat`&&Z4(xnn.prototype,t,n)});function Snn(e){return{enumerable:!1,configurable:!0,get:function(){return this[f3].get_(e)},set:function(t){this[f3].set_(e,t)}}}function Cnn(e){W4(xnn.prototype,``+e,Snn(e))}function wnn(e){if(e>vnn){for(var t=vnn;t<e+100;t++)Cnn(t);vnn=e}}wnn(1e3);function Tnn(e,t,n){return new xnn(e,t,n)}function m6(e,t){if(typeof e==`object`&&e){if(s6(e))return t!==void 0&&V4(23),e[f3].atom_;if(d6(e))return e.atom_;if(u6(e)){if(t===void 0)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||V4(25,t,Dnn(e)),n}if(p6(e)){if(!t)return V4(26);var r=e[f3].values_.get(t);return r||V4(27,t,Dnn(e)),r}if(z9t(e)||D3(e)||B3(e))return e}else if(q4(e)&&B3(e[f3]))return e[f3];V4(28)}function Enn(e,t){if(e||V4(29),t!==void 0)return Enn(m6(e,t));if(z9t(e)||D3(e)||B3(e)||u6(e)||d6(e))return e;if(e[f3])return e[f3];V4(24,e)}function Dnn(e,t){var n;if(t!==void 0)n=m6(e,t);else if(W3(e))return e.name;else n=p6(e)||u6(e)||d6(e)?Enn(e):m6(e);return n.name_}function h6(e){var t=j3(),n=Wen(!0);L3();try{return e()}finally{R3(),Gen(n),M3(t)}}var Onn=G4.toString;function knn(e,t,n){return n===void 0&&(n=-1),Ann(e,t,n)}function Ann(e,t,n,r,i){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!==`function`&&a!==`object`&&typeof t!=`object`)return!1;var o=Onn.call(e);if(o!==Onn.call(t))return!1;switch(o){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:n>=0&&n++;break}e=jnn(e),t=jnn(t);var s=o===`[object Array]`;if(!s){if(typeof e!=`object`||typeof t!=`object`)return!1;var c=e.constructor,l=t.constructor;if(c!==l&&!(q4(c)&&c instanceof c&&q4(l)&&l instanceof l)&&`constructor`in e&&`constructor`in t)return!1}if(n===0)return!1;n<0&&(n=-1),r||=[],i||=[];for(var u=r.length;u--;)if(r[u]===e)return i[u]===t;if(r.push(e),i.push(t),s){if(u=e.length,u!==t.length)return!1;for(;u--;)if(!Ann(e[u],t[u],n-1,r,i))return!1}else{var d=Object.keys(e),f=d.length;if(Object.keys(t).length!==f)return!1;for(var p=0;p<f;p++){var m=d[p];if(!(n3(t,m)&&Ann(e[m],t[m],n-1,r,i)))return!1}}return r.pop(),i.pop(),!0}function jnn(e){return s6(e)?e.slice():$4(e)||u6(e)||e3(e)||d6(e)?Array.from(e.entries()):e}var Mnn=H4().Iterator?.prototype||{};function Nnn(e){return e[Symbol.iterator]=Pnn,Object.assign(Object.create(Mnn),e)}function Pnn(){return this}[`Symbol`,`Map`,`Set`].forEach(function(e){H4()[e]===void 0&&V4(`MobX requires global '`+e+`' to be available or polyfilled`)}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__==`object`&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:mtn,extras:{getDebugName:Dnn},$mobx:f3});function g6(e){return Array.isArray(e)||s6(e)}function _6(e,t){let n=g6(e);if(n!==g6(t))throw Error(`PersistenceUtils::typeGuard] ${B4.MalformedDataError}`);if(n)for(let n of e)_6(n,t[0]);return y6(t)&&Object.keys(t).forEach(n=>{let r=e[n],i=t[n];if(r&&g6(i))_6(r,i);else if(r&&y6(r))_6(r,i);else if(y6(e)&&!e.hasOwnProperty(n))throw Error(`[PersistenceUtils::typeGuard] ${B4.MalformedDataError}`)}),!0}var Fnn=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;function v6(e){if(g6(e))for(let t=0;t<e.length;t++)e[t]=v6(e[t]);else if(y6(e))for(let t of Object.keys(e)){let n=e[t];typeof n==`object`?e[t]=v6(n):typeof n==`string`&&Fnn.exec(n)&&(e[t]=new Date(n))}return e}function y6(e){return typeof e==`object`&&!!e&&!g6(e)}var Inn=class{storageName;schema;constructor(e,t){this.storageName=`${e}Storage`,this.schema=JSON.parse(JSON.stringify(t))}get(){let e=PK.getString(this.storageName),t=this.instantiateData(e);return this.isT(t),t}update(e){let t=JSON.parse(JSON.stringify(e)),n=Object.assign(this.get(),t);return this.isT(n),PK.set(this.storageName,JSON.stringify(n)),n}set(e){return this.isT(e),PK.set(this.storageName,JSON.stringify(e)),e}clear(){return PK.delete(this.storageName),this.instantiateData(void 0)}instantiateData(e){let t=e??JSON.stringify(this.schema);return PK.set(this.storageName,t),JSON.parse(t)}isT(e){if(!e||typeof e!=`object`)throw Error(`[PersistenceManager::isT] ${B4.IncorrectDataError}`);return _6(e,this.schema),!0}},Lnn=class{persistenceManager;schema;data;constructor(e,t){this.schema=JSON.parse(JSON.stringify(t)),this.data=JSON.parse(JSON.stringify(t)),this.persistenceManager=new Inn(e,t),this.createDataFromSchema(),this.restore()}get(){return this.data}set(e){return this.data=JSON.parse(JSON.stringify(e)),this.data=v6(this.data),this.data}update(e){if(g6(this.data)){let t=this.data.findIndex(t=>t.uuid===e.uuid);if(t!==-1)this.data[t]={...this.data[t],...e};else try{_6([e],this.schema),this.data.push(e)}catch(e){throw e.message===B4.MalformedDataError?Error(`[DataManager::update] Cannot add an element that does not contain required fields`):e}}else Object.assign(this.data,e);return this.data}save(e=!0){return e?this.persistenceManager.update(this.data):this.persistenceManager.set(this.data)}restore(){if(this.data=this.persistenceManager.get(),this.data=v6(this.data),g6(this.data)){let e=e=>e.filter(e=>!!e.uuid);this.data=e(this.data)}return this.data}clear=()=>(this.persistenceManager.clear(),this.createDataFromSchema(),this.data);createDataFromSchema(){this.data=g6(this.schema)?[]:JSON.parse(JSON.stringify(this.schema))}},b6=new class extends Lnn{migrateData(){throw Error(`[TrackingManager::migrateData] Method purposefully not implemented.`)}constructor(){super(`trackingEvent`,[])}update(e){return super.update(e)}sync=async()=>{let e=super.get(),t=[];for(let n of e)try{await h9t(n)}catch{t.push(n)}super.set(t),super.save(!1)}},x6=`3.8.0`,Rnn=`2026-09-29`,znn=1187,Bnn=`05700002209597`;V();var S6=function(e){return e.QuickGuideStartPress=`quickguide.start.press`,e.QuickGuideBackPressStep1=`quickguide.screen1.back.press`,e.QuickGuideNextPressStep1=`quickguide.screen1.next.press`,e.QuickGuideBackPressStep2=`quickguide.screen2.back.press`,e.QuickGuideNextPressStep2=`quickguide.screen2.next.press`,e.QuickGuideBackPressStep3=`quickguide.screen3.back.press`,e.QuickGuideNextPressStep3=`quickguide.screen3.next.press`,e.QuickGuideBackPressStep4=`quickguide.screen4.back.press`,e.QuickGuideNextPressStep4=`quickguide.screen4.next.press`,e.QuickGuideBackPressStep5=`quickguide.screen5.back.press`,e.QuickGuideNextPressStep5=`quickguide.screen5.next.press`,e.QuickGuideBackPressStep6=`quickguide.screen6.back.press`,e.QuickGuideFinishPress=`quickguide.finish.press`,e.SetupIntroStartPress=`setup.intro.start.press`,e.SetupGeneralBackPress=`setup.general.back.press`,e.SetupGeneralNextPress=`setup.general.next.press`,e.SetupTreatmentBackPress=`setup.treatment.back.press`,e.SetupTreatmentNextPress=`setup.treatment.next.press`,e.SetupOptionsNextPress=`setup.options.next.press`,e.SetupOptionsBackPress=`setup.options.back.press`,e.SetupInsulinBackPress=`setup.insulin.back.press`,e.SetupInsulinNextPress=`setup.insulin.next.press`,e.SetupTDDBackPress=`setup.tdd.back.press`,e.SetupTDDNextPress=`setup.tdd.next.press`,e.SetupSummaryBackPress=`setup.summary.back.press`,e.SetupSummaryFinishPress=`setup.summary.finish.press`,e.ForecastOffline=`forecast.offline`,e.ForecastNotificationsOff=`forecast.notifications.off`,e.ForecastNewCalculationPress=`forecast.newcalculation.press`,e.CarbohydrateChart7DaysPress=`carbohydratechart.7days.press`,e.CarbohydrateChart14DaysPress=`carbohydratechart.14days.press`,e.CarbohydrateChart30DaysPress=`carbohydratechart.30days.press`,e.CarbohydrateChart90DaysPress=`carbohydratechart.90days.press`,e.CarbohydrateChartStart=`carbohydratechart.start`,e.CarbohydrateChartEnd=`carbohydratechart.end`,e.RapidInsulinChart7DaysPress=`rapidinsulinchart.7days.press`,e.RapidInsulinChart14DaysPress=`rapidinsulinchart.14days.press`,e.RapidInsulinChart30DaysPress=`rapidinsulinchart.30days.press`,e.RapidInsulinChart90DaysPress=`rapidinsulinchart.90days.press`,e.RapidInsulinChartStart=`rapidinsulinchart.start`,e.RapidInsulinChartEnd=`rapidinsulinchart.end`,e.TimeInRangeChart7DaysPress=`timeinrangechart.7days.press`,e.TimeInRangeChart14DaysPress=`timeinrangechart.14days.press`,e.TimeInRangeChart30DaysPress=`timeinrangechart.30days.press`,e.TimeInRangeChart90DaysPress=`timeinrangechart.90days.press`,e.TimeInRangeChartStart=`timeinrangechart.start`,e.TimeInRangeChartEnd=`timeinrangechart.end`,e.MyDayPreviousPress=`mydaychart.previous.press`,e.MyDayNextPress=`mydaychart.next.press`,e.MyDayChartStart=`mydaychart.start`,e.MyDayChartEnd=`mydaychart.end`,e.ActiveInsulinChartStart=`activeinsulinchart.start`,e.ActiveInsulinChartEnd=`activeinsulinchart.end`,e.GlucoseChart7DaysPressCGM=`glucosechart.cgm.7days.press`,e.GlucoseChart14DaysPressCGM=`glucosechart.cgm.14days.press`,e.GlucoseChart30DaysPressCGM=`glucosechart.cgm.30days.press`,e.GlucoseChart90DaysPressCGM=`glucosechart.cgm.90days.press`,e.GlucoseChartStartCGM=`glucosechart.cgm.start`,e.GlucoseChartEndCGM=`glucosechart.cgm.end`,e.GlucoseChart7DaysPressBGM=`glucosechart.bgm.7days.press`,e.GlucoseChart14DaysPressBGM=`glucosechart.bgm.14days.press`,e.GlucoseChart30DaysPressBGM=`glucosechart.bgm.30days.press`,e.GlucoseChart90DaysPressBGM=`glucosechart.bgm.90days.press`,e.GlucoseChartStartBGM=`glucosechart.bgm.start`,e.GlucoseChartEndBGM=`glucosechart.bgm.end`,e.DashboardCgmButtonPress=`home.dashboard.cgm.press`,e.DashboardTabPress=`home.dashboard.press`,e.LogbookTabPress=`home.logbook.press`,e.NewCalculationTabPress=`home.newcalculation.press`,e.SettingsTabPress=`home.settings.press`,e.FoodLibraryTabPress=`home.foodlibrary.press`,e.CalculationGlucosePress=`calcflow.glucose.press`,e.CalculationCarbsPress=`calcflow.carbs.press`,e.CalculationActivityPress=`calcflow.activity.press`,e.CalculationNotesPress=`calcflow.notes.press`,e.AbortCalculationPress=`calcflow.abort.press`,e.RecentInsulinRegisterPress=`calcflow.recentinsulin.register.press`,e.RecentInsulinContinuePress=`calcflow.recentinsulin.continue.press`,e.CalculationManualInput=`calcflow.carbs.input.manual`,e.CalculationScanFoodPress=`calcflow.carbs.scanfood.press`,e.CalculationFoodLibraryPress=`calcflow.carbs.foodlibrary.press`,e.CalculationFoodLibraryDatabaseInput=`calcflow.carbs.foodlibrary.input.database`,e.CalculationFoodLibraryPersonalInput=`calcflow.carbs.foodlibrary.input.personal`,e.CalculationFoodLibraryPersonalPress=`calcflow.carbs.foodlibrary.personal.press`,e.CalculationFoodLibrarySearch=`calcflow.carbs.foodlibrary.search`,e.CalculationFoodLibraryAbort=`calcflow.carbs.foodlibrary.abort`,e.FoodLibrarySearched=`foodlibrary.searched`,e.FoodLibraryScanFoodPress=`foodlibrary.scanfood.press`,e.FoodLibraryPersonalPress=`foodlibrary.personal.press`,e.FoodLibraryCreatePress=`foodlibrary.create.press`,e.FoodLibraryUpdatePress=`foodlibrary.update.press`,e.ActivityAddPress=`calcflow.activity.add.press`,e.ActivityEditPress=`calcflow.activity.edit.press`,e.TransferDevice=`integration.device.transfer`,e.TransferService=`integration.service.transfer`,e.ExpiredGlucose=`calcflow.glucose.expired`,e.SummaryEmptyGlucose=`calcflow.summary.glucose.empty`,e.VisualSearchClosePress=`visualsearch.close.press`,e.VisualSearchNoMatchSearchLibraryPress=`visualsearch.nomatch.searchlibrary.press`,e.VisualSearchAddToCalculationPress=`visualsearch.addtocalculation.press`,e.RecommendationSuccess=`calcflow.recommendation.success`,e.RecommendationInvalid=`calcflow.recommendation.invalid`,e.RecommendationViewDetailsPress=`calcflow.recommendation.details.press`,e.RecommendationExpired=`calcflow.recommendation.expired`,e.RecommendationToastPress=`calcflow.recommendation.toast.press`,e.LogbookPersonalAddPress=`logbook.personal.add.press`,e.LogbookPersonalEditPress=`logbook.personal.edit.press`,e.LogbookPersonalDeletePress=`logbook.personal.delete.press`,e.LogbookExportPress=`logbook.export.press`,e.LogbookExportDurationFourteenDaysPress=`logbook.export.duration.fourteendays.press`,e.LogbookExportDurationThreeMonthsPress=`logbook.export.duration.threemonths.press`,e.LogbookExportDurationSixMonthsPress=`logbook.export.duration.sixmonths.press`,e.LogbookExportGeneratePress=`logbook.export.generate.press`,e.SettingsProfile=`settings.profile.press`,e.SettingsInsulin=`settings.insulin.press`,e.SettingsGlucose=`settings.glucose.press`,e.SettingsActivity=`settings.activity.press`,e.SettingsNotifications=`settings.notifications.press`,e.SettingsTheme=`settings.theme.press`,e.SettingsSmartPen=`settings.smartpen.press`,e.SettingsCGM=`settings.cgm.press`,e.SettingsBGM=`settings.bgm.press`,e.SettingsIFU=`settings.ifu.press`,e.SettingsSupport=`settings.support.press`,e.SettingsLegal=`settings.legal.press`,e.SettingsForecast=`settings.forecast.press`,e.NotificationsAllowQuickGuide=`quickguide.notifications.allow.press`,e.NotificationsAllowSettings=`settings.notifications.allow.press`,e.NotificationsDenyQuickGuide=`quickguide.notifications.deny.press`,e.NotificationsDenySettings=`settings.notifications.deny.press`,e.AppOpenNotification=`app.open.notification`,e.ErrorOffline=`errors.offline`,e.ErrorForceUpdate=`errors.forceupdate`,e.ErrorLogOut=`errors.logout`,e.WatchAppOpened=`watch.app.opened`,e.PINCodeSetupCreatePress=`pincode.setup.create.press`,e.PINCodeSetupMaybeLaterPress=`pincode.setup.maybelater.press`,e}({}),Vnn=()=>{let{email:e,id:t,country:n=``}=sin.get();return{id:t,isTester:e.includes(`@hedia`),country:n,uuid:K2(),timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:z.OS}},C6=(e,t)=>{let{id:n,isTester:r,country:i,uuid:a,timestamp:o,timezone:s,platform:c}=Vnn(),l={uuid:a,type:e,timestamp:t??o,timezone:s,data:{version:x6,platform:c,user:{id:n,isTester:r},geo:{country:i}}};b6.update(l),b6.sync().catch(console.error)},Hnn=e=>{let{id:t,isTester:n,country:r,uuid:i,timestamp:a,timezone:o,platform:s}=Vnn(),c={uuid:i,timestamp:a,timezone:o,type:`integration.service.transfer`,data:{version:x6,platform:s,source:{sourceID:e.source_id,deviceName:e.device_name,sourceName:e.source_name},reading:{type:e.type,value:e.quantity.value,unit:e.quantity.unit},geo:{country:r},user:{id:t,isTester:n}}};b6.update(c),b6.sync().catch(console.error)},w6=async(e,t,n=0)=>{if(VK)return fetch(e,t);let{accessToken:r}=z4.getState();if(!r)throw Error(`[hediaFetch] Missing access token`);let i={...t?.headers,Authorization:`Bearer ${r}`,...UK},a=await fetch(e,{...t,headers:i});if([Y.StatusCode.UNAUTHORIZED,Y.StatusCode.FORBIDDEN].includes(a.status)){if(n<1)return await Wnn(),w6(e,t,n+1);throw Error(`[hediaFetch::hediaFetch] Failed to refresh token after retry`)}return a},T6=null,Unn=async()=>{let{refreshToken:e,setTokens:t}=z4.getState();if(!e)throw Error(`[hediaFetch::refreshAccessToken] Missing refresh token`);let n=await d9t(e);if(n.status===Y.StatusCode.BAD_REQUEST)throw C6(S6.ErrorLogOut),t({accessToken:void 0,refreshToken:void 0}),Error(`[hediaFetch::refreshAccessToken] Bad request - cleared storage`);if(!n.ok)throw Error(`[hediaFetch::refreshAccessToken] Failed to refresh access token (status: ${n.status})`);let{access_token:r,refresh_token:i}=await n.json().catch(()=>null)??{};if(!r||!i)throw Error(`[hediaFetch::refreshAccessToken] Invalid token response from server`);t({accessToken:r,refreshToken:i})},Wnn=()=>(T6===null&&(T6=Unn().finally(()=>{T6=null})),T6),Gnn=async()=>{let e={headers:{Accept:`application/json`,"Content-Type":`application/json`},method:Y.HTTPRequestMethod.GET},t=`${NK.HEDIA_API_URL_V3}/user`,n=await w6(t,e);return await y0(n,Y.StatusCode.OK,t),n.json()},Knn={email:``},qnn={lessThanXSeconds:{one:`mindre end ét sekund`,other:`mindre end {{count}} sekunder`},xSeconds:{one:`1 sekund`,other:`{{count}} sekunder`},halfAMinute:`ét halvt minut`,lessThanXMinutes:{one:`mindre end ét minut`,other:`mindre end {{count}} minutter`},xMinutes:{one:`1 minut`,other:`{{count}} minutter`},aboutXHours:{one:`cirka 1 time`,other:`cirka {{count}} timer`},xHours:{one:`1 time`,other:`{{count}} timer`},xDays:{one:`1 dag`,other:`{{count}} dage`},aboutXWeeks:{one:`cirka 1 uge`,other:`cirka {{count}} uger`},xWeeks:{one:`1 uge`,other:`{{count}} uger`},aboutXMonths:{one:`cirka 1 måned`,other:`cirka {{count}} måneder`},xMonths:{one:`1 måned`,other:`{{count}} måneder`},aboutXYears:{one:`cirka 1 år`,other:`cirka {{count}} år`},xYears:{one:`1 år`,other:`{{count}} år`},overXYears:{one:`over 1 år`,other:`over {{count}} år`},almostXYears:{one:`næsten 1 år`,other:`næsten {{count}} år`}},Jnn=(e,t,n)=>{let r,i=qnn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`om `+r:r+` siden`:r};function E6(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ynn={date:E6({formats:{full:`EEEE 'den' d. MMMM y`,long:`d. MMMM y`,medium:`d. MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'kl'. {{time}}`,long:`{{date}} 'kl'. {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},Xnn={lastWeek:`'sidste' eeee 'kl.' p`,yesterday:`'i går kl.' p`,today:`'i dag kl.' p`,tomorrow:`'i morgen kl.' p`,nextWeek:`'på' eeee 'kl.' p`,other:`P`},Znn=(e,t,n,r)=>Xnn[e];function D6(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var Qnn={ordinalNumber:(e,t)=>Number(e)+`.`,era:D6({values:{narrow:[`fvt`,`vt`],abbreviated:[`f.v.t.`,`v.t.`],wide:[`før vesterlandsk tidsregning`,`vesterlandsk tidsregning`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`1. kvt.`,`2. kvt.`,`3. kvt.`,`4. kvt.`],wide:[`1. kvartal`,`2. kvartal`,`3. kvartal`,`4. kvartal`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`jan.`,`feb.`,`mar.`,`apr.`,`maj`,`jun.`,`jul.`,`aug.`,`sep.`,`okt.`,`nov.`,`dec.`],wide:[`januar`,`februar`,`marts`,`april`,`maj`,`juni`,`juli`,`august`,`september`,`oktober`,`november`,`december`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`T`,`O`,`T`,`F`,`L`],short:[`sø`,`ma`,`ti`,`on`,`to`,`fr`,`lø`],abbreviated:[`søn.`,`man.`,`tir.`,`ons.`,`tor.`,`fre.`,`lør.`],wide:[`søndag`,`mandag`,`tirsdag`,`onsdag`,`torsdag`,`fredag`,`lørdag`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`a`,pm:`p`,midnight:`midnat`,noon:`middag`,morning:`morgen`,afternoon:`eftermiddag`,evening:`aften`,night:`nat`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnat`,noon:`middag`,morning:`morgen`,afternoon:`eftermiddag`,evening:`aften`,night:`nat`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnat`,noon:`middag`,morning:`morgen`,afternoon:`eftermiddag`,evening:`aften`,night:`nat`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`midnat`,noon:`middag`,morning:`om morgenen`,afternoon:`om eftermiddagen`,evening:`om aftenen`,night:`om natten`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnat`,noon:`middag`,morning:`om morgenen`,afternoon:`om eftermiddagen`,evening:`om aftenen`,night:`om natten`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnat`,noon:`middag`,morning:`om morgenen`,afternoon:`om eftermiddagen`,evening:`om aftenen`,night:`om natten`}},defaultFormattingWidth:`wide`})};function O6(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ern(s,e=>e.test(o)):$nn(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function $nn(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ern(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function k6(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var trn={code:`da`,formatDistance:Jnn,formatLong:Ynn,formatRelative:Znn,localize:Qnn,match:{ordinalNumber:k6({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^f/i,/^(v|e)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},nrn={lessThanXSeconds:{standalone:{one:`weniger als 1 Sekunde`,other:`weniger als {{count}} Sekunden`},withPreposition:{one:`weniger als 1 Sekunde`,other:`weniger als {{count}} Sekunden`}},xSeconds:{standalone:{one:`1 Sekunde`,other:`{{count}} Sekunden`},withPreposition:{one:`1 Sekunde`,other:`{{count}} Sekunden`}},halfAMinute:{standalone:`eine halbe Minute`,withPreposition:`einer halben Minute`},lessThanXMinutes:{standalone:{one:`weniger als 1 Minute`,other:`weniger als {{count}} Minuten`},withPreposition:{one:`weniger als 1 Minute`,other:`weniger als {{count}} Minuten`}},xMinutes:{standalone:{one:`1 Minute`,other:`{{count}} Minuten`},withPreposition:{one:`1 Minute`,other:`{{count}} Minuten`}},aboutXHours:{standalone:{one:`etwa 1 Stunde`,other:`etwa {{count}} Stunden`},withPreposition:{one:`etwa 1 Stunde`,other:`etwa {{count}} Stunden`}},xHours:{standalone:{one:`1 Stunde`,other:`{{count}} Stunden`},withPreposition:{one:`1 Stunde`,other:`{{count}} Stunden`}},xDays:{standalone:{one:`1 Tag`,other:`{{count}} Tage`},withPreposition:{one:`1 Tag`,other:`{{count}} Tagen`}},aboutXWeeks:{standalone:{one:`etwa 1 Woche`,other:`etwa {{count}} Wochen`},withPreposition:{one:`etwa 1 Woche`,other:`etwa {{count}} Wochen`}},xWeeks:{standalone:{one:`1 Woche`,other:`{{count}} Wochen`},withPreposition:{one:`1 Woche`,other:`{{count}} Wochen`}},aboutXMonths:{standalone:{one:`etwa 1 Monat`,other:`etwa {{count}} Monate`},withPreposition:{one:`etwa 1 Monat`,other:`etwa {{count}} Monaten`}},xMonths:{standalone:{one:`1 Monat`,other:`{{count}} Monate`},withPreposition:{one:`1 Monat`,other:`{{count}} Monaten`}},aboutXYears:{standalone:{one:`etwa 1 Jahr`,other:`etwa {{count}} Jahre`},withPreposition:{one:`etwa 1 Jahr`,other:`etwa {{count}} Jahren`}},xYears:{standalone:{one:`1 Jahr`,other:`{{count}} Jahre`},withPreposition:{one:`1 Jahr`,other:`{{count}} Jahren`}},overXYears:{standalone:{one:`mehr als 1 Jahr`,other:`mehr als {{count}} Jahre`},withPreposition:{one:`mehr als 1 Jahr`,other:`mehr als {{count}} Jahren`}},almostXYears:{standalone:{one:`fast 1 Jahr`,other:`fast {{count}} Jahre`},withPreposition:{one:`fast 1 Jahr`,other:`fast {{count}} Jahren`}}},rrn=(e,t,n)=>{let r,i=n?.addSuffix?nrn[e].withPreposition:nrn[e].standalone;return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:`vor `+r:r},irn={date:E6({formats:{full:`EEEE, do MMMM y`,long:`do MMMM y`,medium:`do MMM y`,short:`dd.MM.y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'um' {{time}}`,long:`{{date}} 'um' {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},arn={lastWeek:`'letzten' eeee 'um' p`,yesterday:`'gestern um' p`,today:`'heute um' p`,tomorrow:`'morgen um' p`,nextWeek:`eeee 'um' p`,other:`P`},orn=(e,t,n,r)=>arn[e],srn={narrow:[`v.Chr.`,`n.Chr.`],abbreviated:[`v.Chr.`,`n.Chr.`],wide:[`vor Christus`,`nach Christus`]},crn={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1. Quartal`,`2. Quartal`,`3. Quartal`,`4. Quartal`]},lrn={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mär`,`Apr`,`Mai`,`Jun`,`Jul`,`Aug`,`Sep`,`Okt`,`Nov`,`Dez`],wide:[`Januar`,`Februar`,`März`,`April`,`Mai`,`Juni`,`Juli`,`August`,`September`,`Oktober`,`November`,`Dezember`]},urn={narrow:lrn.narrow,abbreviated:[`Jan.`,`Feb.`,`März`,`Apr.`,`Mai`,`Juni`,`Juli`,`Aug.`,`Sep.`,`Okt.`,`Nov.`,`Dez.`],wide:lrn.wide},drn={code:`de`,formatDistance:rrn,formatLong:irn,formatRelative:orn,localize:{ordinalNumber:e=>Number(e)+`.`,era:D6({values:srn,defaultWidth:`wide`}),quarter:D6({values:crn,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:lrn,formattingValues:urn,defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`D`,`M`,`D`,`F`,`S`],short:[`So`,`Mo`,`Di`,`Mi`,`Do`,`Fr`,`Sa`],abbreviated:[`So.`,`Mo.`,`Di.`,`Mi.`,`Do.`,`Fr.`,`Sa.`],wide:[`Sonntag`,`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`vm.`,pm:`nm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`Morgen`,afternoon:`Nachm.`,evening:`Abend`,night:`Nacht`},abbreviated:{am:`vorm.`,pm:`nachm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`Morgen`,afternoon:`Nachmittag`,evening:`Abend`,night:`Nacht`},wide:{am:`vormittags`,pm:`nachmittags`,midnight:`Mitternacht`,noon:`Mittag`,morning:`Morgen`,afternoon:`Nachmittag`,evening:`Abend`,night:`Nacht`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`vm.`,pm:`nm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`morgens`,afternoon:`nachm.`,evening:`abends`,night:`nachts`},abbreviated:{am:`vorm.`,pm:`nachm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`morgens`,afternoon:`nachmittags`,evening:`abends`,night:`nachts`},wide:{am:`vormittags`,pm:`nachmittags`,midnight:`Mitternacht`,noon:`Mittag`,morning:`morgens`,afternoon:`nachmittags`,evening:`abends`,night:`nachts`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:O6({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},defaultMatchWidth:`wide`,parsePatterns:{any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},frn={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},prn=(e,t,n)=>{let r,i=frn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},mrn={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},hrn=(e,t,n,r)=>mrn[e],grn={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:D6({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},_rn={ordinalNumber:k6({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},vrn={code:`en-GB`,formatDistance:prn,formatLong:{date:E6({formats:{full:`EEEE, d MMMM yyyy`,long:`d MMMM yyyy`,medium:`d MMM yyyy`,short:`dd/MM/yyyy`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:hrn,localize:grn,match:_rn,options:{weekStartsOn:1,firstWeekContainsDate:4}},yrn={lessThanXSeconds:{one:`menos de un segundo`,other:`menos de {{count}} segundos`},xSeconds:{one:`1 segundo`,other:`{{count}} segundos`},halfAMinute:`medio minuto`,lessThanXMinutes:{one:`menos de un minuto`,other:`menos de {{count}} minutos`},xMinutes:{one:`1 minuto`,other:`{{count}} minutos`},aboutXHours:{one:`alrededor de 1 hora`,other:`alrededor de {{count}} horas`},xHours:{one:`1 hora`,other:`{{count}} horas`},xDays:{one:`1 día`,other:`{{count}} días`},aboutXWeeks:{one:`alrededor de 1 semana`,other:`alrededor de {{count}} semanas`},xWeeks:{one:`1 semana`,other:`{{count}} semanas`},aboutXMonths:{one:`alrededor de 1 mes`,other:`alrededor de {{count}} meses`},xMonths:{one:`1 mes`,other:`{{count}} meses`},aboutXYears:{one:`alrededor de 1 año`,other:`alrededor de {{count}} años`},xYears:{one:`1 año`,other:`{{count}} años`},overXYears:{one:`más de 1 año`,other:`más de {{count}} años`},almostXYears:{one:`casi 1 año`,other:`casi {{count}} años`}},brn=(e,t,n)=>{let r,i=yrn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`en `+r:`hace `+r:r},xrn={date:E6({formats:{full:`EEEE, d 'de' MMMM 'de' y`,long:`d 'de' MMMM 'de' y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'a las' {{time}}`,long:`{{date}} 'a las' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Srn={lastWeek:`'el' eeee 'pasado a la' p`,yesterday:`'ayer a la' p`,today:`'hoy a la' p`,tomorrow:`'mañana a la' p`,nextWeek:`eeee 'a la' p`,other:`P`},Crn={lastWeek:`'el' eeee 'pasado a las' p`,yesterday:`'ayer a las' p`,today:`'hoy a las' p`,tomorrow:`'mañana a las' p`,nextWeek:`eeee 'a las' p`,other:`P`},wrn={code:`es`,formatDistance:brn,formatLong:xrn,formatRelative:(e,t,n,r)=>t.getHours()===1?Srn[e]:Crn[e],localize:{ordinalNumber:(e,t)=>Number(e)+`º`,era:D6({values:{narrow:[`AC`,`DC`],abbreviated:[`AC`,`DC`],wide:[`antes de cristo`,`después de cristo`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>Number(e)-1}),month:D6({values:{narrow:[`e`,`f`,`m`,`a`,`m`,`j`,`j`,`a`,`s`,`o`,`n`,`d`],abbreviated:[`ene`,`feb`,`mar`,`abr`,`may`,`jun`,`jul`,`ago`,`sep`,`oct`,`nov`,`dic`],wide:[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`d`,`l`,`m`,`m`,`j`,`v`,`s`],short:[`do`,`lu`,`ma`,`mi`,`ju`,`vi`,`sá`],abbreviated:[`dom`,`lun`,`mar`,`mié`,`jue`,`vie`,`sáb`],wide:[`domingo`,`lunes`,`martes`,`miércoles`,`jueves`,`viernes`,`sábado`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:O6({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Trn={lessThanXSeconds:{one:`moins d’une seconde`,other:`moins de {{count}} secondes`},xSeconds:{one:`1 seconde`,other:`{{count}} secondes`},halfAMinute:`30 secondes`,lessThanXMinutes:{one:`moins d’une minute`,other:`moins de {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`environ 1 heure`,other:`environ {{count}} heures`},xHours:{one:`1 heure`,other:`{{count}} heures`},xDays:{one:`1 jour`,other:`{{count}} jours`},aboutXWeeks:{one:`environ 1 semaine`,other:`environ {{count}} semaines`},xWeeks:{one:`1 semaine`,other:`{{count}} semaines`},aboutXMonths:{one:`environ 1 mois`,other:`environ {{count}} mois`},xMonths:{one:`1 mois`,other:`{{count}} mois`},aboutXYears:{one:`environ 1 an`,other:`environ {{count}} ans`},xYears:{one:`1 an`,other:`{{count}} ans`},overXYears:{one:`plus d’un an`,other:`plus de {{count}} ans`},almostXYears:{one:`presqu’un an`,other:`presque {{count}} ans`}},Ern=(e,t,n)=>{let r,i=Trn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`dans `+r:`il y a `+r:r},Drn={date:E6({formats:{full:`EEEE d MMMM y`,long:`d MMMM y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'à' {{time}}`,long:`{{date}} 'à' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Orn={lastWeek:`eeee 'dernier à' p`,yesterday:`'hier à' p`,today:`'aujourd’hui à' p`,tomorrow:`'demain à' p'`,nextWeek:`eeee 'prochain à' p`,other:`P`},krn=(e,t,n,r)=>Orn[e],Arn={narrow:[`av. J.-C`,`ap. J.-C`],abbreviated:[`av. J.-C`,`ap. J.-C`],wide:[`avant Jésus-Christ`,`après Jésus-Christ`]},jrn={narrow:[`T1`,`T2`,`T3`,`T4`],abbreviated:[`1er trim.`,`2ème trim.`,`3ème trim.`,`4ème trim.`],wide:[`1er trimestre`,`2ème trimestre`,`3ème trimestre`,`4ème trimestre`]},Mrn={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`janv.`,`févr.`,`mars`,`avr.`,`mai`,`juin`,`juil.`,`août`,`sept.`,`oct.`,`nov.`,`déc.`],wide:[`janvier`,`février`,`mars`,`avril`,`mai`,`juin`,`juillet`,`août`,`septembre`,`octobre`,`novembre`,`décembre`]},Nrn={narrow:[`D`,`L`,`M`,`M`,`J`,`V`,`S`],short:[`di`,`lu`,`ma`,`me`,`je`,`ve`,`sa`],abbreviated:[`dim.`,`lun.`,`mar.`,`mer.`,`jeu.`,`ven.`,`sam.`],wide:[`dimanche`,`lundi`,`mardi`,`mercredi`,`jeudi`,`vendredi`,`samedi`]},Prn={narrow:{am:`AM`,pm:`PM`,midnight:`minuit`,noon:`midi`,morning:`mat.`,afternoon:`ap.m.`,evening:`soir`,night:`mat.`},abbreviated:{am:`AM`,pm:`PM`,midnight:`minuit`,noon:`midi`,morning:`matin`,afternoon:`après-midi`,evening:`soir`,night:`matin`},wide:{am:`AM`,pm:`PM`,midnight:`minuit`,noon:`midi`,morning:`du matin`,afternoon:`de l’après-midi`,evening:`du soir`,night:`du matin`}},Frn=(e,t)=>{let n=Number(e),r=t?.unit;if(n===0)return`0`;let i=[`year`,`week`,`hour`,`minute`,`second`],a;return a=n===1?r&&i.includes(r)?`ère`:`er`:`ème`,n+a},Irn=[`MMM`,`MMMM`],Lrn={code:`fr`,formatDistance:Ern,formatLong:Drn,formatRelative:krn,localize:{preprocessor:(e,t)=>e.getDate()===1||!t.some(e=>e.isToken&&Irn.includes(e.value))?t:t.map(e=>e.isToken&&e.value===`do`?{isToken:!0,value:`d`}:e),ordinalNumber:Frn,era:D6({values:Arn,defaultWidth:`wide`}),quarter:D6({values:jrn,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:Mrn,defaultWidth:`wide`}),day:D6({values:Nrn,defaultWidth:`wide`}),dayPeriod:D6({values:Prn,defaultWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:O6({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Rrn={lessThanXSeconds:{one:`meno di un secondo`,other:`meno di {{count}} secondi`},xSeconds:{one:`un secondo`,other:`{{count}} secondi`},halfAMinute:`alcuni secondi`,lessThanXMinutes:{one:`meno di un minuto`,other:`meno di {{count}} minuti`},xMinutes:{one:`un minuto`,other:`{{count}} minuti`},aboutXHours:{one:`circa un'ora`,other:`circa {{count}} ore`},xHours:{one:`un'ora`,other:`{{count}} ore`},xDays:{one:`un giorno`,other:`{{count}} giorni`},aboutXWeeks:{one:`circa una settimana`,other:`circa {{count}} settimane`},xWeeks:{one:`una settimana`,other:`{{count}} settimane`},aboutXMonths:{one:`circa un mese`,other:`circa {{count}} mesi`},xMonths:{one:`un mese`,other:`{{count}} mesi`},aboutXYears:{one:`circa un anno`,other:`circa {{count}} anni`},xYears:{one:`un anno`,other:`{{count}} anni`},overXYears:{one:`più di un anno`,other:`più di {{count}} anni`},almostXYears:{one:`quasi un anno`,other:`quasi {{count}} anni`}},zrn=(e,t,n)=>{let r,i=Rrn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`tra `+r:r+` fa`:r},Brn={date:E6({formats:{full:`EEEE d MMMM y`,long:`d MMMM y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} {{time}}`,long:`{{date}} {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})};function A6(e,...t){let n=V2.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}var Vrn={};function j6(){return Vrn}function Hrn(e){Vrn=e}function M6(e,t){let n=j6(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=H2(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Urn(e,t,n){let[r,i]=A6(n?.in,e,t);return+M6(r,n)==+M6(i,n)}var Wrn=[`domenica`,`lunedì`,`martedì`,`mercoledì`,`giovedì`,`venerdì`,`sabato`];function Grn(e){switch(e){case 0:return`'domenica scorsa alle' p`;default:return`'`+Wrn[e]+` scorso alle' p`}}function Krn(e){return`'`+Wrn[e]+` alle' p`}function qrn(e){switch(e){case 0:return`'domenica prossima alle' p`;default:return`'`+Wrn[e]+` prossimo alle' p`}}var Jrn={lastWeek:(e,t,n)=>{let r=e.getDay();return Urn(e,t,n)?Krn(r):Grn(r)},yesterday:`'ieri alle' p`,today:`'oggi alle' p`,tomorrow:`'domani alle' p`,nextWeek:(e,t,n)=>{let r=e.getDay();return Urn(e,t,n)?Krn(r):qrn(r)},other:`P`},Yrn={code:`it`,formatDistance:zrn,formatLong:Brn,formatRelative:(e,t,n,r)=>{let i=Jrn[e];return typeof i==`function`?i(t,n,r):i},localize:{ordinalNumber:(e,t)=>{let n=Number(e);return String(n)},era:D6({values:{narrow:[`aC`,`dC`],abbreviated:[`a.C.`,`d.C.`],wide:[`avanti Cristo`,`dopo Cristo`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`G`,`F`,`M`,`A`,`M`,`G`,`L`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`gen`,`feb`,`mar`,`apr`,`mag`,`giu`,`lug`,`ago`,`set`,`ott`,`nov`,`dic`],wide:[`gennaio`,`febbraio`,`marzo`,`aprile`,`maggio`,`giugno`,`luglio`,`agosto`,`settembre`,`ottobre`,`novembre`,`dicembre`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`D`,`L`,`M`,`M`,`G`,`V`,`S`],short:[`dom`,`lun`,`mar`,`mer`,`gio`,`ven`,`sab`],abbreviated:[`dom`,`lun`,`mar`,`mer`,`gio`,`ven`,`sab`],wide:[`domenica`,`lunedì`,`martedì`,`mercoledì`,`giovedì`,`venerdì`,`sabato`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`m.`,pm:`p.`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`mattina`,afternoon:`pomeriggio`,evening:`sera`,night:`notte`},abbreviated:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`mattina`,afternoon:`pomeriggio`,evening:`sera`,night:`notte`},wide:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`mattina`,afternoon:`pomeriggio`,evening:`sera`,night:`notte`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`m.`,pm:`p.`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`di mattina`,afternoon:`del pomeriggio`,evening:`di sera`,night:`di notte`},abbreviated:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`di mattina`,afternoon:`del pomeriggio`,evening:`di sera`,night:`di notte`},wide:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`di mattina`,afternoon:`del pomeriggio`,evening:`di sera`,night:`di notte`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^a/i,/^(d|e)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Xrn={lessThanXSeconds:{one:`mindre än en sekund`,other:`mindre än {{count}} sekunder`},xSeconds:{one:`en sekund`,other:`{{count}} sekunder`},halfAMinute:`en halv minut`,lessThanXMinutes:{one:`mindre än en minut`,other:`mindre än {{count}} minuter`},xMinutes:{one:`en minut`,other:`{{count}} minuter`},aboutXHours:{one:`ungefär en timme`,other:`ungefär {{count}} timmar`},xHours:{one:`en timme`,other:`{{count}} timmar`},xDays:{one:`en dag`,other:`{{count}} dagar`},aboutXWeeks:{one:`ungefär en vecka`,other:`ungefär {{count}} veckor`},xWeeks:{one:`en vecka`,other:`{{count}} veckor`},aboutXMonths:{one:`ungefär en månad`,other:`ungefär {{count}} månader`},xMonths:{one:`en månad`,other:`{{count}} månader`},aboutXYears:{one:`ungefär ett år`,other:`ungefär {{count}} år`},xYears:{one:`ett år`,other:`{{count}} år`},overXYears:{one:`över ett år`,other:`över {{count}} år`},almostXYears:{one:`nästan ett år`,other:`nästan {{count}} år`}},Zrn=[`noll`,`en`,`två`,`tre`,`fyra`,`fem`,`sex`,`sju`,`åtta`,`nio`,`tio`,`elva`,`tolv`],Qrn=(e,t,n)=>{let r,i=Xrn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t<13?Zrn[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`om `+r:r+` sedan`:r},$rn={date:E6({formats:{full:`EEEE d MMMM y`,long:`d MMMM y`,medium:`d MMM y`,short:`y-MM-dd`},defaultWidth:`full`}),time:E6({formats:{full:`'kl'. HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'kl.' {{time}}`,long:`{{date}} 'kl.' {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},ein={lastWeek:`'i' EEEE's kl.' p`,yesterday:`'igår kl.' p`,today:`'idag kl.' p`,tomorrow:`'imorgon kl.' p`,nextWeek:`EEEE 'kl.' p`,other:`P`},tin={code:`sv`,formatDistance:Qrn,formatLong:$rn,formatRelative:(e,t,n,r)=>ein[e],localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:case 2:return n+`:a`}return n+`:e`},era:D6({values:{narrow:[`f.Kr.`,`e.Kr.`],abbreviated:[`f.Kr.`,`e.Kr.`],wide:[`före Kristus`,`efter Kristus`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1:a kvartalet`,`2:a kvartalet`,`3:e kvartalet`,`4:e kvartalet`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`jan.`,`feb.`,`mars`,`apr.`,`maj`,`juni`,`juli`,`aug.`,`sep.`,`okt.`,`nov.`,`dec.`],wide:[`januari`,`februari`,`mars`,`april`,`maj`,`juni`,`juli`,`augusti`,`september`,`oktober`,`november`,`december`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`T`,`O`,`T`,`F`,`L`],short:[`sö`,`må`,`ti`,`on`,`to`,`fr`,`lö`],abbreviated:[`sön`,`mån`,`tis`,`ons`,`tors`,`fre`,`lör`],wide:[`söndag`,`måndag`,`tisdag`,`onsdag`,`torsdag`,`fredag`,`lördag`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`morg.`,afternoon:`efterm.`,evening:`kväll`,night:`natt`},abbreviated:{am:`f.m.`,pm:`e.m.`,midnight:`midnatt`,noon:`middag`,morning:`morgon`,afternoon:`efterm.`,evening:`kväll`,night:`natt`},wide:{am:`förmiddag`,pm:`eftermiddag`,midnight:`midnatt`,noon:`middag`,morning:`morgon`,afternoon:`eftermiddag`,evening:`kväll`,night:`natt`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`på morg.`,afternoon:`på efterm.`,evening:`på kvällen`,night:`på natten`},abbreviated:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`på morg.`,afternoon:`på efterm.`,evening:`på kvällen`,night:`på natten`},wide:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`på morgonen`,afternoon:`på eftermiddagen`,evening:`på kvällen`,night:`på natten`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^f/i,/^[ev]/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}};function nin(e){let t={},n=j6();for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]===void 0?delete t[n]:t[n]=e[n]);Hrn(t)}var rin=C5t(Y.Languages,Y.Languages.en);function iin(e){let t={da:trn,de:drn,es:wrn,fr:Lrn,it:Yrn,enGB:vrn,sv:tin};nin({locale:e===`en`?t.enGB:t[e]})}function ain(e){return e??rin}function oin(e){let{language:t,set:n}=IK.getState();n(e),iin(e),e!==t&&E2t.invalidateQueries({queryKey:[`foods`]})}var sin=new class extends Lnn{constructor(){super(`userDetails`,Knn)}get(){let{id:e,country:t,language:n,email:r,name:i}=super.get();return{id:e,name:i,country:t,language:n,email:r}}async fetch(){let e=await Gnn();oin(ain(e.language)),super.set(e),super.save()}migrateData(){throw Error(`[UserDetailsManager::migrateData] Purposefully not implemented.`)}},cin=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.adjustedInsulinCorrection=a,e.calculateActiveInsulin=c,e.calculateRecommendation=n,e.convertBGL=r,e.foodBolus=u,e.foodRecommendation=s,e.fractionOfInsulinStillActive=o,e.getInterval=p,e.getRecentBolusIds=l,e.getReduction=f,e.insulinStillActive=d,e.rawInsulinCorrection=i,e.roundInsulinValue=void 0;var t=b0();function n(e){let{carbohydrateRatio:n,carbohydrates:i,glucoseReading:o,insulinSensitivity:c,targetBGL:l,recentBoluses:d,activity:p}=e;if(o==null)throw Error(t.GlucoseErrors.MissingGlucoseReading);if(o.unit!==t.BloodGlucoseUnit.MMOL_L&&o.unit!==t.BloodGlucoseUnit.MG_DL)throw Error(t.GlucoseErrors.InvalidGlucoseUnit);let m=r(o.value,o.unit);if(m<t.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL||m>t.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL)throw Error(t.GlucoseErrors.OutOfRangeCurrentBGL);let h=new Date,g=p?.activitySettings?.target,_=u(i,n),{activeInsulin:v,adjustedInsulin:y,recentBolusesIds:b}=a(m,g===void 0?l:Math.max(g,l),c,d),x=_+y,S=x>t.CONSTANTS.INSULIN_DOSE_MAX;x=Math.min(x,t.CONSTANTS.INSULIN_DOSE_MAX);let C=0;if(m<3.9){let e=u(15,n);x-=e,x<0&&(C=Math.max(15,s(x+e,n)))}else{let e=s(x,n);C=Math.max(0,e)}x=Math.max(0,x);let w=p?f(p.activityDuration,p.activitySettings,p.activityIntensity,p.activityDate):null;return w&&(x*=1-w),{activeInsulin:v,activityReduction:w,bolus:x,carbRecommendation:C,recentBolusesIds:b,recommendationDate:h,wasLimited:S}}function r(e,n){if(e==null||isNaN(e))throw Error(t.GlucoseErrors.InvalidGlucoseValue);return n===t.BloodGlucoseUnit.MMOL_L?e:e*t.CONSTANTS.MMOLL_PER_MGDL_BGL}function i(e,t,n){return(e-t)/n}function a(e,t,n,r){let a=c(r),o=l(r),s=i(e,t,n);return{activeInsulin:a,adjustedInsulin:Math.max(s-a,Math.min(s,0)),recentBolusesIds:o}}function o(e){if(e<0)throw RangeError(`Parameter secondsPassed can't be negative. Found ${e}.`);return e===0?1:e<5e3?Math.cos((e+500)/5900):e<7e3?-120127e-9*e+1.197151:e<14400?.96-Math.tanh((e-2800)/6e3):0}function s(e,t){return-e*t}function c(e){return e.reduce((e,t)=>e+d(t),0)}function l(e){return e.map(e=>e.id)}function u(e,t){return e/t}function d(e){return e.insulinDose*o(e.secondsPassed)}e.roundInsulinValue=(e,n)=>{let r={[t.InjectionMethod.PenWhole]:1,[t.InjectionMethod.PenHalf]:2,[t.InjectionMethod.Pump]:10}[n];return Math.round(e*r)/r};function f(e,n,r,i){if(e<t.CONSTANTS.ACTIVITY_DURATION_MIN||e>t.CONSTANTS.ACTIVITY_DURATION_MAX)throw Error(t.ActivityErrors.OutOfRangeDuration);let a=i.getTime()+e*t.Milliseconds.Minute,o=new Date().getTime()>=a,s=p(e,(()=>{if(o)return n.post;if(r===null)throw Error(t.ActivityErrors.MissingIntensity);return n[r]})());if(s==null)throw Error(t.ActivityErrors.InvalidInterval);let c=1-s;if(c<t.CONSTANTS.ACTIVITY_REDUCTION_MIN||c>t.CONSTANTS.ACTIVITY_REDUCTION_MAX)throw Error(t.ActivityErrors.InvalidReduction);return c}function p(e,t){let{fromZero:n,fromThirty:r,fromFortysix:i,fromSixtyone:a}=t;return e<=29?n:e<=45?r:e<=60?i:a}})),lin=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"calculateActiveInsulin",{enumerable:!0,get:function(){return t.calculateActiveInsulin}}),Object.defineProperty(e,"calculateRecommendation",{enumerable:!0,get:function(){return t.calculateRecommendation}}),Object.defineProperty(e,"getReduction",{enumerable:!0,get:function(){return t.getReduction}}),Object.defineProperty(e,"roundInsulinValue",{enumerable:!0,get:function(){return t.roundInsulinValue}});var t=cin()})),N6=lin(),uin=class{create=async(e,t)=>{try{e.overwrittenByUUID=void 0;let n=fin();n.eventUpdates.push({...e,uuidOld:t}),PK.set(`event/pendingChanges`,JSON.stringify(n));let r=(e,t)=>{if(this.saveLocally(e),t!==void 0){let n=this.getByUUID(t);n.overwrittenByUUID=e.uuid,this.saveLocally(n)}};return VK?(await this.sync(),r(e,t)):(r(e,t),a8.syncAll().catch(console.error)),!0}catch(e){return console.error(e),!1}};getActiveEvents=()=>{let e=P6(),t=[];for(let n of e){let[e,r]=n,i=this.getByUUID(e);r>Date.now()-Y.Milliseconds.Minute*90-i.durationSeconds*Y.Milliseconds.Second&&t.push(i)}return t};getEvents=(e,t)=>{let n=P6();if(e!==void 0){let t=e.getTime();n=n.filter(e=>e[1]>=t)}if(t!==void 0){let e=t.getTime();n=n.filter(t=>t[1]<e)}let r=[];for(let e of n)try{let t=this.getByUUID(e[0]);r.push(t)}catch(e){console.error(e)}return r};sync=async()=>{let e=fin(),t={method:Y.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}},n=`${NK.HEDIA_API_URL_V2}/events`,r=await w6(n,t);await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.POST);let{lastSyncTimestamp:i,eventUpdates:a}=await r.json();for(let e of a)this.saveLocally(e);let o=fin(),s={lastSyncTimestamp:i,eventUpdates:o.eventUpdates.filter(t=>!e.eventUpdates.map(e=>e.uuid).includes(t.uuid)),deletedEvents:o.deletedEvents.filter(t=>!e.deletedEvents.includes(t))};PK.set(`event/pendingChanges`,JSON.stringify(s))};getEventWithHighestReduction=e=>{if(!e)throw Error(`[EventManager::getEventWithHighestReduction] Cannot retrieve highest reduction without a provided setting!`);let t=this.getActiveEvents();if(!t.length)return;let n=({durationSeconds:t,activityIntensity:n,startTimestamp:r})=>{if(r===null)throw Error(`[EventManager::calculateReduction] Cannot calculate reduction without startTimestamp!`);return(0,N6.getReduction)(t/60,e,n,new Date(r))},r=t.sort((e,t)=>n(e)-n(t));return r[r.length-1]};getByUUID=e=>{let t=PK.getString(`event/${e}`);if(t===void 0)throw Error(`[EventManager::getByUUID] The requested event with UUID ${e} does not exist!`);return JSON.parse(t)};saveLocally=e=>{if(din(e.uuid),PK.set(`event/${e.uuid}`,JSON.stringify(e)),!e.deleted&&!e.overwrittenByUUID){let t=P6();if(e.startTimestamp===null)throw Error(`[EventManager::saveLocally] event.startTimestamp must be non-null.`);let n=new Date(e.startTimestamp).getTime();t.push([e.uuid,n]),t=t.sort((e,t)=>t[1]-e[1]),PK.set(`event/index`,JSON.stringify(t))}}},din=e=>{let t=P6();t=t.filter(t=>t[0]!==e),PK.set(`event/index`,JSON.stringify(t))},P6=()=>{let e=PK.getString(`event/index`);return e===void 0?[]:JSON.parse(e)},fin=()=>{let e=PK.getString(`event/pendingChanges`);return e===void 0?{lastSyncTimestamp:new Date(0).toJSON(),eventUpdates:[],deletedEvents:[]}:JSON.parse(e)},F6=new uin,I6=(e,t,n)=>Math.round(e*t*n/100),pin=e=>e.source!==`packaged`,min=async()=>{let e=new URLSearchParams({source:`personal`,limit:`100`,sort:`title`}),t=await w6(`${NK.FOOD_BASE_URL}/foods?${e.toString()}`,{headers:{Accept:`application/json`}});return t.ok?await t.json():(console.warn(`[listPersonalFoods] server error`),[])},hin=async e=>{let t=new URLSearchParams({source:`curated`,limit:`100`,sort:`title`});e!==void 0&&t.set(`categoryId`,e);let n=`${NK.FOOD_BASE_URL}/foods?${t.toString()}`,r=await w6(n,{headers:{Accept:`application/json`}});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.GET),r.json()},gin=async()=>{let e=new URLSearchParams({usedWithinDays:`30`}),t=`${NK.FOOD_BASE_URL}/foods?${e.toString()}`,n=await w6(t,{headers:{Accept:`application/json`}});return await y0(n,Y.StatusCode.OK,t,Y.HTTPRequestMethod.GET),(await n.json()).filter(pin)},_in=async e=>{let t=new URLSearchParams({search:e,limit:`100`}),n=`${NK.FOOD_BASE_URL}/foods?${t.toString()}`,r=await w6(n,{headers:{Accept:`application/json`}});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.GET),(await r.json()).filter(pin)},vin=async e=>{let t=`${NK.FOOD_BASE_URL}/foods/${e}`,n=await w6(t,{headers:{Accept:`application/json`}});if(n.status===Y.StatusCode.NOT_FOUND)return null;await y0(n,Y.StatusCode.OK,t,Y.HTTPRequestMethod.GET);let r=await n.json();return!pin(r)||r.deleted?null:r},yin=async(e,t)=>{let n=`${NK.FOOD_BASE_URL}/foods/personal/${e}`,r=await w6(n,{method:Y.HTTPRequestMethod.PATCH,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(t)});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.PATCH),r.json()},bin=async e=>{let t=`${NK.FOOD_BASE_URL}/foods/personal/${e}`;await y0(await w6(t,{method:Y.HTTPRequestMethod.DELETE}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)},xin=async e=>{let t=`${NK.FOOD_BASE_URL}/foods/personal`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),await n.json()},Sin=async e=>{let t=new URLSearchParams({language:e}),n=`${NK.FOOD_BASE_URL}/categories?${t.toString()}`,r=await w6(n,{headers:{Accept:`application/json`}});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.GET),r.json()},Cin=async e=>{let t=`${NK.FOOD_BASE_URL}/food-intakes`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),await n.json()},win=async e=>{let t=`${NK.FOOD_BASE_URL}/food-intakes/${e}`;await y0(await w6(t,{method:Y.HTTPRequestMethod.DELETE}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)},Tin=J2(Y.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,Y.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX),Ein=q2(90,250),Din=8,Oin={fromZero:1,fromThirty:.75,fromFortysix:.5,fromSixtyone:null},kin={fromZero:1,fromThirty:.5,fromFortysix:.25,fromSixtyone:null},Ain={fromZero:1,fromThirty:.25,fromFortysix:null,fromSixtyone:null},jin={fromZero:1,fromThirty:.5,fromFortysix:.5,fromSixtyone:null};function L6(){return{target:Din,light:Oin,moderate:kin,hard:Ain,post:jin}}function Min(){return[{startTime:`00:00`,target:8},{startTime:`05:00`,target:6},{startTime:`09:00`,target:7},{startTime:`11:00`,target:6},{startTime:`13:00`,target:7},{startTime:`18:00`,target:6},{startTime:`22:00`,target:8}]}function Nin(){return{startTime:`00:00`,target:6}}function Pin(){return{targetBGLIntervals:Min(),overallTargetBGL:Nin(),use:Y.Usage.Intervals}}var Fin=()=>({min:Y.CONSTANTS.TARGET_GLUCOSE_MIN,max:Y.CONSTANTS.TARGET_GLUCOSE_MAX}),Iin=()=>({min:79,max:180}),Lin=`19:00`,Rin=1.5;function zin(){return{medicineNotification:{toggle:!1,dailyReminderTime:Lin},remeasurementNotification:{toggle:!0,remeasurement:Rin}}}var R6=new class{get=()=>{let e=PK.getString(`userSettings`),t=this.safeParse(e);return this.migrateAndClean(t)??{}};write=e=>{let t=this.migrateAndClean(e)??{};PK.set(`userSettings`,JSON.stringify(t))};getPending=()=>{let e=PK.getString(`pendingSettingsChanges`);return(this.safeParse(e)??[]).map(e=>this.migrateAndClean(e)??{})};addPending=e=>{let t=this.getPending();t.push(this.migrateAndClean(e)??{}),PK.set(`pendingSettingsChanges`,JSON.stringify(t))};removePending=e=>{let t=e.map(e=>e.uuid),n=this.getPending().filter(e=>!t.includes(e.uuid));PK.set(`pendingSettingsChanges`,JSON.stringify(n))};safeParse=e=>{if(e)try{return JSON.parse(e)}catch{return}};migrateActivitySettings=e=>{if(e.activity)for(let t of[`hard`,`moderate`,`light`,`post`])e.activity[t].fromSixtyone===void 0&&(e.activity[t].fromSixtyone=null)};migrateGenderToBiologicalSex=e=>{e.gender&&!e.biologicalSex&&(e.biologicalSex=e.gender),delete e.gender};removeEmailField=e=>{delete e.email};removeInsulinDependentField=e=>{delete e.insulinDependent};migrateBGLFields=e=>{if(!e.glucoseLevelTargets)return;let t={...e.glucoseLevelTargets};if(t.overallTargetBGL){let e={...t.overallTargetBGL};delete e.low,delete e.high,t.overallTargetBGL=e}Array.isArray(t.targetBGLIntervals)&&(t.targetBGLIntervals=t.targetBGLIntervals.map(e=>{let t={...e};return delete t.low,delete t.high,t})),e.glucoseLevelTargets=t};migrateNotificationsSettings=e=>{if(!e.notifications)return;let t={...e.notifications};t.deviceIdentifiers!==void 0&&delete t.deviceIdentifiers,e.notifications=t};migrateAndClean=e=>{if(!e)return;let t={...e};return this.migrateActivitySettings(t),this.migrateGenderToBiologicalSex(t),this.migrateBGLFields(t),this.migrateNotificationsSettings(t),this.removeEmailField(t),this.removeInsulinDependentField(t),t}};function z6(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var B6=class{_diabetesType;_biologicalSex;_heightCm;_weightKg;_birthDate;_injectionMethod;_glucoseUnit;_treatmentParameters;_glucoseLevelTargets;_fastActingInsulin;_longActingInsulin;_uuid;_activity;_notifications;_created;constructor(){let e=this.getLocalUserSettings();this.updateUserSettings(e),Ytn(this)}get diabetesType(){return this._diabetesType}get biologicalSex(){return this._biologicalSex}get heightCm(){return this._heightCm}get weightKg(){return this._weightKg}get birthDate(){return this._birthDate}get injectionMethod(){return this._injectionMethod}get glucoseUnit(){return this._glucoseUnit}get treatmentParameters(){return this._treatmentParameters}get glucoseLevelTargets(){return this._glucoseLevelTargets}get fastActingInsulin(){return this._fastActingInsulin}get longActingInsulin(){return this._longActingInsulin}get uuid(){return this._uuid}get activity(){return this._activity}get notifications(){return this._notifications}get created(){return this._created}async postUserSettings(e){try{e.uuidOld=this.getLocalUserSettings().uuid,e.uuid=K2(),e.created=new Date().toJSON();let t=await this.makeSyncRequest([e]);return R6.write(t),this.updateUserSettings(t),!0}catch(e){return console.error(e),!1}}async getUserSettings(){try{let e=R6.getPending();if(e.length>0){let t=await this.makeSyncRequest(e);return R6.write(t),this.updateUserSettings(t),R6.removePending(e),t}let t=await this.makeSyncRequest();return R6.write(t),this.updateUserSettings(t),t}catch(e){return VK&&NK.IS_PRODUCTION!==`true`&&e instanceof M2t&&[Y.StatusCode.UNAVAILABLE_FOR_LEGAL_REASONS,Y.StatusCode.UNAUTHORIZED].includes(e.statusCode)?(console.error(`❌❌❌ [dev] Not authenticated — Login at http://localhost:7265 (hda-app) to get the token ❌❌❌`),null):(console.error(e),null)}}getLocalUserSettings(){return R6.get()}reset(){this.updateUserSettings({activity:void 0,biologicalSex:void 0,birthday:void 0,bloodGlucoseUnits:void 0,bloodKetonesUnit:void 0,created:void 0,diabetesType:void 0,fastActingInsulin:void 0,glucoseLevelTargets:void 0,height:void 0,longActingInsulin:void 0,notifications:void 0,parameters:void 0,treatmentType:void 0,uuid:void 0,uuidOld:void 0,weight:void 0})}makeSyncRequest=async e=>{let t=e?Y.HTTPRequestMethod.POST:Y.HTTPRequestMethod.GET,n={headers:{"Content-Type":`application/json`},body:e?JSON.stringify(e):void 0,method:t},r=`${NK.HEDIA_API_URL_V2}/settings`,i=await w6(r,n);return await y0(i,Y.StatusCode.OK,r,t),i.json()};updateUserSettings(e){this._activity=e.activity,this._biologicalSex=e.biologicalSex,this._birthDate=e.birthday,this._created=e.created,this._diabetesType=e.diabetesType,this._fastActingInsulin=e.fastActingInsulin,this._glucoseLevelTargets=e.glucoseLevelTargets,this._glucoseUnit=e.bloodGlucoseUnits,this._heightCm=e.height,this._injectionMethod=e.treatmentType,this._longActingInsulin=e.longActingInsulin,this._notifications=e.notifications,this._treatmentParameters=e.parameters,this._uuid=e.uuid,this._weightKg=e.weight}updateMockUserSettings(){if(NK.IS_PRODUCTION===`true`)throw Error(`[UserSettingsManager::updateMockUserSettings] - This method should only be used outside production environments`);this._uuid=K2(),this._treatmentParameters=V6(2,10,Y.Usage.Overall),this._activity=L6(),this._notifications=zin(),this._glucoseLevelTargets=Pin(),this._glucoseUnit=Y.BloodGlucoseUnit.MMOL_L,this._fastActingInsulin=Y.FastActingInsulin.Apidra,this._longActingInsulin=Y.LongActingInsulin.Lantus,this._injectionMethod=Y.InjectionMethod.Pump,this._diabetesType=Y.DiabetesType.Type1,this._birthDate=`1975-12-31T23:00:00.000Z`,this._biologicalSex=Y.BiologicalSex.Female,this._heightCm=170,this._weightKg=70}};z6([x3],B6.prototype,`_diabetesType`,void 0),z6([x3],B6.prototype,`_biologicalSex`,void 0),z6([x3],B6.prototype,`_heightCm`,void 0),z6([x3],B6.prototype,`_weightKg`,void 0),z6([x3],B6.prototype,`_birthDate`,void 0),z6([x3],B6.prototype,`_injectionMethod`,void 0),z6([x3],B6.prototype,`_glucoseUnit`,void 0),z6([x3],B6.prototype,`_treatmentParameters`,void 0),z6([x3],B6.prototype,`_glucoseLevelTargets`,void 0),z6([x3],B6.prototype,`_fastActingInsulin`,void 0),z6([x3],B6.prototype,`_longActingInsulin`,void 0),z6([x3],B6.prototype,`_uuid`,void 0),z6([x3],B6.prototype,`_activity`,void 0),z6([x3],B6.prototype,`_notifications`,void 0),z6([x3],B6.prototype,`_created`,void 0),z6([H3],B6.prototype,`updateUserSettings`,null),z6([H3],B6.prototype,`updateMockUserSettings`,null);function V6(e,t,n){let r={carbohydrateRatio:t,insulinSensitivity:e,startTime:`00:00`};return{overallParameters:r,parameterIntervals:[`00:00`,`05:00`,`09:00`,`11:00`,`13:00`,`18:00`,`22:00`].map(e=>({insulinSensitivity:r.insulinSensitivity,carbohydrateRatio:r.carbohydrateRatio,startTime:e})),use:n}}var H6=new B6,Bin={code:`en-US`,formatDistance:prn,formatLong:{date:E6({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:E6({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:hrn,localize:grn,match:_rn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function U6(e){let t=H2(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function Vin(e,t){let n=H2(e,t?.in);return n.setHours(0,0,0,0),n}function Hin(e,t,n){let[r,i]=A6(n?.in,e,t),a=Vin(r),o=Vin(i),s=+a-U6(a),c=+o-U6(o);return Math.round((s-c)/l5t)}function Uin(e,t){let n=H2(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Win(e,t){let n=H2(e,t?.in);return Hin(n,Uin(n))+1}function W6(e,t){return M6(e,{...t,weekStartsOn:1})}function Gin(e,t){let n=H2(e,t?.in),r=n.getFullYear(),i=V2(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=W6(i),o=V2(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=W6(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Kin(e,t){let n=Gin(e,t),r=V2(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),W6(r)}function qin(e,t){let n=H2(e,t?.in),r=W6(n)-+Kin(n);return Math.round(r/c5t)+1}function Jin(e,t){let n=H2(e,t?.in),r=n.getFullYear(),i=j6(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=V2(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=M6(o,t),c=V2(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=M6(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function Yin(e,t){let n=j6(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Jin(e,t),a=V2(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),M6(a,t)}function Xin(e,t){let n=H2(e,t?.in),r=M6(n,t)-+Yin(n,t);return Math.round(r/c5t)+1}function G6(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var K6={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return G6(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):G6(n+1,2)},d(e,t){return G6(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return G6(e.getHours()%12||12,t.length)},H(e,t){return G6(e.getHours(),t.length)},m(e,t){return G6(e.getMinutes(),t.length)},s(e,t){return G6(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return G6(Math.trunc(r*10**(n-3)),t.length)}},q6={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},Zin={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return K6.y(e,t)},Y:function(e,t,n,r){let i=Jin(e,r),a=i>0?i:1-i;return t===`YY`?G6(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):G6(a,t.length)},R:function(e,t){return G6(Gin(e),t.length)},u:function(e,t){return G6(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return G6(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return G6(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return K6.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return G6(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=Xin(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):G6(i,t.length)},I:function(e,t,n){let r=qin(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):G6(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):K6.d(e,t)},D:function(e,t,n){let r=Win(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):G6(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return G6(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return G6(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return G6(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?q6.noon:r===0?q6.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?q6.evening:r>=12?q6.afternoon:r>=4?q6.morning:q6.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return K6.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):K6.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):G6(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):G6(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):K6.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):K6.s(e,t)},S:function(e,t){return K6.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return $in(r);case`XXXX`:case`XX`:return J6(r);default:return J6(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return $in(r);case`xxxx`:case`xx`:return J6(r);default:return J6(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+Qin(r,`:`);default:return`GMT`+J6(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+Qin(r,`:`);default:return`GMT`+J6(r,`:`)}},t:function(e,t,n){return G6(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return G6(+e,t.length)}};function Qin(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+G6(a,2)}function $in(e,t){return e%60==0?(e>0?`-`:`+`)+G6(Math.abs(e)/60,2):J6(e,t)}function J6(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=G6(Math.trunc(r/60),2),a=G6(r%60,2);return n+i+t+a}var ean=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},tan=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},nan={p:tan,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return ean(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,ean(r,t)).replace(`{{time}}`,tan(i,t))}},ran=/^D+$/,ian=/^Y+$/,aan=[`D`,`DD`,`YY`,`YYYY`];function oan(e){return ran.test(e)}function san(e){return ian.test(e)}function can(e,t,n){let r=lan(e,t,n);if(console.warn(r),aan.includes(e))throw RangeError(r)}function lan(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function uan(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function dan(e){return!(!uan(e)&&typeof e!=`number`||isNaN(+H2(e)))}var fan=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pan=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,man=/^'([^]*?)'?$/,han=/''/g,gan=/[a-zA-Z]/;function Y6(e,t,n){let r=j6(),i=n?.locale??r.locale??Bin,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=H2(e,n?.in);if(!dan(s))throw RangeError(`Invalid time value`);let c=t.match(pan).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=nan[t];return n(e,i.formatLong)}return e}).join(``).match(fan).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:_an(e)};if(Zin[t])return{isToken:!0,value:e};if(t.match(gan))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&san(a)||!n?.useAdditionalDayOfYearTokens&&oan(a))&&can(a,t,String(e));let o=Zin[a[0]];return o(s,a,i.localize,l)}).join(``)}function _an(e){let t=e.match(man);return t?t[1].replace(han,`'`):e}var van=`mmol/L`,yan=`mg/dL`,ban=[0,30],xan=[0,540],San={low:3.9,high:10},Can={low:70,high:180},X6=e=>{if(e===Y.BloodGlucoseUnit.MMOL_L)return{text:van,graphLimits:ban,inputMin:Y.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,inputMax:Y.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL,decimalPlaces:1,placeholder:`-.-`,targetInterval:{low:San.low,high:San.high}};if(e===Y.BloodGlucoseUnit.MG_DL)return{text:yan,graphLimits:xan,inputMin:20,inputMax:600,decimalPlaces:0,placeholder:`-`,targetInterval:{low:Can.low,high:Can.high}};throw Error(`[glucose::getBGConstants] Unsupported glucose unit! ${e}`)};function wan(e,t,n){return V2(n?.in||e,+H2(e)+t)}function Tan(e,t,n){return wan(e,t*d5t,n)}function Ean(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Dan(e,t){return H2(e)-+H2(t)}function Oan(e,t,n){let r=Dan(e,t)/u5t;return Ean(n?.roundingMethod)(r)}function kan(e){return e<=29?`0-29`:e<=45?`30-45`:e<=60?`46-60`:`61-120`}function Aan(e,t){let n=new Date,r=Oan(U2(Tan(new Date(e),1.5),t),n),i=Math.floor(r/60),a=r%60;return i>0?`${i}${LK(`activity_card__active_hour`)} ${a}${LK(`activity_card__active_min`)}`:`${a} ${LK(`activity_card__active_min`)}`}var Z6={light:()=>LK(`activity_intensity_1`),moderate:()=>LK(`activity_intensity_2`),hard:()=>LK(`activity_intensity_3`)},jan=van,Man=0,Nan=8,Pan=1,Fan=()=>({displayUnit:jan,inputMin:Man,inputMax:Nan,decimalPlaces:Pan});O2t.base900,f0.noRisk,f0.lowRisk,f0.moderateRisk,f0.highRisk;function Q6(e,t,n){if(t===n)return e;switch(n){case Y.BloodGlucoseUnit.MG_DL:return e*Y.CONSTANTS.MGDL_PER_MMOLL_BGL;case Y.BloodGlucoseUnit.MMOL_L:return e*Y.CONSTANTS.MMOLL_PER_MGDL_BGL;default:throw Error(`[conversionGlucose::convertBGL] Unsupported glucose unit! ${n}`)}}function Ian(e,t){let{decimalPlaces:n}=X6(t);return(Math.round(e*10)/10).toFixed(n)}function $6(e,t,n){return Ian(Q6(e,t,n),n)}var Lan=H4t({entry_timestamp:l2([B4t(),z4t()]),settings_uuid:z4t(),insulin_entered_units:l2([s2(),c2()]),carbohydrates_entered_grams:l2([s2(),c2()]),blood_glucose_millimolar:l2([s2(),c2()]),blood_ketones_millimolar:l2([s2(),c2(),V4t()]),event_uuid:l2([z4t(),c2(),V4t()])});`${v0.textPdf}${v0.textPdf}${v0.textPdf}${v0.textPdf}`;var Ran=e=>{Lan.parse(e);let{blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:r,blood_ketones_millimolar:i}=e,{inputMax:a,inputMin:o}=X6(Y.BloodGlucoseUnit.MMOL_L),{inputMax:s}=Fan();if(t!==null&&t>a)throw Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is greater than ${a}`);if(t!==null&&t<o)throw Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is less than ${o}`);if(i!==null&&i>s)throw Error(`[LogbookUtils::validateLogbook] blood_ketones_millimolar is greater than ${s}`);let c={blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:r,blood_ketones_millimolar:i};function l(e){return e!==null&&e<0}if(Object.entries(c).forEach(([e,t])=>{if(l(t))throw Error(`[LogbookUtils::validateLogbook] ${e} is less than 0`)}),e.event_uuid)try{F6.getByUUID(e.event_uuid)}catch{e.event_uuid=null}return!0},zan=e=>({...e,client_timestamp:e.client_timestamp.toISOString(),entry_timestamp:e.entry_timestamp.toISOString(),server_timestamp:e.server_timestamp?.toISOString()??null,is_deleted:e.is_deleted?.toISOString()??null}),Ban=e=>({...e,client_timestamp:new Date(e.client_timestamp),entry_timestamp:new Date(e.entry_timestamp),server_timestamp:e.server_timestamp?new Date(e.server_timestamp):null,is_deleted:e.is_deleted?new Date(e.is_deleted):null}),Van=e=>({active_insulin_source_logbook_ids:[],active_insulin:null,activity_reduction:null,blood_glucose_millimolar_sample_id:null,blood_glucose_millimolar:null,glucose_sample_source_id:null,blood_ketones_millimolar:null,carbohydrates_entered_grams:null,carbohydrates_sample_id:null,carbohydrates_input_grams:null,carbohydrates_manual_grams:null,carbohydrates_food_grams:null,food_intake_id:null,carbohydrates_overwritten_suggested_grams:null,carbohydrates_suggested_grams:null,client_timestamp:new Date,client_version:``,device_and_os:``,entry_timestamp:new Date,event_uuid:null,insulin_entered_units:null,insulin_suggested_units:null,is_bolus_calculation:!1,is_deleted:null,overwritten_by_id:null,server_timestamp:null,server_version:null,settings_uuid:``,timezone:``,utc_timezone_offset:null,uuid:``,note_id:null,...e}),Han=new Set,Uan=e=>{Han.forEach(t=>{try{t(e)}catch(e){console.error(`[logbookEvents] listener failed`,e)}})},Wan=e=>{Uan({type:`created`,entry:e})},Gan=(e,t)=>{Uan({type:`updated`,oldEntry:e,newEntry:t})},Kan=e=>{Uan({type:`deleted`,entry:e})};V();var qan=e=>{let t={...e};return delete t.carbohydrates_modified_suggested_grams,delete t.mood,delete t.smart_pen_sync_timestamp,t},Jan=class{constructor(){PK.delete(`logbook/unsuccessful`)}async addLogbook(e,t){let n=t?this.getLogbookByUUID(t):null;try{e.uuid=K2(),e.client_timestamp=new Date,e.client_version=x6,e.device_and_os=`${z.OS} ${z.Version}`;let r=n8();if(t)e.settings_uuid=this.getLogbookByUUID(t).settings_uuid,r.edited.push({oldUUID:t,newUUID:e.uuid}),t8(t);else{let{uuid:t}=H6;if(!t)throw Error(`[LogbookManager::addLogbook] settingsUUID must be defined`);e.settings_uuid=t}return e.utc_timezone_offset=S5t(),e.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,r.created.push(e),PK.set(`logbook/pendingChanges`,JSON.stringify(r)),e8(e),n===null?Wan(e):Gan(n,e),VK?await this.syncWeb():a8.syncAll().catch(console.error),e}catch(r){return console.error(r),VK&&(t?(t8(e.uuid),n!==null&&e8(n),r8(e.uuid,t)):(t8(e.uuid),r8(e.uuid))),null}}deleteLogbook=async e=>{let t=this.getLogbookByUUID(e);try{t.food_intake_id&&await win(t.food_intake_id).catch(console.error);let n=n8();return n.deleted.push(e),PK.set(`logbook/pendingChanges`,JSON.stringify(n)),t8(e),Kan(t),VK?await this.syncWeb():a8.syncAll().catch(console.error),!0}catch(n){return console.error(n),VK&&(e8(t),r8(e)),!1}};syncWeb=async()=>{let e=n8(),t=e=>({method:Y.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}}),n=`${NK.HEDIA_API_URL_V2}/logbooks`,r=await w6(n,t(e));await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.POST);let{created:i,last_sync_timestamp:a}=await r.json();for(let e of i)e8(e);let o={last_sync_timestamp:a,created:[],deleted:[],edited:[]};PK.set(`logbook/pendingChanges`,JSON.stringify(o))};sync=async()=>{let e=n8(),{created:t,deleted:n,edited:r,last_sync_timestamp:i}=e,a=[],o=[],s=[],c=[],l=[],u=e.last_sync_timestamp,d=async e=>{let t=`${NK.HEDIA_API_URL_V2}/logbooks`,n=await w6(t,{method:Y.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}});await y0(n,Y.StatusCode.OK,t,Y.HTTPRequestMethod.POST);let{created:r,deleted:i,last_sync_timestamp:a}=await n.json();c=c.concat(r),l=l.concat(i),u=a},f={created:[],deleted:[],edited:[]};!t.length&&!r.length&&!n.length&&await d({...f,last_sync_timestamp:i}).catch();for(let e of t)await d({...f,last_sync_timestamp:i,created:[e]}).catch(()=>a.push(e));for(let e of r)await d({...f,last_sync_timestamp:i,edited:[e]}).catch(()=>s.push(e));for(let e of n)await d({...f,last_sync_timestamp:i,deleted:[e]}).catch(()=>o.push(e));let p=n8(),m=t.filter(e=>!a.includes(e)).map(e=>e.uuid),h=r.filter(e=>!s.includes(e)).map(e=>e.oldUUID),g=n.filter(e=>!o.includes(e)),_={last_sync_timestamp:u,created:p.created.filter(e=>!m.includes(e.uuid)),deleted:p.deleted.filter(e=>!g.includes(e)),edited:p.edited.filter(e=>!h.includes(e.oldUUID))};PK.set(`logbook/pendingChanges`,JSON.stringify(_));for(let e of c)e8(e);for(let e of l)t8(e)};getRecentBoluses=(e=new Date(Date.now()-Y.Milliseconds.Hour*4),t=new Date)=>{let n=this.getLogbooks(e,t);return n.length===0?[]:n.filter(e=>e.insulin_entered_units!==null&&e.insulin_entered_units>0).map(({insulin_entered_units:e,entry_timestamp:t,uuid:n})=>({insulinDose:e,secondsPassed:(Date.now()-new Date(t).getTime())/1e3,id:n}))};getLogbooks=(e,t)=>{let n=Yan();if(e!==void 0){let t=e.getTime();n=n.filter(e=>e[1]>=t)}if(t!==void 0){let e=t.getTime();n=n.filter(t=>t[1]<e)}let r=[];for(let[e]of n)try{let t=this.getLogbookByUUID(e);try{Ran(t),r.push(t)}catch(t){console.error(t),r8(e),t8(e)}}catch(e){console.error(e)}return r};getLogbookByUUID=e=>{let t=PK.getString(`logbook/${e}`);if(!t)throw Error(`LogbookManager::getLogbookByUUID - could not find logbook in local storage`);let n=qan(JSON.parse(t));return{...n,entry_timestamp:new Date(n.entry_timestamp),server_timestamp:n.server_timestamp?new Date(n.server_timestamp):null,client_timestamp:new Date(n.client_timestamp)}}},e8=e=>{let{uuid:t}=e;if(!t)throw Error(`[LogbookManager::saveLocally] uuid must be defined`);t8(t);let n=Yan();n.push([t,new Date(e.entry_timestamp).getTime()]),n.sort((e,t)=>t[1]-e[1]),PK.set(`logbook/index`,JSON.stringify(n)),PK.set(`logbook/${e.uuid}`,JSON.stringify(e))},t8=e=>{let t=Yan().filter(([t])=>t!==e);PK.set(`logbook/index`,JSON.stringify(t)),PK.delete(`logbook/${e}`)},n8=()=>{let e=PK.getString(`logbook/pendingChanges`);if(!e)return{last_sync_timestamp:new Date(0).toISOString(),created:[],edited:[],deleted:[]};let t=JSON.parse(e);return{...t,created:t.created.map(e=>qan(e))}},r8=(e,t)=>{let{created:n,deleted:r,edited:i,last_sync_timestamp:a}=n8(),o={last_sync_timestamp:a,created:[...n].filter(({uuid:t})=>t!==e),edited:[...i].filter(({oldUUID:n,newUUID:r})=>n!==t&&r!==e),deleted:[...r].filter(t=>t!==e)};PK.set(`logbook/pendingChanges`,JSON.stringify(o))},Yan=()=>{let e=PK.getString(`logbook/index`);return e===void 0?[]:JSON.parse(e)},i8=new Jan,a8=new class{currentIsConnected=null;isSynchronizing=!1;isListenerAttached=!1;constructor(){this.setListener()}syncAll=async()=>{if(!this.isSynchronizing)try{this.isSynchronizing=!0,await H6.getUserSettings().catch(console.error),await F6.sync().catch(console.error),await i8.sync().catch(console.error),await sin.fetch().catch(console.error)}finally{this.isSynchronizing=!1}};handleConnectivity=async({isConnected:e,isInternetReachable:t})=>{let{accessToken:n}=z4.getState();this.currentIsConnected!==(e&&t)&&(this.currentIsConnected=e&&t,this.currentIsConnected&&n&&await this.syncAll())};setListener=()=>{!this.isListenerAttached&&!VK&&(s9t.addEventListener(this.handleConnectivity),this.isListenerAttached=!0)}};V();var{add:Xan,multiply:Zan}=jf;function o8(e,t,n){return Xan(Zan(e,t),Zan(e.interpolate({inputRange:[0,1],outputRange:[1,0]}),n))}V();var{add:Qan,multiply:s8}=jf;function $an({current:e,next:t,inverted:n,layouts:{screen:r}}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[r.width,0],extrapolate:`clamp`}),n),a=t?s8(t.progress.interpolate({inputRange:[0,1],outputRange:[0,r.width*-.3],extrapolate:`clamp`}),n):0,o=e.progress.interpolate({inputRange:[0,1],outputRange:[0,.07],extrapolate:`clamp`}),s=e.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:`clamp`});return{cardStyle:{transform:[{translateX:i},{translateX:a}]},overlayStyle:{opacity:o},shadowStyle:{shadowOpacity:s}}}function eon({inverted:e,...t}){return $an({...t,inverted:jf.multiply(e,-1)})}function ton({current:e,inverted:t,layouts:{screen:n}}){return{cardStyle:{transform:[{translateY:s8(e.progress.interpolate({inputRange:[0,1],outputRange:[n.height,0],extrapolate:`clamp`}),t)}]}}}function non({index:e,current:t,next:n,inverted:r,layouts:{screen:i},insets:a}){let o=z.OS===`ios`&&!z.isPad&&!z.isTV&&a.top>20,s=i.width>i.height,c=s?0:10,l=a.top,u=i.height/i.width,d=Qan(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0),f=e===0,p=s8(d.interpolate({inputRange:[0,1,2],outputRange:[i.height,f?0:c,(f?l:0)-c*u]}),r),m=d.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,.3,1,1]}),h=s?1:d.interpolate({inputRange:[0,1,2],outputRange:[1,1,i.width?1-c*2/i.width:1]}),g=s?0:f?d.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,0,o?38:0,10]}):10;return{cardStyle:{overflow:`hidden`,borderCurve:`continuous`,borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomLeftRadius:o?g:0,borderBottomRightRadius:o?g:0,marginTop:f?0:l,marginBottom:f?0:c,transform:[{translateY:p},{scale:h}]},overlayStyle:{opacity:m}}}function ron({current:e,inverted:t,layouts:{screen:n},closing:r}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[n.height*.08,0],extrapolate:`clamp`}),t);return{cardStyle:{opacity:o8(r,e.progress,e.progress.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1],extrapolate:`clamp`})),transform:[{translateY:i}]}}}function ion({current:e,next:t,inverted:n,layouts:{screen:r}}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[r.height,0],extrapolate:`clamp`}),n),a=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[r.height*(95.9/100)*-1,0],extrapolate:`clamp`}),n),o=t?s8(t.progress.interpolate({inputRange:[0,1],outputRange:[0,r.height*(2/100)*-1],extrapolate:`clamp`}),n):0,s=e.progress.interpolate({inputRange:[0,.36,1],outputRange:[0,.1,.1],extrapolate:`clamp`});return{containerStyle:{overflow:`hidden`,transform:[{translateY:i}]},cardStyle:{transform:[{translateY:a},{translateY:o}]},overlayStyle:{opacity:s}}}function aon({current:e,next:t,closing:n}){let r=Qan(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0);return{cardStyle:{opacity:r.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:o8(n,e.progress.interpolate({inputRange:[0,1],outputRange:[.925,1],extrapolate:`clamp`}),r.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.075]}))}]}}}function oon({current:e,next:t,inverted:n,closing:r}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[96,0],extrapolate:`clamp`}),n),a=t?s8(t.progress.interpolate({inputRange:[0,1],outputRange:[0,-96],extrapolate:`clamp`}),n):0;return{cardStyle:{opacity:o8(r,e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),e.progress),transform:[{translateX:i},{translateX:a}]}}}function son({current:e,inverted:t,layouts:{screen:n},closing:r}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[n.height*.8,0],extrapolate:`clamp`}),t),a=o8(r,e.progress,e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`})),o=e.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:`clamp`});return{cardStyle:{opacity:a,transform:[{translateY:i}]},overlayStyle:{opacity:o}}}function con({current:{progress:e}}){return{cardStyle:{opacity:e.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})},overlayStyle:{opacity:e.interpolate({inputRange:[0,1],outputRange:[0,.5],extrapolate:`clamp`})}}}function lon(){return{}}V();var{add:c8,multiply:uon}=jf;function l8({current:e,next:t}){let n=c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0),r=n.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:r},rightButtonStyle:{opacity:r},titleStyle:{opacity:r},backgroundStyle:{opacity:n.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function don({current:e,next:t,direction:n,layouts:{screen:r}}){let i=n===`rtl`,a=[{translateX:c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0).interpolate({inputRange:[0,1,2],outputRange:i?[-r.width,0,r.width]:[r.width,0,-r.width]})}];return{leftButtonStyle:{transform:a},rightButtonStyle:{transform:a},titleStyle:{transform:a},backgroundStyle:{transform:a}}}function fon({current:e,next:t,direction:n,layouts:{screen:r}}){let i=n===`rtl`,a=[{translateX:c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0).interpolate({inputRange:[0,1,2],outputRange:i?[r.width,0,-r.width]:[-r.width,0,r.width]})}];return{leftButtonStyle:{transform:a},rightButtonStyle:{transform:a},titleStyle:{transform:a},backgroundStyle:{transform:a}}}function pon({current:e,next:t,layouts:{header:n}}){let r=[{translateY:c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0).interpolate({inputRange:[0,1,2],outputRange:[-n.height,0,-n.height]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function mon(){return{}}V();var u8={animation:`spring`,config:{stiffness:1e3,damping:500,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}},hon={animation:`timing`,config:{duration:350,easing:Cf.out(Cf.poly(5))}},gon={animation:`timing`,config:{duration:150,easing:Cf.in(Cf.linear)}},_on={animation:`timing`,config:{duration:425,easing:Cf.bezier(.20833,.82,.25,1)}},von={animation:`timing`,config:{duration:400,easing:Cf.bezier(.20833,.82,.25,1)}};Cf.bezier(.20833,.82,.25,1),Cf.bezier(.20833,.82,.25,1);var yon={animation:`timing`,config:{duration:250,easing:e=>Math.cos((e+1)*Math.PI)/2+.5}},bon={animation:`timing`,config:{duration:200,easing:e=>e===1?1:e**2}};V();var xon=28,Son=29,Con=34,d8={gestureDirection:`horizontal`,transitionSpec:{open:u8,close:u8},cardStyleInterpolator:$an,headerStyleInterpolator:l8},won={gestureDirection:`vertical`,transitionSpec:{open:u8,close:u8},cardStyleInterpolator:ton,headerStyleInterpolator:l8},Ton={gestureDirection:`vertical`,transitionSpec:{open:u8,close:u8},cardStyleInterpolator:non,headerStyleInterpolator:l8},Eon={gestureDirection:`vertical`,transitionSpec:{open:hon,close:gon},cardStyleInterpolator:ron,headerStyleInterpolator:l8},Don={gestureDirection:`vertical`,transitionSpec:{open:_on,close:_on},cardStyleInterpolator:ion,headerStyleInterpolator:l8},Oon={gestureDirection:`horizontal`,transitionSpec:{open:von,close:von},cardStyleInterpolator:aon,headerStyleInterpolator:l8},kon={gestureDirection:`horizontal`,transitionSpec:{open:hon,close:gon},cardStyleInterpolator:oon,headerStyleInterpolator:l8},Aon={gestureDirection:`vertical`,transitionSpec:{open:yon,close:bon},cardStyleInterpolator:son,headerStyleInterpolator:l8},jon={gestureDirection:`vertical`,transitionSpec:{open:yon,close:bon},cardStyleInterpolator:con,headerStyleInterpolator:l8},f8=z.select({ios:d8,android:Number(z.Version)>=Con?kon:Number(z.Version)>=Son?Oon:Number(z.Version)>=xon?Don:Eon,default:Oon}),Mon=z.select({ios:Ton,default:Aon}),Non={...d8,cardStyleInterpolator:eon},Pon=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC`,Fon=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABVCAQAAAChx3/YAAACVElEQVR42t3ZP2sUURQFcI0xm9gEg4I2GjSIX0DFRkFsbE20DtqIfgBRMCalpV9CUUEQQWIUBBFBEGKze899s+smO2HFRhtNYv5d2eqA284pnm/7/fEeM/PuPXdX1Wt5v03jVVpH8FcpEAN+Mj3nnwuQ2IMpm8eGACFRTPkiNhEyJPYWV/HFtxCVIyRwG58amwgZUh/yO7ZkPUKFRM3v2jK2ETIkavawXpKoEiFxHx0elABpD9usrXAXAqQcaT4gIUFiqDkN2BZChhQ1XIfbDqJyhITfRAKJChESt7wkIUDeDaZzqYFAyJCiVpx3QwiR9nDzkgMhRGLQT/OgJEhRq59JhhAgJHDBHSFASKSLqYUQIuVIcTY1EUKkuy9d7u1CgZCY9BWEDIndxUFcSSQUSGsU93qEACFRzKQfCCHSPuSz+IlQICQe4zt2hMjSYTyxXxYIGfL1KJ6ChAJpj+M9fltAgHAXr7FKQoAUx9MC1kgIkOZE+mjrJATIt/H0wnhQCqQ+YS9tFQEdUo75WyehQXyO/aoO+YCQI+gi/o+d+JxtyJFyLL3h05Xpe6J/4/u/XVhTMQzDjtkCmXzvE96MproZubpHeMdnXK2w7nrEuivXCpK1sM+AtXCWVT37Ez9QZ3+SbafV3zNm3v2yjyejTySyzlaYEp1iSgR93pV5cscMsq5EmKZ2eBEIc2F3MrKEu7jGhDvfrL5/6pDx/ISPwAwnQdKZVqPD3eQ6neufM+Y8MeXs1xc5+81yik1mwCZt3v+IEDKtE3iWtkUI1+fRdOPfKvovc6zWpmERVBkAAAAASUVORK5CYII=`,Ion=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAACTElEQVR42sWZTYoaQRiGH2kR4hEUc4QIGjBnUEEPoDPLqCfQO8REdwq61+1oDqBewAGz0MUszd5FHGfzZTZSJDRVdnW39T5b4X2hy6rvh8BKU6XHkDlrDpzeObBmzpAeVdLEqI+0+ckZ0XBmSYscEStFh2ckAM90SBGJPJq8IBa80MQjlBLU2SEh2FEngaWybJAI2JDFQl84IhFxpERAPXJBIuTCIzcryQ8kBvokb7NfIDHxdEuE70iM9M3fXmLmQX/yL0jMvFICf2X5jdyBIxl8lGCD3ImN3+1YR+5Ijf/k8Qu5Izs8/lFTe4uN+ESRCW8IZt6YUCDPSHukG6CU0j64I64qc8F86Za5aqx9rFNwVQfRkAefCGZ7yCMaOlxlqHaK4BPBbA+fEQ1bVeuJlgn4RDDbwxTRkgOAtvFQlX0imO3LxkPbAoCl+WBpImh/YWABkOaM2EWwtFecSUMVQWwjWNorKtBDwkSwsld0YYiEiWBlrxjAHAkTwcpeMYM1YhnB3l6xggNiGcHeXrGHE2IZwd5ecXIewPkncH4Inf8NnV9Ezq9i54+R2+f4Dx+cFyTuSzL3Ram5LC9Yl+VFfVnuvDFx3prd3pyOyVNkenNzOqVAnvHtzSl47Jy25+4HFLgf0UCWo6MhlfsxnftBpftRrVKSJ7fDakjSR2LgG0l3C4tXHgiokquVjVImsqVVBkslqIVe29VIEEoeDevFZQMvutXtFgnAljYpIlaOFkvj8nrBV3LEqDQVugyYsWLP6Z09K2YM6FIJvr7/C289zVf6dsfbAAAAAElFTkSuQmCC`,Lon=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgBAMAAAAQtmoLAAAAFVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAASAQCkAAAABnRSTlMANO8Qy7qrh7/eAAAA4ElEQVR4Xu3WvQ3CQAxHcRALoGxAQ00RJkBiASQGQPDffwSU+t3pFe4in9xFuV8+fLYPvTo69hv38wg4vmbA6XkZAcv3NgHWfAbE8ZrHDEgGxJJMiDXZCAKZEO9kIwgkv6GwBMQGYBtck11ICEBCARIEhCAgBAAjACgBwAgASgAwAoASAIwAoAQAIwAYAcAIAEYAEAKAEASccMBv8Ecqv7R/1vKP89QoJ5+nd/kA+REtFwEvM+VC5qWyXIy93JcbiresclP0tltt7D46VIcTH3+KA5aPcPUh0cfQjo6Ona4/2hPAtwOzeV0AAAAASUVORK5CYII=`,Ron=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAADZ0lEQVR42u3bS0hUURzH8W+mzrKwpDJ6gb18VEJvo3da1CqoFrWICoIsWvROs1oELQpqUYsI2lRYFCFGVPR+U7QJalMU9NAMKzRC1NETSBDevwedOXPOnYnz+e0E/+f+7rlzZ+bC4Hme53melxz6pOKiw1hGHjmdGYziK7WdeUMNX0hqE6nkJUqbDl5QTgFJaTbPUL3MI2aSVPKpQcWYK4wjKUQ4SRQVR6IcJ4OQDeIJyiD3GUiIiviIMswHCgnJMn6jekgHqsf8opQQFKE//DpOsZIZjCCTCCOZwSpOU4/SpIkCHBvER80ZP8t0+gBSGsVUafbkPQNxKKJ56d5gEj2ZzG0UMvfIwJkTKJEW1tFbG2lFiRzFkTzkfb+eYmIxlwYxo5VcnKhGHv4oYjWa72LOBRyYhbx4ionHPNrELWAK1smX73ritUnMuoNlBWLJm5h4IOblYlW52PQiTEwXBbZh1YvAcucwdTkw8SEWDRXvozMxNT8wsZ1srNkobp9pmErnR2DqWqw5FljqNIlwNjD1MIbS0Mmhq1uYk1Ny3BX4RCJ8Dq9AHYlQS1dDbBWQo2stFLC6A8rCg0Oxns2BdQk8V/p9rTcu4GSz9VO+uiswnEQYFt4OLCIRSsSFaq3Aa/FkqC+mMllCV4+wZrD4MDcbUyXiiWl/LHoaWO4Spq4GJj7Gql2oQKZhYo6YV4lVY5HPl008E98GxmDZXVFhC/HaIWZVYd1UsWiUhcRjKe3iG3YhDlwUFX4wnlgV0ijmVONELm1i6Z8sivHsy8NvJh9HjqBEomyN4dpvR4lswZl0zSPyJ8yiJ3N5jkLmKk5l8Q7VbaopIQOQMlnMNc1/fSMbx/JoRGnSSBXrKaWQLAYwgVI2cJEmlDZtrCZChEwcWoCsYJ6DODSetyjD1NMaZoUsbqEMUkM2K8RfD+BQOodpQcWRZjb/naDCrQCjOEcHKoZ0cIV8EAVCqwBF3ET1KlHOU8A/fVHdZj/OjWQrd4miv1k+pILRBO0Ls4KUxRoOcYbrvKKBBl5zh/McZTn90KnQVKgk2fzPFco1Ffb5Cg7t1VSo8BUc2qOpUO4rOLRbU2Gvr+DQLk2FPb6CQzs1FXaneoUyUsiO1D58WaGMFLRdHH6KVigjhW2jzP8szPM8z/M8z0t2fwDen7r/jhTzQwAAAABJRU5ErkJggg==`,zon=s(((e,t)=>{t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}})),Bon=s(((e,t)=>{t.exports=function(e){return!e||typeof e==`string`?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`)}})),Von=s(((e,t)=>{var n=Bon(),r=Array.prototype.concat,i=Array.prototype.slice,a=t.exports=function(e){for(var t=[],a=0,o=e.length;a<o;a++){var s=e[a];n(s)?t=r.call(t,i.call(s)):t.push(s)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}})),Hon=s(((e,t)=>{var n=zon(),r=Von(),i=Object.hasOwnProperty,a=Object.create(null);for(var o in n)i.call(n,o)&&(a[n[o]]=o);var s=t.exports={to:{},get:{}};s.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case`hsl`:n=s.get.hsl(e),r=`hsl`;break;case`hwb`:n=s.get.hwb(e),r=`hwb`;break;default:n=s.get.rgb(e),r=`rgb`;break}return n?{model:r,value:n}:null},s.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,a=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,l=[0,0,0,1],u,d,f;if(u=e.match(r)){for(f=u[2],u=u[1],d=0;d<3;d++){var p=d*2;l[d]=parseInt(u.slice(p,p+2),16)}f&&(l[3]=parseInt(f,16)/255)}else if(u=e.match(t)){for(u=u[1],f=u[3],d=0;d<3;d++)l[d]=parseInt(u[d]+u[d],16);f&&(l[3]=parseInt(f+f,16)/255)}else if(u=e.match(a)){for(d=0;d<3;d++)l[d]=parseInt(u[d+1],0);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(o)){for(d=0;d<3;d++)l[d]=Math.round(parseFloat(u[d+1])*2.55);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(s))return u[1]===`transparent`?[0,0,0,0]:i.call(n,u[1])?(l=n[u[1]],l[3]=1,l):null;else return null;for(d=0;d<3;d++)l[d]=c(l[d],0,255);return l[3]=c(l[3],0,1),l},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=r(arguments);return`#`+l(e[0])+l(e[1])+l(e[2])+(e[3]<1?l(Math.round(e[3]*255)):``)},s.to.rgb=function(){var e=r(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},s.to.rgb.percent=function(){var e=r(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+i+`%)`:`rgba(`+t+`%, `+n+`%, `+i+`%, `+e[3]+`)`},s.to.hsl=function(){var e=r(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},s.to.hwb=function(){var e=r(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},s.to.keyword=function(e){return a[e.slice(0,3)]};function c(e,t,n){return Math.min(Math.max(t,e),n)}function l(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}})),Uon=s(((e,t)=>{var n=zon(),r={};for(let e of Object.keys(n))r[n[e]]=e;var i={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};t.exports=i;for(let e of Object.keys(i)){if(!(`channels`in i[e]))throw Error(`missing channels property: `+e);if(!(`labels`in i[e]))throw Error(`missing channel labels property: `+e);if(i[e].labels.length!==i[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:n})}i.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},i.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[i*360,a*100,l*100]},i.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],a=i.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[a,o*100,r*100]},i.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),a=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[a*100,o*100,s*100,i*100]};function a(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}i.rgb.keyword=function(e){let t=r[e];if(t)return t;let i=1/0,o;for(let t of Object.keys(n)){let r=n[t],s=a(e,r);s<i&&(i=s,o=t)}return o},i.keyword.rgb=function(e){return n[e]},i.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let i=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]},i.rgb.lab=function(e){let t=i.rgb.xyz(e),n=t[0],r=t[1],a=t[2];return n/=95.047,r/=100,a/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*r-16,500*(n-r),200*(r-a)]},i.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=r*255,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+(i-s)*6*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=o*255;return c},i.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;let o=(r+n)/2;return[t,(r===0?2*i/(a+i):2*n/(r+n))*100,o*100]},i.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},i.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,a*100,o*100]},i.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,o&1&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c;break}return[l*255,u*255,d*255]},i.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},i.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]},i.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},i.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;a=(t+16)/116,i=n/500+a,o=a-r/200;let s=a**3,c=i**3,l=o**3;return a=s>.008856?s:(a-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},i.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},i.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},i.rgb.ansi16=function(e,t=null){let[n,r,a]=e,o=t===null?i.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},i.ansi256.rgb=function(e){if(e>=232){let t=(e-232)*10+8;return[t,t,t]}e-=16;let t;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.substring(t.length)+t},i.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},i.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[c*360,o*100,s*100]},i.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},i.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},i.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},i.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},i.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},i.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}})),Won=s(((e,t)=>{var n=Uon();function r(){let e={},t=Object.keys(n);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function i(e){let t=r(),i=[e];for(t[e].distance=0;i.length;){let e=i.pop(),r=Object.keys(n[e]);for(let n=r.length,a=0;a<n;a++){let n=r[a],o=t[n];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,i.unshift(n))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let r=[t[e].parent,e],i=n[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),i=a(n[t[o].parent][o],i),o=t[o].parent;return i.conversion=r,i}t.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}})),Gon=s(((e,t)=>{var n=Uon(),r=Won(),i={},a=Object.keys(n);function o(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function s(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}a.forEach(e=>{i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});let t=r(e);Object.keys(t).forEach(n=>{let r=t[n];i[e][n]=s(r),i[e][n].raw=o(r)})}),t.exports=i})),Kon=s(((e,t)=>{var n=Hon(),r=Gon(),i=[`keyword`,`gray`,`hex`],a={};for(let e of Object.keys(r))a[[...r[e].labels].sort().join(``)]=e;var o={};function s(e,t){if(!(this instanceof s))return new s(e,t);if(t&&t in i&&(t=null),t&&!(t in r))throw Error(`Unknown model: `+t);let c,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof s)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=n.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=r[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0){this.model=t||`rgb`,l=r[this.model].channels;let n=Array.prototype.slice.call(e,0,l);this.color=p(n,l),this.valpha=typeof e[l]==`number`?e[l]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let n=t.sort().join(``);if(!(n in a))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=a[n];let{labels:i}=r[this.model],o=[];for(c=0;c<i.length;c++)o.push(e[i[c]]);this.color=p(o)}if(o[this.model])for(l=r[this.model].channels,c=0;c<l;c++){let e=o[this.model][c];e&&(this.color[c]=e(this.color[c]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}s.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in n.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=r[this.model],{labels:n}=r[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new s([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new s([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?r[this.model].keyword(this.color):new s(e)},hex(e){return e===void 0?n.to.hex(this.rgb().round().color):new s(e)},hexa(e){if(e!==void 0)return new s(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r=`0`+r),n.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return s.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),c=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-c;return s.rgb(c*n.red()+l*r.red(),c*n.green()+l*r.green(),c*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(r)){if(i.includes(e))continue;let{channels:t}=r[e];s.prototype[e]=function(...t){return this.model===e?new s(this):t.length>0?new s(t,e):new s([...f(r[this.model][e].raw(this.color)),this.valpha],e)},s[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=p(n,t)),new s(r,e)}}function c(e,t){return Number(e.toFixed(t))}function l(e){return function(t){return c(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(o[r]||(o[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e){return Array.isArray(e)?e:[e]}function p(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}t.exports=s}));V();var qon=jf.createAnimatedComponent(Kp),Jon=z.OS===`android`&&z.Version>=21,Yon=z.OS!==`web`;function Xon({disabled:e,onPress:t,onPressIn:n,onPressOut:r,android_ripple:i,pressColor:a,pressOpacity:o=.3,hoverEffect:s,style:c,children:l,...u},d){let{dark:f}=r$(),[p]=H.useState(()=>new jf.Value(1)),m=(e,t)=>{Jon||jf.timing(p,{toValue:e,duration:t,easing:Cf.inOut(Cf.quad),useNativeDriver:Yon}).start()};return(0,W.jsxs)(qon,{ref:d,accessible:!0,role:z.OS===`web`&&u.href!=null?`link`:`button`,onPress:e?void 0:e=>{if(z.OS===`web`&&u.href!==null){let n=`metaKey`in e&&e.metaKey||`altKey`in e&&e.altKey||`ctrlKey`in e&&e.ctrlKey||`shiftKey`in e&&e.shiftKey,r=`button`in e?e.button==null||e.button===0:!0,i=e.currentTarget&&`target`in e.currentTarget?[void 0,null,``,`self`].includes(e.currentTarget.target):!0;!n&&r&&i&&(e.preventDefault(),t?.(e))}else t?.(e)},onPressIn:e?void 0:e=>{m(o,0),n?.(e)},onPressOut:e?void 0:e=>{m(1,200),r?.(e)},android_ripple:Jon&&!e?{color:a===void 0?f?`rgba(255, 255, 255, .32)`:`rgba(0, 0, 0, .32)`:a,...i}:void 0,style:[{cursor:(z.OS===`web`||z.OS===`ios`)&&!e?`pointer`:`auto`,opacity:!Jon&&!e?p:1},c],...u,children:[e?null:(0,W.jsx)($on,{...s}),l]})}var p8=H.forwardRef(Xon);p8.displayName=`PlatformPressable`;var Zon=String.raw,m8=`__react-navigation_elements_Pressable_hover`,Qon=Zon`
867
+ '`+a.annotationType_+`' can only be used on properties with a function value.`))}function Q9t(e,t,n,r){t.annotationType_,r.value}function $9t(e,t,n,r,i){var a,o;i===void 0&&(i=I3.safeDescriptors),Q9t(e,t,n,r);var s=r.value;return(a=t.options_)!=null&&a.bound&&(s=s.bind(e.proxy_??e.target_)),{value:w3(t.options_?.name??n.toString(),s,t.options_?.autoAction??!1,(o=t.options_)!=null&&o.bound?e.proxy_??e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function een(e,t){return{annotationType_:e,options_:t,make_:ten,extend_:nen,decorate_20223_:ren}}function ten(e,t,n,r){var i;return r===e.target_?this.extend_(e,t,n,!1)===null?0:2:(i=this.options_)!=null&&i.bound&&(!n3(e.target_,t)||!q3(e.target_[t]))&&this.extend_(e,t,n,!1)===null?0:q3(n.value)?1:(W4(r,t,aen(e,this,t,n,!1,!1)),2)}function nen(e,t,n,r){var i=aen(e,this,t,n,this.options_?.bound);return e.defineProperty_(t,i,r)}function ren(e,t){var n,r=t.name,i=t.addInitializer;return q3(e)||(e=K3(e)),(n=this.options_)!=null&&n.bound&&i(function(){var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function ien(e,t,n,r){t.annotationType_,r.value}function aen(e,t,n,r,i,a){a===void 0&&(a=I3.safeDescriptors),ien(e,t,n,r);var o=r.value;return q3(o)||(o=K3(o)),i&&(o=o.bind(e.proxy_??e.target_),o.isMobXFlow=!0),{value:o,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function oen(e,t){return{annotationType_:e,options_:t,make_:sen,extend_:cen,decorate_20223_:len}}function sen(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function cen(e,t,n,r){return uen(e,this,t,n),e.defineComputedProperty_(t,s3({},this.options_,{get:n.get,set:n.set}),r)}function len(e,t){var n=this,r=t.name,i=t.addInitializer;return i(function(){var t=f6(this)[f3],i=s3({},n.options_,{get:e,context:this});i.name||=`ObservableObject.`+r.toString(),t.values_.set(r,new E3(i))}),function(){return this[f3].getObservablePropValue_(r)}}function uen(e,t,n,r){t.annotationType_,r.get}function v3(e,t){return{annotationType_:e,options_:t,make_:den,extend_:fen,decorate_20223_:pen}}function den(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function fen(e,t,n,r){return men(e,this,t,n),e.defineObservableProperty_(t,n.value,this.options_?.enhancer??h3,r)}function pen(e,t){var n=this,r=t.kind,i=t.name,a=new WeakSet;function o(e,t){var r=f6(e)[f3],o=new T3(t,n.options_?.enhancer??h3,`ObservableObject.`+i.toString(),!1);r.values_.set(i,o),a.add(e)}if(r==`accessor`)return{get:function(){return a.has(this)||o(this,e.get.call(this)),this[f3].getObservablePropValue_(i)},set:function(e){return a.has(this)||o(this,e),this[f3].setObservablePropValue_(i,e)},init:function(e){return a.has(this)||o(this,e),e}}}function men(e,t,n,r){t.annotationType_}var hen=`true`,gen=_en();function _en(e){return{annotationType_:hen,options_:e,make_:ven,extend_:yen,decorate_20223_:ben}}function ven(e,t,n,r){var i;if(n.get)return S3.make_(e,t,n,r);if(n.set){var a=w3(t.toString(),n.set);return r===e.target_?e.defineProperty_(t,{configurable:I3.safeDescriptors?e.isPlainObject_:!0,set:a})===null?0:2:(W4(r,t,{configurable:!0,set:a}),2)}if(r!==e.target_&&typeof n.value==`function`){var o;if(w9t(n.value)){var s;return((s=this.options_)!=null&&s.autoBind?K3.bound:K3).make_(e,t,n,r)}return((o=this.options_)!=null&&o.autoBind?U3.bound:U3).make_(e,t,n,r)}var c=this.options_?.deep===!1?x3.ref:x3;return typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),c.make_(e,t,n,r)}function yen(e,t,n,r){var i;return n.get?S3.extend_(e,t,n,r):n.set?e.defineProperty_(t,{configurable:I3.safeDescriptors?e.isPlainObject_:!0,set:w3(t.toString(),n.set)},r):(typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),(this.options_?.deep===!1?x3.ref:x3).extend_(e,t,n,r))}function ben(e,t){V4(`'`+this.annotationType_+`' cannot be used as a decorator`)}var xen=`observable`,Sen=`observable.ref`,Cen=`observable.shallow`,wen=`observable.struct`,Ten={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ten);function y3(e){return e||Ten}var Een=v3(xen),Den=v3(Sen,{enhancer:g3}),Oen=v3(Cen,{enhancer:G9t}),ken=v3(wen,{enhancer:K9t}),Aen=l3(Een);function b3(e){return e.deep===!0?h3:e.deep===!1?g3:Men(e.defaultDecorator)}function jen(e){return e?e.defaultDecorator??_en(e):void 0}function Men(e){return e?e.options_?.enhancer??h3:h3}function Nen(e,t,n){if(d3(t))return Een.decorate_20223_(e,t);if(J4(t)){u3(e,t,Een);return}return Ktn(e)?e:X4(e)?x3.object(e,t,n):Array.isArray(e)?x3.array(e,t):$4(e)?x3.map(e,t):e3(e)?x3.set(e,t):typeof e==`object`&&e?e:x3.box(e,t)}_9t(Nen,Aen);var x3=_9t(Nen,{box:function(e,t){var n=y3(t);return new T3(e,b3(n),n.name,!0,n.equals)},array:function(e,t){var n=y3(t);return(I3.useProxies===!1||n.proxy===!1?Tnn:enn)(e,b3(n),n.name)},map:function(e,t){var n=y3(t);return new inn(e,b3(n),n.name)},set:function(e,t){var n=y3(t);return new cnn(e,b3(n),n.name)},object:function(e,t,n){return h6(function(){return Itn(I3.useProxies===!1||n?.proxy===!1?f6({},n):Jtn({},n),e,t)})},ref:l3(Den),shallow:l3(Oen),deep:Aen,struct:l3(ken)}),Pen=`computed`,Fen=`computed.struct`,Ien=oen(Pen),Len=oen(Fen,{equals:m3.structural}),S3=function(e,t){if(d3(t))return Ien.decorate_20223_(e,t);if(J4(t))return u3(e,t,Ien);if(X4(e))return l3(oen(Pen,e));var n=X4(t)?t:{};return n.get=e,n.name||=e.name||``,new E3(n)};Object.assign(S3,Ien),S3.struct=l3(Len);var C3=0,Ren=1,zen=U4(function(){},`name`)?.configurable??!1,Ben={value:`action`,configurable:!0,writable:!1,enumerable:!1};function w3(e,t,n,r){n===void 0&&(n=!1);function i(){return Ven(e,n,t,r||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},zen&&(Ben.value=e,W4(i,`name`,Ben)),i}function Ven(e,t,n,r,i){var a=Hen(e,t,r,i);try{return n.apply(r,i)}catch(e){throw a.error_=e,e}finally{Uen(a)}}function Hen(e,t,n,r){var i=!1,a=0,o=I3.trackingDerivation,s=!t||!o;L3();var c=I3.allowStateChanges;s&&(j3(),c=Wen(!0));var l=Qen(!0),u={runAsAction_:s,prevDerivation_:o,prevAllowStateChanges_:c,prevAllowStateReads_:l,notifySpy_:i,startTime_:a,actionId_:Ren++,parentActionId_:C3};return C3=u.actionId_,u}function Uen(e){C3!==e.actionId_&&V4(30),C3=e.parentActionId_,e.error_!==void 0&&(I3.suppressReactionErrors=!0),Gen(e.prevAllowStateChanges_),N3(e.prevAllowStateReads_),R3(),e.runAsAction_&&M3(e.prevDerivation_),I3.suppressReactionErrors=!1}function Wen(e){var t=I3.allowStateChanges;return I3.allowStateChanges=e,t}function Gen(e){I3.allowStateChanges=e}var T3=function(e){function t(t,n,r,i,a){var o;return r===void 0&&(r=`ObservableValue`),i===void 0&&(i=!0),a===void 0&&(a=m3.default),o=e.call(this,r)||this,o.enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=r,o.equals=a,o.value_=n(t,void 0,r),o}N9t(t,e);var n=t.prototype;return n.dehanceValue=function(e){return this.dehancer===void 0?e:this.dehancer(e)},n.set=function(e){this.value_,e=this.prepareNewValue_(e),e!==I3.UNCHANGED&&this.setNewValue_(e)},n.prepareNewValue_=function(e){if(X3(this)){var t=Q3(this,{object:this,type:n6,newValue:e});if(!t)return I3.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?I3.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),$3(this)&&t6(this,{type:n6,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Z3(this,e)},n.observe_=function(e,t){return t&&e({observableKind:`value`,debugObjectName:this.name_,object:this,type:n6,newValue:this.value_,oldValue:void 0}),e6(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+`[`+this.value_+`]`},n.valueOf=function(){return k9t(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(p3),E3=function(){function e(e){this.dependenciesState_=O3.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=O3.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new k3(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ken.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||V4(31),this.derivation=e.get,this.name_=e.name||`ComputedValue`,e.set&&(this.setter_=w3(`ComputedValue-setter`,e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?m3.structural:m3.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){ctn(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&V4(32,this.name_,this.derivation),I3.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)qen(this)&&(this.warnAboutUntrackedRead_(),L3(),this.value_=this.computeValue_(!1),R3());else if(atn(this),qen(this)){var e=I3.trackingContext;this.keepAlive_&&!e&&(I3.trackingContext=this),this.trackAndCompute()&&stn(this),I3.trackingContext=e}var t=this.value_;if(A3(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&V4(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else V4(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===O3.NOT_TRACKING_,n=this.computeValue_(!0),r=t||A3(e)||A3(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing=!0;var t=Wen(!1),n;if(e)n=Jen(this,this.derivation,this.scope_);else if(I3.disableErrorBoundaries===!0)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(e){n=new k3(e)}return Gen(t),this.isComputing=!1,n},t.suspend_=function(){this.keepAlive_||(Xen(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return Ttn(function(){var a=n.get();if(!r||t){var o=j3();e({observableKind:`computed`,debugObjectName:n.name_,type:n6,object:n,newValue:a,oldValue:i}),M3(o)}r=!1,i=a})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+`[`+this.derivation.toString()+`]`},t.valueOf=function(){return k9t(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},a3(e,[{key:`isComputing`,get:function(){return r3(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=i3(this.flags_,e.isComputingMask_,t)}},{key:`isRunningSetter`,get:function(){return r3(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=i3(this.flags_,e.isRunningSetterMask_,t)}},{key:`isBeingObserved`,get:function(){return r3(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=i3(this.flags_,e.isBeingObservedMask_,t)}},{key:`isPendingUnobservation`,get:function(){return r3(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=i3(this.flags_,e.isPendingUnobservationMask_,t)}},{key:`diffValue`,get:function(){return+!!r3(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=i3(this.flags_,e.diffValueMask_,t===1)}}])}();E3.isComputingMask_=1,E3.isRunningSetterMask_=2,E3.isBeingObservedMask_=4,E3.isPendingUnobservationMask_=8,E3.diffValueMask_=16;var D3=Q4(`ComputedValue`,E3),O3;(function(e){e[e.NOT_TRACKING_=-1]=`NOT_TRACKING_`,e[e.UP_TO_DATE_=0]=`UP_TO_DATE_`,e[e.POSSIBLY_STALE_=1]=`POSSIBLY_STALE_`,e[e.STALE_=2]=`STALE_`})(O3||={});var Ken;(function(e){e[e.NONE=0]=`NONE`,e[e.LOG=1]=`LOG`,e[e.BREAK=2]=`BREAK`})(Ken||={});var k3=function(e){this.cause=void 0,this.cause=e};function A3(e){return e instanceof k3}function qen(e){switch(e.dependenciesState_){case O3.UP_TO_DATE_:return!1;case O3.NOT_TRACKING_:case O3.STALE_:return!0;case O3.POSSIBLY_STALE_:for(var t=Qen(!0),n=j3(),r=e.observing_,i=r.length,a=0;a<i;a++){var o=r[a];if(D3(o)){if(I3.disableErrorBoundaries)o.get();else try{o.get()}catch{return M3(n),N3(t),!0}if(e.dependenciesState_===O3.STALE_)return M3(n),N3(t),!0}}return $en(e),M3(n),N3(t),!1}}function Jen(e,t,n){var r=Qen(!0);$en(e),e.newObserving_=Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++I3.runId;var i=I3.trackingDerivation;I3.trackingDerivation=e,I3.inBatch++;var a;if(I3.disableErrorBoundaries===!0)a=t.call(n);else try{a=t.call(n)}catch(e){a=new k3(e)}return I3.inBatch--,I3.trackingDerivation=i,Yen(e),N3(r),a}function Yen(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=O3.UP_TO_DATE_,i=0,a=e.unboundDepsCount_,o=0;o<a;o++){var s=n[o];s.diffValue===0&&(s.diffValue=1,i!==o&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}for(n.length=i,e.newObserving_=null,a=t.length;a--;){var c=t[a];c.diffValue===0&&rtn(c,e),c.diffValue=0}for(;i--;){var l=n[i];l.diffValue===1&&(l.diffValue=0,ntn(l,e))}r!==O3.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function Xen(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)rtn(t[n],e);e.dependenciesState_=O3.NOT_TRACKING_}function Zen(e){var t=j3();try{return e()}finally{M3(t)}}function j3(){var e=I3.trackingDerivation;return I3.trackingDerivation=null,e}function M3(e){I3.trackingDerivation=e}function Qen(e){var t=I3.allowStateReads;return I3.allowStateReads=e,t}function N3(e){I3.allowStateReads=e}function $en(e){if(e.dependenciesState_!==O3.UP_TO_DATE_){e.dependenciesState_=O3.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=O3.UP_TO_DATE_}}var P3=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},F3=!0,etn=!1,I3=function(){var e=H4();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(F3=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new P3().version&&(F3=!1),F3?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new P3):(setTimeout(function(){etn||V4(35)},1),new P3)}();function ttn(){if((I3.pendingReactions.length||I3.inBatch||I3.isRunningReactions)&&V4(36),etn=!0,F3){var e=H4();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),I3=new P3}}function ntn(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function rtn(e,t){e.observers_.delete(t),e.observers_.size===0&&itn(e)}function itn(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,I3.pendingUnobservations.push(e))}function L3(){I3.inBatch++}function R3(){if(--I3.inBatch===0){dtn();for(var e=I3.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,n.observers_.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof E3&&n.suspend_())}I3.pendingUnobservations=[]}}function atn(e){var t=I3.trackingDerivation;return t===null?(e.observers_.size===0&&I3.inBatch>0&&itn(e),!1):(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&I3.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function otn(e){e.lowestObserverState_!==O3.STALE_&&(e.lowestObserverState_=O3.STALE_,e.observers_.forEach(function(e){e.dependenciesState_===O3.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=O3.STALE_}))}function stn(e){e.lowestObserverState_!==O3.STALE_&&(e.lowestObserverState_=O3.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===O3.POSSIBLY_STALE_?t.dependenciesState_=O3.STALE_:t.dependenciesState_===O3.UP_TO_DATE_&&(e.lowestObserverState_=O3.UP_TO_DATE_)}))}function ctn(e){e.lowestObserverState_===O3.UP_TO_DATE_&&(e.lowestObserverState_=O3.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===O3.UP_TO_DATE_&&(e.dependenciesState_=O3.POSSIBLY_STALE_,e.onBecomeStale_())}))}var z3=function(){function e(e,t,n,r){e===void 0&&(e=`Reaction`),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=O3.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Ken.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,I3.pendingReactions.push(this),dtn())},t.runReaction_=function(){if(!this.isDisposed){L3(),this.isScheduled=!1;var e=I3.trackingContext;if(I3.trackingContext=this,qen(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}I3.trackingContext=e,R3()}},t.track=function(e){if(!this.isDisposed){L3(),this.isRunning=!0;var t=I3.trackingContext;I3.trackingContext=this;var n=Jen(this,e,void 0);I3.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Xen(this),A3(n)&&this.reportExceptionInDerivation_(n.cause),R3()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_){this.errorHandler_(e,this);return}if(I3.disableErrorBoundaries)throw e;var n=`[mobx] uncaught error in '`+this+`'`;I3.suppressReactionErrors||console.error(n,e),I3.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(L3(),Xen(this),R3()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),e==null||e.removeEventListener==null||e.removeEventListener(`abort`,n)};return e==null||e.addEventListener==null||e.addEventListener(`abort`,n),n[f3]=this,n},t.toString=function(){return`Reaction[`+this.name_+`]`},t.trace=function(e){e===void 0&&(e=!1)},a3(e,[{key:`isDisposed`,get:function(){return r3(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=i3(this.flags_,e.isDisposedMask_,t)}},{key:`isScheduled`,get:function(){return r3(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=i3(this.flags_,e.isScheduledMask_,t)}},{key:`isTrackPending`,get:function(){return r3(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=i3(this.flags_,e.isTrackPendingMask_,t)}},{key:`isRunning`,get:function(){return r3(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=i3(this.flags_,e.isRunningMask_,t)}},{key:`diffValue`,get:function(){return+!!r3(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=i3(this.flags_,e.diffValueMask_,t===1)}}])}();z3.isDisposedMask_=1,z3.isScheduledMask_=2,z3.isTrackPendingMask_=4,z3.isRunningMask_=8,z3.diffValueMask_=16;var ltn=100,utn=function(e){return e()};function dtn(){I3.inBatch>0||I3.isRunningReactions||utn(ftn)}function ftn(){I3.isRunningReactions=!0;for(var e=I3.pendingReactions,t=0;e.length>0;){++t===ltn&&(console.error(`[mobx] cycle in reaction: `+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}I3.isRunningReactions=!1}var B3=Q4(`Reaction`,z3);function ptn(e){var t=utn;utn=function(n){return e(function(){return t(n)})}}function V3(){return!1}function mtn(e){return console.warn(`[mobx.spy] Is a no-op in production builds`),function(){}}var htn=`action`,gtn=`action.bound`,_tn=`autoAction`,vtn=`autoAction.bound`,ytn=`<unnamed action>`,btn=_3(htn),xtn=_3(gtn,{bound:!0}),Stn=_3(_tn,{autoAction:!0}),Ctn=_3(vtn,{autoAction:!0,bound:!0});function wtn(e){return function(t,n){if(q4(t))return w3(t.name||ytn,t,e);if(q4(n))return w3(t,n,e);if(d3(n))return(e?Stn:btn).decorate_20223_(t,n);if(J4(n))return u3(t,n,e?Stn:btn);if(J4(t))return l3(_3(e?_tn:htn,{name:t,autoAction:e}))}}var H3=wtn(!1);Object.assign(H3,btn);var U3=wtn(!0);Object.assign(U3,Stn),H3.bound=l3(xtn),U3.bound=l3(Ctn);function W3(e){return q4(e)&&e.isMobxAction===!0}function Ttn(e,t){var n;t===void 0&&(t=y9t);var r=t?.name??`Autorun`,i=!t.scheduler&&!t.delay,a;if(i)a=new z3(r,function(){this.track(c)},t.onError,t.requiresObservable);else{var o=Dtn(t),s=!1;a=new z3(r,function(){s||(s=!0,o(function(){s=!1,a.isDisposed||a.track(c)}))},t.onError,t.requiresObservable)}function c(){e(a)}return(n=t)!=null&&(n=n.signal)!=null&&n.aborted||a.schedule_(),a.getDisposer_(t?.signal)}var Etn=function(e){return e()};function Dtn(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Etn}var Otn=`onBO`,ktn=`onBUO`;function Atn(e,t,n){return Mtn(Otn,e,t,n)}function jtn(e,t,n){return Mtn(ktn,e,t,n)}function Mtn(e,t,n,r){var i=typeof r==`function`?m6(t,n):m6(t),a=q4(r)?r:n,o=e+`L`;return i[o]?i[o].add(a):i[o]=new Set([a]),function(){var e=i[o];e&&(e.delete(a),e.size===0&&delete i[o])}}var Ntn=`never`,G3=`always`,Ptn=`observed`;function Ftn(e){e.isolateGlobalState===!0&&ttn();var t=e.useProxies,n=e.enforceActions;if(t!==void 0&&(I3.useProxies=t===G3?!0:t===Ntn?!1:typeof Proxy<`u`),t===`ifavailable`&&(I3.verifyProxies=!0),n!==void 0){var r=n===G3?G3:n===Ptn;I3.enforceActions=r,I3.allowStateChanges=!(r===!0||r===G3)}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(function(t){t in e&&(I3[t]=!!e[t])}),I3.allowStateReads=!I3.observableRequiresReaction,e.reactionScheduler&&ptn(e.reactionScheduler)}function Itn(e,t,n,r){var i=A9t(t);return h6(function(){var t=f6(e,r)[f3];t3(i).forEach(function(e){t.extend_(e,i[e],n&&e in n?n[e]:!0)})}),e}function Ltn(e,t){return Rtn(m6(e,t))}function Rtn(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=ztn(e.observing_).map(Rtn)),t}function ztn(e){return Array.from(new Set(e))}var Btn=0;function Vtn(){this.message=`FLOW_CANCELLED`}Vtn.prototype=Object.create(Error.prototype);var Htn=een(`flow`),Utn=een(`flow.bound`,{bound:!0}),K3=Object.assign(function(e,t){if(d3(t))return Htn.decorate_20223_(e,t);if(J4(t))return u3(e,t,Htn);var n=e,r=n.name||`<unnamed flow>`,i=function(){var e=this,t=arguments,i=++Btn,a=H3(r+` - runid: `+i+` - init`,n).apply(e,t),o,s=void 0,c=new Promise(function(e,t){var n=0;o=t;function c(e){s=void 0;var o;try{o=H3(r+` - runid: `+i+` - yield `+ n++,a.next).call(a,e)}catch(e){return t(e)}u(o)}function l(e){s=void 0;var o;try{o=H3(r+` - runid: `+i+` - yield `+ n++,a.throw).call(a,e)}catch(e){return t(e)}u(o)}function u(n){if(q4(n?.then)){n.then(u,t);return}return n.done?e(n.value):(s=Promise.resolve(n.value),s.then(c,l))}c(void 0)});return c.cancel=H3(r+` - runid: `+i+` - cancel`,function(){try{s&&Wtn(s);var e=a.return(void 0),t=Promise.resolve(e.value);t.then(K4,K4),Wtn(t),o(new Vtn)}catch(e){o(e)}}),c};return i.isMobXFlow=!0,i},Htn);K3.bound=l3(Utn);function Wtn(e){q4(e.cancel)&&e.cancel()}function q3(e){return e?.isMobXFlow===!0}function Gtn(e,t){return e?t===void 0?p6(e)||!!e[f3]||z9t(e)||B3(e)||D3(e):p6(e)?e[f3].values_.has(t):!1:!1}function Ktn(e){return Gtn(e)}function J3(e,t){t===void 0&&(t=void 0),L3();try{return e.apply(t)}finally{R3()}}function Y3(e){return e[f3]}var qtn={has:function(e,t){return Y3(e).has_(t)},get:function(e,t){return Y3(e).get_(t)},set:function(e,t,n){return J4(t)?Y3(e).set_(t,n,!0)??!0:!1},deleteProperty:function(e,t){return J4(t)?Y3(e).delete_(t,!0)??!0:!1},defineProperty:function(e,t,n){return Y3(e).defineProperty_(t,n)??!0},ownKeys:function(e){return Y3(e).ownKeys_()},preventExtensions:function(e){V4(13)}};function Jtn(e,t){var n;return S9t(),e=f6(e,t),(n=e[f3]).proxy_??(n.proxy_=new Proxy(e,qtn))}function X3(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Z3(e,t){var n=e.interceptors_||=[];return n.push(t),C9t(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Q3(e,t){var n=j3();try{for(var r=[].concat(e.interceptors_||[]),i=0,a=r.length;i<a&&(t=r[i](t),t&&!t.type&&V4(14),t);i++);return t}finally{M3(n)}}function $3(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function e6(e,t){var n=e.changeListeners_||=[];return n.push(t),C9t(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function t6(e,t){var n=j3(),r=e.changeListeners_;if(r){r=r.slice();for(var i=0,a=r.length;i<a;i++)r[i](t);M3(n)}}function Ytn(e,t,n){return h6(function(){var r=f6(e,n)[f3];t??=R9t(e),t3(t).forEach(function(e){return r.make_(e,t[e])})}),e}var Xtn=`splice`,n6=`update`,Ztn=1e4,Qtn={get:function(e,t){var n=e[f3];return t===f3?n:t===`length`?n.getArrayLength_():typeof t==`string`&&!isNaN(t)?n.get_(parseInt(t)):n3(r6,t)?r6[t]:e[t]},set:function(e,t,n){var r=e[f3];return t===`length`&&r.setArrayLength_(n),typeof t==`symbol`||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){V4(15)}},$tn=function(){function e(e,t,n,r){e===void 0&&(e=`ObservableArray`),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new p3(e),this.enhancer_=function(e,n){return t(e,n,`ObservableArray[..]`)}}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.dehanceValues_=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Z3(this,e)},t.observe_=function(e,t){return t===void 0&&(t=!1),t&&e({observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:`splice`,index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),e6(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){(typeof e!=`number`||isNaN(e)||e<0)&&V4(`Out of range: `+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&V4(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&wnn(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;this.atom_;var i=this.values_.length;if(e===void 0?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=arguments.length===1?i-e:t==null?0:Math.max(0,Math.min(t,i-e)),n===void 0&&(n=v9t),X3(this)){var a=Q3(this,{object:this.proxy_,type:Xtn,index:e,removedCount:t,added:n});if(!a)return v9t;t=a.removedCount,n=a.added}if(n=n.length===0?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_){var o=n.length-t;this.updateArrayLength_(i,o)}var s=this.spliceItemsIntoValues_(e,t,n);return(t!==0||n.length!==0)&&this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){if(n.length<Ztn){var r;return(r=this.values_).splice.apply(r,[e,t].concat(n))}else{var i=this.values_.slice(e,e+t),a=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var s=0;s<a.length;s++)this.values_[e+n.length+s]=a[s];return i}},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&V3(),i=$3(this),a=i||r?{observableKind:`array`,object:this.proxy_,type:n6,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&t6(this,a)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&V3(),i=$3(this),a=i||r?{observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:Xtn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&t6(this,a)},t.get_=function(e){if(this.legacyMode_&&e>=this.values_.length){console.warn(`[mobx] Out of bounds read: `+e);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e])},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&V4(17,e,n.length),e<n.length){this.atom_;var r=n[e];if(X3(this)){var i=Q3(this,{type:n6,object:this.proxy_,index:e,newValue:t});if(!i)return;t=i.newValue}t=this.enhancer_(t,r),t!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{for(var a=Array(e+1-n.length),o=0;o<a.length-1;o++)a[o]=void 0;a[a.length-1]=t,this.spliceWithArray_(n.length,0,a)}},e}();function enn(e,t,n,r){return n===void 0&&(n=`ObservableArray`),r===void 0&&(r=!1),S9t(),h6(function(){var i=new $tn(n,t,r,!1);T9t(i.values_,f3,i);var a=new Proxy(i.values_,Qtn);return i.proxy_=a,e&&e.length&&i.spliceWithArray_(0,0,e),a})}var r6={clear:function(){return this.splice(0)},replace:function(e){var t=this[f3];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){var n=[...arguments].slice(2),r=this[f3];switch(arguments.length){case 0:return[];case 1:return r.spliceWithArray_(e);case 2:return r.spliceWithArray_(e,t)}return r.spliceWithArray_(e,t,n)},spliceWithArray:function(e,t,n){return this[f3].spliceWithArray_(e,t,n)},push:function(){var e=this[f3],t=[...arguments];return e.spliceWithArray_(e.values_.length,0,t),e.values_.length},pop:function(){return this.splice(Math.max(this[f3].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){var e=this[f3],t=[...arguments];return e.spliceWithArray_(0,0,t),e.values_.length},reverse:function(){return I3.trackingDerivation&&V4(37,`reverse`),this.replace(this.slice().reverse()),this},sort:function(){I3.trackingDerivation&&V4(37,`sort`);var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[f3],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1?(this.splice(n,1),!0):!1}};i6(`at`,a6),i6(`concat`,a6),i6(`flat`,a6),i6(`includes`,a6),i6(`indexOf`,a6),i6(`join`,a6),i6(`lastIndexOf`,a6),i6(`slice`,a6),i6(`toString`,a6),i6(`toLocaleString`,a6),i6(`toSorted`,a6),i6(`toSpliced`,a6),i6(`with`,a6),i6(`every`,o6),i6(`filter`,o6),i6(`find`,o6),i6(`findIndex`,o6),i6(`findLast`,o6),i6(`findLastIndex`,o6),i6(`flatMap`,o6),i6(`forEach`,o6),i6(`map`,o6),i6(`some`,o6),i6(`toReversed`,o6),i6(`reduce`,tnn),i6(`reduceRight`,tnn);function i6(e,t){typeof Array.prototype[e]==`function`&&(r6[e]=t(e))}function a6(e){return function(){var t=this[f3];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function o6(e){return function(t,n){var r=this,i=this[f3];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function tnn(e){return function(){var t=this,n=this[f3];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}var nnn=Q4(`ObservableArrayAdministration`,$tn);function s6(e){return Y4(e)&&nnn(e[f3])}var rnn={},c6=`add`,l6=`delete`,inn=function(){function e(e,t,n){var r=this;t===void 0&&(t=h3),n===void 0&&(n=`ObservableMap`),this.enhancer_=void 0,this.name_=void 0,this[f3]=rnn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,q4(Map)||V4(18),h6(function(){r.keysAtom_=B9t(`ObservableMap.keys()`),r.data_=new Map,r.hasMap_=new Map,e&&r.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!I3.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new T3(this.has_(e),g3,`ObservableMap.key?`,!1);this.hasMap_.set(e,r),jtn(r,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(X3(this)){var r=Q3(this,{type:n?n6:c6,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if(this.keysAtom_,X3(this)&&!Q3(this,{type:l6,object:this,name:e}))return!1;if(this.has_(e)){var n=V3(),r=$3(this),i=r||n?{observableKind:`map`,debugObjectName:this.name_,type:l6,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return J3(function(){var n;t.keysAtom_.reportChanged(),(n=t.hasMap_.get(e))==null||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&t6(this,i),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if(t=n.prepareNewValue_(t),t!==I3.UNCHANGED){var r=V3(),i=$3(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:n6,object:this,oldValue:n.value_,name:e,newValue:t}:null;n.setNewValue_(t),i&&t6(this,a)}},t.addValue_=function(e,t){var n=this;this.keysAtom_,J3(function(){var r,i=new T3(t,n.enhancer_,`ObservableMap.key`,!1);n.data_.set(e,i),t=i.value_,(r=n.hasMap_.get(e))==null||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=V3(),i=$3(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:c6,object:this,name:e,newValue:t}:null;i&&t6(this,a)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return ann({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return ann({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n=o3(this),r;!(r=n()).done;){var i=r.value,a=i[0],o=i[1];e.call(t,o,a,this)}},t.merge=function(e){var t=this;return u6(e)&&(e=new Map(e)),J3(function(){X4(e)?O9t(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):$4(e)?(E9t(e)||V4(19,e),e.forEach(function(e,n){return t.set(n,e)})):e!=null&&V4(20,e)}),this},t.clear=function(){var e=this;J3(function(){Zen(function(){for(var t=o3(e.keys()),n;!(n=t()).done;){var r=n.value;e.delete(r)}})})},t.replace=function(e){var t=this;return J3(function(){for(var n=onn(e),r=new Map,i=!1,a=o3(t.data_.keys()),o;!(o=a()).done;){var s=o.value;if(!n.has(s))if(t.delete(s))i=!0;else{var c=t.data_.get(s);r.set(s,c)}}for(var l=o3(n.entries()),u;!(u=l()).done;){var d=u.value,f=d[0],p=d[1],m=t.data_.has(f);if(t.set(f,p),t.data_.has(f)){var h=t.data_.get(f);r.set(f,h),m||(i=!0)}}if(!i)if(t.data_.size!==r.size)t.keysAtom_.reportChanged();else for(var g=t.data_.keys(),_=r.keys(),v=g.next(),y=_.next();!v.done;){if(v.value!==y.value){t.keysAtom_.reportChanged();break}v=g.next(),y=_.next()}t.data_=r}),this},t.toString=function(){return`[object ObservableMap]`},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return e6(this,e)},t.intercept_=function(e){return Z3(this,e)},a3(e,[{key:`size`,get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Map`}}])}(),u6=Q4(`ObservableMap`,inn);function ann(e){return e[Symbol.toStringTag]=`MapIterator`,Nnn(e)}function onn(e){if($4(e)||u6(e))return e;if(Array.isArray(e))return new Map(e);if(X4(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}else return V4(21,e)}var snn={},cnn=function(){function e(e,t,n){var r=this;t===void 0&&(t=h3),n===void 0&&(n=`ObservableSet`),this.name_=void 0,this[f3]=snn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,q4(Set)||V4(22),this.enhancer_=function(e,r){return t(e,r,n)},h6(function(){r.atom_=B9t(r.name_),e&&r.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.clear=function(){var e=this;J3(function(){Zen(function(){for(var t=o3(e.data_.values()),n;!(n=t()).done;){var r=n.value;e.delete(r)}})})},t.forEach=function(e,t){for(var n=o3(this),r;!(r=n()).done;){var i=r.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(this.atom_,X3(this)){var n=Q3(this,{type:c6,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){J3(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r=!1,i=$3(this),a=i||r?{observableKind:`set`,debugObjectName:this.name_,type:c6,object:this,newValue:e}:null;i&&t6(this,a)}return this},t.delete=function(e){var t=this;if(X3(this)&&!Q3(this,{type:l6,object:this,oldValue:e}))return!1;if(this.has(e)){var n=!1,r=$3(this),i=r||n?{observableKind:`set`,debugObjectName:this.name_,type:l6,object:this,oldValue:e}:null;return J3(function(){t.atom_.reportChanged(),t.data_.delete(e)}),r&&t6(this,i),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return lnn({next:function(){var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return lnn({next:function(){var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){return e3(e)&&!d6(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return e3(e)&&!d6(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return e3(e)&&!d6(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return e3(e)&&!d6(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return d6(e)&&(e=new Set(e)),J3(function(){Array.isArray(e)||e3(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):e!=null&&V4(`Cannot initialize set from `+e)}),this},t.observe_=function(e,t){return e6(this,e)},t.intercept_=function(e){return Z3(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return`[object ObservableSet]`},t[Symbol.iterator]=function(){return this.values()},a3(e,[{key:`size`,get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Set`}}])}(),d6=Q4(`ObservableSet`,cnn);function lnn(e){return e[Symbol.toStringTag]=`SetIterator`,Nnn(e)}var unn=Object.create(null),dnn=`remove`,fnn=function(){function e(e,t,n,r){t===void 0&&(t=new Map),r===void 0&&(r=gen),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new p3(`ObservableObject.keys`),this.isPlainObject_=X4(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof E3)return n.set(t),!0;if(X3(this)){var r=Q3(this,{type:n6,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if(t=n.prepareNewValue_(t),t!==I3.UNCHANGED){var i=$3(this),a=i?{type:n6,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;n.setNewValue_(t),i&&t6(this,a)}return!0},t.get_=function(e){return I3.trackingDerivation&&!n3(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return n===void 0&&(n=!1),n3(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!I3.trackingDerivation)return e in this.target_;this.pendingKeys_||=new Map;var t=this.pendingKeys_.get(e);return t||(t=new T3(e in this.target_,g3,`ObservableObject.key?`,!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(t===!0&&(t=this.defaultAnnotation_),t!==!1){if(!(e in this.target_)){var n;if((n=this.target_[c3])!=null&&n[e])return;V4(1,t.annotationType_,this.name_+`.`+e.toString())}for(var r=this.target_;r&&r!==G4;){var i=U4(r,e);if(i){var a=t.make_(this,e,i,r);if(a===0)return;if(a===1)break}r=Object.getPrototypeOf(r)}hnn(this,t,e)}},t.extend_=function(e,t,n,r){if(r===void 0&&(r=!1),n===!0&&(n=this.defaultAnnotation_),n===!1)return this.defineProperty_(e,t,r);var i=n.extend_(this,e,t,r);return i&&hnn(this,n,e),i},t.defineProperty_=function(e,t,n){n===void 0&&(n=!1),this.keysAtom_;try{L3();var r=this.delete_(e);if(!r)return r;if(X3(this)){var i=Q3(this,{object:this.proxy_||this.target_,name:e,type:c6,newValue:t.value});if(!i)return null;var a=i.newValue;t.value!==a&&(t=s3({},t,{value:a}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else W4(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{R3()}return!0},t.defineObservableProperty_=function(e,t,n,r){r===void 0&&(r=!1),this.keysAtom_;try{L3();var i=this.delete_(e);if(!i)return i;if(X3(this)){var a=Q3(this,{object:this.proxy_||this.target_,name:e,type:c6,newValue:t});if(!a)return null;t=a.newValue}var o=mnn(e),s={configurable:I3.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else W4(this.target_,e,s);var c=new T3(t,n,`ObservableObject.key`,!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{R3()}return!0},t.defineComputedProperty_=function(e,t,n){n===void 0&&(n=!1),this.keysAtom_;try{L3();var r=this.delete_(e);if(!r)return r;if(X3(this)&&!Q3(this,{object:this.proxy_||this.target_,name:e,type:c6,newValue:void 0}))return null;t.name||=`ObservableObject.key`,t.context=this.proxy_||this.target_;var i=mnn(e),a={configurable:I3.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,a))return!1}else W4(this.target_,e,a);this.values_.set(e,new E3(t)),this.notifyPropertyAddition_(e,void 0)}finally{R3()}return!0},t.delete_=function(e,t){if(t===void 0&&(t=!1),this.keysAtom_,!n3(this.target_,e))return!0;if(X3(this)&&!Q3(this,{object:this.proxy_||this.target_,name:e,type:dnn}))return null;try{var n;L3();var r=$3(this),i=!1,a=this.values_.get(e),o=void 0;if(!a&&(r||i)&&(o=U4(this.target_,e)?.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof T3&&(o=a.value_),otn(a)),this.keysAtom_.reportChanged(),(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(e in this.target_),r||i){var s={type:dnn,observableKind:`object`,object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:o,name:e};r&&t6(this,s)}}finally{R3()}return!0},t.observe_=function(e,t){return e6(this,e)},t.intercept_=function(e){return Z3(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r=$3(this),i=!1;if(r||i){var a=r||i?{type:c6,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;r&&t6(this,a)}(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),t3(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function f6(e,t){if(n3(e,f3))return e;var n=t?.name??`ObservableObject`;return Z4(e,f3,new fnn(e,new Map,String(n),jen(t))),e}var pnn=Q4(`ObservableObjectAdministration`,fnn);function mnn(e){return unn[e]||(unn[e]={get:function(){return this[f3].getObservablePropValue_(e)},set:function(t){return this[f3].setObservablePropValue_(e,t)}})}function p6(e){return Y4(e)?pnn(e[f3]):!1}function hnn(e,t,n){var r;(r=e.target_[c3])==null||delete r[n]}var gnn=Snn(0),_nn=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),vnn=0,ynn=function(){};function bnn(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__===void 0?e.prototype=t:e.prototype.__proto__=t}bnn(ynn,Array.prototype);var xnn=function(e){function t(t,n,r,i){var a;return r===void 0&&(r=`ObservableArray`),i===void 0&&(i=!1),a=e.call(this)||this,h6(function(){var e=new $tn(r,n,i,!0);e.proxy_=a,T9t(a,f3,e),t&&t.length&&a.spliceWithArray(0,0,t),_nn&&Object.defineProperty(a,"0",gnn)}),a}N9t(t,e);var n=t.prototype;return n.concat=function(){this[f3].atom_.reportObserved();var e=[...arguments];return Array.prototype.concat.apply(this.slice(),e.map(function(e){return s6(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Nnn({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},a3(t,[{key:`length`,get:function(){return this[f3].getArrayLength_()},set:function(e){this[f3].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return`Array`}}])}(ynn);Object.entries(r6).forEach(function(e){var t=e[0],n=e[1];t!==`concat`&&Z4(xnn.prototype,t,n)});function Snn(e){return{enumerable:!1,configurable:!0,get:function(){return this[f3].get_(e)},set:function(t){this[f3].set_(e,t)}}}function Cnn(e){W4(xnn.prototype,``+e,Snn(e))}function wnn(e){if(e>vnn){for(var t=vnn;t<e+100;t++)Cnn(t);vnn=e}}wnn(1e3);function Tnn(e,t,n){return new xnn(e,t,n)}function m6(e,t){if(typeof e==`object`&&e){if(s6(e))return t!==void 0&&V4(23),e[f3].atom_;if(d6(e))return e.atom_;if(u6(e)){if(t===void 0)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||V4(25,t,Dnn(e)),n}if(p6(e)){if(!t)return V4(26);var r=e[f3].values_.get(t);return r||V4(27,t,Dnn(e)),r}if(z9t(e)||D3(e)||B3(e))return e}else if(q4(e)&&B3(e[f3]))return e[f3];V4(28)}function Enn(e,t){if(e||V4(29),t!==void 0)return Enn(m6(e,t));if(z9t(e)||D3(e)||B3(e)||u6(e)||d6(e))return e;if(e[f3])return e[f3];V4(24,e)}function Dnn(e,t){var n;if(t!==void 0)n=m6(e,t);else if(W3(e))return e.name;else n=p6(e)||u6(e)||d6(e)?Enn(e):m6(e);return n.name_}function h6(e){var t=j3(),n=Wen(!0);L3();try{return e()}finally{R3(),Gen(n),M3(t)}}var Onn=G4.toString;function knn(e,t,n){return n===void 0&&(n=-1),Ann(e,t,n)}function Ann(e,t,n,r,i){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!==`function`&&a!==`object`&&typeof t!=`object`)return!1;var o=Onn.call(e);if(o!==Onn.call(t))return!1;switch(o){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:n>=0&&n++;break}e=jnn(e),t=jnn(t);var s=o===`[object Array]`;if(!s){if(typeof e!=`object`||typeof t!=`object`)return!1;var c=e.constructor,l=t.constructor;if(c!==l&&!(q4(c)&&c instanceof c&&q4(l)&&l instanceof l)&&`constructor`in e&&`constructor`in t)return!1}if(n===0)return!1;n<0&&(n=-1),r||=[],i||=[];for(var u=r.length;u--;)if(r[u]===e)return i[u]===t;if(r.push(e),i.push(t),s){if(u=e.length,u!==t.length)return!1;for(;u--;)if(!Ann(e[u],t[u],n-1,r,i))return!1}else{var d=Object.keys(e),f=d.length;if(Object.keys(t).length!==f)return!1;for(var p=0;p<f;p++){var m=d[p];if(!(n3(t,m)&&Ann(e[m],t[m],n-1,r,i)))return!1}}return r.pop(),i.pop(),!0}function jnn(e){return s6(e)?e.slice():$4(e)||u6(e)||e3(e)||d6(e)?Array.from(e.entries()):e}var Mnn=H4().Iterator?.prototype||{};function Nnn(e){return e[Symbol.iterator]=Pnn,Object.assign(Object.create(Mnn),e)}function Pnn(){return this}[`Symbol`,`Map`,`Set`].forEach(function(e){H4()[e]===void 0&&V4(`MobX requires global '`+e+`' to be available or polyfilled`)}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__==`object`&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:mtn,extras:{getDebugName:Dnn},$mobx:f3});function g6(e){return Array.isArray(e)||s6(e)}function _6(e,t){let n=g6(e);if(n!==g6(t))throw Error(`PersistenceUtils::typeGuard] ${B4.MalformedDataError}`);if(n)for(let n of e)_6(n,t[0]);return y6(t)&&Object.keys(t).forEach(n=>{let r=e[n],i=t[n];if(r&&g6(i))_6(r,i);else if(r&&y6(r))_6(r,i);else if(y6(e)&&!e.hasOwnProperty(n))throw Error(`[PersistenceUtils::typeGuard] ${B4.MalformedDataError}`)}),!0}var Fnn=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;function v6(e){if(g6(e))for(let t=0;t<e.length;t++)e[t]=v6(e[t]);else if(y6(e))for(let t of Object.keys(e)){let n=e[t];typeof n==`object`?e[t]=v6(n):typeof n==`string`&&Fnn.exec(n)&&(e[t]=new Date(n))}return e}function y6(e){return typeof e==`object`&&!!e&&!g6(e)}var Inn=class{storageName;schema;constructor(e,t){this.storageName=`${e}Storage`,this.schema=JSON.parse(JSON.stringify(t))}get(){let e=PK.getString(this.storageName),t=this.instantiateData(e);return this.isT(t),t}update(e){let t=JSON.parse(JSON.stringify(e)),n=Object.assign(this.get(),t);return this.isT(n),PK.set(this.storageName,JSON.stringify(n)),n}set(e){return this.isT(e),PK.set(this.storageName,JSON.stringify(e)),e}clear(){return PK.delete(this.storageName),this.instantiateData(void 0)}instantiateData(e){let t=e??JSON.stringify(this.schema);return PK.set(this.storageName,t),JSON.parse(t)}isT(e){if(!e||typeof e!=`object`)throw Error(`[PersistenceManager::isT] ${B4.IncorrectDataError}`);return _6(e,this.schema),!0}},Lnn=class{persistenceManager;schema;data;constructor(e,t){this.schema=JSON.parse(JSON.stringify(t)),this.data=JSON.parse(JSON.stringify(t)),this.persistenceManager=new Inn(e,t),this.createDataFromSchema(),this.restore()}get(){return this.data}set(e){return this.data=JSON.parse(JSON.stringify(e)),this.data=v6(this.data),this.data}update(e){if(g6(this.data)){let t=this.data.findIndex(t=>t.uuid===e.uuid);if(t!==-1)this.data[t]={...this.data[t],...e};else try{_6([e],this.schema),this.data.push(e)}catch(e){throw e.message===B4.MalformedDataError?Error(`[DataManager::update] Cannot add an element that does not contain required fields`):e}}else Object.assign(this.data,e);return this.data}save(e=!0){return e?this.persistenceManager.update(this.data):this.persistenceManager.set(this.data)}restore(){if(this.data=this.persistenceManager.get(),this.data=v6(this.data),g6(this.data)){let e=e=>e.filter(e=>!!e.uuid);this.data=e(this.data)}return this.data}clear=()=>(this.persistenceManager.clear(),this.createDataFromSchema(),this.data);createDataFromSchema(){this.data=g6(this.schema)?[]:JSON.parse(JSON.stringify(this.schema))}},b6=new class extends Lnn{migrateData(){throw Error(`[TrackingManager::migrateData] Method purposefully not implemented.`)}constructor(){super(`trackingEvent`,[])}update(e){return super.update(e)}sync=async()=>{let e=super.get(),t=[];for(let n of e)try{await h9t(n)}catch{t.push(n)}super.set(t),super.save(!1)}},x6=`3.8.0`,Rnn=`2026-09-29`,znn=1189,Bnn=`05700002209597`;V();var S6=function(e){return e.QuickGuideStartPress=`quickguide.start.press`,e.QuickGuideBackPressStep1=`quickguide.screen1.back.press`,e.QuickGuideNextPressStep1=`quickguide.screen1.next.press`,e.QuickGuideBackPressStep2=`quickguide.screen2.back.press`,e.QuickGuideNextPressStep2=`quickguide.screen2.next.press`,e.QuickGuideBackPressStep3=`quickguide.screen3.back.press`,e.QuickGuideNextPressStep3=`quickguide.screen3.next.press`,e.QuickGuideBackPressStep4=`quickguide.screen4.back.press`,e.QuickGuideNextPressStep4=`quickguide.screen4.next.press`,e.QuickGuideBackPressStep5=`quickguide.screen5.back.press`,e.QuickGuideNextPressStep5=`quickguide.screen5.next.press`,e.QuickGuideBackPressStep6=`quickguide.screen6.back.press`,e.QuickGuideFinishPress=`quickguide.finish.press`,e.SetupIntroStartPress=`setup.intro.start.press`,e.SetupGeneralBackPress=`setup.general.back.press`,e.SetupGeneralNextPress=`setup.general.next.press`,e.SetupTreatmentBackPress=`setup.treatment.back.press`,e.SetupTreatmentNextPress=`setup.treatment.next.press`,e.SetupOptionsNextPress=`setup.options.next.press`,e.SetupOptionsBackPress=`setup.options.back.press`,e.SetupInsulinBackPress=`setup.insulin.back.press`,e.SetupInsulinNextPress=`setup.insulin.next.press`,e.SetupTDDBackPress=`setup.tdd.back.press`,e.SetupTDDNextPress=`setup.tdd.next.press`,e.SetupSummaryBackPress=`setup.summary.back.press`,e.SetupSummaryFinishPress=`setup.summary.finish.press`,e.ForecastOffline=`forecast.offline`,e.ForecastNotificationsOff=`forecast.notifications.off`,e.ForecastNewCalculationPress=`forecast.newcalculation.press`,e.CarbohydrateChart7DaysPress=`carbohydratechart.7days.press`,e.CarbohydrateChart14DaysPress=`carbohydratechart.14days.press`,e.CarbohydrateChart30DaysPress=`carbohydratechart.30days.press`,e.CarbohydrateChart90DaysPress=`carbohydratechart.90days.press`,e.CarbohydrateChartStart=`carbohydratechart.start`,e.CarbohydrateChartEnd=`carbohydratechart.end`,e.RapidInsulinChart7DaysPress=`rapidinsulinchart.7days.press`,e.RapidInsulinChart14DaysPress=`rapidinsulinchart.14days.press`,e.RapidInsulinChart30DaysPress=`rapidinsulinchart.30days.press`,e.RapidInsulinChart90DaysPress=`rapidinsulinchart.90days.press`,e.RapidInsulinChartStart=`rapidinsulinchart.start`,e.RapidInsulinChartEnd=`rapidinsulinchart.end`,e.TimeInRangeChart7DaysPress=`timeinrangechart.7days.press`,e.TimeInRangeChart14DaysPress=`timeinrangechart.14days.press`,e.TimeInRangeChart30DaysPress=`timeinrangechart.30days.press`,e.TimeInRangeChart90DaysPress=`timeinrangechart.90days.press`,e.TimeInRangeChartStart=`timeinrangechart.start`,e.TimeInRangeChartEnd=`timeinrangechart.end`,e.MyDayPreviousPress=`mydaychart.previous.press`,e.MyDayNextPress=`mydaychart.next.press`,e.MyDayChartStart=`mydaychart.start`,e.MyDayChartEnd=`mydaychart.end`,e.ActiveInsulinChartStart=`activeinsulinchart.start`,e.ActiveInsulinChartEnd=`activeinsulinchart.end`,e.GlucoseChart7DaysPressCGM=`glucosechart.cgm.7days.press`,e.GlucoseChart14DaysPressCGM=`glucosechart.cgm.14days.press`,e.GlucoseChart30DaysPressCGM=`glucosechart.cgm.30days.press`,e.GlucoseChart90DaysPressCGM=`glucosechart.cgm.90days.press`,e.GlucoseChartStartCGM=`glucosechart.cgm.start`,e.GlucoseChartEndCGM=`glucosechart.cgm.end`,e.GlucoseChart7DaysPressBGM=`glucosechart.bgm.7days.press`,e.GlucoseChart14DaysPressBGM=`glucosechart.bgm.14days.press`,e.GlucoseChart30DaysPressBGM=`glucosechart.bgm.30days.press`,e.GlucoseChart90DaysPressBGM=`glucosechart.bgm.90days.press`,e.GlucoseChartStartBGM=`glucosechart.bgm.start`,e.GlucoseChartEndBGM=`glucosechart.bgm.end`,e.DashboardCgmButtonPress=`home.dashboard.cgm.press`,e.DashboardTabPress=`home.dashboard.press`,e.LogbookTabPress=`home.logbook.press`,e.NewCalculationTabPress=`home.newcalculation.press`,e.SettingsTabPress=`home.settings.press`,e.FoodLibraryTabPress=`home.foodlibrary.press`,e.CalculationGlucosePress=`calcflow.glucose.press`,e.CalculationCarbsPress=`calcflow.carbs.press`,e.CalculationActivityPress=`calcflow.activity.press`,e.CalculationNotesPress=`calcflow.notes.press`,e.AbortCalculationPress=`calcflow.abort.press`,e.RecentInsulinRegisterPress=`calcflow.recentinsulin.register.press`,e.RecentInsulinContinuePress=`calcflow.recentinsulin.continue.press`,e.CalculationManualInput=`calcflow.carbs.input.manual`,e.CalculationScanFoodPress=`calcflow.carbs.scanfood.press`,e.CalculationFoodLibraryPress=`calcflow.carbs.foodlibrary.press`,e.CalculationFoodLibraryDatabaseInput=`calcflow.carbs.foodlibrary.input.database`,e.CalculationFoodLibraryPersonalInput=`calcflow.carbs.foodlibrary.input.personal`,e.CalculationFoodLibraryPersonalPress=`calcflow.carbs.foodlibrary.personal.press`,e.CalculationFoodLibrarySearch=`calcflow.carbs.foodlibrary.search`,e.CalculationFoodLibraryAbort=`calcflow.carbs.foodlibrary.abort`,e.FoodLibrarySearched=`foodlibrary.searched`,e.FoodLibraryScanFoodPress=`foodlibrary.scanfood.press`,e.FoodLibraryPersonalPress=`foodlibrary.personal.press`,e.FoodLibraryCreatePress=`foodlibrary.create.press`,e.FoodLibraryUpdatePress=`foodlibrary.update.press`,e.ActivityAddPress=`calcflow.activity.add.press`,e.ActivityEditPress=`calcflow.activity.edit.press`,e.TransferDevice=`integration.device.transfer`,e.TransferService=`integration.service.transfer`,e.ExpiredGlucose=`calcflow.glucose.expired`,e.SummaryEmptyGlucose=`calcflow.summary.glucose.empty`,e.VisualSearchClosePress=`visualsearch.close.press`,e.VisualSearchNoMatchSearchLibraryPress=`visualsearch.nomatch.searchlibrary.press`,e.VisualSearchAddToCalculationPress=`visualsearch.addtocalculation.press`,e.RecommendationSuccess=`calcflow.recommendation.success`,e.RecommendationInvalid=`calcflow.recommendation.invalid`,e.RecommendationViewDetailsPress=`calcflow.recommendation.details.press`,e.RecommendationExpired=`calcflow.recommendation.expired`,e.RecommendationToastPress=`calcflow.recommendation.toast.press`,e.LogbookPersonalAddPress=`logbook.personal.add.press`,e.LogbookPersonalEditPress=`logbook.personal.edit.press`,e.LogbookPersonalDeletePress=`logbook.personal.delete.press`,e.LogbookExportPress=`logbook.export.press`,e.LogbookExportDurationFourteenDaysPress=`logbook.export.duration.fourteendays.press`,e.LogbookExportDurationThreeMonthsPress=`logbook.export.duration.threemonths.press`,e.LogbookExportDurationSixMonthsPress=`logbook.export.duration.sixmonths.press`,e.LogbookExportGeneratePress=`logbook.export.generate.press`,e.SettingsProfile=`settings.profile.press`,e.SettingsInsulin=`settings.insulin.press`,e.SettingsGlucose=`settings.glucose.press`,e.SettingsActivity=`settings.activity.press`,e.SettingsNotifications=`settings.notifications.press`,e.SettingsTheme=`settings.theme.press`,e.SettingsSmartPen=`settings.smartpen.press`,e.SettingsCGM=`settings.cgm.press`,e.SettingsBGM=`settings.bgm.press`,e.SettingsIFU=`settings.ifu.press`,e.SettingsSupport=`settings.support.press`,e.SettingsLegal=`settings.legal.press`,e.SettingsForecast=`settings.forecast.press`,e.NotificationsAllowQuickGuide=`quickguide.notifications.allow.press`,e.NotificationsAllowSettings=`settings.notifications.allow.press`,e.NotificationsDenyQuickGuide=`quickguide.notifications.deny.press`,e.NotificationsDenySettings=`settings.notifications.deny.press`,e.AppOpenNotification=`app.open.notification`,e.ErrorOffline=`errors.offline`,e.ErrorForceUpdate=`errors.forceupdate`,e.ErrorLogOut=`errors.logout`,e.WatchAppOpened=`watch.app.opened`,e.PINCodeSetupCreatePress=`pincode.setup.create.press`,e.PINCodeSetupMaybeLaterPress=`pincode.setup.maybelater.press`,e}({}),Vnn=()=>{let{email:e,id:t,country:n=``}=sin.get();return{id:t,isTester:e.includes(`@hedia`),country:n,uuid:K2(),timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:z.OS}},C6=(e,t)=>{let{id:n,isTester:r,country:i,uuid:a,timestamp:o,timezone:s,platform:c}=Vnn(),l={uuid:a,type:e,timestamp:t??o,timezone:s,data:{version:x6,platform:c,user:{id:n,isTester:r},geo:{country:i}}};b6.update(l),b6.sync().catch(console.error)},Hnn=e=>{let{id:t,isTester:n,country:r,uuid:i,timestamp:a,timezone:o,platform:s}=Vnn(),c={uuid:i,timestamp:a,timezone:o,type:`integration.service.transfer`,data:{version:x6,platform:s,source:{sourceID:e.source_id,deviceName:e.device_name,sourceName:e.source_name},reading:{type:e.type,value:e.quantity.value,unit:e.quantity.unit},geo:{country:r},user:{id:t,isTester:n}}};b6.update(c),b6.sync().catch(console.error)},w6=async(e,t,n=0)=>{if(VK)return fetch(e,t);let{accessToken:r}=z4.getState();if(!r)throw Error(`[hediaFetch] Missing access token`);let i={...t?.headers,Authorization:`Bearer ${r}`,...UK},a=await fetch(e,{...t,headers:i});if([Y.StatusCode.UNAUTHORIZED,Y.StatusCode.FORBIDDEN].includes(a.status)){if(n<1)return await Wnn(),w6(e,t,n+1);throw Error(`[hediaFetch::hediaFetch] Failed to refresh token after retry`)}return a},T6=null,Unn=async()=>{let{refreshToken:e,setTokens:t}=z4.getState();if(!e)throw Error(`[hediaFetch::refreshAccessToken] Missing refresh token`);let n=await d9t(e);if(n.status===Y.StatusCode.BAD_REQUEST)throw C6(S6.ErrorLogOut),t({accessToken:void 0,refreshToken:void 0}),Error(`[hediaFetch::refreshAccessToken] Bad request - cleared storage`);if(!n.ok)throw Error(`[hediaFetch::refreshAccessToken] Failed to refresh access token (status: ${n.status})`);let{access_token:r,refresh_token:i}=await n.json().catch(()=>null)??{};if(!r||!i)throw Error(`[hediaFetch::refreshAccessToken] Invalid token response from server`);t({accessToken:r,refreshToken:i})},Wnn=()=>(T6===null&&(T6=Unn().finally(()=>{T6=null})),T6),Gnn=async()=>{let e={headers:{Accept:`application/json`,"Content-Type":`application/json`},method:Y.HTTPRequestMethod.GET},t=`${NK.HEDIA_API_URL_V3}/user`,n=await w6(t,e);return await y0(n,Y.StatusCode.OK,t),n.json()},Knn={email:``},qnn={lessThanXSeconds:{one:`mindre end ét sekund`,other:`mindre end {{count}} sekunder`},xSeconds:{one:`1 sekund`,other:`{{count}} sekunder`},halfAMinute:`ét halvt minut`,lessThanXMinutes:{one:`mindre end ét minut`,other:`mindre end {{count}} minutter`},xMinutes:{one:`1 minut`,other:`{{count}} minutter`},aboutXHours:{one:`cirka 1 time`,other:`cirka {{count}} timer`},xHours:{one:`1 time`,other:`{{count}} timer`},xDays:{one:`1 dag`,other:`{{count}} dage`},aboutXWeeks:{one:`cirka 1 uge`,other:`cirka {{count}} uger`},xWeeks:{one:`1 uge`,other:`{{count}} uger`},aboutXMonths:{one:`cirka 1 måned`,other:`cirka {{count}} måneder`},xMonths:{one:`1 måned`,other:`{{count}} måneder`},aboutXYears:{one:`cirka 1 år`,other:`cirka {{count}} år`},xYears:{one:`1 år`,other:`{{count}} år`},overXYears:{one:`over 1 år`,other:`over {{count}} år`},almostXYears:{one:`næsten 1 år`,other:`næsten {{count}} år`}},Jnn=(e,t,n)=>{let r,i=qnn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`om `+r:r+` siden`:r};function E6(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ynn={date:E6({formats:{full:`EEEE 'den' d. MMMM y`,long:`d. MMMM y`,medium:`d. MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'kl'. {{time}}`,long:`{{date}} 'kl'. {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},Xnn={lastWeek:`'sidste' eeee 'kl.' p`,yesterday:`'i går kl.' p`,today:`'i dag kl.' p`,tomorrow:`'i morgen kl.' p`,nextWeek:`'på' eeee 'kl.' p`,other:`P`},Znn=(e,t,n,r)=>Xnn[e];function D6(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var Qnn={ordinalNumber:(e,t)=>Number(e)+`.`,era:D6({values:{narrow:[`fvt`,`vt`],abbreviated:[`f.v.t.`,`v.t.`],wide:[`før vesterlandsk tidsregning`,`vesterlandsk tidsregning`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`1. kvt.`,`2. kvt.`,`3. kvt.`,`4. kvt.`],wide:[`1. kvartal`,`2. kvartal`,`3. kvartal`,`4. kvartal`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`jan.`,`feb.`,`mar.`,`apr.`,`maj`,`jun.`,`jul.`,`aug.`,`sep.`,`okt.`,`nov.`,`dec.`],wide:[`januar`,`februar`,`marts`,`april`,`maj`,`juni`,`juli`,`august`,`september`,`oktober`,`november`,`december`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`T`,`O`,`T`,`F`,`L`],short:[`sø`,`ma`,`ti`,`on`,`to`,`fr`,`lø`],abbreviated:[`søn.`,`man.`,`tir.`,`ons.`,`tor.`,`fre.`,`lør.`],wide:[`søndag`,`mandag`,`tirsdag`,`onsdag`,`torsdag`,`fredag`,`lørdag`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`a`,pm:`p`,midnight:`midnat`,noon:`middag`,morning:`morgen`,afternoon:`eftermiddag`,evening:`aften`,night:`nat`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnat`,noon:`middag`,morning:`morgen`,afternoon:`eftermiddag`,evening:`aften`,night:`nat`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnat`,noon:`middag`,morning:`morgen`,afternoon:`eftermiddag`,evening:`aften`,night:`nat`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`midnat`,noon:`middag`,morning:`om morgenen`,afternoon:`om eftermiddagen`,evening:`om aftenen`,night:`om natten`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnat`,noon:`middag`,morning:`om morgenen`,afternoon:`om eftermiddagen`,evening:`om aftenen`,night:`om natten`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnat`,noon:`middag`,morning:`om morgenen`,afternoon:`om eftermiddagen`,evening:`om aftenen`,night:`om natten`}},defaultFormattingWidth:`wide`})};function O6(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ern(s,e=>e.test(o)):$nn(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function $nn(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ern(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function k6(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var trn={code:`da`,formatDistance:Jnn,formatLong:Ynn,formatRelative:Znn,localize:Qnn,match:{ordinalNumber:k6({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^f/i,/^(v|e)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},nrn={lessThanXSeconds:{standalone:{one:`weniger als 1 Sekunde`,other:`weniger als {{count}} Sekunden`},withPreposition:{one:`weniger als 1 Sekunde`,other:`weniger als {{count}} Sekunden`}},xSeconds:{standalone:{one:`1 Sekunde`,other:`{{count}} Sekunden`},withPreposition:{one:`1 Sekunde`,other:`{{count}} Sekunden`}},halfAMinute:{standalone:`eine halbe Minute`,withPreposition:`einer halben Minute`},lessThanXMinutes:{standalone:{one:`weniger als 1 Minute`,other:`weniger als {{count}} Minuten`},withPreposition:{one:`weniger als 1 Minute`,other:`weniger als {{count}} Minuten`}},xMinutes:{standalone:{one:`1 Minute`,other:`{{count}} Minuten`},withPreposition:{one:`1 Minute`,other:`{{count}} Minuten`}},aboutXHours:{standalone:{one:`etwa 1 Stunde`,other:`etwa {{count}} Stunden`},withPreposition:{one:`etwa 1 Stunde`,other:`etwa {{count}} Stunden`}},xHours:{standalone:{one:`1 Stunde`,other:`{{count}} Stunden`},withPreposition:{one:`1 Stunde`,other:`{{count}} Stunden`}},xDays:{standalone:{one:`1 Tag`,other:`{{count}} Tage`},withPreposition:{one:`1 Tag`,other:`{{count}} Tagen`}},aboutXWeeks:{standalone:{one:`etwa 1 Woche`,other:`etwa {{count}} Wochen`},withPreposition:{one:`etwa 1 Woche`,other:`etwa {{count}} Wochen`}},xWeeks:{standalone:{one:`1 Woche`,other:`{{count}} Wochen`},withPreposition:{one:`1 Woche`,other:`{{count}} Wochen`}},aboutXMonths:{standalone:{one:`etwa 1 Monat`,other:`etwa {{count}} Monate`},withPreposition:{one:`etwa 1 Monat`,other:`etwa {{count}} Monaten`}},xMonths:{standalone:{one:`1 Monat`,other:`{{count}} Monate`},withPreposition:{one:`1 Monat`,other:`{{count}} Monaten`}},aboutXYears:{standalone:{one:`etwa 1 Jahr`,other:`etwa {{count}} Jahre`},withPreposition:{one:`etwa 1 Jahr`,other:`etwa {{count}} Jahren`}},xYears:{standalone:{one:`1 Jahr`,other:`{{count}} Jahre`},withPreposition:{one:`1 Jahr`,other:`{{count}} Jahren`}},overXYears:{standalone:{one:`mehr als 1 Jahr`,other:`mehr als {{count}} Jahre`},withPreposition:{one:`mehr als 1 Jahr`,other:`mehr als {{count}} Jahren`}},almostXYears:{standalone:{one:`fast 1 Jahr`,other:`fast {{count}} Jahre`},withPreposition:{one:`fast 1 Jahr`,other:`fast {{count}} Jahren`}}},rrn=(e,t,n)=>{let r,i=n?.addSuffix?nrn[e].withPreposition:nrn[e].standalone;return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:`vor `+r:r},irn={date:E6({formats:{full:`EEEE, do MMMM y`,long:`do MMMM y`,medium:`do MMM y`,short:`dd.MM.y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'um' {{time}}`,long:`{{date}} 'um' {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},arn={lastWeek:`'letzten' eeee 'um' p`,yesterday:`'gestern um' p`,today:`'heute um' p`,tomorrow:`'morgen um' p`,nextWeek:`eeee 'um' p`,other:`P`},orn=(e,t,n,r)=>arn[e],srn={narrow:[`v.Chr.`,`n.Chr.`],abbreviated:[`v.Chr.`,`n.Chr.`],wide:[`vor Christus`,`nach Christus`]},crn={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1. Quartal`,`2. Quartal`,`3. Quartal`,`4. Quartal`]},lrn={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mär`,`Apr`,`Mai`,`Jun`,`Jul`,`Aug`,`Sep`,`Okt`,`Nov`,`Dez`],wide:[`Januar`,`Februar`,`März`,`April`,`Mai`,`Juni`,`Juli`,`August`,`September`,`Oktober`,`November`,`Dezember`]},urn={narrow:lrn.narrow,abbreviated:[`Jan.`,`Feb.`,`März`,`Apr.`,`Mai`,`Juni`,`Juli`,`Aug.`,`Sep.`,`Okt.`,`Nov.`,`Dez.`],wide:lrn.wide},drn={code:`de`,formatDistance:rrn,formatLong:irn,formatRelative:orn,localize:{ordinalNumber:e=>Number(e)+`.`,era:D6({values:srn,defaultWidth:`wide`}),quarter:D6({values:crn,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:lrn,formattingValues:urn,defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`D`,`M`,`D`,`F`,`S`],short:[`So`,`Mo`,`Di`,`Mi`,`Do`,`Fr`,`Sa`],abbreviated:[`So.`,`Mo.`,`Di.`,`Mi.`,`Do.`,`Fr.`,`Sa.`],wide:[`Sonntag`,`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`vm.`,pm:`nm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`Morgen`,afternoon:`Nachm.`,evening:`Abend`,night:`Nacht`},abbreviated:{am:`vorm.`,pm:`nachm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`Morgen`,afternoon:`Nachmittag`,evening:`Abend`,night:`Nacht`},wide:{am:`vormittags`,pm:`nachmittags`,midnight:`Mitternacht`,noon:`Mittag`,morning:`Morgen`,afternoon:`Nachmittag`,evening:`Abend`,night:`Nacht`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`vm.`,pm:`nm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`morgens`,afternoon:`nachm.`,evening:`abends`,night:`nachts`},abbreviated:{am:`vorm.`,pm:`nachm.`,midnight:`Mitternacht`,noon:`Mittag`,morning:`morgens`,afternoon:`nachmittags`,evening:`abends`,night:`nachts`},wide:{am:`vormittags`,pm:`nachmittags`,midnight:`Mitternacht`,noon:`Mittag`,morning:`morgens`,afternoon:`nachmittags`,evening:`abends`,night:`nachts`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:O6({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},defaultMatchWidth:`wide`,parsePatterns:{any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},frn={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},prn=(e,t,n)=>{let r,i=frn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},mrn={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},hrn=(e,t,n,r)=>mrn[e],grn={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:D6({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},_rn={ordinalNumber:k6({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},vrn={code:`en-GB`,formatDistance:prn,formatLong:{date:E6({formats:{full:`EEEE, d MMMM yyyy`,long:`d MMMM yyyy`,medium:`d MMM yyyy`,short:`dd/MM/yyyy`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:hrn,localize:grn,match:_rn,options:{weekStartsOn:1,firstWeekContainsDate:4}},yrn={lessThanXSeconds:{one:`menos de un segundo`,other:`menos de {{count}} segundos`},xSeconds:{one:`1 segundo`,other:`{{count}} segundos`},halfAMinute:`medio minuto`,lessThanXMinutes:{one:`menos de un minuto`,other:`menos de {{count}} minutos`},xMinutes:{one:`1 minuto`,other:`{{count}} minutos`},aboutXHours:{one:`alrededor de 1 hora`,other:`alrededor de {{count}} horas`},xHours:{one:`1 hora`,other:`{{count}} horas`},xDays:{one:`1 día`,other:`{{count}} días`},aboutXWeeks:{one:`alrededor de 1 semana`,other:`alrededor de {{count}} semanas`},xWeeks:{one:`1 semana`,other:`{{count}} semanas`},aboutXMonths:{one:`alrededor de 1 mes`,other:`alrededor de {{count}} meses`},xMonths:{one:`1 mes`,other:`{{count}} meses`},aboutXYears:{one:`alrededor de 1 año`,other:`alrededor de {{count}} años`},xYears:{one:`1 año`,other:`{{count}} años`},overXYears:{one:`más de 1 año`,other:`más de {{count}} años`},almostXYears:{one:`casi 1 año`,other:`casi {{count}} años`}},brn=(e,t,n)=>{let r,i=yrn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`en `+r:`hace `+r:r},xrn={date:E6({formats:{full:`EEEE, d 'de' MMMM 'de' y`,long:`d 'de' MMMM 'de' y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'a las' {{time}}`,long:`{{date}} 'a las' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Srn={lastWeek:`'el' eeee 'pasado a la' p`,yesterday:`'ayer a la' p`,today:`'hoy a la' p`,tomorrow:`'mañana a la' p`,nextWeek:`eeee 'a la' p`,other:`P`},Crn={lastWeek:`'el' eeee 'pasado a las' p`,yesterday:`'ayer a las' p`,today:`'hoy a las' p`,tomorrow:`'mañana a las' p`,nextWeek:`eeee 'a las' p`,other:`P`},wrn={code:`es`,formatDistance:brn,formatLong:xrn,formatRelative:(e,t,n,r)=>t.getHours()===1?Srn[e]:Crn[e],localize:{ordinalNumber:(e,t)=>Number(e)+`º`,era:D6({values:{narrow:[`AC`,`DC`],abbreviated:[`AC`,`DC`],wide:[`antes de cristo`,`después de cristo`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>Number(e)-1}),month:D6({values:{narrow:[`e`,`f`,`m`,`a`,`m`,`j`,`j`,`a`,`s`,`o`,`n`,`d`],abbreviated:[`ene`,`feb`,`mar`,`abr`,`may`,`jun`,`jul`,`ago`,`sep`,`oct`,`nov`,`dic`],wide:[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`d`,`l`,`m`,`m`,`j`,`v`,`s`],short:[`do`,`lu`,`ma`,`mi`,`ju`,`vi`,`sá`],abbreviated:[`dom`,`lun`,`mar`,`mié`,`jue`,`vie`,`sáb`],wide:[`domingo`,`lunes`,`martes`,`miércoles`,`jueves`,`viernes`,`sábado`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:O6({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Trn={lessThanXSeconds:{one:`moins d’une seconde`,other:`moins de {{count}} secondes`},xSeconds:{one:`1 seconde`,other:`{{count}} secondes`},halfAMinute:`30 secondes`,lessThanXMinutes:{one:`moins d’une minute`,other:`moins de {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`environ 1 heure`,other:`environ {{count}} heures`},xHours:{one:`1 heure`,other:`{{count}} heures`},xDays:{one:`1 jour`,other:`{{count}} jours`},aboutXWeeks:{one:`environ 1 semaine`,other:`environ {{count}} semaines`},xWeeks:{one:`1 semaine`,other:`{{count}} semaines`},aboutXMonths:{one:`environ 1 mois`,other:`environ {{count}} mois`},xMonths:{one:`1 mois`,other:`{{count}} mois`},aboutXYears:{one:`environ 1 an`,other:`environ {{count}} ans`},xYears:{one:`1 an`,other:`{{count}} ans`},overXYears:{one:`plus d’un an`,other:`plus de {{count}} ans`},almostXYears:{one:`presqu’un an`,other:`presque {{count}} ans`}},Ern=(e,t,n)=>{let r,i=Trn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`dans `+r:`il y a `+r:r},Drn={date:E6({formats:{full:`EEEE d MMMM y`,long:`d MMMM y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'à' {{time}}`,long:`{{date}} 'à' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Orn={lastWeek:`eeee 'dernier à' p`,yesterday:`'hier à' p`,today:`'aujourd’hui à' p`,tomorrow:`'demain à' p'`,nextWeek:`eeee 'prochain à' p`,other:`P`},krn=(e,t,n,r)=>Orn[e],Arn={narrow:[`av. J.-C`,`ap. J.-C`],abbreviated:[`av. J.-C`,`ap. J.-C`],wide:[`avant Jésus-Christ`,`après Jésus-Christ`]},jrn={narrow:[`T1`,`T2`,`T3`,`T4`],abbreviated:[`1er trim.`,`2ème trim.`,`3ème trim.`,`4ème trim.`],wide:[`1er trimestre`,`2ème trimestre`,`3ème trimestre`,`4ème trimestre`]},Mrn={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`janv.`,`févr.`,`mars`,`avr.`,`mai`,`juin`,`juil.`,`août`,`sept.`,`oct.`,`nov.`,`déc.`],wide:[`janvier`,`février`,`mars`,`avril`,`mai`,`juin`,`juillet`,`août`,`septembre`,`octobre`,`novembre`,`décembre`]},Nrn={narrow:[`D`,`L`,`M`,`M`,`J`,`V`,`S`],short:[`di`,`lu`,`ma`,`me`,`je`,`ve`,`sa`],abbreviated:[`dim.`,`lun.`,`mar.`,`mer.`,`jeu.`,`ven.`,`sam.`],wide:[`dimanche`,`lundi`,`mardi`,`mercredi`,`jeudi`,`vendredi`,`samedi`]},Prn={narrow:{am:`AM`,pm:`PM`,midnight:`minuit`,noon:`midi`,morning:`mat.`,afternoon:`ap.m.`,evening:`soir`,night:`mat.`},abbreviated:{am:`AM`,pm:`PM`,midnight:`minuit`,noon:`midi`,morning:`matin`,afternoon:`après-midi`,evening:`soir`,night:`matin`},wide:{am:`AM`,pm:`PM`,midnight:`minuit`,noon:`midi`,morning:`du matin`,afternoon:`de l’après-midi`,evening:`du soir`,night:`du matin`}},Frn=(e,t)=>{let n=Number(e),r=t?.unit;if(n===0)return`0`;let i=[`year`,`week`,`hour`,`minute`,`second`],a;return a=n===1?r&&i.includes(r)?`ère`:`er`:`ème`,n+a},Irn=[`MMM`,`MMMM`],Lrn={code:`fr`,formatDistance:Ern,formatLong:Drn,formatRelative:krn,localize:{preprocessor:(e,t)=>e.getDate()===1||!t.some(e=>e.isToken&&Irn.includes(e.value))?t:t.map(e=>e.isToken&&e.value===`do`?{isToken:!0,value:`d`}:e),ordinalNumber:Frn,era:D6({values:Arn,defaultWidth:`wide`}),quarter:D6({values:jrn,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:Mrn,defaultWidth:`wide`}),day:D6({values:Nrn,defaultWidth:`wide`}),dayPeriod:D6({values:Prn,defaultWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:O6({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Rrn={lessThanXSeconds:{one:`meno di un secondo`,other:`meno di {{count}} secondi`},xSeconds:{one:`un secondo`,other:`{{count}} secondi`},halfAMinute:`alcuni secondi`,lessThanXMinutes:{one:`meno di un minuto`,other:`meno di {{count}} minuti`},xMinutes:{one:`un minuto`,other:`{{count}} minuti`},aboutXHours:{one:`circa un'ora`,other:`circa {{count}} ore`},xHours:{one:`un'ora`,other:`{{count}} ore`},xDays:{one:`un giorno`,other:`{{count}} giorni`},aboutXWeeks:{one:`circa una settimana`,other:`circa {{count}} settimane`},xWeeks:{one:`una settimana`,other:`{{count}} settimane`},aboutXMonths:{one:`circa un mese`,other:`circa {{count}} mesi`},xMonths:{one:`un mese`,other:`{{count}} mesi`},aboutXYears:{one:`circa un anno`,other:`circa {{count}} anni`},xYears:{one:`un anno`,other:`{{count}} anni`},overXYears:{one:`più di un anno`,other:`più di {{count}} anni`},almostXYears:{one:`quasi un anno`,other:`quasi {{count}} anni`}},zrn=(e,t,n)=>{let r,i=Rrn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`tra `+r:r+` fa`:r},Brn={date:E6({formats:{full:`EEEE d MMMM y`,long:`d MMMM y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:E6({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} {{time}}`,long:`{{date}} {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})};function A6(e,...t){let n=V2.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}var Vrn={};function j6(){return Vrn}function Hrn(e){Vrn=e}function M6(e,t){let n=j6(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=H2(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Urn(e,t,n){let[r,i]=A6(n?.in,e,t);return+M6(r,n)==+M6(i,n)}var Wrn=[`domenica`,`lunedì`,`martedì`,`mercoledì`,`giovedì`,`venerdì`,`sabato`];function Grn(e){switch(e){case 0:return`'domenica scorsa alle' p`;default:return`'`+Wrn[e]+` scorso alle' p`}}function Krn(e){return`'`+Wrn[e]+` alle' p`}function qrn(e){switch(e){case 0:return`'domenica prossima alle' p`;default:return`'`+Wrn[e]+` prossimo alle' p`}}var Jrn={lastWeek:(e,t,n)=>{let r=e.getDay();return Urn(e,t,n)?Krn(r):Grn(r)},yesterday:`'ieri alle' p`,today:`'oggi alle' p`,tomorrow:`'domani alle' p`,nextWeek:(e,t,n)=>{let r=e.getDay();return Urn(e,t,n)?Krn(r):qrn(r)},other:`P`},Yrn={code:`it`,formatDistance:zrn,formatLong:Brn,formatRelative:(e,t,n,r)=>{let i=Jrn[e];return typeof i==`function`?i(t,n,r):i},localize:{ordinalNumber:(e,t)=>{let n=Number(e);return String(n)},era:D6({values:{narrow:[`aC`,`dC`],abbreviated:[`a.C.`,`d.C.`],wide:[`avanti Cristo`,`dopo Cristo`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`G`,`F`,`M`,`A`,`M`,`G`,`L`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`gen`,`feb`,`mar`,`apr`,`mag`,`giu`,`lug`,`ago`,`set`,`ott`,`nov`,`dic`],wide:[`gennaio`,`febbraio`,`marzo`,`aprile`,`maggio`,`giugno`,`luglio`,`agosto`,`settembre`,`ottobre`,`novembre`,`dicembre`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`D`,`L`,`M`,`M`,`G`,`V`,`S`],short:[`dom`,`lun`,`mar`,`mer`,`gio`,`ven`,`sab`],abbreviated:[`dom`,`lun`,`mar`,`mer`,`gio`,`ven`,`sab`],wide:[`domenica`,`lunedì`,`martedì`,`mercoledì`,`giovedì`,`venerdì`,`sabato`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`m.`,pm:`p.`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`mattina`,afternoon:`pomeriggio`,evening:`sera`,night:`notte`},abbreviated:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`mattina`,afternoon:`pomeriggio`,evening:`sera`,night:`notte`},wide:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`mattina`,afternoon:`pomeriggio`,evening:`sera`,night:`notte`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`m.`,pm:`p.`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`di mattina`,afternoon:`del pomeriggio`,evening:`di sera`,night:`di notte`},abbreviated:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`di mattina`,afternoon:`del pomeriggio`,evening:`di sera`,night:`di notte`},wide:{am:`AM`,pm:`PM`,midnight:`mezzanotte`,noon:`mezzogiorno`,morning:`di mattina`,afternoon:`del pomeriggio`,evening:`di sera`,night:`di notte`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^a/i,/^(d|e)/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Xrn={lessThanXSeconds:{one:`mindre än en sekund`,other:`mindre än {{count}} sekunder`},xSeconds:{one:`en sekund`,other:`{{count}} sekunder`},halfAMinute:`en halv minut`,lessThanXMinutes:{one:`mindre än en minut`,other:`mindre än {{count}} minuter`},xMinutes:{one:`en minut`,other:`{{count}} minuter`},aboutXHours:{one:`ungefär en timme`,other:`ungefär {{count}} timmar`},xHours:{one:`en timme`,other:`{{count}} timmar`},xDays:{one:`en dag`,other:`{{count}} dagar`},aboutXWeeks:{one:`ungefär en vecka`,other:`ungefär {{count}} veckor`},xWeeks:{one:`en vecka`,other:`{{count}} veckor`},aboutXMonths:{one:`ungefär en månad`,other:`ungefär {{count}} månader`},xMonths:{one:`en månad`,other:`{{count}} månader`},aboutXYears:{one:`ungefär ett år`,other:`ungefär {{count}} år`},xYears:{one:`ett år`,other:`{{count}} år`},overXYears:{one:`över ett år`,other:`över {{count}} år`},almostXYears:{one:`nästan ett år`,other:`nästan {{count}} år`}},Zrn=[`noll`,`en`,`två`,`tre`,`fyra`,`fem`,`sex`,`sju`,`åtta`,`nio`,`tio`,`elva`,`tolv`],Qrn=(e,t,n)=>{let r,i=Xrn[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t<13?Zrn[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`om `+r:r+` sedan`:r},$rn={date:E6({formats:{full:`EEEE d MMMM y`,long:`d MMMM y`,medium:`d MMM y`,short:`y-MM-dd`},defaultWidth:`full`}),time:E6({formats:{full:`'kl'. HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'kl.' {{time}}`,long:`{{date}} 'kl.' {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},ein={lastWeek:`'i' EEEE's kl.' p`,yesterday:`'igår kl.' p`,today:`'idag kl.' p`,tomorrow:`'imorgon kl.' p`,nextWeek:`EEEE 'kl.' p`,other:`P`},tin={code:`sv`,formatDistance:Qrn,formatLong:$rn,formatRelative:(e,t,n,r)=>ein[e],localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:case 2:return n+`:a`}return n+`:e`},era:D6({values:{narrow:[`f.Kr.`,`e.Kr.`],abbreviated:[`f.Kr.`,`e.Kr.`],wide:[`före Kristus`,`efter Kristus`]},defaultWidth:`wide`}),quarter:D6({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1:a kvartalet`,`2:a kvartalet`,`3:e kvartalet`,`4:e kvartalet`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:D6({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`jan.`,`feb.`,`mars`,`apr.`,`maj`,`juni`,`juli`,`aug.`,`sep.`,`okt.`,`nov.`,`dec.`],wide:[`januari`,`februari`,`mars`,`april`,`maj`,`juni`,`juli`,`augusti`,`september`,`oktober`,`november`,`december`]},defaultWidth:`wide`}),day:D6({values:{narrow:[`S`,`M`,`T`,`O`,`T`,`F`,`L`],short:[`sö`,`må`,`ti`,`on`,`to`,`fr`,`lö`],abbreviated:[`sön`,`mån`,`tis`,`ons`,`tors`,`fre`,`lör`],wide:[`söndag`,`måndag`,`tisdag`,`onsdag`,`torsdag`,`fredag`,`lördag`]},defaultWidth:`wide`}),dayPeriod:D6({values:{narrow:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`morg.`,afternoon:`efterm.`,evening:`kväll`,night:`natt`},abbreviated:{am:`f.m.`,pm:`e.m.`,midnight:`midnatt`,noon:`middag`,morning:`morgon`,afternoon:`efterm.`,evening:`kväll`,night:`natt`},wide:{am:`förmiddag`,pm:`eftermiddag`,midnight:`midnatt`,noon:`middag`,morning:`morgon`,afternoon:`eftermiddag`,evening:`kväll`,night:`natt`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`på morg.`,afternoon:`på efterm.`,evening:`på kvällen`,night:`på natten`},abbreviated:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`på morg.`,afternoon:`på efterm.`,evening:`på kvällen`,night:`på natten`},wide:{am:`fm`,pm:`em`,midnight:`midnatt`,noon:`middag`,morning:`på morgonen`,afternoon:`på eftermiddagen`,evening:`på kvällen`,night:`på natten`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:k6({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:O6({matchPatterns:{narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^f/i,/^[ev]/i]},defaultParseWidth:`any`}),quarter:O6({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:O6({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:O6({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:`any`}),dayPeriod:O6({matchPatterns:{any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}};function nin(e){let t={},n=j6();for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]===void 0?delete t[n]:t[n]=e[n]);Hrn(t)}var rin=C5t(Y.Languages,Y.Languages.en);function iin(e){let t={da:trn,de:drn,es:wrn,fr:Lrn,it:Yrn,enGB:vrn,sv:tin};nin({locale:e===`en`?t.enGB:t[e]})}function ain(e){return e??rin}function oin(e){let{language:t,set:n}=IK.getState();n(e),iin(e),e!==t&&E2t.invalidateQueries({queryKey:[`foods`]})}var sin=new class extends Lnn{constructor(){super(`userDetails`,Knn)}get(){let{id:e,country:t,language:n,email:r,name:i}=super.get();return{id:e,name:i,country:t,language:n,email:r}}async fetch(){let e=await Gnn();oin(ain(e.language)),super.set(e),super.save()}migrateData(){throw Error(`[UserDetailsManager::migrateData] Purposefully not implemented.`)}},cin=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.adjustedInsulinCorrection=a,e.calculateActiveInsulin=c,e.calculateRecommendation=n,e.convertBGL=r,e.foodBolus=u,e.foodRecommendation=s,e.fractionOfInsulinStillActive=o,e.getInterval=p,e.getRecentBolusIds=l,e.getReduction=f,e.insulinStillActive=d,e.rawInsulinCorrection=i,e.roundInsulinValue=void 0;var t=b0();function n(e){let{carbohydrateRatio:n,carbohydrates:i,glucoseReading:o,insulinSensitivity:c,targetBGL:l,recentBoluses:d,activity:p}=e;if(o==null)throw Error(t.GlucoseErrors.MissingGlucoseReading);if(o.unit!==t.BloodGlucoseUnit.MMOL_L&&o.unit!==t.BloodGlucoseUnit.MG_DL)throw Error(t.GlucoseErrors.InvalidGlucoseUnit);let m=r(o.value,o.unit);if(m<t.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL||m>t.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL)throw Error(t.GlucoseErrors.OutOfRangeCurrentBGL);let h=new Date,g=p?.activitySettings?.target,_=u(i,n),{activeInsulin:v,adjustedInsulin:y,recentBolusesIds:b}=a(m,g===void 0?l:Math.max(g,l),c,d),x=_+y,S=x>t.CONSTANTS.INSULIN_DOSE_MAX;x=Math.min(x,t.CONSTANTS.INSULIN_DOSE_MAX);let C=0;if(m<3.9){let e=u(15,n);x-=e,x<0&&(C=Math.max(15,s(x+e,n)))}else{let e=s(x,n);C=Math.max(0,e)}x=Math.max(0,x);let w=p?f(p.activityDuration,p.activitySettings,p.activityIntensity,p.activityDate):null;return w&&(x*=1-w),{activeInsulin:v,activityReduction:w,bolus:x,carbRecommendation:C,recentBolusesIds:b,recommendationDate:h,wasLimited:S}}function r(e,n){if(e==null||isNaN(e))throw Error(t.GlucoseErrors.InvalidGlucoseValue);return n===t.BloodGlucoseUnit.MMOL_L?e:e*t.CONSTANTS.MMOLL_PER_MGDL_BGL}function i(e,t,n){return(e-t)/n}function a(e,t,n,r){let a=c(r),o=l(r),s=i(e,t,n);return{activeInsulin:a,adjustedInsulin:Math.max(s-a,Math.min(s,0)),recentBolusesIds:o}}function o(e){if(e<0)throw RangeError(`Parameter secondsPassed can't be negative. Found ${e}.`);return e===0?1:e<5e3?Math.cos((e+500)/5900):e<7e3?-120127e-9*e+1.197151:e<14400?.96-Math.tanh((e-2800)/6e3):0}function s(e,t){return-e*t}function c(e){return e.reduce((e,t)=>e+d(t),0)}function l(e){return e.map(e=>e.id)}function u(e,t){return e/t}function d(e){return e.insulinDose*o(e.secondsPassed)}e.roundInsulinValue=(e,n)=>{let r={[t.InjectionMethod.PenWhole]:1,[t.InjectionMethod.PenHalf]:2,[t.InjectionMethod.Pump]:10}[n];return Math.round(e*r)/r};function f(e,n,r,i){if(e<t.CONSTANTS.ACTIVITY_DURATION_MIN||e>t.CONSTANTS.ACTIVITY_DURATION_MAX)throw Error(t.ActivityErrors.OutOfRangeDuration);let a=i.getTime()+e*t.Milliseconds.Minute,o=new Date().getTime()>=a,s=p(e,(()=>{if(o)return n.post;if(r===null)throw Error(t.ActivityErrors.MissingIntensity);return n[r]})());if(s==null)throw Error(t.ActivityErrors.InvalidInterval);let c=1-s;if(c<t.CONSTANTS.ACTIVITY_REDUCTION_MIN||c>t.CONSTANTS.ACTIVITY_REDUCTION_MAX)throw Error(t.ActivityErrors.InvalidReduction);return c}function p(e,t){let{fromZero:n,fromThirty:r,fromFortysix:i,fromSixtyone:a}=t;return e<=29?n:e<=45?r:e<=60?i:a}})),lin=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"calculateActiveInsulin",{enumerable:!0,get:function(){return t.calculateActiveInsulin}}),Object.defineProperty(e,"calculateRecommendation",{enumerable:!0,get:function(){return t.calculateRecommendation}}),Object.defineProperty(e,"getReduction",{enumerable:!0,get:function(){return t.getReduction}}),Object.defineProperty(e,"roundInsulinValue",{enumerable:!0,get:function(){return t.roundInsulinValue}});var t=cin()})),N6=lin(),uin=class{create=async(e,t)=>{try{e.overwrittenByUUID=void 0;let n=fin();n.eventUpdates.push({...e,uuidOld:t}),PK.set(`event/pendingChanges`,JSON.stringify(n));let r=(e,t)=>{if(this.saveLocally(e),t!==void 0){let n=this.getByUUID(t);n.overwrittenByUUID=e.uuid,this.saveLocally(n)}};return VK?(await this.sync(),r(e,t)):(r(e,t),a8.syncAll().catch(console.error)),!0}catch(e){return console.error(e),!1}};getActiveEvents=()=>{let e=P6(),t=[];for(let n of e){let[e,r]=n,i=this.getByUUID(e);r>Date.now()-Y.Milliseconds.Minute*90-i.durationSeconds*Y.Milliseconds.Second&&t.push(i)}return t};getEvents=(e,t)=>{let n=P6();if(e!==void 0){let t=e.getTime();n=n.filter(e=>e[1]>=t)}if(t!==void 0){let e=t.getTime();n=n.filter(t=>t[1]<e)}let r=[];for(let e of n)try{let t=this.getByUUID(e[0]);r.push(t)}catch(e){console.error(e)}return r};sync=async()=>{let e=fin(),t={method:Y.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}},n=`${NK.HEDIA_API_URL_V2}/events`,r=await w6(n,t);await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.POST);let{lastSyncTimestamp:i,eventUpdates:a}=await r.json();for(let e of a)this.saveLocally(e);let o=fin(),s={lastSyncTimestamp:i,eventUpdates:o.eventUpdates.filter(t=>!e.eventUpdates.map(e=>e.uuid).includes(t.uuid)),deletedEvents:o.deletedEvents.filter(t=>!e.deletedEvents.includes(t))};PK.set(`event/pendingChanges`,JSON.stringify(s))};getEventWithHighestReduction=e=>{if(!e)throw Error(`[EventManager::getEventWithHighestReduction] Cannot retrieve highest reduction without a provided setting!`);let t=this.getActiveEvents();if(!t.length)return;let n=({durationSeconds:t,activityIntensity:n,startTimestamp:r})=>{if(r===null)throw Error(`[EventManager::calculateReduction] Cannot calculate reduction without startTimestamp!`);return(0,N6.getReduction)(t/60,e,n,new Date(r))},r=t.sort((e,t)=>n(e)-n(t));return r[r.length-1]};getByUUID=e=>{let t=PK.getString(`event/${e}`);if(t===void 0)throw Error(`[EventManager::getByUUID] The requested event with UUID ${e} does not exist!`);return JSON.parse(t)};saveLocally=e=>{if(din(e.uuid),PK.set(`event/${e.uuid}`,JSON.stringify(e)),!e.deleted&&!e.overwrittenByUUID){let t=P6();if(e.startTimestamp===null)throw Error(`[EventManager::saveLocally] event.startTimestamp must be non-null.`);let n=new Date(e.startTimestamp).getTime();t.push([e.uuid,n]),t=t.sort((e,t)=>t[1]-e[1]),PK.set(`event/index`,JSON.stringify(t))}}},din=e=>{let t=P6();t=t.filter(t=>t[0]!==e),PK.set(`event/index`,JSON.stringify(t))},P6=()=>{let e=PK.getString(`event/index`);return e===void 0?[]:JSON.parse(e)},fin=()=>{let e=PK.getString(`event/pendingChanges`);return e===void 0?{lastSyncTimestamp:new Date(0).toJSON(),eventUpdates:[],deletedEvents:[]}:JSON.parse(e)},F6=new uin,I6=(e,t,n)=>Math.round(e*t*n/100),pin=e=>e.source!==`packaged`,min=async()=>{let e=new URLSearchParams({source:`personal`,limit:`100`,sort:`title`}),t=await w6(`${NK.FOOD_BASE_URL}/foods?${e.toString()}`,{headers:{Accept:`application/json`}});return t.ok?await t.json():(console.warn(`[listPersonalFoods] server error`),[])},hin=async e=>{let t=new URLSearchParams({source:`curated`,limit:`100`,sort:`title`});e!==void 0&&t.set(`categoryId`,e);let n=`${NK.FOOD_BASE_URL}/foods?${t.toString()}`,r=await w6(n,{headers:{Accept:`application/json`}});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.GET),r.json()},gin=async()=>{let e=new URLSearchParams({usedWithinDays:`30`}),t=`${NK.FOOD_BASE_URL}/foods?${e.toString()}`,n=await w6(t,{headers:{Accept:`application/json`}});return await y0(n,Y.StatusCode.OK,t,Y.HTTPRequestMethod.GET),(await n.json()).filter(pin)},_in=async e=>{let t=new URLSearchParams({search:e,limit:`100`}),n=`${NK.FOOD_BASE_URL}/foods?${t.toString()}`,r=await w6(n,{headers:{Accept:`application/json`}});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.GET),(await r.json()).filter(pin)},vin=async e=>{let t=`${NK.FOOD_BASE_URL}/foods/${e}`,n=await w6(t,{headers:{Accept:`application/json`}});if(n.status===Y.StatusCode.NOT_FOUND)return null;await y0(n,Y.StatusCode.OK,t,Y.HTTPRequestMethod.GET);let r=await n.json();return!pin(r)||r.deleted?null:r},yin=async(e,t)=>{let n=`${NK.FOOD_BASE_URL}/foods/personal/${e}`,r=await w6(n,{method:Y.HTTPRequestMethod.PATCH,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(t)});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.PATCH),r.json()},bin=async e=>{let t=`${NK.FOOD_BASE_URL}/foods/personal/${e}`;await y0(await w6(t,{method:Y.HTTPRequestMethod.DELETE}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)},xin=async e=>{let t=`${NK.FOOD_BASE_URL}/foods/personal`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),await n.json()},Sin=async e=>{let t=new URLSearchParams({language:e}),n=`${NK.FOOD_BASE_URL}/categories?${t.toString()}`,r=await w6(n,{headers:{Accept:`application/json`}});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.GET),r.json()},Cin=async e=>{let t=`${NK.FOOD_BASE_URL}/food-intakes`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),await n.json()},win=async e=>{let t=`${NK.FOOD_BASE_URL}/food-intakes/${e}`;await y0(await w6(t,{method:Y.HTTPRequestMethod.DELETE}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)},Tin=J2(Y.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,Y.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX),Ein=q2(90,250),Din=8,Oin={fromZero:1,fromThirty:.75,fromFortysix:.5,fromSixtyone:null},kin={fromZero:1,fromThirty:.5,fromFortysix:.25,fromSixtyone:null},Ain={fromZero:1,fromThirty:.25,fromFortysix:null,fromSixtyone:null},jin={fromZero:1,fromThirty:.5,fromFortysix:.5,fromSixtyone:null};function L6(){return{target:Din,light:Oin,moderate:kin,hard:Ain,post:jin}}function Min(){return[{startTime:`00:00`,target:8},{startTime:`05:00`,target:6},{startTime:`09:00`,target:7},{startTime:`11:00`,target:6},{startTime:`13:00`,target:7},{startTime:`18:00`,target:6},{startTime:`22:00`,target:8}]}function Nin(){return{startTime:`00:00`,target:6}}function Pin(){return{targetBGLIntervals:Min(),overallTargetBGL:Nin(),use:Y.Usage.Intervals}}var Fin=()=>({min:Y.CONSTANTS.TARGET_GLUCOSE_MIN,max:Y.CONSTANTS.TARGET_GLUCOSE_MAX}),Iin=()=>({min:79,max:180}),Lin=`19:00`,Rin=1.5;function zin(){return{medicineNotification:{toggle:!1,dailyReminderTime:Lin},remeasurementNotification:{toggle:!0,remeasurement:Rin}}}var R6=new class{get=()=>{let e=PK.getString(`userSettings`),t=this.safeParse(e);return this.migrateAndClean(t)??{}};write=e=>{let t=this.migrateAndClean(e)??{};PK.set(`userSettings`,JSON.stringify(t))};getPending=()=>{let e=PK.getString(`pendingSettingsChanges`);return(this.safeParse(e)??[]).map(e=>this.migrateAndClean(e)??{})};addPending=e=>{let t=this.getPending();t.push(this.migrateAndClean(e)??{}),PK.set(`pendingSettingsChanges`,JSON.stringify(t))};removePending=e=>{let t=e.map(e=>e.uuid),n=this.getPending().filter(e=>!t.includes(e.uuid));PK.set(`pendingSettingsChanges`,JSON.stringify(n))};safeParse=e=>{if(e)try{return JSON.parse(e)}catch{return}};migrateActivitySettings=e=>{if(e.activity)for(let t of[`hard`,`moderate`,`light`,`post`])e.activity[t].fromSixtyone===void 0&&(e.activity[t].fromSixtyone=null)};migrateGenderToBiologicalSex=e=>{e.gender&&!e.biologicalSex&&(e.biologicalSex=e.gender),delete e.gender};removeEmailField=e=>{delete e.email};removeInsulinDependentField=e=>{delete e.insulinDependent};migrateBGLFields=e=>{if(!e.glucoseLevelTargets)return;let t={...e.glucoseLevelTargets};if(t.overallTargetBGL){let e={...t.overallTargetBGL};delete e.low,delete e.high,t.overallTargetBGL=e}Array.isArray(t.targetBGLIntervals)&&(t.targetBGLIntervals=t.targetBGLIntervals.map(e=>{let t={...e};return delete t.low,delete t.high,t})),e.glucoseLevelTargets=t};migrateNotificationsSettings=e=>{if(!e.notifications)return;let t={...e.notifications};t.deviceIdentifiers!==void 0&&delete t.deviceIdentifiers,e.notifications=t};migrateAndClean=e=>{if(!e)return;let t={...e};return this.migrateActivitySettings(t),this.migrateGenderToBiologicalSex(t),this.migrateBGLFields(t),this.migrateNotificationsSettings(t),this.removeEmailField(t),this.removeInsulinDependentField(t),t}};function z6(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var B6=class{_diabetesType;_biologicalSex;_heightCm;_weightKg;_birthDate;_injectionMethod;_glucoseUnit;_treatmentParameters;_glucoseLevelTargets;_fastActingInsulin;_longActingInsulin;_uuid;_activity;_notifications;_created;constructor(){let e=this.getLocalUserSettings();this.updateUserSettings(e),Ytn(this)}get diabetesType(){return this._diabetesType}get biologicalSex(){return this._biologicalSex}get heightCm(){return this._heightCm}get weightKg(){return this._weightKg}get birthDate(){return this._birthDate}get injectionMethod(){return this._injectionMethod}get glucoseUnit(){return this._glucoseUnit}get treatmentParameters(){return this._treatmentParameters}get glucoseLevelTargets(){return this._glucoseLevelTargets}get fastActingInsulin(){return this._fastActingInsulin}get longActingInsulin(){return this._longActingInsulin}get uuid(){return this._uuid}get activity(){return this._activity}get notifications(){return this._notifications}get created(){return this._created}async postUserSettings(e){try{e.uuidOld=this.getLocalUserSettings().uuid,e.uuid=K2(),e.created=new Date().toJSON();let t=await this.makeSyncRequest([e]);return R6.write(t),this.updateUserSettings(t),!0}catch(e){return console.error(e),!1}}async getUserSettings(){try{let e=R6.getPending();if(e.length>0){let t=await this.makeSyncRequest(e);return R6.write(t),this.updateUserSettings(t),R6.removePending(e),t}let t=await this.makeSyncRequest();return R6.write(t),this.updateUserSettings(t),t}catch(e){return VK&&NK.IS_PRODUCTION!==`true`&&e instanceof M2t&&[Y.StatusCode.UNAVAILABLE_FOR_LEGAL_REASONS,Y.StatusCode.UNAUTHORIZED].includes(e.statusCode)?(console.error(`❌❌❌ [dev] Not authenticated — Login at http://localhost:7265 (hda-app) to get the token ❌❌❌`),null):(console.error(e),null)}}getLocalUserSettings(){return R6.get()}reset(){this.updateUserSettings({activity:void 0,biologicalSex:void 0,birthday:void 0,bloodGlucoseUnits:void 0,bloodKetonesUnit:void 0,created:void 0,diabetesType:void 0,fastActingInsulin:void 0,glucoseLevelTargets:void 0,height:void 0,longActingInsulin:void 0,notifications:void 0,parameters:void 0,treatmentType:void 0,uuid:void 0,uuidOld:void 0,weight:void 0})}makeSyncRequest=async e=>{let t=e?Y.HTTPRequestMethod.POST:Y.HTTPRequestMethod.GET,n={headers:{"Content-Type":`application/json`},body:e?JSON.stringify(e):void 0,method:t},r=`${NK.HEDIA_API_URL_V2}/settings`,i=await w6(r,n);return await y0(i,Y.StatusCode.OK,r,t),i.json()};updateUserSettings(e){this._activity=e.activity,this._biologicalSex=e.biologicalSex,this._birthDate=e.birthday,this._created=e.created,this._diabetesType=e.diabetesType,this._fastActingInsulin=e.fastActingInsulin,this._glucoseLevelTargets=e.glucoseLevelTargets,this._glucoseUnit=e.bloodGlucoseUnits,this._heightCm=e.height,this._injectionMethod=e.treatmentType,this._longActingInsulin=e.longActingInsulin,this._notifications=e.notifications,this._treatmentParameters=e.parameters,this._uuid=e.uuid,this._weightKg=e.weight}updateMockUserSettings(){if(NK.IS_PRODUCTION===`true`)throw Error(`[UserSettingsManager::updateMockUserSettings] - This method should only be used outside production environments`);this._uuid=K2(),this._treatmentParameters=V6(2,10,Y.Usage.Overall),this._activity=L6(),this._notifications=zin(),this._glucoseLevelTargets=Pin(),this._glucoseUnit=Y.BloodGlucoseUnit.MMOL_L,this._fastActingInsulin=Y.FastActingInsulin.Apidra,this._longActingInsulin=Y.LongActingInsulin.Lantus,this._injectionMethod=Y.InjectionMethod.Pump,this._diabetesType=Y.DiabetesType.Type1,this._birthDate=`1975-12-31T23:00:00.000Z`,this._biologicalSex=Y.BiologicalSex.Female,this._heightCm=170,this._weightKg=70}};z6([x3],B6.prototype,`_diabetesType`,void 0),z6([x3],B6.prototype,`_biologicalSex`,void 0),z6([x3],B6.prototype,`_heightCm`,void 0),z6([x3],B6.prototype,`_weightKg`,void 0),z6([x3],B6.prototype,`_birthDate`,void 0),z6([x3],B6.prototype,`_injectionMethod`,void 0),z6([x3],B6.prototype,`_glucoseUnit`,void 0),z6([x3],B6.prototype,`_treatmentParameters`,void 0),z6([x3],B6.prototype,`_glucoseLevelTargets`,void 0),z6([x3],B6.prototype,`_fastActingInsulin`,void 0),z6([x3],B6.prototype,`_longActingInsulin`,void 0),z6([x3],B6.prototype,`_uuid`,void 0),z6([x3],B6.prototype,`_activity`,void 0),z6([x3],B6.prototype,`_notifications`,void 0),z6([x3],B6.prototype,`_created`,void 0),z6([H3],B6.prototype,`updateUserSettings`,null),z6([H3],B6.prototype,`updateMockUserSettings`,null);function V6(e,t,n){let r={carbohydrateRatio:t,insulinSensitivity:e,startTime:`00:00`};return{overallParameters:r,parameterIntervals:[`00:00`,`05:00`,`09:00`,`11:00`,`13:00`,`18:00`,`22:00`].map(e=>({insulinSensitivity:r.insulinSensitivity,carbohydrateRatio:r.carbohydrateRatio,startTime:e})),use:n}}var H6=new B6,Bin={code:`en-US`,formatDistance:prn,formatLong:{date:E6({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:E6({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:E6({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:hrn,localize:grn,match:_rn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function U6(e){let t=H2(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function Vin(e,t){let n=H2(e,t?.in);return n.setHours(0,0,0,0),n}function Hin(e,t,n){let[r,i]=A6(n?.in,e,t),a=Vin(r),o=Vin(i),s=+a-U6(a),c=+o-U6(o);return Math.round((s-c)/l5t)}function Uin(e,t){let n=H2(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Win(e,t){let n=H2(e,t?.in);return Hin(n,Uin(n))+1}function W6(e,t){return M6(e,{...t,weekStartsOn:1})}function Gin(e,t){let n=H2(e,t?.in),r=n.getFullYear(),i=V2(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=W6(i),o=V2(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=W6(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Kin(e,t){let n=Gin(e,t),r=V2(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),W6(r)}function qin(e,t){let n=H2(e,t?.in),r=W6(n)-+Kin(n);return Math.round(r/c5t)+1}function Jin(e,t){let n=H2(e,t?.in),r=n.getFullYear(),i=j6(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=V2(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=M6(o,t),c=V2(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=M6(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function Yin(e,t){let n=j6(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Jin(e,t),a=V2(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),M6(a,t)}function Xin(e,t){let n=H2(e,t?.in),r=M6(n,t)-+Yin(n,t);return Math.round(r/c5t)+1}function G6(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var K6={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return G6(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):G6(n+1,2)},d(e,t){return G6(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return G6(e.getHours()%12||12,t.length)},H(e,t){return G6(e.getHours(),t.length)},m(e,t){return G6(e.getMinutes(),t.length)},s(e,t){return G6(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return G6(Math.trunc(r*10**(n-3)),t.length)}},q6={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},Zin={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return K6.y(e,t)},Y:function(e,t,n,r){let i=Jin(e,r),a=i>0?i:1-i;return t===`YY`?G6(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):G6(a,t.length)},R:function(e,t){return G6(Gin(e),t.length)},u:function(e,t){return G6(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return G6(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return G6(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return K6.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return G6(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=Xin(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):G6(i,t.length)},I:function(e,t,n){let r=qin(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):G6(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):K6.d(e,t)},D:function(e,t,n){let r=Win(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):G6(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return G6(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return G6(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return G6(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?q6.noon:r===0?q6.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?q6.evening:r>=12?q6.afternoon:r>=4?q6.morning:q6.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return K6.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):K6.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):G6(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):G6(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):K6.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):K6.s(e,t)},S:function(e,t){return K6.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return $in(r);case`XXXX`:case`XX`:return J6(r);default:return J6(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return $in(r);case`xxxx`:case`xx`:return J6(r);default:return J6(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+Qin(r,`:`);default:return`GMT`+J6(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+Qin(r,`:`);default:return`GMT`+J6(r,`:`)}},t:function(e,t,n){return G6(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return G6(+e,t.length)}};function Qin(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+G6(a,2)}function $in(e,t){return e%60==0?(e>0?`-`:`+`)+G6(Math.abs(e)/60,2):J6(e,t)}function J6(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=G6(Math.trunc(r/60),2),a=G6(r%60,2);return n+i+t+a}var ean=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},tan=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},nan={p:tan,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return ean(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,ean(r,t)).replace(`{{time}}`,tan(i,t))}},ran=/^D+$/,ian=/^Y+$/,aan=[`D`,`DD`,`YY`,`YYYY`];function oan(e){return ran.test(e)}function san(e){return ian.test(e)}function can(e,t,n){let r=lan(e,t,n);if(console.warn(r),aan.includes(e))throw RangeError(r)}function lan(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function uan(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function dan(e){return!(!uan(e)&&typeof e!=`number`||isNaN(+H2(e)))}var fan=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pan=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,man=/^'([^]*?)'?$/,han=/''/g,gan=/[a-zA-Z]/;function Y6(e,t,n){let r=j6(),i=n?.locale??r.locale??Bin,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=H2(e,n?.in);if(!dan(s))throw RangeError(`Invalid time value`);let c=t.match(pan).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=nan[t];return n(e,i.formatLong)}return e}).join(``).match(fan).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:_an(e)};if(Zin[t])return{isToken:!0,value:e};if(t.match(gan))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&san(a)||!n?.useAdditionalDayOfYearTokens&&oan(a))&&can(a,t,String(e));let o=Zin[a[0]];return o(s,a,i.localize,l)}).join(``)}function _an(e){let t=e.match(man);return t?t[1].replace(han,`'`):e}var van=`mmol/L`,yan=`mg/dL`,ban=[0,30],xan=[0,540],San={low:3.9,high:10},Can={low:70,high:180},X6=e=>{if(e===Y.BloodGlucoseUnit.MMOL_L)return{text:van,graphLimits:ban,inputMin:Y.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,inputMax:Y.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL,decimalPlaces:1,placeholder:`-.-`,targetInterval:{low:San.low,high:San.high}};if(e===Y.BloodGlucoseUnit.MG_DL)return{text:yan,graphLimits:xan,inputMin:20,inputMax:600,decimalPlaces:0,placeholder:`-`,targetInterval:{low:Can.low,high:Can.high}};throw Error(`[glucose::getBGConstants] Unsupported glucose unit! ${e}`)};function wan(e,t,n){return V2(n?.in||e,+H2(e)+t)}function Tan(e,t,n){return wan(e,t*d5t,n)}function Ean(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Dan(e,t){return H2(e)-+H2(t)}function Oan(e,t,n){let r=Dan(e,t)/u5t;return Ean(n?.roundingMethod)(r)}function kan(e){return e<=29?`0-29`:e<=45?`30-45`:e<=60?`46-60`:`61-120`}function Aan(e,t){let n=new Date,r=Oan(U2(Tan(new Date(e),1.5),t),n),i=Math.floor(r/60),a=r%60;return i>0?`${i}${LK(`activity_card__active_hour`)} ${a}${LK(`activity_card__active_min`)}`:`${a} ${LK(`activity_card__active_min`)}`}var Z6={light:()=>LK(`activity_intensity_1`),moderate:()=>LK(`activity_intensity_2`),hard:()=>LK(`activity_intensity_3`)},jan=van,Man=0,Nan=8,Pan=1,Fan=()=>({displayUnit:jan,inputMin:Man,inputMax:Nan,decimalPlaces:Pan});O2t.base900,f0.noRisk,f0.lowRisk,f0.moderateRisk,f0.highRisk;function Q6(e,t,n){if(t===n)return e;switch(n){case Y.BloodGlucoseUnit.MG_DL:return e*Y.CONSTANTS.MGDL_PER_MMOLL_BGL;case Y.BloodGlucoseUnit.MMOL_L:return e*Y.CONSTANTS.MMOLL_PER_MGDL_BGL;default:throw Error(`[conversionGlucose::convertBGL] Unsupported glucose unit! ${n}`)}}function Ian(e,t){let{decimalPlaces:n}=X6(t);return(Math.round(e*10)/10).toFixed(n)}function $6(e,t,n){return Ian(Q6(e,t,n),n)}var Lan=H4t({entry_timestamp:l2([B4t(),z4t()]),settings_uuid:z4t(),insulin_entered_units:l2([s2(),c2()]),carbohydrates_entered_grams:l2([s2(),c2()]),blood_glucose_millimolar:l2([s2(),c2()]),blood_ketones_millimolar:l2([s2(),c2(),V4t()]),event_uuid:l2([z4t(),c2(),V4t()])});`${v0.textPdf}${v0.textPdf}${v0.textPdf}${v0.textPdf}`;var Ran=e=>{Lan.parse(e);let{blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:r,blood_ketones_millimolar:i}=e,{inputMax:a,inputMin:o}=X6(Y.BloodGlucoseUnit.MMOL_L),{inputMax:s}=Fan();if(t!==null&&t>a)throw Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is greater than ${a}`);if(t!==null&&t<o)throw Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is less than ${o}`);if(i!==null&&i>s)throw Error(`[LogbookUtils::validateLogbook] blood_ketones_millimolar is greater than ${s}`);let c={blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:r,blood_ketones_millimolar:i};function l(e){return e!==null&&e<0}if(Object.entries(c).forEach(([e,t])=>{if(l(t))throw Error(`[LogbookUtils::validateLogbook] ${e} is less than 0`)}),e.event_uuid)try{F6.getByUUID(e.event_uuid)}catch{e.event_uuid=null}return!0},zan=e=>({...e,client_timestamp:e.client_timestamp.toISOString(),entry_timestamp:e.entry_timestamp.toISOString(),server_timestamp:e.server_timestamp?.toISOString()??null,is_deleted:e.is_deleted?.toISOString()??null}),Ban=e=>({...e,client_timestamp:new Date(e.client_timestamp),entry_timestamp:new Date(e.entry_timestamp),server_timestamp:e.server_timestamp?new Date(e.server_timestamp):null,is_deleted:e.is_deleted?new Date(e.is_deleted):null}),Van=e=>({active_insulin_source_logbook_ids:[],active_insulin:null,activity_reduction:null,blood_glucose_millimolar_sample_id:null,blood_glucose_millimolar:null,glucose_sample_source_id:null,blood_ketones_millimolar:null,carbohydrates_entered_grams:null,carbohydrates_sample_id:null,carbohydrates_input_grams:null,carbohydrates_manual_grams:null,carbohydrates_food_grams:null,food_intake_id:null,carbohydrates_overwritten_suggested_grams:null,carbohydrates_suggested_grams:null,client_timestamp:new Date,client_version:``,device_and_os:``,entry_timestamp:new Date,event_uuid:null,insulin_entered_units:null,insulin_suggested_units:null,is_bolus_calculation:!1,is_deleted:null,overwritten_by_id:null,server_timestamp:null,server_version:null,settings_uuid:``,timezone:``,utc_timezone_offset:null,uuid:``,note_id:null,...e}),Han=new Set,Uan=e=>{Han.forEach(t=>{try{t(e)}catch(e){console.error(`[logbookEvents] listener failed`,e)}})},Wan=e=>{Uan({type:`created`,entry:e})},Gan=(e,t)=>{Uan({type:`updated`,oldEntry:e,newEntry:t})},Kan=e=>{Uan({type:`deleted`,entry:e})};V();var qan=e=>{let t={...e};return delete t.carbohydrates_modified_suggested_grams,delete t.mood,delete t.smart_pen_sync_timestamp,t},Jan=class{constructor(){PK.delete(`logbook/unsuccessful`)}async addLogbook(e,t){let n=t?this.getLogbookByUUID(t):null;try{e.uuid=K2(),e.client_timestamp=new Date,e.client_version=x6,e.device_and_os=`${z.OS} ${z.Version}`;let r=n8();if(t)e.settings_uuid=this.getLogbookByUUID(t).settings_uuid,r.edited.push({oldUUID:t,newUUID:e.uuid}),t8(t);else{let{uuid:t}=H6;if(!t)throw Error(`[LogbookManager::addLogbook] settingsUUID must be defined`);e.settings_uuid=t}return e.utc_timezone_offset=S5t(),e.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,r.created.push(e),PK.set(`logbook/pendingChanges`,JSON.stringify(r)),e8(e),n===null?Wan(e):Gan(n,e),VK?await this.syncWeb():a8.syncAll().catch(console.error),e}catch(r){return console.error(r),VK&&(t?(t8(e.uuid),n!==null&&e8(n),r8(e.uuid,t)):(t8(e.uuid),r8(e.uuid))),null}}deleteLogbook=async e=>{let t=this.getLogbookByUUID(e);try{t.food_intake_id&&await win(t.food_intake_id).catch(console.error);let n=n8();return n.deleted.push(e),PK.set(`logbook/pendingChanges`,JSON.stringify(n)),t8(e),Kan(t),VK?await this.syncWeb():a8.syncAll().catch(console.error),!0}catch(n){return console.error(n),VK&&(e8(t),r8(e)),!1}};syncWeb=async()=>{let e=n8(),t=e=>({method:Y.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}}),n=`${NK.HEDIA_API_URL_V2}/logbooks`,r=await w6(n,t(e));await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.POST);let{created:i,last_sync_timestamp:a}=await r.json();for(let e of i)e8(e);let o={last_sync_timestamp:a,created:[],deleted:[],edited:[]};PK.set(`logbook/pendingChanges`,JSON.stringify(o))};sync=async()=>{let e=n8(),{created:t,deleted:n,edited:r,last_sync_timestamp:i}=e,a=[],o=[],s=[],c=[],l=[],u=e.last_sync_timestamp,d=async e=>{let t=`${NK.HEDIA_API_URL_V2}/logbooks`,n=await w6(t,{method:Y.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}});await y0(n,Y.StatusCode.OK,t,Y.HTTPRequestMethod.POST);let{created:r,deleted:i,last_sync_timestamp:a}=await n.json();c=c.concat(r),l=l.concat(i),u=a},f={created:[],deleted:[],edited:[]};!t.length&&!r.length&&!n.length&&await d({...f,last_sync_timestamp:i}).catch();for(let e of t)await d({...f,last_sync_timestamp:i,created:[e]}).catch(()=>a.push(e));for(let e of r)await d({...f,last_sync_timestamp:i,edited:[e]}).catch(()=>s.push(e));for(let e of n)await d({...f,last_sync_timestamp:i,deleted:[e]}).catch(()=>o.push(e));let p=n8(),m=t.filter(e=>!a.includes(e)).map(e=>e.uuid),h=r.filter(e=>!s.includes(e)).map(e=>e.oldUUID),g=n.filter(e=>!o.includes(e)),_={last_sync_timestamp:u,created:p.created.filter(e=>!m.includes(e.uuid)),deleted:p.deleted.filter(e=>!g.includes(e)),edited:p.edited.filter(e=>!h.includes(e.oldUUID))};PK.set(`logbook/pendingChanges`,JSON.stringify(_));for(let e of c)e8(e);for(let e of l)t8(e)};getRecentBoluses=(e=new Date(Date.now()-Y.Milliseconds.Hour*4),t=new Date)=>{let n=this.getLogbooks(e,t);return n.length===0?[]:n.filter(e=>e.insulin_entered_units!==null&&e.insulin_entered_units>0).map(({insulin_entered_units:e,entry_timestamp:t,uuid:n})=>({insulinDose:e,secondsPassed:(Date.now()-new Date(t).getTime())/1e3,id:n}))};getLogbooks=(e,t)=>{let n=Yan();if(e!==void 0){let t=e.getTime();n=n.filter(e=>e[1]>=t)}if(t!==void 0){let e=t.getTime();n=n.filter(t=>t[1]<e)}let r=[];for(let[e]of n)try{let t=this.getLogbookByUUID(e);try{Ran(t),r.push(t)}catch(t){console.error(t),r8(e),t8(e)}}catch(e){console.error(e)}return r};getLogbookByUUID=e=>{let t=PK.getString(`logbook/${e}`);if(!t)throw Error(`LogbookManager::getLogbookByUUID - could not find logbook in local storage`);let n=qan(JSON.parse(t));return{...n,entry_timestamp:new Date(n.entry_timestamp),server_timestamp:n.server_timestamp?new Date(n.server_timestamp):null,client_timestamp:new Date(n.client_timestamp)}}},e8=e=>{let{uuid:t}=e;if(!t)throw Error(`[LogbookManager::saveLocally] uuid must be defined`);t8(t);let n=Yan();n.push([t,new Date(e.entry_timestamp).getTime()]),n.sort((e,t)=>t[1]-e[1]),PK.set(`logbook/index`,JSON.stringify(n)),PK.set(`logbook/${e.uuid}`,JSON.stringify(e))},t8=e=>{let t=Yan().filter(([t])=>t!==e);PK.set(`logbook/index`,JSON.stringify(t)),PK.delete(`logbook/${e}`)},n8=()=>{let e=PK.getString(`logbook/pendingChanges`);if(!e)return{last_sync_timestamp:new Date(0).toISOString(),created:[],edited:[],deleted:[]};let t=JSON.parse(e);return{...t,created:t.created.map(e=>qan(e))}},r8=(e,t)=>{let{created:n,deleted:r,edited:i,last_sync_timestamp:a}=n8(),o={last_sync_timestamp:a,created:[...n].filter(({uuid:t})=>t!==e),edited:[...i].filter(({oldUUID:n,newUUID:r})=>n!==t&&r!==e),deleted:[...r].filter(t=>t!==e)};PK.set(`logbook/pendingChanges`,JSON.stringify(o))},Yan=()=>{let e=PK.getString(`logbook/index`);return e===void 0?[]:JSON.parse(e)},i8=new Jan,a8=new class{currentIsConnected=null;isSynchronizing=!1;isListenerAttached=!1;constructor(){this.setListener()}syncAll=async()=>{if(!this.isSynchronizing)try{this.isSynchronizing=!0,await H6.getUserSettings().catch(console.error),await F6.sync().catch(console.error),await i8.sync().catch(console.error),await sin.fetch().catch(console.error)}finally{this.isSynchronizing=!1}};handleConnectivity=async({isConnected:e,isInternetReachable:t})=>{let{accessToken:n}=z4.getState();this.currentIsConnected!==(e&&t)&&(this.currentIsConnected=e&&t,this.currentIsConnected&&n&&await this.syncAll())};setListener=()=>{!this.isListenerAttached&&!VK&&(s9t.addEventListener(this.handleConnectivity),this.isListenerAttached=!0)}};V();var{add:Xan,multiply:Zan}=jf;function o8(e,t,n){return Xan(Zan(e,t),Zan(e.interpolate({inputRange:[0,1],outputRange:[1,0]}),n))}V();var{add:Qan,multiply:s8}=jf;function $an({current:e,next:t,inverted:n,layouts:{screen:r}}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[r.width,0],extrapolate:`clamp`}),n),a=t?s8(t.progress.interpolate({inputRange:[0,1],outputRange:[0,r.width*-.3],extrapolate:`clamp`}),n):0,o=e.progress.interpolate({inputRange:[0,1],outputRange:[0,.07],extrapolate:`clamp`}),s=e.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:`clamp`});return{cardStyle:{transform:[{translateX:i},{translateX:a}]},overlayStyle:{opacity:o},shadowStyle:{shadowOpacity:s}}}function eon({inverted:e,...t}){return $an({...t,inverted:jf.multiply(e,-1)})}function ton({current:e,inverted:t,layouts:{screen:n}}){return{cardStyle:{transform:[{translateY:s8(e.progress.interpolate({inputRange:[0,1],outputRange:[n.height,0],extrapolate:`clamp`}),t)}]}}}function non({index:e,current:t,next:n,inverted:r,layouts:{screen:i},insets:a}){let o=z.OS===`ios`&&!z.isPad&&!z.isTV&&a.top>20,s=i.width>i.height,c=s?0:10,l=a.top,u=i.height/i.width,d=Qan(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0),f=e===0,p=s8(d.interpolate({inputRange:[0,1,2],outputRange:[i.height,f?0:c,(f?l:0)-c*u]}),r),m=d.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,.3,1,1]}),h=s?1:d.interpolate({inputRange:[0,1,2],outputRange:[1,1,i.width?1-c*2/i.width:1]}),g=s?0:f?d.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,0,o?38:0,10]}):10;return{cardStyle:{overflow:`hidden`,borderCurve:`continuous`,borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomLeftRadius:o?g:0,borderBottomRightRadius:o?g:0,marginTop:f?0:l,marginBottom:f?0:c,transform:[{translateY:p},{scale:h}]},overlayStyle:{opacity:m}}}function ron({current:e,inverted:t,layouts:{screen:n},closing:r}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[n.height*.08,0],extrapolate:`clamp`}),t);return{cardStyle:{opacity:o8(r,e.progress,e.progress.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1],extrapolate:`clamp`})),transform:[{translateY:i}]}}}function ion({current:e,next:t,inverted:n,layouts:{screen:r}}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[r.height,0],extrapolate:`clamp`}),n),a=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[r.height*(95.9/100)*-1,0],extrapolate:`clamp`}),n),o=t?s8(t.progress.interpolate({inputRange:[0,1],outputRange:[0,r.height*(2/100)*-1],extrapolate:`clamp`}),n):0,s=e.progress.interpolate({inputRange:[0,.36,1],outputRange:[0,.1,.1],extrapolate:`clamp`});return{containerStyle:{overflow:`hidden`,transform:[{translateY:i}]},cardStyle:{transform:[{translateY:a},{translateY:o}]},overlayStyle:{opacity:s}}}function aon({current:e,next:t,closing:n}){let r=Qan(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0);return{cardStyle:{opacity:r.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:o8(n,e.progress.interpolate({inputRange:[0,1],outputRange:[.925,1],extrapolate:`clamp`}),r.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.075]}))}]}}}function oon({current:e,next:t,inverted:n,closing:r}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[96,0],extrapolate:`clamp`}),n),a=t?s8(t.progress.interpolate({inputRange:[0,1],outputRange:[0,-96],extrapolate:`clamp`}),n):0;return{cardStyle:{opacity:o8(r,e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),e.progress),transform:[{translateX:i},{translateX:a}]}}}function son({current:e,inverted:t,layouts:{screen:n},closing:r}){let i=s8(e.progress.interpolate({inputRange:[0,1],outputRange:[n.height*.8,0],extrapolate:`clamp`}),t),a=o8(r,e.progress,e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`})),o=e.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:`clamp`});return{cardStyle:{opacity:a,transform:[{translateY:i}]},overlayStyle:{opacity:o}}}function con({current:{progress:e}}){return{cardStyle:{opacity:e.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})},overlayStyle:{opacity:e.interpolate({inputRange:[0,1],outputRange:[0,.5],extrapolate:`clamp`})}}}function lon(){return{}}V();var{add:c8,multiply:uon}=jf;function l8({current:e,next:t}){let n=c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0),r=n.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:r},rightButtonStyle:{opacity:r},titleStyle:{opacity:r},backgroundStyle:{opacity:n.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function don({current:e,next:t,direction:n,layouts:{screen:r}}){let i=n===`rtl`,a=[{translateX:c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0).interpolate({inputRange:[0,1,2],outputRange:i?[-r.width,0,r.width]:[r.width,0,-r.width]})}];return{leftButtonStyle:{transform:a},rightButtonStyle:{transform:a},titleStyle:{transform:a},backgroundStyle:{transform:a}}}function fon({current:e,next:t,direction:n,layouts:{screen:r}}){let i=n===`rtl`,a=[{translateX:c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0).interpolate({inputRange:[0,1,2],outputRange:i?[r.width,0,-r.width]:[-r.width,0,r.width]})}];return{leftButtonStyle:{transform:a},rightButtonStyle:{transform:a},titleStyle:{transform:a},backgroundStyle:{transform:a}}}function pon({current:e,next:t,layouts:{header:n}}){let r=[{translateY:c8(e.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}),t?t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:`clamp`}):0).interpolate({inputRange:[0,1,2],outputRange:[-n.height,0,-n.height]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function mon(){return{}}V();var u8={animation:`spring`,config:{stiffness:1e3,damping:500,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}},hon={animation:`timing`,config:{duration:350,easing:Cf.out(Cf.poly(5))}},gon={animation:`timing`,config:{duration:150,easing:Cf.in(Cf.linear)}},_on={animation:`timing`,config:{duration:425,easing:Cf.bezier(.20833,.82,.25,1)}},von={animation:`timing`,config:{duration:400,easing:Cf.bezier(.20833,.82,.25,1)}};Cf.bezier(.20833,.82,.25,1),Cf.bezier(.20833,.82,.25,1);var yon={animation:`timing`,config:{duration:250,easing:e=>Math.cos((e+1)*Math.PI)/2+.5}},bon={animation:`timing`,config:{duration:200,easing:e=>e===1?1:e**2}};V();var xon=28,Son=29,Con=34,d8={gestureDirection:`horizontal`,transitionSpec:{open:u8,close:u8},cardStyleInterpolator:$an,headerStyleInterpolator:l8},won={gestureDirection:`vertical`,transitionSpec:{open:u8,close:u8},cardStyleInterpolator:ton,headerStyleInterpolator:l8},Ton={gestureDirection:`vertical`,transitionSpec:{open:u8,close:u8},cardStyleInterpolator:non,headerStyleInterpolator:l8},Eon={gestureDirection:`vertical`,transitionSpec:{open:hon,close:gon},cardStyleInterpolator:ron,headerStyleInterpolator:l8},Don={gestureDirection:`vertical`,transitionSpec:{open:_on,close:_on},cardStyleInterpolator:ion,headerStyleInterpolator:l8},Oon={gestureDirection:`horizontal`,transitionSpec:{open:von,close:von},cardStyleInterpolator:aon,headerStyleInterpolator:l8},kon={gestureDirection:`horizontal`,transitionSpec:{open:hon,close:gon},cardStyleInterpolator:oon,headerStyleInterpolator:l8},Aon={gestureDirection:`vertical`,transitionSpec:{open:yon,close:bon},cardStyleInterpolator:son,headerStyleInterpolator:l8},jon={gestureDirection:`vertical`,transitionSpec:{open:yon,close:bon},cardStyleInterpolator:con,headerStyleInterpolator:l8},f8=z.select({ios:d8,android:Number(z.Version)>=Con?kon:Number(z.Version)>=Son?Oon:Number(z.Version)>=xon?Don:Eon,default:Oon}),Mon=z.select({ios:Ton,default:Aon}),Non={...d8,cardStyleInterpolator:eon},Pon=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC`,Fon=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABVCAQAAAChx3/YAAACVElEQVR42t3ZP2sUURQFcI0xm9gEg4I2GjSIX0DFRkFsbE20DtqIfgBRMCalpV9CUUEQQWIUBBFBEGKze899s+smO2HFRhtNYv5d2eqA284pnm/7/fEeM/PuPXdX1Wt5v03jVVpH8FcpEAN+Mj3nnwuQ2IMpm8eGACFRTPkiNhEyJPYWV/HFtxCVIyRwG58amwgZUh/yO7ZkPUKFRM3v2jK2ETIkavawXpKoEiFxHx0elABpD9usrXAXAqQcaT4gIUFiqDkN2BZChhQ1XIfbDqJyhITfRAKJChESt7wkIUDeDaZzqYFAyJCiVpx3QwiR9nDzkgMhRGLQT/OgJEhRq59JhhAgJHDBHSFASKSLqYUQIuVIcTY1EUKkuy9d7u1CgZCY9BWEDIndxUFcSSQUSGsU93qEACFRzKQfCCHSPuSz+IlQICQe4zt2hMjSYTyxXxYIGfL1KJ6ChAJpj+M9fltAgHAXr7FKQoAUx9MC1kgIkOZE+mjrJATIt/H0wnhQCqQ+YS9tFQEdUo75WyehQXyO/aoO+YCQI+gi/o+d+JxtyJFyLL3h05Xpe6J/4/u/XVhTMQzDjtkCmXzvE96MproZubpHeMdnXK2w7nrEuivXCpK1sM+AtXCWVT37Ez9QZ3+SbafV3zNm3v2yjyejTySyzlaYEp1iSgR93pV5cscMsq5EmKZ2eBEIc2F3MrKEu7jGhDvfrL5/6pDx/ISPwAwnQdKZVqPD3eQ6neufM+Y8MeXs1xc5+81yik1mwCZt3v+IEDKtE3iWtkUI1+fRdOPfKvovc6zWpmERVBkAAAAASUVORK5CYII=`,Ion=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAACTElEQVR42sWZTYoaQRiGH2kR4hEUc4QIGjBnUEEPoDPLqCfQO8REdwq61+1oDqBewAGz0MUszd5FHGfzZTZSJDRVdnW39T5b4X2hy6rvh8BKU6XHkDlrDpzeObBmzpAeVdLEqI+0+ckZ0XBmSYscEStFh2ckAM90SBGJPJq8IBa80MQjlBLU2SEh2FEngaWybJAI2JDFQl84IhFxpERAPXJBIuTCIzcryQ8kBvokb7NfIDHxdEuE70iM9M3fXmLmQX/yL0jMvFICf2X5jdyBIxl8lGCD3ImN3+1YR+5Ijf/k8Qu5Izs8/lFTe4uN+ESRCW8IZt6YUCDPSHukG6CU0j64I64qc8F86Za5aqx9rFNwVQfRkAefCGZ7yCMaOlxlqHaK4BPBbA+fEQ1bVeuJlgn4RDDbwxTRkgOAtvFQlX0imO3LxkPbAoCl+WBpImh/YWABkOaM2EWwtFecSUMVQWwjWNorKtBDwkSwsld0YYiEiWBlrxjAHAkTwcpeMYM1YhnB3l6xggNiGcHeXrGHE2IZwd5ecXIewPkncH4Inf8NnV9Ezq9i54+R2+f4Dx+cFyTuSzL3Ram5LC9Yl+VFfVnuvDFx3prd3pyOyVNkenNzOqVAnvHtzSl47Jy25+4HFLgf0UCWo6MhlfsxnftBpftRrVKSJ7fDakjSR2LgG0l3C4tXHgiokquVjVImsqVVBkslqIVe29VIEEoeDevFZQMvutXtFgnAljYpIlaOFkvj8nrBV3LEqDQVugyYsWLP6Z09K2YM6FIJvr7/C289zVf6dsfbAAAAAElFTkSuQmCC`,Lon=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgBAMAAAAQtmoLAAAAFVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAASAQCkAAAABnRSTlMANO8Qy7qrh7/eAAAA4ElEQVR4Xu3WvQ3CQAxHcRALoGxAQ00RJkBiASQGQPDffwSU+t3pFe4in9xFuV8+fLYPvTo69hv38wg4vmbA6XkZAcv3NgHWfAbE8ZrHDEgGxJJMiDXZCAKZEO9kIwgkv6GwBMQGYBtck11ICEBCARIEhCAgBAAjACgBwAgASgAwAoASAIwAoAQAIwAYAcAIAEYAEAKAEASccMBv8Ecqv7R/1vKP89QoJ5+nd/kA+REtFwEvM+VC5qWyXIy93JcbiresclP0tltt7D46VIcTH3+KA5aPcPUh0cfQjo6Ona4/2hPAtwOzeV0AAAAASUVORK5CYII=`,Ron=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAADZ0lEQVR42u3bS0hUURzH8W+mzrKwpDJ6gb18VEJvo3da1CqoFrWICoIsWvROs1oELQpqUYsI2lRYFCFGVPR+U7QJalMU9NAMKzRC1NETSBDevwedOXPOnYnz+e0E/+f+7rlzZ+bC4Hme53melxz6pOKiw1hGHjmdGYziK7WdeUMNX0hqE6nkJUqbDl5QTgFJaTbPUL3MI2aSVPKpQcWYK4wjKUQ4SRQVR6IcJ4OQDeIJyiD3GUiIiviIMswHCgnJMn6jekgHqsf8opQQFKE//DpOsZIZjCCTCCOZwSpOU4/SpIkCHBvER80ZP8t0+gBSGsVUafbkPQNxKKJ56d5gEj2ZzG0UMvfIwJkTKJEW1tFbG2lFiRzFkTzkfb+eYmIxlwYxo5VcnKhGHv4oYjWa72LOBRyYhbx4ionHPNrELWAK1smX73ritUnMuoNlBWLJm5h4IOblYlW52PQiTEwXBbZh1YvAcucwdTkw8SEWDRXvozMxNT8wsZ1srNkobp9pmErnR2DqWqw5FljqNIlwNjD1MIbS0Mmhq1uYk1Ny3BX4RCJ8Dq9AHYlQS1dDbBWQo2stFLC6A8rCg0Oxns2BdQk8V/p9rTcu4GSz9VO+uiswnEQYFt4OLCIRSsSFaq3Aa/FkqC+mMllCV4+wZrD4MDcbUyXiiWl/LHoaWO4Spq4GJj7Gql2oQKZhYo6YV4lVY5HPl008E98GxmDZXVFhC/HaIWZVYd1UsWiUhcRjKe3iG3YhDlwUFX4wnlgV0ijmVONELm1i6Z8sivHsy8NvJh9HjqBEomyN4dpvR4lswZl0zSPyJ8yiJ3N5jkLmKk5l8Q7VbaopIQOQMlnMNc1/fSMbx/JoRGnSSBXrKaWQLAYwgVI2cJEmlDZtrCZChEwcWoCsYJ6DODSetyjD1NMaZoUsbqEMUkM2K8RfD+BQOodpQcWRZjb/naDCrQCjOEcHKoZ0cIV8EAVCqwBF3ET1KlHOU8A/fVHdZj/OjWQrd4miv1k+pILRBO0Ls4KUxRoOcYbrvKKBBl5zh/McZTn90KnQVKgk2fzPFco1Ffb5Cg7t1VSo8BUc2qOpUO4rOLRbU2Gvr+DQLk2FPb6CQzs1FXaneoUyUsiO1D58WaGMFLRdHH6KVigjhW2jzP8szPM8z/M8z0t2fwDen7r/jhTzQwAAAABJRU5ErkJggg==`,zon=s(((e,t)=>{t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}})),Bon=s(((e,t)=>{t.exports=function(e){return!e||typeof e==`string`?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`)}})),Von=s(((e,t)=>{var n=Bon(),r=Array.prototype.concat,i=Array.prototype.slice,a=t.exports=function(e){for(var t=[],a=0,o=e.length;a<o;a++){var s=e[a];n(s)?t=r.call(t,i.call(s)):t.push(s)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}})),Hon=s(((e,t)=>{var n=zon(),r=Von(),i=Object.hasOwnProperty,a=Object.create(null);for(var o in n)i.call(n,o)&&(a[n[o]]=o);var s=t.exports={to:{},get:{}};s.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case`hsl`:n=s.get.hsl(e),r=`hsl`;break;case`hwb`:n=s.get.hwb(e),r=`hwb`;break;default:n=s.get.rgb(e),r=`rgb`;break}return n?{model:r,value:n}:null},s.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,a=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,l=[0,0,0,1],u,d,f;if(u=e.match(r)){for(f=u[2],u=u[1],d=0;d<3;d++){var p=d*2;l[d]=parseInt(u.slice(p,p+2),16)}f&&(l[3]=parseInt(f,16)/255)}else if(u=e.match(t)){for(u=u[1],f=u[3],d=0;d<3;d++)l[d]=parseInt(u[d]+u[d],16);f&&(l[3]=parseInt(f+f,16)/255)}else if(u=e.match(a)){for(d=0;d<3;d++)l[d]=parseInt(u[d+1],0);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(o)){for(d=0;d<3;d++)l[d]=Math.round(parseFloat(u[d+1])*2.55);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(s))return u[1]===`transparent`?[0,0,0,0]:i.call(n,u[1])?(l=n[u[1]],l[3]=1,l):null;else return null;for(d=0;d<3;d++)l[d]=c(l[d],0,255);return l[3]=c(l[3],0,1),l},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=r(arguments);return`#`+l(e[0])+l(e[1])+l(e[2])+(e[3]<1?l(Math.round(e[3]*255)):``)},s.to.rgb=function(){var e=r(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},s.to.rgb.percent=function(){var e=r(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+i+`%)`:`rgba(`+t+`%, `+n+`%, `+i+`%, `+e[3]+`)`},s.to.hsl=function(){var e=r(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},s.to.hwb=function(){var e=r(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},s.to.keyword=function(e){return a[e.slice(0,3)]};function c(e,t,n){return Math.min(Math.max(t,e),n)}function l(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}})),Uon=s(((e,t)=>{var n=zon(),r={};for(let e of Object.keys(n))r[n[e]]=e;var i={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};t.exports=i;for(let e of Object.keys(i)){if(!(`channels`in i[e]))throw Error(`missing channels property: `+e);if(!(`labels`in i[e]))throw Error(`missing channel labels property: `+e);if(i[e].labels.length!==i[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:n})}i.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},i.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[i*360,a*100,l*100]},i.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],a=i.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[a,o*100,r*100]},i.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),a=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[a*100,o*100,s*100,i*100]};function a(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}i.rgb.keyword=function(e){let t=r[e];if(t)return t;let i=1/0,o;for(let t of Object.keys(n)){let r=n[t],s=a(e,r);s<i&&(i=s,o=t)}return o},i.keyword.rgb=function(e){return n[e]},i.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let i=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]},i.rgb.lab=function(e){let t=i.rgb.xyz(e),n=t[0],r=t[1],a=t[2];return n/=95.047,r/=100,a/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*r-16,500*(n-r),200*(r-a)]},i.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=r*255,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+(i-s)*6*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=o*255;return c},i.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;let o=(r+n)/2;return[t,(r===0?2*i/(a+i):2*n/(r+n))*100,o*100]},i.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},i.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,a*100,o*100]},i.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,o&1&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c;break}return[l*255,u*255,d*255]},i.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},i.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]},i.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},i.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;a=(t+16)/116,i=n/500+a,o=a-r/200;let s=a**3,c=i**3,l=o**3;return a=s>.008856?s:(a-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},i.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},i.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},i.rgb.ansi16=function(e,t=null){let[n,r,a]=e,o=t===null?i.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},i.ansi256.rgb=function(e){if(e>=232){let t=(e-232)*10+8;return[t,t,t]}e-=16;let t;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.substring(t.length)+t},i.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},i.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[c*360,o*100,s*100]},i.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},i.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},i.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},i.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},i.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},i.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}})),Won=s(((e,t)=>{var n=Uon();function r(){let e={},t=Object.keys(n);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function i(e){let t=r(),i=[e];for(t[e].distance=0;i.length;){let e=i.pop(),r=Object.keys(n[e]);for(let n=r.length,a=0;a<n;a++){let n=r[a],o=t[n];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,i.unshift(n))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let r=[t[e].parent,e],i=n[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),i=a(n[t[o].parent][o],i),o=t[o].parent;return i.conversion=r,i}t.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}})),Gon=s(((e,t)=>{var n=Uon(),r=Won(),i={},a=Object.keys(n);function o(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function s(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}a.forEach(e=>{i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});let t=r(e);Object.keys(t).forEach(n=>{let r=t[n];i[e][n]=s(r),i[e][n].raw=o(r)})}),t.exports=i})),Kon=s(((e,t)=>{var n=Hon(),r=Gon(),i=[`keyword`,`gray`,`hex`],a={};for(let e of Object.keys(r))a[[...r[e].labels].sort().join(``)]=e;var o={};function s(e,t){if(!(this instanceof s))return new s(e,t);if(t&&t in i&&(t=null),t&&!(t in r))throw Error(`Unknown model: `+t);let c,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof s)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=n.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=r[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0){this.model=t||`rgb`,l=r[this.model].channels;let n=Array.prototype.slice.call(e,0,l);this.color=p(n,l),this.valpha=typeof e[l]==`number`?e[l]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let n=t.sort().join(``);if(!(n in a))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=a[n];let{labels:i}=r[this.model],o=[];for(c=0;c<i.length;c++)o.push(e[i[c]]);this.color=p(o)}if(o[this.model])for(l=r[this.model].channels,c=0;c<l;c++){let e=o[this.model][c];e&&(this.color[c]=e(this.color[c]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}s.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in n.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=r[this.model],{labels:n}=r[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new s([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new s([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?r[this.model].keyword(this.color):new s(e)},hex(e){return e===void 0?n.to.hex(this.rgb().round().color):new s(e)},hexa(e){if(e!==void 0)return new s(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r=`0`+r),n.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return s.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),c=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-c;return s.rgb(c*n.red()+l*r.red(),c*n.green()+l*r.green(),c*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(r)){if(i.includes(e))continue;let{channels:t}=r[e];s.prototype[e]=function(...t){return this.model===e?new s(this):t.length>0?new s(t,e):new s([...f(r[this.model][e].raw(this.color)),this.valpha],e)},s[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=p(n,t)),new s(r,e)}}function c(e,t){return Number(e.toFixed(t))}function l(e){return function(t){return c(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(o[r]||(o[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e){return Array.isArray(e)?e:[e]}function p(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}t.exports=s}));V();var qon=jf.createAnimatedComponent(Kp),Jon=z.OS===`android`&&z.Version>=21,Yon=z.OS!==`web`;function Xon({disabled:e,onPress:t,onPressIn:n,onPressOut:r,android_ripple:i,pressColor:a,pressOpacity:o=.3,hoverEffect:s,style:c,children:l,...u},d){let{dark:f}=r$(),[p]=H.useState(()=>new jf.Value(1)),m=(e,t)=>{Jon||jf.timing(p,{toValue:e,duration:t,easing:Cf.inOut(Cf.quad),useNativeDriver:Yon}).start()};return(0,W.jsxs)(qon,{ref:d,accessible:!0,role:z.OS===`web`&&u.href!=null?`link`:`button`,onPress:e?void 0:e=>{if(z.OS===`web`&&u.href!==null){let n=`metaKey`in e&&e.metaKey||`altKey`in e&&e.altKey||`ctrlKey`in e&&e.ctrlKey||`shiftKey`in e&&e.shiftKey,r=`button`in e?e.button==null||e.button===0:!0,i=e.currentTarget&&`target`in e.currentTarget?[void 0,null,``,`self`].includes(e.currentTarget.target):!0;!n&&r&&i&&(e.preventDefault(),t?.(e))}else t?.(e)},onPressIn:e?void 0:e=>{m(o,0),n?.(e)},onPressOut:e?void 0:e=>{m(1,200),r?.(e)},android_ripple:Jon&&!e?{color:a===void 0?f?`rgba(255, 255, 255, .32)`:`rgba(0, 0, 0, .32)`:a,...i}:void 0,style:[{cursor:(z.OS===`web`||z.OS===`ios`)&&!e?`pointer`:`auto`,opacity:!Jon&&!e?p:1},c],...u,children:[e?null:(0,W.jsx)($on,{...s}),l]})}var p8=H.forwardRef(Xon);p8.displayName=`PlatformPressable`;var Zon=String.raw,m8=`__react-navigation_elements_Pressable_hover`,Qon=Zon`
868
868
  .${m8} {
869
869
  position: absolute;
870
870
  top: 0;
@@ -886,7 +886,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
886
886
  opacity: var(--overlay-active-opacity);
887
887
  }
888
888
  `,$on=({color:e,hoverOpacity:t=.08,activeOpacity:n=.16})=>z.OS!==`web`||e==null?null:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`style`,{href:m8,precedence:`elements`,children:Qon}),(0,W.jsx)(`div`,{className:m8,style:{"--overlay-color":e,"--overlay-hover-opacity":t,"--overlay-active-opacity":n}})]});V();function esn({style:e,...t}){let{colors:n,fonts:r}=r$();return(0,W.jsx)(Id,{...t,style:[{color:n.text},r.regular,e]})}V();function tsn(e,t,n){let r,i=z.OS===`ios`&&n>50?n-(5+1/rd.get()):n,a=e.width>e.height;return r=z.OS===`ios`?z.isPad||z.isTV?t?56:50:a?32:t?56:44:64,r+i}function nsn(e,t){return typeof e.headerTitle==`string`?e.headerTitle:e.title===void 0?t:e.title}var rsn=s((e=>{var t=m();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useSyncExternalStore,a=t.useRef,o=t.useEffect,s=t.useMemo,c=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}})),isn=s(((e,t)=>{t.exports=rsn()}));V();var asn=isn(),osn=H.createContext(void 0);function ssn(e,t){let n=H.useContext(osn);if(n==null)throw Error(`useFrameSize must be used within a FrameSizeProvider`);return(0,asn.useSyncExternalStoreWithSelector)(t?n.subscribeThrottled:n.subscribe,n.getCurrent,n.getCurrent,e)}function csn({initialFrame:e,render:t}){let n=H.useRef({width:e.width,height:e.height}),r=H.useRef(new Set),i=HQ(()=>n.current),a=HQ(e=>(r.current.add(e),()=>{r.current.delete(e)})),o=HQ(e=>{let t,n=!1,r=!1,i=a(()=>{clearTimeout(t),n=!0,r?t=setTimeout(()=>{n&&(n=!1,e())},100):(r=!0,setTimeout(function(){r=!1},100),n=!1,e())});return()=>{i(),clearTimeout(t)}}),s=H.useMemo(()=>({getCurrent:i,subscribe:a,subscribeThrottled:o}),[a,o,i]),c=HQ(e=>{n.current.height===e.height&&n.current.width===e.width||(n.current={width:e.width,height:e.height},r.current.forEach(e=>e()))}),l=H.useRef(null);return H.useEffect(()=>{z.OS!==`web`&&l.current?.measure((e,t,n,r)=>{c({width:n,height:r})})},[c]),(0,W.jsxs)(osn.Provider,{value:s,children:[z.OS===`web`?(0,W.jsx)(lsn,{onChange:c}):null,t({ref:l,onLayout:e=>{let{width:t,height:n}=e.nativeEvent.layout;c({width:t,height:n})}})]})}function lsn({onChange:e}){let t=H.useRef(null);return H.useEffect(()=>{if(t.current==null)return;let n=t.current.getBoundingClientRect();e({width:n.width,height:n.height});let r=new ResizeObserver(t=>{let n=t[0];if(n){let{width:t,height:r}=n.contentRect;e({width:t,height:r})}});return r.observe(t.current),()=>{r.disconnect()}},[e]),(0,W.jsx)(`div`,{ref:t,style:{position:`absolute`,left:0,right:0,top:0,bottom:0,pointerEvents:`none`,visibility:`hidden`}})}function usn({children:e}){return e}V();function dsn({disabled:e,onPress:t,pressColor:n,pressOpacity:r,accessibilityLabel:i,testID:a,style:o,href:s,children:c},l){return(0,W.jsx)(p8,{ref:l,disabled:e,href:s,"aria-label":i,testID:a,onPress:t,pressColor:n,pressOpacity:r,android_ripple:fsn,style:[psn.container,e&&psn.disabled,o],hitSlop:z.select({ios:void 0,default:{top:16,right:16,bottom:16,left:16}}),children:c})}var h8=H.forwardRef(dsn);h8.displayName=`HeaderButton`;var fsn={borderless:!0,foreground:z.OS===`android`&&z.Version>=23,radius:20},psn=R.create({container:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:8,borderRadius:10,borderCurve:`continuous`},disabled:{opacity:.5}});V();function g8({source:e,style:t,...n}){let{colors:r}=r$(),{direction:i}=l$();return(0,W.jsx)(gd,{source:e,resizeMode:`contain`,fadeDuration:0,tintColor:r.text,style:[gsn.icon,i===`rtl`&&gsn.flip,t],...n})}var msn=z.OS===`ios`?21:24,hsn=z.OS===`ios`?8:3,gsn=R.create({icon:{width:msn,height:msn,margin:hsn},flip:{transform:`scaleX(-1)`}});V();function _sn({disabled:e,allowFontScaling:t,backImage:n,label:r,labelStyle:i,displayMode:a=z.OS===`ios`?`default`:`minimal`,onLabelLayout:o,onPress:s,pressColor:c,pressOpacity:l,screenLayout:u,tintColor:d,titleLayout:f,truncatedLabel:p=`Back`,accessibilityLabel:m=r&&r!==`Back`?`${r}, back`:`Go back`,testID:h,style:g,href:_}){let{colors:v,fonts:y}=r$(),{direction:b}=l$(),[x,S]=H.useState(null),[C,w]=H.useState(null);return(0,W.jsx)(h8,{disabled:e,href:_,accessibilityLabel:m,testID:h,onPress:()=>{s&&requestAnimationFrame(()=>s())},pressColor:c,pressOpacity:l,style:[_8.container,g],children:(0,W.jsxs)(H.Fragment,{children:[n?n({tintColor:d??v.text}):(0,W.jsx)(g8,{source:Pon,tintColor:d,style:[_8.icon,a!==`minimal`&&_8.iconWithLabel]}),(()=>{if(a===`minimal`)return null;let e=f&&u?(u.width-f.width)/2-(vsn+hsn):null,s=a==="default"?r:p,c=e&&x&&C?e>x?s:e>C?p:null:s,l=[y.regular,_8.label,i],m=[l,{position:`absolute`,top:0,left:0,opacity:0}],h=(0,W.jsxs)(B,{style:_8.labelWrapper,children:[r&&a==="default"?(0,W.jsx)(jf.Text,{style:m,numberOfLines:1,onLayout:e=>S(e.nativeEvent.layout.width),children:r}):null,p?(0,W.jsx)(jf.Text,{style:m,numberOfLines:1,onLayout:e=>w(e.nativeEvent.layout.width),children:p}):null,c?(0,W.jsx)(jf.Text,{accessible:!1,onLayout:o,style:[d?{color:d}:null,l],numberOfLines:1,allowFontScaling:!!t,children:c}):null]});return n||z.OS!==`ios`?h:(0,W.jsx)(usn,{maskElement:(0,W.jsxs)(B,{style:[_8.iconMaskContainer,u?{minWidth:u.width/2-27}:null],children:[(0,W.jsx)(gd,{source:Fon,resizeMode:`contain`,style:[_8.iconMask,b===`rtl`&&_8.flip]}),(0,W.jsx)(B,{style:_8.iconMaskFillerRect})]}),children:h})})()]})})}var vsn=z.OS===`ios`?13:24,ysn=z.OS===`ios`?22:3,_8=R.create({container:{paddingHorizontal:0,minWidth:R.hairlineWidth,...z.select({ios:null,default:{marginVertical:3,marginHorizontal:11}})},label:{fontSize:17,letterSpacing:.35},labelWrapper:{flexDirection:`row`,alignItems:`flex-start`,marginEnd:hsn},icon:{width:vsn,marginEnd:ysn},iconWithLabel:z.OS===`ios`?{marginEnd:6}:{},iconMaskContainer:{flex:1,flexDirection:`row`,justifyContent:`center`},iconMaskFillerRect:{flex:1,backgroundColor:`#000`},iconMask:{height:21,width:13,marginStart:-14.5,marginVertical:12,alignSelf:`center`},flip:{transform:`scaleX(-1)`}});V();function bsn({style:e,...t}){let{colors:n,dark:r}=r$();return(0,W.jsx)(jf.View,{style:[xsn.container,{backgroundColor:n.card,borderBottomColor:n.border,...z.OS===`ios`&&{shadowColor:r?`rgba(255, 255, 255, 0.45)`:`rgba(0, 0, 0, 1)`}},e],...t})}var xsn=R.create({container:{flex:1,...z.select({android:{elevation:4},ios:{shadowOpacity:.3,shadowRadius:0,shadowOffset:{width:0,height:R.hairlineWidth}},default:{borderBottomWidth:R.hairlineWidth}})}}),v8=u(Kon());V();var Ssn={text:`text`,number:`numeric`,phone:`tel`,email:`email`},Csn=z.OS!==`web`;function wsn({visible:e,inputType:t,autoFocus:n=!0,autoCapitalize:r,placeholder:i=`Search`,cancelButtonText:a=`Cancel`,enterKeyHint:o=`search`,onChangeText:s,onClose:c,tintColor:l,style:u,...d},f){let p=XQ(),{dark:m,colors:h,fonts:g}=r$(),[_,v]=H.useState(``),[y,b]=H.useState(e),[x]=H.useState(()=>new jf.Value(+!!e)),[S]=H.useState(()=>new jf.Value(0)),C=H.useRef(e),w=H.useRef(!1),T=H.useRef(null);H.useEffect(()=>{if(e!==C.current)return jf.timing(x,{toValue:+!!e,duration:100,useNativeDriver:Csn}).start(({finished:t})=>{t&&(b(e),C.current=e)}),()=>{x.stopAnimation()}},[e,x]);let E=_!==``;H.useEffect(()=>{w.current!==E&&jf.timing(S,{toValue:+!!E,duration:100,useNativeDriver:Csn}).start(({finished:e})=>{e&&(w.current=E)})},[S,E]);let D=H.useCallback(()=>{T.current?.clear(),T.current?.focus(),v(``)},[]),O=H.useCallback(()=>{D(),s?.({nativeEvent:{text:``}})},[D,s]),k=H.useCallback(()=>{O(),c()},[O,c]);if(H.useEffect(()=>p?.addListener(`blur`,k),[k,p]),H.useImperativeHandle(f,()=>({focus:()=>{T.current?.focus()},blur:()=>{T.current?.blur()},setText:e=>{T.current?.setNativeProps({text:e}),v(e)},clearText:D,cancelSearch:k}),[k,D]),!e&&!y)return null;let A=l??h.text;return(0,W.jsxs)(jf.View,{pointerEvents:e?`auto`:`none`,"aria-live":`polite`,"aria-hidden":!e,style:[y8.container,{opacity:x},u],children:[(0,W.jsxs)(B,{style:y8.searchbarContainer,children:[(0,W.jsx)(g8,{source:Ron,tintColor:A,style:y8.inputSearchIcon}),(0,W.jsx)(am,{...d,ref:T,onChange:s,onChangeText:v,autoFocus:n,autoCapitalize:r===`systemDefault`?void 0:r,inputMode:Ssn[t??`text`],enterKeyHint:o,placeholder:i,placeholderTextColor:(0,v8.default)(A).alpha(.5).string(),cursorColor:h.primary,selectionHandleColor:h.primary,selectionColor:(0,v8.default)(h.primary).alpha(.3).string(),style:[g.regular,y8.searchbar,{backgroundColor:z.select({ios:m?`rgba(255, 255, 255, 0.1)`:`rgba(0, 0, 0, 0.1)`,default:`transparent`}),color:A,borderBottomColor:(0,v8.default)(A).alpha(.2).string()}]}),z.OS===`ios`?(0,W.jsx)(p8,{onPress:O,style:[{opacity:S,transform:[{scale:S}]},y8.clearButton],children:(0,W.jsx)(gd,{source:Ion,resizeMode:`contain`,tintColor:A,style:y8.clearIcon})}):null]}),z.OS===`ios`?null:(0,W.jsx)(h8,{onPress:()=>{_?O():c()},style:y8.closeButton,children:(0,W.jsx)(g8,{source:Lon,tintColor:A})}),z.OS===`ios`?(0,W.jsx)(p8,{onPress:k,style:y8.cancelButton,children:(0,W.jsx)(esn,{style:[g.regular,{color:l??h.primary},y8.cancelText],children:a})}):null]})}var y8=R.create({container:{flex:1,flexDirection:`row`,alignItems:`stretch`},inputSearchIcon:{position:`absolute`,opacity:.5,left:z.select({ios:16,default:4}),top:z.select({ios:-1,default:17}),...z.select({ios:{height:18,width:18},default:{}})},closeButton:{position:`absolute`,opacity:.5,right:z.select({ios:0,default:8}),top:z.select({ios:-2,default:17})},clearButton:{position:`absolute`,right:0,top:-7,bottom:0,justifyContent:`center`,padding:8},clearIcon:{height:16,width:16,opacity:.5},cancelButton:{alignSelf:`center`,top:-4},cancelText:{fontSize:17,marginHorizontal:12},searchbarContainer:{flex:1},searchbar:z.select({ios:{flex:1,fontSize:17,paddingHorizontal:32,marginLeft:16,marginTop:-1,marginBottom:4,borderRadius:8,borderCurve:`continuous`},default:{flex:1,fontSize:18,paddingHorizontal:36,marginRight:8,marginTop:8,marginBottom:8,borderBottomWidth:1}})}),Tsn=H.forwardRef(wsn),b8=`__react_navigation__elements_contexts`;globalThis[b8]=globalThis[b8]??new Map;function Esn(e,t){let n=globalThis[b8].get(e);return n||(n=H.createContext(t),n.displayName=e,globalThis[b8].set(e,n),n)}var x8=Esn(`HeaderShownContext`,!1);V();function Dsn({tintColor:e,style:t,...n}){let{colors:r,fonts:i}=r$();return(0,W.jsx)(jf.Text,{role:`heading`,"aria-level":`1`,numberOfLines:1,...n,style:[{color:e===void 0?r.text:e},z.select({ios:i.bold,default:i.medium}),Osn.title,t]})}var Osn=R.create({title:z.select({ios:{fontSize:17},android:{fontSize:20},default:{fontSize:18}})});V(),l0();var ksn=414;function Asn(e){let t=n0(),n=ssn(e=>e,!0),{colors:r}=r$(),i=XQ(),a=H.useContext(x8),[o,s]=H.useState(!1),[c,l]=H.useState(void 0),u=e=>{let{height:t,width:n}=e.nativeEvent.layout;l(e=>e&&t===e.height&&n===e.width?e:{height:t,width:n})},{layout:d=n,modal:f=!1,back:p,title:m,headerTitle:h,headerTitleAlign:g=z.OS===`ios`?`center`:`left`,headerLeft:_=p?e=>(0,W.jsx)(_sn,{...e}):void 0,headerSearchBarOptions:v,headerTransparent:y,headerTintColor:b,headerBackground:x,headerRight:S,headerTitleAllowFontScaling:C,headerTitleStyle:w,headerLeftContainerStyle:T,headerRightContainerStyle:E,headerTitleContainerStyle:D,headerBackButtonDisplayMode:O=z.OS===`ios`?`default`:`minimal`,headerBackTitleStyle:k,headerBackgroundContainerStyle:A,headerStyle:ee,headerShadowVisible:te,headerPressColor:ne,headerPressOpacity:re,headerStatusBarHeight:ie=a?0:t.top}=e,j=tsn(d,f,ie),{height:ae=j,maxHeight:oe,minHeight:se,backfaceVisibility:ce,backgroundColor:M,borderBlockColor:N,borderBlockEndColor:P,borderBlockStartColor:le,borderBottomColor:ue,borderBottomEndRadius:de,borderBottomLeftRadius:fe,borderBottomRightRadius:pe,borderBottomStartRadius:me,borderBottomWidth:he,borderColor:ge,borderCurve:F,borderEndColor:_e,borderEndEndRadius:I,borderEndStartRadius:ve,borderEndWidth:ye,borderLeftColor:be,borderLeftWidth:xe,borderRadius:L,borderRightColor:Se,borderRightWidth:Ce,borderStartColor:we,borderStartEndRadius:Te,borderStartStartRadius:Ee,borderStartWidth:De,borderStyle:Oe,borderTopColor:ke,borderTopEndRadius:Ae,borderTopLeftRadius:je,borderTopRightRadius:Me,borderTopStartRadius:Ne,borderTopWidth:Pe,borderWidth:Fe,boxShadow:Ie,elevation:Le,filter:Re,mixBlendMode:ze,opacity:Be,shadowColor:Ve,shadowOffset:He,shadowOpacity:Ue,shadowRadius:We,transform:Ge,transformOrigin:Ke,...qe}=R.flatten(ee||{}),Je={backfaceVisibility:ce,backgroundColor:M,borderBlockColor:N,borderBlockEndColor:P,borderBlockStartColor:le,borderBottomColor:ue,borderBottomEndRadius:de,borderBottomLeftRadius:fe,borderBottomRightRadius:pe,borderBottomStartRadius:me,borderBottomWidth:he,borderColor:ge,borderCurve:F,borderEndColor:_e,borderEndEndRadius:I,borderEndStartRadius:ve,borderEndWidth:ye,borderLeftColor:be,borderLeftWidth:xe,borderRadius:L,borderRightColor:Se,borderRightWidth:Ce,borderStartColor:we,borderStartEndRadius:Te,borderStartStartRadius:Ee,borderStartWidth:De,borderStyle:Oe,borderTopColor:ke,borderTopEndRadius:Ae,borderTopLeftRadius:je,borderTopRightRadius:Me,borderTopStartRadius:Ne,borderTopWidth:Pe,borderWidth:Fe,boxShadow:Ie,elevation:Le,filter:Re,mixBlendMode:ze,opacity:Be,shadowColor:Ve,shadowOffset:He,shadowOpacity:Ue,shadowRadius:We,transform:Ge,transformOrigin:Ke};for(let e in Je)Je[e]===void 0&&delete Je[e];let Ye={...y&&{backgroundColor:`transparent`},...(y||te===!1)&&{borderBottomWidth:0,...z.select({android:{elevation:0},web:{boxShadow:`none`},default:{shadowOpacity:0}})},...Je},Xe=b??z.select({ios:r.primary,default:r.text}),Ze=_?_({tintColor:Xe,pressColor:ne,pressOpacity:re,displayMode:O,titleLayout:c,screenLayout:d,canGoBack:!!p,onPress:p?i.goBack:void 0,label:p?.title,labelStyle:k,href:p?.href}):null,Qe=S?S({tintColor:Xe,pressColor:ne,pressOpacity:re,canGoBack:!!p}):null,$e=typeof h==`function`?h:e=>(0,W.jsx)(Dsn,{...e});return(0,W.jsxs)(jf.View,{pointerEvents:`box-none`,style:[{height:ae,minHeight:se,maxHeight:oe,opacity:Be,transform:Ge}],children:[(0,W.jsx)(jf.View,{pointerEvents:`box-none`,style:[R.absoluteFill,A],children:x?x({style:Ye}):(0,W.jsx)(bsn,{pointerEvents:y&&(Ye.backgroundColor===`transparent`||(0,v8.default)(Ye.backgroundColor).alpha()===0)?`none`:`auto`,style:Ye})}),(0,W.jsx)(B,{pointerEvents:`none`,style:{height:ie}}),(0,W.jsxs)(B,{pointerEvents:`box-none`,style:[S8.content,z.OS===`ios`&&n.width>=ksn?S8.large:null],children:[(0,W.jsx)(jf.View,{pointerEvents:`box-none`,style:[S8.start,!o&&g===`center`&&S8.expand,{marginStart:t.left},T],children:Ze}),z.OS===`ios`||!o?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(jf.View,{pointerEvents:`box-none`,style:[S8.title,{maxWidth:g===`center`?d.width-((Ze?O===`minimal`?32:80:16)+(Qe||v?16:0)+Math.max(t.left,t.right))*2:d.width-((Ze?52:16)+(Qe||v?52:16)+t.left-t.right)},g===`left`&&Ze?{marginStart:4}:{marginHorizontal:16},D],children:$e({children:m,allowFontScaling:C,tintColor:b,onLayout:u,style:w})}),(0,W.jsxs)(jf.View,{pointerEvents:`box-none`,style:[S8.end,S8.expand,{marginEnd:t.right},E],children:[Qe,v?(0,W.jsx)(h8,{tintColor:Xe,pressColor:ne,pressOpacity:re,onPress:()=>{s(!0),v?.onOpen?.()},children:(0,W.jsx)(g8,{source:Ron,tintColor:Xe})}):null]})]}):null,z.OS===`ios`||o?(0,W.jsx)(Tsn,{...v,visible:o,onClose:()=>{s(!1),v?.onClose?.()},tintColor:b,style:[z.OS===`ios`?[R.absoluteFill,{paddingTop:ie?0:4},{backgroundColor:M??r.card}]:!Ze&&{marginStart:8}]}):null]})]})}var S8=R.create({content:{flex:1,flexDirection:`row`,alignItems:`stretch`},large:{marginHorizontal:5},title:{justifyContent:`center`},start:{flexDirection:`row`,alignItems:`center`,justifyContent:`flex-start`},end:{flexDirection:`row`,alignItems:`center`,justifyContent:`flex-end`},expand:{flexGrow:1,flexBasis:0}}),jsn=Esn(`HeaderBackContext`,void 0),Msn=Esn(`HeaderHeightContext`,void 0);function Nsn(){let e=H.useContext(Msn);if(e===void 0)throw Error(`Couldn't find the header height. Are you inside a screen in a navigator with a header?`);return e}V(),l0();var{width:Psn=0,height:Fsn=0}=Zo.get(`window`),Isn=(z.OS,{frame:{x:0,y:0,width:Psn,height:Fsn},insets:{top:0,left:0,right:0,bottom:0}});function Lsn({children:e,style:t}){let n=H.useContext(i0);return(0,W.jsx)(csn,{initialFrame:Isn.frame,render:({ref:r,onLayout:i})=>n?(0,W.jsx)(B,{ref:r,onLayout:i,style:[Rsn.container,t],children:e}):(0,W.jsx)(c2t,{initialMetrics:Isn,style:t,onLayout:i,children:e})})}Lsn.initialMetrics=Isn;var Rsn=R.create({container:{flex:1}}),zsn=H.createContext(!1);V();var Bsn=({children:e})=>(0,W.jsx)(W.Fragment,{children:e}),Vsn=B,C8={UNDETERMINED:0,FAILED:1,BEGAN:2,CANCELLED:3,ACTIVE:4,END:5};function Hsn(e,t){let n;return function(...r){n??=(e.apply(this,r),setTimeout(()=>{n=void 0},t))}}V();function Usn(e){let{direction:t}=l$(),[n,r]=H.useState(void 0),[i,a]=H.useState(void 0),o=e=>{let{height:t,width:n}=e.nativeEvent.layout;a(e=>e&&t===e.height&&n===e.width?e:{height:t,width:n})},s=e=>{let{height:t,width:i}=e.nativeEvent.layout;n&&t===n.height&&i===n.width||r({height:t,width:i})},{progress:c,layout:l,modal:u,onGoBack:d,backHref:f,headerTitle:p,headerLeft:m=d?e=>(0,W.jsx)(_sn,{...e}):void 0,headerRight:h,headerBackImage:g,headerBackTitle:_,headerBackButtonDisplayMode:v=z.OS===`ios`?`default`:`minimal`,headerBackTruncatedTitle:y,headerBackAccessibilityLabel:b,headerBackTestID:x,headerBackAllowFontScaling:S,headerBackTitleStyle:C,headerTitleContainerStyle:w,headerLeftContainerStyle:T,headerRightContainerStyle:E,headerBackgroundContainerStyle:D,headerStyle:O,headerStatusBarHeight:k,styleInterpolator:A,...ee}=e,te=tsn(l,u,k),{height:ne=te}=R.flatten(O||{}),re=typeof ne==`number`?ne:te,{titleStyle:ie,leftButtonStyle:j,leftLabelStyle:ae,rightButtonStyle:oe,backgroundStyle:se}=H.useMemo(()=>A({current:{progress:c.current},next:c.next&&{progress:c.next},direction:t,layouts:{header:{height:re,width:l.width},screen:l,title:i,leftLabel:n}}),[A,c,t,re,l,i,n]);return(0,W.jsx)(Asn,{modal:u,layout:l,headerTitle:typeof p==`function`?e=>p({...e,onLayout:o}):e=>(0,W.jsx)(Dsn,{...e,onLayout:o}),headerLeft:m?e=>m({...e,href:f,backImage:g,accessibilityLabel:b,testID:x,allowFontScaling:S,onPress:d,label:_,truncatedLabel:y,labelStyle:[ae,C],onLabelLayout:s,screenLayout:l,titleLayout:i,canGoBack:!!d}):void 0,headerRight:h?e=>h({...e,canGoBack:!!d}):void 0,headerTitleContainerStyle:[ie,w],headerLeftContainerStyle:[j,T],headerRightContainerStyle:[oe,E],headerBackButtonDisplayMode:v,headerBackgroundContainerStyle:[se,D],headerStyle:O,headerStatusBarHeight:k,...ee})}l0();var Wsn=H.memo(function({back:e,layout:t,progress:n,options:r,route:i,navigation:a,styleInterpolator:o}){let s=n0(),c;r.headerBackTitle===void 0?e&&(c=e.title):c=r.headerBackTitle;let l=H.useCallback(Hsn(()=>{a.isFocused()&&a.canGoBack()&&a.dispatch({...VQ.pop(),source:i.key})},50),[a,i.key]),u=H.useContext(zsn),d=H.useContext(x8),f=r.headerStatusBarHeight===void 0?u||d?0:s.top:r.headerStatusBarHeight;return(0,W.jsx)(Usn,{...r,title:nsn(r,i.name),progress:n,layout:t,modal:u,headerBackTitle:r.headerBackTitle===void 0?c:r.headerBackTitle,headerStatusBarHeight:f,onGoBack:e?l:void 0,backHref:e?e.href:void 0,styleInterpolator:o})});V();function Gsn({mode:e,scenes:t,layout:n,getPreviousScene:r,getFocusedRoute:i,onContentHeightChange:a,style:o}){let s=i(),c=H.useContext(jsn),{buildHref:l}=hKt();return(0,W.jsx)(B,{pointerEvents:`box-none`,style:o,children:t.slice(-2).map((t,i,o)=>{if(e===`screen`&&i!==o.length-1||!t)return null;let{header:u,headerMode:d,headerShown:f=!0,headerTransparent:p,headerStyleInterpolator:m}=t.descriptor.options;if(d!==e||!f)return null;let h=s.key===t.descriptor.route.key,g=r({route:t.descriptor.route}),_=c;if(g){let{options:e,route:t}=g.descriptor;_=g?{title:nsn(e,t.name),href:l(t.name,t.params)}:c}let v=o[i-1]?.descriptor,y=o[i+1]?.descriptor,{headerShown:b=!0,headerMode:x}=v?.options||{},S=o.slice(i+1).find(e=>{let{headerShown:t=!0,headerMode:n}=e?.descriptor.options||{};return t===!1||n===`screen`}),{gestureDirection:C}=S?.descriptor.options||{},w=(b===!1||x===`screen`)&&!y||S,T={layout:n,back:_,progress:t.progress,options:t.descriptor.options,route:t.descriptor.route,navigation:t.descriptor.navigation,styleInterpolator:e===`float`?w?C===`vertical`||C===`vertical-inverted`?pon:C===`horizontal-inverted`?fon:don:m:mon};return(0,W.jsx)(SWt,{route:t.descriptor.route,navigation:t.descriptor.navigation,children:(0,W.jsx)(B,{onLayout:a?e=>{let{height:n}=e.nativeEvent.layout;a({route:t.descriptor.route,height:n})}:void 0,pointerEvents:h?`box-none`:`none`,"aria-hidden":!h,style:e===`float`&&!h||p?Ksn.header:null,children:u===void 0?(0,W.jsx)(Wsn,{...T}):u(T)})},t.descriptor.route.key)})})}var Ksn=R.create({header:{position:`absolute`,top:0,start:0,end:0}});function qsn(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}function w8(e,t){switch(e){case`vertical`:return 1;case`vertical-inverted`:return-1;case`horizontal`:return t?-1:1;case`horizontal-inverted`:return t?1:-1}}function T8(e,t,n){let r=w8(t,n);switch(t){case`vertical`:case`vertical-inverted`:return e.height*r;case`horizontal`:case`horizontal-inverted`:return e.width*r}}var Jsn=(e,t)=>e.reduce((e,n)=>{let{presentation:r}=t[n.key]?.options??{};return(e.length&&!r||r===`modal`||r===`transparentModal`)&&e.push(n.key),e},[]),Ysn=o((()=>{}));function Xsn(e=!0){D8=e,E8&&D8&&!Ei.getViewManagerConfig(`RNSScreen`)&&console.error(`Screen native module hasn't been linked. Please check the react-native-screens README for more details`)}function Zsn(e=!0){E8&&(ecn=e)}function Qsn(){return D8}function $sn(){return ecn}var E8,D8,ecn,tcn=o((()=>{V(),E8=z.OS===`ios`||z.OS===`android`||z.OS===`windows`,D8=E8,ecn=!1}));function ncn(){return ncn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ncn.apply(null,arguments)}var O8,rcn,icn,k8,acn,ocn=o((()=>{V(),O8=u(m()),tcn(),rcn=B,icn=class extends O8.Component{render(){let{active:e,activityState:t,style:n,enabled:r=Qsn(),...i}=this.props;return r?(e!==void 0&&t===void 0&&(t=e===0?0:2),O8.createElement(B,ncn({hidden:t===0,style:[n,{display:t===0?`none`:`flex`}]},i))):O8.createElement(B,i)}},k8=jf.createAnimatedComponent(icn),acn=O8.createContext(k8)}));function scn(){return scn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},scn.apply(null,arguments)}var A8,ccn,lcn,ucn,dcn,fcn,pcn,mcn,hcn=o((()=>{V(),A8=u(m()),ccn=e=>A8.createElement(B,null,A8.createElement(gd,scn({resizeMode:`center`,fadeDuration:0},e))),lcn=e=>A8.createElement(B,e),ucn=e=>A8.createElement(B,e),dcn=e=>A8.createElement(B,e),fcn=e=>A8.createElement(B,e),pcn=e=>A8.createElement(B,e),mcn=B})),gcn,_cn=o((()=>{V(),gcn=B})),vcn,ycn=o((()=>{V(),vcn=B})),bcn,xcn=o((()=>{V(),bcn=B})),Scn=s(((e,t)=>{function n(e,...t){}t.exports=n})),Ccn,wcn=o((()=>{V(),Ccn=B}));function Tcn(e){return Ecn.createElement(Ccn,e)}var Ecn,Dcn=o((()=>{Ecn=u(m()),wcn()})),Ocn,kcn,Acn=o((()=>{Ocn=u(m()),kcn=Ocn.createContext(null)})),jcn,Mcn,Ncn=o((()=>{V(),jcn=B,Mcn=B})),Pcn,Fcn=o((()=>{V(),Pcn=B})),Icn,Lcn,Rcn,zcn,Bcn,Vcn,Hcn,Ucn,j8,M8,Wcn,Gcn,Kcn,qcn,Jcn,Ycn,Xcn,Zcn,Qcn=o((()=>{Icn=!1,Lcn=!1,Rcn=!1,zcn=!1,Bcn=!0,Vcn=!0,Hcn=!0,Ucn={isNewBackTitleImplementation:!0,usesHeaderFlexboxImplementation:!0,usesNewAndroidHeaderHeightImplementation:!0},j8={experiment:{controlledBottomTabs:Icn,synchronousScreenUpdatesEnabled:Lcn,synchronousHeaderConfigUpdatesEnabled:Rcn,synchronousHeaderSubviewUpdatesEnabled:zcn,androidResetScreenShadowStateOnOrientationChangeEnabled:Bcn,iosPreventReattachmentOfDismissedScreens:Vcn,ios26AllowInteractionsDuringTransition:Hcn},stable:{}},M8=(e,t)=>({get(){return j8.experiment[e]},set(n){n!==j8.experiment[e]&&j8.experiment[e]!==t&&console.error(`[RNScreens] ${e} feature flag modified for a second time; this might lead to unexpected effects`),j8.experiment[e]=n}}),Wcn=M8(`controlledBottomTabs`,Icn),Gcn=M8(`synchronousScreenUpdatesEnabled`,Lcn),Kcn=M8(`synchronousHeaderConfigUpdatesEnabled`,Rcn),qcn=M8(`synchronousHeaderSubviewUpdatesEnabled`,zcn),Jcn=M8(`androidResetScreenShadowStateOnOrientationChangeEnabled`,Bcn),Ycn=M8(`iosPreventReattachmentOfDismissedScreens`,Vcn),Xcn=M8(`ios26AllowInteractionsDuringTransition`,Hcn),Zcn={experiment:{get controlledBottomTabs(){return Wcn.get()},set controlledBottomTabs(e){Wcn.set(e)},get synchronousScreenUpdatesEnabled(){return Gcn.get()},set synchronousScreenUpdatesEnabled(e){Gcn.set(e)},get synchronousHeaderConfigUpdatesEnabled(){return Kcn.get()},set synchronousHeaderConfigUpdatesEnabled(e){Kcn.set(e)},get synchronousHeaderSubviewUpdatesEnabled(){return qcn.get()},set synchronousHeaderSubviewUpdatesEnabled(e){qcn.set(e)},get androidResetScreenShadowStateOnOrientationChangeEnabled(){return Jcn.get()},set androidResetScreenShadowStateOnOrientationChangeEnabled(e){Jcn.set(e)},get iosPreventReattachmentOfDismissedScreens(){return Ycn.get()},set iosPreventReattachmentOfDismissedScreens(e){Ycn.set(e)},get ios26AllowInteractionsDuringTransition(){return Xcn.get()},set ios26AllowInteractionsDuringTransition(e){Xcn.set(e)}},stable:{}}}));function $cn(){return $cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$cn.apply(null,arguments)}function eln({children:e,headerConfig:t,activityState:n,shouldFreeze:r,stackPresentation:i,sheetAllowedDetents:a,contentStyle:o,style:s,screenId:c,onHeaderHeightChange:l,unstable_sheetFooter:u,...d},f){let p=N8.useRef(null),m=N8.useContext(kcn);N8.useImperativeHandle(f,()=>p.current);let h=i??`push`,g=t?.hidden??!1,_=z.OS===`android`?!1:h!==`push`&&g===!1,v=N8.useRef(g);N8.useEffect(()=>{(0,iln.default)(z.OS!==`android`&&h!==`push`&&v.current!==g,`Dynamically changing header's visibility in modals will result in remounting the screen and losing all local state.`),v.current=g},[g,h]);let y=d?.scrollEdgeEffects===void 0||Object.values(d.scrollEdgeEffects).some(e=>e!==`hidden`),b=t?.blurEffect!==void 0&&t.blurEffect!==`none`;(0,iln.default)(y&&b&&z.OS===`ios`&&parseInt(z.Version,10)>=26,"[RNScreens] Using both `blurEffect` and `scrollEdgeEffects` simultaneously may cause overlapping effects.");let x=tln(a,h),S;if(h===`formSheet`&&z.OS===`ios`&&o){let{screenStyles:e,contentWrapperStyles:t}=nln(o);S=e,o=t}let C=z.OS===`ios`&&parseInt(z.Version,10)>=26,w=N8.createElement(N8.Fragment,null,N8.createElement(Tcn,{contentStyle:o,style:x,stackPresentation:h},C?N8.createElement(Pcn,{edges:rln(t)},e):e),N8.createElement(pcn,t),h===`formSheet`&&u&&N8.createElement(Mcn,null,u()));return N8.createElement(k8,$cn({ref:e=>{if(p.current=e,m===null){console.warn(`Looks like RNSScreensRefContext is missing. Make sure the ScreenStack component is wrapped in it`);return}let t=m.current;e===null?delete t[c]:t[c]={current:e}},enabled:!0,isNativeStack:!0,activityState:n,shouldFreeze:r,screenId:c,stackPresentation:h,hasLargeHeader:t?.largeTitle??!1,sheetAllowedDetents:a,style:[s,S],onHeaderHeightChange:_?void 0:l},d),_?N8.createElement(bcn,{style:P8.container},N8.createElement(k8,{enabled:!0,isNativeStack:!0,activityState:n,shouldFreeze:r,hasLargeHeader:t?.largeTitle??!1,style:R.absoluteFill,onHeaderHeightChange:l},w)):w)}function tln(e,t){let n=z.OS===`ios`,r=z.constants.reactNativeVersion.minor;return t===`formSheet`?n?e!==`fitToContents`&&r>=82&&Zcn.experiment.synchronousScreenUpdatesEnabled?P8.container:P8.absoluteWithNoBottom:e===`fitToContents`?P8.absoluteWithNoBottom:P8.container:P8.container}function nln(e){let{backgroundColor:t,...n}=R.flatten(e);return{screenStyles:{backgroundColor:t},contentWrapperStyles:n}}function rln(e){if(z.OS!==`ios`||parseInt(z.Version,10)<26)return{};let t;return t=e?.translucent||e?.hidden?{}:{top:!0},t}var N8,iln,aln,P8,oln=o((()=>{N8=u(m()),V(),iln=u(Scn()),Dcn(),hcn(),ocn(),xcn(),Acn(),Ncn(),Fcn(),Qcn(),aln=N8.forwardRef(eln),P8=R.create({container:{flex:1},absoluteWithNoBottom:{position:`absolute`,top:0,start:0,end:0}})})),sln,cln=o((()=>{V(),sln=B}));function lln(){return Gf.exitApp(),!0}var uln,dln=o((()=>{V(),uln=[`ios`,`android`].includes(z.OS),z.OS})),fln,pln,mln=o((()=>{fln=u(m()),pln=fln.createContext(void 0)}));function hln(){let e=gln.useContext(pln);if(e===void 0)throw Error(`Couldn't find values for transition progress. Are you inside a screen in Native Stack?`);return e}var gln,_ln=o((()=>{gln=u(m()),mln()})),vln,yln=o((()=>{V(),vln=B})),bln,xln=o((()=>{V(),bln=B})),Sln,Cln=o((()=>{yln(),xln(),Sln={Host:vln,Screen:bln}})),wln=c({FullWindowOverlay:()=>sln,InnerScreen:()=>rcn,Screen:()=>k8,ScreenContainer:()=>vcn,ScreenContentWrapper:()=>Ccn,ScreenContext:()=>acn,ScreenFooter:()=>jcn,ScreenStack:()=>bcn,ScreenStackHeaderBackButtonImage:()=>ccn,ScreenStackHeaderCenterView:()=>dcn,ScreenStackHeaderConfig:()=>pcn,ScreenStackHeaderLeftView:()=>ucn,ScreenStackHeaderRightView:()=>lcn,ScreenStackHeaderSearchBarView:()=>fcn,ScreenStackHeaderSubview:()=>mcn,ScreenStackItem:()=>aln,SearchBar:()=>gcn,Tabs:()=>Sln,compatibilityFlags:()=>Ucn,enableFreeze:()=>Zsn,enableScreens:()=>Xsn,executeNativeBackPress:()=>lln,featureFlags:()=>Zcn,freezeEnabled:()=>$sn,isSearchBarAvailableForCurrentPlatform:()=>uln,screensEnabled:()=>Qsn,useTransitionProgress:()=>hln}),Tln=o((()=>{Ysn(),tcn(),ocn(),hcn(),_cn(),ycn(),xcn(),oln(),cln(),Ncn(),wcn(),dln(),Qcn(),_ln(),Cln()}));V();var F8;try{F8=(Tln(),d(wln))}catch{}var Eln=({enabled:e,...t})=>F8==null?(0,W.jsx)(B,{...t}):(0,W.jsx)(F8.ScreenContainer,{enabled:e,...t}),Dln=({enabled:e,active:t,...n})=>F8==null?(0,W.jsx)(B,{...n}):(0,W.jsx)(F8.Screen,{enabled:e,activityState:t,...n});V();function Oln({enabled:e,focused:t}){let n=H.useRef(void 0),r=H.useRef(0),i=H.useRef(void 0),a=H.useRef(e),o=H.useCallback(()=>{i.current!==void 0&&(clearTimeout(i.current),i.current=void 0)},[]),s=H.useCallback(()=>{if(!a.current)return;o();let e=am.State.currentlyFocusedInput();e?.blur(),n.current=e,r.current=Date.now()},[o]),c=H.useCallback(()=>{if(!a.current)return;o();let e=n.current;e&&(Date.now()-r.current<100?i.current=setTimeout(()=>{e?.focus(),n.current=void 0},100):(e?.focus(),n.current=void 0))},[o]),l=H.useCallback(({gesture:e,active:t,closing:r})=>{if(a.current){if(!r){c();return}o(),e?t&&n.current?.blur():qf.dismiss(),n.current=void 0}},[o,c]);return H.useLayoutEffect(()=>{a.current&&!t&&qf.dismiss()},[t]),H.useLayoutEffect(()=>{a.current=e}),H.useEffect(()=>()=>o(),[o]),{onPageChangeStart:s,onPageChangeConfirm:l,onPageChangeCancel:c}}var kln=H.createContext(void 0),Aln=50,jln=135,Mln=({direction:e,gestureDirection:t,gestureResponseDistance:n,layout:r})=>{let i=n===void 0?t===`vertical`||t===`vertical-inverted`?jln:Aln:n;if(t===`vertical`)return{maxDeltaX:15,minOffsetY:5,hitSlop:{bottom:-r.height+i},enableTrackpadTwoFingerGesture:!0};if(t===`vertical-inverted`)return{maxDeltaX:15,minOffsetY:-5,hitSlop:{top:-r.height+i},enableTrackpadTwoFingerGesture:!0};{let n=-r.width+i;return w8(t,e===`rtl`)===1?{minOffsetX:5,maxDeltaY:20,hitSlop:{right:n},enableTrackpadTwoFingerGesture:!0}:{minOffsetX:-5,maxDeltaY:20,hitSlop:{left:n},enableTrackpadTwoFingerGesture:!0}}};V();function Nln({offset:e,radius:t,opacity:n,color:r=`#000`}){return z.select({web:{boxShadow:`${e.width}px ${e.height}px ${t}px ${(0,v8.default)(r).alpha(n).toString()}`},default:{shadowOffset:e,shadowRadius:t,shadowColor:r,shadowOpacity:n}})}V();function Pln({enabled:e,layout:t,style:n,...r}){let[i,a]=H.useState(!1);return H.useEffect(()=>{if(typeof document>`u`||!document.body)return;let e=document.body.clientWidth,n=document.body.clientHeight,r=n===t.height,i=`__react-navigation-stack-mobile-chrome-viewport-fix`,o;if(r&&navigator.maxTouchPoints>0){let e=document.getElementById(i)??document.createElement(`style`);e.id=i;let t=()=>{e.textContent=[`:root { --vh: ${window.innerHeight*.01}px; }`,`body { height: calc(var(--vh, 1vh) * 100); }`].join(`
889
- `)};t(),document.head.contains(e)||document.head.appendChild(e),window.addEventListener(`resize`,t),o=()=>{window.removeEventListener(`resize`,t)}}else document.getElementById(i)?.remove();return a(e===t.width&&n===t.height),o},[t.height,t.width]),(0,W.jsx)(B,{...r,pointerEvents:`box-none`,style:[e&&i?Fln.page:Fln.card,n]})}var Fln=R.create({page:{minHeight:`100%`},card:{flex:1,overflow:`hidden`}});V();var Iln=.3,Lln=1,I8=0,Rln=z.OS!==`web`,zln=e=>{if(e){let t=R.flatten(e);return`opacity`in t&&t.opacity!=null}return!1},Bln=({closing:e,layout:t,gestureDirection:n,direction:r,preloaded:i})=>!e&&!i?0:T8(t,n,r===`rtl`),Vln=({style:e})=>e?(0,W.jsx)(jf.View,{pointerEvents:`none`,style:[L8.overlay,e]}):null;function Hln({shadowEnabled:e=!1,gestureEnabled:t=!0,gestureVelocityImpact:n=Iln,overlay:r=Vln,animated:i,interpolationIndex:a,opening:o,closing:s,next:c,current:l,gesture:u,layout:d,insets:f,direction:p,pageOverflowEnabled:m,gestureDirection:h,onOpen:g,onClose:_,onTransition:v,onGestureBegin:y,onGestureCanceled:b,onGestureEnd:x,children:S,overlayEnabled:C,gestureResponseDistance:w,transitionSpec:T,preloaded:E,styleInterpolator:D,containerStyle:O,contentStyle:k}){let A=H.useRef(!1),ee=H.useRef(void 0),te=H.useRef(void 0),ne=H.useRef(void 0),re=H.useRef(void 0),ie=H.useRef(void 0),[j]=H.useState(()=>new jf.Value(I8)),[ae]=H.useState(()=>new jf.Value(w8(h,p===`rtl`))),[oe]=H.useState(()=>({width:new jf.Value(d.width),height:new jf.Value(d.height)})),[se]=H.useState(()=>new jf.Value(I8)),ce=HQ(()=>{te.current===void 0&&(te.current=Ms.createInteractionHandle())}),M=HQ(()=>{te.current!==void 0&&(Ms.clearInteractionHandle(te.current),te.current=void 0)}),N=HQ(({closing:e,velocity:t})=>{let n=Bln({closing:e,layout:d,gestureDirection:h,direction:p,preloaded:E});ee.current=n,j.setValue(e?Lln:I8);let r=e?T.close:T.open,a=r.animation===`spring`?jf.spring:jf.timing;clearTimeout(re.current),ne.current!==void 0&&cancelAnimationFrame(ne.current),v?.({closing:e,gesture:t!==void 0});let o=()=>{e?_():g(),ne.current=requestAnimationFrame(()=>{de()})};i?(ce(),a(u,{...r.config,velocity:t,toValue:n,useNativeDriver:Rln,isInteraction:!1}).start(({finished:e})=>{M(),clearTimeout(re.current),e&&o()})):o()}),P=HQ(({nativeEvent:e})=>{switch(e.state){case C8.ACTIVE:clearTimeout(re.current),clearTimeout(ie.current),se.setValue(Lln),ce(),y?.();break;case C8.CANCELLED:case C8.FAILED:se.setValue(I8),M(),N({closing:s,velocity:h===`vertical`||h===`vertical-inverted`?e.velocityY:e.velocityX}),b?.();break;case C8.END:{se.setValue(I8);let t,r,i;h===`vertical`||h===`vertical-inverted`?(t=d.height,r=e.translationY,i=e.velocityY):(t=d.width,r=e.translationX,i=e.velocityX);let a=(r+i*n)*w8(h,p===`rtl`)>t/2?i!==0||r!==0:s;N({closing:a,velocity:i}),a&&(re.current=setTimeout(()=>{_(),ie.current=setTimeout(()=>{de()},32)},16)),x?.();break}}});H.useLayoutEffect(()=>{oe.width.setValue(d.width),oe.height.setValue(d.height),ae.setValue(w8(h,p===`rtl`))},[h,p,ae,oe.width,oe.height,d.width,d.height]);let le=H.useRef(null);H.useEffect(()=>()=>{M(),ne.current&&cancelAnimationFrame(ne.current),clearTimeout(re.current),clearTimeout(ie.current)},[]);let ue=H.useRef(void 0),de=HQ(()=>{if(clearTimeout(re.current),clearTimeout(ie.current),!A.current)clearTimeout(ue.current),ue.current=setTimeout(()=>{A.current=!0,N({closing:s})},0);else{let e=le.current?.opening,t=le.current?Bln(le.current):null,n=Bln({closing:s,layout:d,gestureDirection:h,direction:p,preloaded:E});t!==n||ee.current!==n?N({closing:s}):typeof e==`boolean`&&o&&!e&&(u.setValue(T8(d,h,p===`rtl`)),N({closing:s}))}});H.useEffect(()=>{E||(de(),le.current={opening:o,closing:s,layout:d,gestureDirection:h,direction:p,preloaded:E})},[N,s,p,u,h,d,o,E,de]);let fe=H.useMemo(()=>({index:a,current:{progress:l},next:c&&{progress:c},closing:j,swiping:se,inverted:ae,layouts:{screen:d},insets:{top:f.top,right:f.right,bottom:f.bottom,left:f.left}}),[a,l,c,j,se,ae,d,f.top,f.right,f.bottom,f.left]),{containerStyle:pe,cardStyle:me,overlayStyle:he,shadowStyle:ge}=H.useMemo(()=>D(fe),[D,fe]),F=H.useMemo(()=>t?jf.event([{nativeEvent:h===`vertical`||h===`vertical-inverted`?{translationY:u}:{translationX:u}}],{useNativeDriver:Rln}):void 0,[u,h,t]),{backgroundColor:_e}=R.flatten(k||{}),I=typeof _e==`string`?(0,v8.default)(_e).alpha()===0:!1;return(0,W.jsxs)(kln.Provider,{value:fe,children:[z.OS===`web`?null:(0,W.jsx)(jf.View,{style:{opacity:l},collapsable:!1}),C?(0,W.jsx)(B,{pointerEvents:`box-none`,style:R.absoluteFill,children:r({style:he})}):null,(0,W.jsx)(jf.View,{pointerEvents:`box-none`,style:[L8.container,pe,O],children:(0,W.jsx)(Bsn,{enabled:d.width!==0&&t,onGestureEvent:F,onHandlerStateChange:P,...Mln({layout:d,direction:p,gestureDirection:h,gestureResponseDistance:w}),children:(0,W.jsxs)(jf.View,{pointerEvents:`box-none`,needsOffscreenAlphaCompositing:zln(me),style:[L8.container,me],children:[e&&ge&&!I?(0,W.jsx)(jf.View,{pointerEvents:`none`,style:[L8.shadow,h===`horizontal`?[L8.shadowHorizontal,L8.shadowStart]:h===`horizontal-inverted`?[L8.shadowHorizontal,L8.shadowEnd]:h===`vertical`?[L8.shadowVertical,L8.shadowTop]:[L8.shadowVertical,L8.shadowBottom],{backgroundColor:_e},ge]}):null,(0,W.jsx)(Pln,{enabled:m,layout:d,style:k,children:S})]})})})]})}var L8=R.create({container:{flex:1},overlay:{flex:1,backgroundColor:`#000`},shadow:{position:`absolute`},shadowHorizontal:{top:0,bottom:0,width:3,...Nln({offset:{width:-1,height:1},radius:5,opacity:.3})},shadowStart:{start:0},shadowEnd:{end:0},shadowVertical:{start:0,end:0,height:3,...Nln({offset:{width:1,height:-1},radius:5,opacity:.3})},shadowTop:{top:0},shadowBottom:{bottom:0}});V();var Uln=H.forwardRef(({focused:e,active:t,animated:n,isNextScreenTransparent:r,detachCurrentScreen:i,children:a},o)=>{let[s,c]=H.useState(!1);H.useImperativeHandle(o,()=>({setInert:c}),[]);let l=!n&&r===!1&&i!==!1&&!e;return(0,W.jsx)(B,{"aria-hidden":!e,pointerEvents:(n?s:!e)?`none`:`box-none`,style:[R.absoluteFill,{overflow:t?void 0:`hidden`,display:z.OS!==`web`&&l?`none`:`flex`,visibility:l?`hidden`:`visible`}],collapsable:!1,children:a})});Uln.displayName=`CardA11yWrapper`,V();var Wln=.1;function Gln({interpolationIndex:e,index:t,active:n,opening:r,closing:i,gesture:a,focused:o,modal:s,getPreviousScene:c,getFocusedRoute:l,hasAbsoluteFloatHeader:u,headerHeight:d,onHeaderHeightChange:f,isParentHeaderShown:p,isNextScreenTransparent:m,detachCurrentScreen:h,layout:g,onCloseRoute:_,onOpenRoute:v,onGestureCancel:y,onGestureEnd:b,onGestureStart:x,onTransitionEnd:S,onTransitionStart:C,preloaded:w,renderHeader:T,safeAreaInsetBottom:E,safeAreaInsetLeft:D,safeAreaInsetRight:O,safeAreaInsetTop:k,scene:A}){let ee=H.useRef(null),{direction:te}=l$(),ne=H.useContext(Msn),{options:re}=A.descriptor,{onPageChangeStart:ie,onPageChangeCancel:j,onPageChangeConfirm:ae}=Oln({enabled:o&&re.keyboardHandlingEnabled!==!1,focused:o}),oe=()=>{let{route:e}=A.descriptor;S({route:e},!1),v({route:e})},se=()=>{let{route:e}=A.descriptor;S({route:e},!0),_({route:e})},ce=()=>{let{route:e}=A.descriptor;ie(),x({route:e})},M=()=>{let{route:e}=A.descriptor;j(),y({route:e})},N=()=>{let{route:e}=A.descriptor;b({route:e})},P=({closing:e,gesture:t})=>{ee.current?.setInert(e);let{route:r}=A.descriptor;ae?.({gesture:t,active:n,closing:e}),C?.({route:r},e)},le={top:k,right:O,bottom:E,left:D},{colors:ue}=r$();H.useEffect(()=>{let e=A.progress.next?.addListener?.(({value:e})=>{ee.current?.setInert(e>Wln)});return()=>{e&&A.progress.next?.removeListener?.(e)}},[A.progress.next]);let{presentation:de,animation:fe,cardOverlay:pe,cardOverlayEnabled:me,cardShadowEnabled:he,cardStyle:ge,cardStyleInterpolator:F,gestureDirection:_e,gestureEnabled:I,gestureResponseDistance:ve,gestureVelocityImpact:ye,headerMode:be,headerShown:xe,headerTransparent:L,transitionSpec:Se}=A.descriptor.options,{buildHref:Ce}=hKt(),we=c({route:A.descriptor.route}),Te,Ee;if(we){let{options:e,route:t}=we.descriptor;Te=nsn(e,t.name),Ee=Ce(t.name,t.params)}let De=we!=null,Oe=H.useMemo(()=>{if(De)return{href:Ee,title:Te}},[De,Te,Ee]),ke=fe!==`none`;return(0,W.jsx)(Uln,{ref:ee,focused:o,active:n,animated:ke,isNextScreenTransparent:m,detachCurrentScreen:h,children:(0,W.jsx)(Hln,{animated:ke,interpolationIndex:e,gestureDirection:_e,layout:g,insets:le,direction:te,gesture:a,current:A.progress.current,next:A.progress.next,opening:r,closing:i,onOpen:oe,onClose:se,overlay:pe,overlayEnabled:me,shadowEnabled:he,onTransition:P,onGestureBegin:ce,onGestureCanceled:M,onGestureEnd:N,gestureEnabled:t===0?!1:I,gestureResponseDistance:ve,gestureVelocityImpact:ye,transitionSpec:Se,styleInterpolator:F,pageOverflowEnabled:be!==`float`&&de!==`modal`,preloaded:w,containerStyle:u&&be!==`screen`?{marginTop:d}:null,contentStyle:[{backgroundColor:de===`transparentModal`?`transparent`:ue.background},ge],children:(0,W.jsx)(B,{style:qln.container,children:(0,W.jsxs)(zsn.Provider,{value:s,children:[be===`float`?null:T({mode:`screen`,layout:g,scenes:[we,A],getPreviousScene:c,getFocusedRoute:l,onContentHeightChange:f,style:[qln.header,L?{minHeight:d}:null]}),(0,W.jsx)(B,{style:qln.scene,children:(0,W.jsx)(jsn.Provider,{value:Oe,children:(0,W.jsx)(x8.Provider,{value:p||xe!==!1,children:(0,W.jsx)(Msn.Provider,{value:xe===!1?ne??0:d,children:A.descriptor.render()})})})})]})})})})}var Kln=H.memo(Gln),qln=R.create({container:{flex:1},header:{zIndex:1},scene:{flex:1}});V();var Jln={default:f8,fade:jon,fade_from_bottom:Eon,fade_from_right:kon,none:f8,reveal_from_bottom:Don,scale_from_center:Oon,slide_from_left:Non,slide_from_right:d8,slide_from_bottom:z.select({ios:won,default:Aon})},Yln=1e-5,R8=0,Xln=1,Zln=2,Qln=Object.freeze({options:{}}),$ln=(e,t)=>{let{cardStyleInterpolator:n}=e[t].descriptor.options,r=0;for(let i=t-1;i>=0&&e[i]?.descriptor.options.cardStyleInterpolator===n;i--)r++;return r},z8=e=>e===non||e.name===`forModalPresentationIOS`,eun=(e,t,n)=>{if(n)return!0;let{cardStyleInterpolator:r}=e.descriptor.options;return z8(r)&&t!==0},tun=(e,t,n,r,i,a)=>e.reduce((o,s,c)=>{let{headerStatusBarHeight:l=n?0:t.top,headerStyle:u}=s.descriptor.options,d=R.flatten(u||{}),f=`height`in d&&typeof d.height==`number`?d.height:a[s.route.key],p=eun(s,$ln(e,c),r);return o[s.route.key]=typeof f==`number`?f:tsn(i,p,l),o},{}),nun=(e,t,n)=>{if(t?.gestureDirection)return T8(e,t.gestureDirection,n);let r=t?.presentation===`modal`?Mon.gestureDirection:f8.gestureDirection;return T8(e,t?.animation?Jln[t?.animation]?.gestureDirection:r,n)},run=(e,t,n,r)=>{let i=nun({width:Math.max(1,t.width),height:Math.max(1,t.height)},n,r);return i>0?e.interpolate({inputRange:[0,i],outputRange:[1,0]}):e.interpolate({inputRange:[i,0],outputRange:[0,1]})};function iun(e){let t=z.OS!==`web`&&z.OS!==`windows`&&z.OS!==`macos`;return e??(t?`default`:`none`)}function aun(e){return iun(e)!==`none`}var oun=class extends H.Component{static getDerivedStateFromProps(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;let n=[...e.routes,...e.state.preloadedRoutes].reduce((n,r)=>{let i=e.descriptors[r.key]||e.preloadedDescriptors[r.key],{animation:a}=i?.options||{};return n[r.key]=t.gestures[r.key]||new jf.Value(e.openingRouteKeys.includes(r.key)&&aun(a)||e.state.preloadedRoutes.includes(r)?nun(t.layout,i?.options,e.direction===`rtl`):0),n},{}),r=Jsn([...e.routes,...e.state.preloadedRoutes],{...e.descriptors,...e.preloadedDescriptors}),i=[...e.routes,...e.state.preloadedRoutes].map((i,a,o)=>{let s=e.state.preloadedRoutes.includes(i),c=s?void 0:o[a-1],l=s?void 0:o[a+1],u=t.scenes[a],d=n[i.key],f=c?n[c.key]:void 0,p=l?n[l.key]:void 0,m=(s?e.preloadedDescriptors:e.descriptors)[i.key]||t.descriptors[i.key]||(u?u.descriptor:Qln),h=l&&(e.descriptors[l?.key]||t.descriptors[l?.key])?.options,g=c&&(e.descriptors[c?.key]||t.descriptors[c?.key])?.options,_=a!==o.length-1&&h&&h?.presentation!==`transparentModal`?h:m.options,v=r.includes(i.key),y=iun(_.animation),b=aun(y),x=y==="default"?_.presentation===`transparentModal`?jon:_.presentation===`modal`||v?Mon:f8:Jln[y],{gestureEnabled:S=z.OS===`ios`&&b,gestureDirection:C=x.gestureDirection,transitionSpec:w=x.transitionSpec,cardStyleInterpolator:T=b?x.cardStyleInterpolator:lon,headerStyleInterpolator:E=x.headerStyleInterpolator,cardOverlayEnabled:D=z.OS!==`ios`&&_.presentation!==`transparentModal`||z8(T)}=_,O=m.options.headerMode??(!(_.presentation===`modal`||_.presentation===`transparentModal`||h?.presentation===`modal`||h?.presentation===`transparentModal`||z8(T))&&z.OS===`ios`&&m.options.header===void 0?`float`:`screen`),k=e.direction===`rtl`,A={route:i,descriptor:{...m,options:{...m.options,animation:y,cardOverlayEnabled:D,cardStyleInterpolator:T,gestureDirection:C,gestureEnabled:S,headerStyleInterpolator:E,transitionSpec:w,headerMode:O}},progress:{current:run(d,t.layout,m.options,k),next:p&&h?.presentation!==`transparentModal`?run(p,t.layout,h,k):void 0,previous:f?run(f,t.layout,g,k):void 0},__memo:[t.layout,m,h,g,d,p,f]};return u&&A.__memo.every((e,t)=>u.__memo[t]===e)?u:A}),a=t.activeStates;if(e.routes.length!==t.routes.length){let n=1;for(let t=e.routes.length-1;t>=0;t--){let{options:r}=i[t].descriptor,{detachPreviousScreen:a=r.presentation===`transparentModal`?!1:z8(r.cardStyleInterpolator)?t!==qsn(i,e=>{let{cardStyleInterpolator:t}=e.descriptor.options;return t===non||t?.name===`forModalPresentationIOS`}):!0}=r;if(a===!1)n++;else if(t<=e.routes.length-2)break}a=e.routes.map((e,r,a)=>{let o,s=t.activeStates[r],c=r>=a.length-n;if(s===R8&&!c)o=R8;else{let e=i[a.length-1],t=r===a.length-1?Zln:c?Xln:R8;o=e?e.progress.current.interpolate({inputRange:[0,1-Yln,1],outputRange:[1,1,t],extrapolate:`clamp`}):Xln}return o})}return{routes:e.routes,scenes:i,gestures:n,descriptors:e.descriptors,activeStates:a,headerHeights:tun(i,e.insets,e.isParentHeaderShown,e.isParentModal,t.layout,t.headerHeights)}}constructor(e){super(e),this.state={routes:[],scenes:[],gestures:{},layout:Lsn.initialMetrics.frame,descriptors:this.props.descriptors,activeStates:[],headerHeights:{}}}handleLayout=e=>{let{height:t,width:n}=e.nativeEvent.layout,r={width:n,height:t};this.setState((e,i)=>t===e.layout.height&&n===e.layout.width?null:{layout:r,headerHeights:tun(e.scenes,i.insets,i.isParentHeaderShown,i.isParentModal,r,e.headerHeights)})};handleHeaderLayout=({route:e,height:t})=>{this.setState(({headerHeights:n})=>n[e.key]===t?null:{headerHeights:{...n,[e.key]:t}})};getFocusedRoute=()=>{let{state:e}=this.props;return e.routes[e.index]};getPreviousScene=({route:e})=>{let{getPreviousRoute:t}=this.props,{scenes:n}=this.state,r=t({route:e});if(r)return n.find(e=>e.descriptor.route.key===r.key)};render(){let{insets:e,state:t,routes:n,openingRouteKeys:r,closingRouteKeys:i,onOpenRoute:a,onCloseRoute:o,renderHeader:s,isParentHeaderShown:c,isParentModal:l,onTransitionStart:u,onTransitionEnd:d,onGestureStart:f,onGestureEnd:p,onGestureCancel:m,detachInactiveScreens:h=z.OS===`web`||z.OS===`android`||z.OS===`ios`}=this.props,{scenes:g,layout:_,gestures:v,activeStates:y,headerHeights:b}=this.state,x=t.routes[t.index],S=b[x.key],C=this.state.scenes.slice(-2).some(e=>{let{headerMode:t,headerTransparent:n,headerShown:r=!0}=e.descriptor.options??{};return!!(n||r===!1||t===`screen`)});return(0,W.jsxs)(B,{style:B8.container,children:[s({mode:`float`,layout:_,scenes:g,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,style:[B8.floating,C&&[{height:S},B8.absolute]]}),(0,W.jsx)(Eln,{enabled:h,style:B8.container,onLayout:this.handleLayout,children:[...n,...t.preloadedRoutes].map((S,w)=>{let T=x.key===S.key,E=v[S.key],D=g[w],O=t.preloadedRoutes.includes(S)&&!n.includes(S);if(t.preloadedRoutes.includes(S)&&n.includes(S)&&w>=n.length)return null;let{headerShown:k=!0,headerTransparent:A,freezeOnBlur:ee,autoHideHomeIndicator:te}=D.descriptor.options,ne=e.top,re=e.right,ie=e.bottom,j=e.left,ae=k===!1?0:b[S.key],oe=$ln(g,w),se=eun(D,oe,l),ce=g[w+1]?.descriptor.options.presentation===`transparentModal`,M=g[w+1]?.descriptor.options.detachPreviousScreen!==!1,N=O?R8:y[w];return(0,W.jsx)(Dln,{style:[R.absoluteFill],enabled:h,active:N,freezeOnBlur:ee,shouldFreeze:N===R8&&!O,homeIndicatorHidden:te,pointerEvents:`box-none`,children:(0,W.jsx)(Kln,{index:w,interpolationIndex:oe,modal:se,active:w===n.length-1,focused:T,opening:r.includes(S.key),closing:i.includes(S.key),layout:_,gesture:E,scene:D,safeAreaInsetTop:ne,safeAreaInsetRight:re,safeAreaInsetBottom:ie,safeAreaInsetLeft:j,onGestureStart:f,onGestureCancel:m,onGestureEnd:p,headerHeight:ae,isParentHeaderShown:c,onHeaderHeightChange:this.handleHeaderLayout,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,hasAbsoluteFloatHeader:C&&!A,renderHeader:s,onOpenRoute:a,onCloseRoute:o,onTransitionStart:u,onTransitionEnd:d,isNextScreenTransparent:ce,detachCurrentScreen:M,preloaded:O})},S.key)})})]})}},B8=R.create({container:{flex:1},absolute:{position:`absolute`,top:0,start:0,end:0},floating:{zIndex:1}});V(),l0();var sun=Vsn??B,cun=(e,t)=>e.length===t.length&&e.every((e,n)=>Object.is(e,t[n])),lun=class extends H.Component{static getDerivedStateFromProps(e,t){let n=[...e.state.routes,...e.state.preloadedRoutes],r=t.previousState?[...t.previousState.routes,...t.previousState.preloadedRoutes]:[];if(cun(n.map(e=>e.key),r.map(e=>e.key))&&t.routes.length){let i=t.routes.filter(n=>t.closingRouteKeys.includes(n.key)&&!e.state.routes.some(e=>e.key===n.key)),a=t.routes.filter(n=>t.replacingRouteKeys.includes(n.key)&&!e.state.routes.some(e=>e.key===n.key)),o=e.state.routes.slice();if(a.length&&o.splice(o.length-1,0,...a),i.length&&o.push(...i),!cun(n,r)){let e=n.reduce((e,t)=>(e[t.key]=t,e),{});o=o.map(t=>e[t.key]||t)}let s=[...o,...e.state.preloadedRoutes].reduce((n,r)=>(n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n),{});return{routes:o,previousState:e.state,descriptors:s}}let i=e.state.index<e.state.routes.length-1?e.state.routes.slice(0,e.state.index+1):e.state.routes,{openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s}=t;o=o.filter(e=>!i.some(t=>t.key===e)),s=s.filter(e=>!i.some(t=>t.key===e));let c=t.previousState?t.previousState.routes[t.previousState.index]:void 0,l=i[i.length-1],u=n=>aun((e.descriptors[n]||t.descriptors[n])?.options.animation),d=n=>(e.descriptors[n]||t.descriptors[n]).options.animationTypeForReplace??`push`;if(c&&c.key!==l.key){if(r.some(e=>e.key===l.key)&&!i.some(e=>e.key===c.key))u(c.key)&&!o.includes(c.key)&&(o=[...o,c.key],a=a.filter(e=>e!==c.key),s=s.filter(e=>e!==c.key),i=[...i,c]);else if(u(l.key)&&!a.includes(l.key)&&(a=[...a,l.key],o=o.filter(e=>e!==l.key),s=s.filter(e=>e!==l.key),!i.some(e=>e.key===c.key)))if(a=a.filter(e=>e!==c.key),d(l.key)===`pop`)o=[...o,c.key],a=a.filter(e=>e!==l.key),i=[...i,c];else{s=[...s,c.key],o=o.filter(e=>e!==c.key),i=i.slice(),i.splice(i.length-1,0,c);let e=t.routes.filter(e=>s.includes(e.key)&&!i.some(t=>t.key===e.key));e.length&&i.splice(i.length-2,0,...e)}}else (s.length||o.length)&&(i=i.slice(),i.splice(i.length-1,0,...t.routes.filter(({key:e})=>u(e)?s.includes(e)||o.includes(e):!1)));if(!i.length)throw Error(`There should always be at least one route in the navigation state.`);let f=[...i,...e.state.preloadedRoutes].reduce((n,r)=>(n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n),{});return{routes:i,previousState:e.state,openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s,descriptors:f}}state={routes:[],previousState:void 0,openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}};getPreviousRoute=({route:e})=>{let{closingRouteKeys:t,replacingRouteKeys:n}=this.state,r=this.state.routes.filter(r=>r.key===e.key||!t.includes(r.key)&&!n.includes(r.key));return r[r.findIndex(t=>t.key===e.key)-1]};renderHeader=e=>(0,W.jsx)(Gsn,{...e});handleOpenRoute=({route:e})=>{let{state:t,navigation:n}=this.props,{closingRouteKeys:r,replacingRouteKeys:i}=this.state;r.some(t=>t===e.key)&&i.every(t=>t!==e.key)&&t.routeNames.includes(e.name)&&!t.routes.some(t=>t.key===e.key)?n.dispatch(t=>{let n=[...t.routes.filter(t=>t.key!==e.key),e];return RQ({...t,routes:n,index:n.length-1})}):this.setState(t=>{let n=t.routes.findIndex(t=>t.key===e.key),r=new Set(t.routes.slice(0,n).filter(e=>t.replacingRouteKeys.includes(e.key)).map(e=>e.key));return{routes:t.routes.filter(e=>!r.has(e.key)),openingRouteKeys:t.openingRouteKeys.filter(t=>t!==e.key),closingRouteKeys:t.closingRouteKeys.filter(t=>t!==e.key),replacingRouteKeys:t.replacingRouteKeys.filter(e=>!r.has(e))}})};handleCloseRoute=({route:e})=>{let{state:t,navigation:n}=this.props;t.routes.some(t=>t.key===e.key)?n.dispatch({...VQ.pop(),source:e.key,target:t.key}):this.setState(t=>({routes:t.routes.filter(t=>t.key!==e.key),openingRouteKeys:t.openingRouteKeys.filter(t=>t!==e.key),closingRouteKeys:t.closingRouteKeys.filter(t=>t!==e.key)}))};handleTransitionStart=({route:e},t)=>this.props.navigation.emit({type:`transitionStart`,data:{closing:t},target:e.key});handleTransitionEnd=({route:e},t)=>this.props.navigation.emit({type:`transitionEnd`,data:{closing:t},target:e.key});handleGestureStart=({route:e})=>{this.props.navigation.emit({type:`gestureStart`,target:e.key})};handleGestureEnd=({route:e})=>{this.props.navigation.emit({type:`gestureEnd`,target:e.key})};handleGestureCancel=({route:e})=>{this.props.navigation.emit({type:`gestureCancel`,target:e.key})};render(){let{state:e,descriptors:t,...n}=this.props,{routes:r,descriptors:i,openingRouteKeys:a,closingRouteKeys:o}=this.state,s=e.preloadedRoutes.reduce((e,t)=>(e[t.key]=e[t.key]||this.props.describe(t,!0),e),{});return(0,W.jsx)(sun,{style:uun.container,children:(0,W.jsx)(Lsn,{children:(0,W.jsx)(i0.Consumer,{children:t=>(0,W.jsx)(zsn.Consumer,{children:c=>(0,W.jsx)(x8.Consumer,{children:l=>(0,W.jsx)(oun,{insets:t,isParentHeaderShown:l,isParentModal:c,getPreviousRoute:this.getPreviousRoute,routes:r,openingRouteKeys:a,closingRouteKeys:o,onOpenRoute:this.handleOpenRoute,onCloseRoute:this.handleCloseRoute,onTransitionStart:this.handleTransitionStart,onTransitionEnd:this.handleTransitionEnd,renderHeader:this.renderHeader,state:e,descriptors:i,onGestureStart:this.handleGestureStart,onGestureEnd:this.handleGestureEnd,onGestureCancel:this.handleGestureCancel,preloadedDescriptors:s,...n})})})})})})}},uun=R.create({container:{flex:1}});function dun({id:e,initialRouteName:t,UNSTABLE_routeNamesChangeBehavior:n,children:r,layout:i,screenListeners:a,screenOptions:o,screenLayout:s,UNSTABLE_router:c,...l}){let{direction:u}=l$(),{state:d,describe:f,descriptors:p,navigation:m,NavigationContent:h}=XGt(qUt,{id:e,initialRouteName:t,UNSTABLE_routeNamesChangeBehavior:n,children:r,layout:i,screenListeners:a,screenOptions:o,screenLayout:s,UNSTABLE_router:c});return H.useEffect(()=>m.addListener?.(`tabPress`,e=>{let t=m.isFocused();requestAnimationFrame(()=>{d.index>0&&t&&!e.defaultPrevented&&m.dispatch({...VQ.popToTop(),target:d.key})})}),[m,d.index,d.key]),(0,W.jsx)(h,{children:(0,W.jsx)(lun,{...l,direction:u,state:d,describe:f,descriptors:p,navigation:m})})}function V8(e){return DWt(dun)(e)}V();var fun={blurredTopClearBottom:`linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%)`,blurredBottomClearTop:`linear-gradient(to top, #000 0%, #000 50%, transparent 100%)`,blurredCenterClearTopAndBottom:`linear-gradient(to bottom, transparent 0%, #000 50%, transparent 100%)`},pun=`blur(5px)`,mun=({direction:e,style:t})=>{let n=fun[e];return(0,W.jsx)(B,{style:[t,{backdropFilter:pun,WebkitBackdropFilter:pun,maskImage:n,WebkitMaskImage:n}],pointerEvents:`none`})};V();var hun=50,H8=44,gun=44,_un=10,vun=54,yun=6;function U8(e=!1){let{top:t}=B2();return(e?16:t)+vun}var bun=(0,H.memo)(function({title:e,LeftButton:t,RightButton:n,BottomContent:r,hasHeaderRow:i,style:a}){let[o,s]=(0,H.useState)(H8),[c,l]=(0,H.useState)(H8),{COLORS:u}=J(),d=(0,H.useMemo)(()=>Math.max(o,c,H8),[o,c]),f=(0,H.useCallback)(e=>{let t=Math.round(e.nativeEvent.layout.width);t&&t!==o&&s(t)},[o]),p=(0,H.useCallback)(e=>{let t=Math.round(e.nativeEvent.layout.width);t&&t!==c&&l(t)},[c]);return(0,W.jsxs)(B,{style:a,children:[i&&(0,W.jsxs)(B,{style:W8.headerRow,children:[(0,W.jsx)(B,{style:[W8.sideContainer,{minWidth:d}],onLayout:f,children:t??(0,W.jsx)(B,{style:{minWidth:d}})}),e?(0,W.jsx)(X,{style:[W8.headerTitle,{color:u.textNavigationBar}],numberOfLines:1,allowFontScaling:!1,children:e}):(0,W.jsx)(B,{style:W8.placeHolderTitle}),(0,W.jsx)(B,{style:[W8.sideContainer,{minWidth:d}],onLayout:p,children:n??(0,W.jsx)(B,{style:{minWidth:d}})})]}),r]})});function xun({title:e,LeftButton:t,RightButton:n,BottomContent:r,extraBlurSize:i=0,skipTopInset:a=!1,color:o,overlay:s=!1}){let{COLORS:c}=J(),{top:l}=B2(),u=a?16:l,d=o??c.bgPrimary,f=X2(d,0),p=e!==void 0||t!==void 0||n!==void 0,m=r&&p?hun+i:0+i,h=(0,H.useMemo)(()=>({backdrop:{height:u+vun+yun+m},container:{marginTop:u}}),[u,m]),g=VK&&s?W8.overlay:void 0;return HK||VK?(0,W.jsxs)(B,{style:g,children:[(0,W.jsxs)(B,{style:{pointerEvents:`none`},children:[(0,W.jsx)(M2.default,{colors:[d,f],style:[W8.gradient,h.backdrop]}),(0,W.jsx)(mun,{direction:`blurredTopClearBottom`,style:[W8.blur,h.backdrop],fallbackColor:d})]}),(0,W.jsx)(bun,{title:e,LeftButton:t,RightButton:n,BottomContent:r,style:h.container,hasHeaderRow:p})]}):(0,W.jsxs)(B,{children:[(0,W.jsx)(M2.default,{colors:[d,f],style:[W8.gradient,h.backdrop,{pointerEvents:`none`}]}),(0,W.jsx)(bun,{title:e,LeftButton:t,RightButton:n,BottomContent:r,style:h.container,hasHeaderRow:p})]})}var W8=R.create({headerRow:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:16,justifyContent:`space-between`,paddingBottom:_un},sideContainer:{minWidth:H8,minHeight:gun,alignItems:`center`},gradient:{position:`absolute`,top:0,left:0,right:0},blur:{position:`absolute`,top:0,left:0,right:0},overlay:{position:`absolute`,top:0,left:0,right:0},headerTitle:{...q.Poppins.medium_Base,flex:1,textAlign:`center`,paddingHorizontal:16},placeHolderTitle:{flex:1}}),G8=(0,H.memo)(xun),Q=function(e){return e.MainBottomTabs=`MainBottomTabs`,e.SettingsStack=`SettingsStack`,e.Calculation=`Calculation`,e.VisualSearchIntro=`VisualSearchIntro`,e.VisualSearchPrivacyNoticeWebView=`VisualSearchPrivacyNoticeWebView`,e.VisualSearchEducation=`VisualSearchEducation`,e.VisualSearch=`VisualSearch`,e.FoodLibrary=`FoodLibrary`,e.LoadingRecommendation=`LoadingRecommendation`,e.Recommendation=`Recommendation`,e.LeavingRecommendation=`LeavingRecommendation`,e.DashboardTab=`DashboardTab`,e.LogbooksTab=`LogbooksTab`,e.FoodTab=`FoodTab`,e.Dashboard=`Dashboard`,e.ActiveInsulinChart=`ActiveInsulinChart`,e.MyDay=`MyDay`,e.GlucoseBGM=`GlucoseBGM`,e.GlucoseCGM=`GlucoseCGM`,e.CarbohydrateChart=`CarbohydrateChart`,e.RapidInsulinChart=`RapidInsulinChart`,e.TimeInRange=`TimeInRange`,e.FoodAndDrink=`FoodAndDrink`,e.FoodSubcategories=`FoodSubcategories`,e.CuratedFood=`CuratedFood`,e.PersonalFood=`PersonalFood`,e.PersonalFoodItem=`PersonalFoodItem`,e.CuratedFoodItem=`CuratedFoodItem`,e.Settings=`Settings`,e.ProfileStack=`ProfileStack`,e.GlucoseSettings=`GlucoseSettings`,e.ActivitySettings=`ActivitySettings`,e.InsulinSettingsStack=`InsulinSettingsStack`,e.Notifications=`Notifications`,e.AppleHealth=`AppleHealth`,e.Theme=`Theme`,e.SetupGlucoseMeters=`SetupGlucoseMeters`,e.IFU=`IFU`,e.Support=`Support`,e.SupportWebView=`SupportWebView`,e.SupportContact=`SupportContact`,e.Legal=`Legal`,e.GlucoseUnit=`GlucoseUnit`,e.ChangePINCode=`ChangePINCode`,e.ConfirmPINCode=`ConfirmPINCode`,e.Profile=`Profile`,e.AccountWebView=`AccountWebView`,e.PINCode=`PINCode`,e.InsulinSettings=`InsulinSettings`,e.TreatmentType=`TreatmentType`,e.RapidActingInsulin=`RapidActingInsulin`,e.LongActingInsulin=`LongActingInsulin`,e.NovoPenSetupScreen1=`NovoPenSetupScreen1`,e.NovoPenSetupScreen2=`NovoPenSetupScreen2`,e.NovoPenSetupScreen3=`NovoPenSetupScreen3`,e.NovoPenSetupScreen4=`NovoPenSetupScreen4`,e.SmartPenSetupStack=`SmartPenSetupStack`,e.SmartPenSetupScreen1=`SmartPenSetupScreen1`,e.SmartPenSetupScreen2=`SmartPenSetupScreen2`,e.RenameSmartPen=`RenameSmartPen`,e.NewCalculationStack=`NewCalculationStack`,e.CreateLogbook=`CreateLogbook`,e.CreateFood=`CreateFood`,e.RecommendationLogbook=`RecommendationLogbook`,e.LicensingStatus=`LicensingStatus`,e.LicensingWebView=`LicensingWebView`,e.SetupCGMWebview=`SetupCGMWebview`,e.SetupForecastWebview=`SetupForecastWebview`,e.NovoPenSetupStack=`NovoPenSetupStack`,e}({}),K8=function(e){return e.SetupBolusCalculator=`SetupBolusCalculator`,e.QuickGuideStack=`QuickGuideStack`,e.PINCodeSetup=`PINCodeSetup`,e.SetupStart=`SetupStart`,e.Setup=`Setup`,e.QuickGuideStart=`QuickGuideStart`,e.QuickGuide=`QuickGuide`,e.QuickGuideAllSet=`QuickGuideAllSet`,e}({}),Sun=async e=>{let t=`${NK.HEDIA_API_URL_V3}/data/objects`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),await n.json()},Cun=e=>{let t=e.reduce((e,t)=>e+I6(t.amount,t.foodItem.measures[0].gramsPerUnit,t.foodItem.nutritionPer100g.carbohydrates.value),0);return Math.round(t)},wun={foodIntakeItems:[],visualSearchIds:[],foodIntakeCarbsAmount:0,manualCarbsInput:0},q8=kK()((e,t)=>({...wun,setManualCarbsInput:t=>{e({manualCarbsInput:Math.round(t)})},addVisualSearchId:t=>{e(e=>({visualSearchIds:[...e.visualSearchIds,t]}))},addFoodIntakeItem:t=>{e(e=>{let n=e.foodIntakeItems.findIndex(e=>e.foodItem.id===t.foodItem.id),r;r=n===-1?[...e.foodIntakeItems,t]:e.foodIntakeItems.map((e,r)=>r===n?t:e);let i=Cun(r);return{foodIntakeItems:r,foodIntakeCarbsAmount:i}})},removeFoodIntakeItem:(t,n)=>{e(e=>{let r=e.foodIntakeItems.filter(({foodItem:e})=>!(n===`id`?e.id===t:e.title===t));return{foodIntakeItems:r,foodIntakeCarbsAmount:Cun(r)}})},saveCarbohydrates:async e=>{let{foodIntakeItems:n,foodIntakeCarbsAmount:r,manualCarbsInput:i,visualSearchIds:a}=t();if(!n.length&&!i)return null;let o=e.toISOString(),s=n.map(e=>({type:`referenced`,foodId:e.foodItem.id,quantity:{unit:e.foodItem.measures[0].unit,value:e.amount*e.foodItem.measures[0].gramsPerUnit}})),c=i>0?[{type:`standalone`,nutritionPerItem:{carbohydrates:{unit:`g`,value:i}},title:null}]:[],l=await Cin({startDate:o,endDate:o,visualSearchIds:a,items:[...s,...c]});try{return{sampleId:(await Sun({type:`carbohydrates`,startDate:o,endDate:o,quantity:{unit:`g`,value:r+i},metadata:{foodIntakeId:l.id}})).id,foodIntakeId:l.id}}catch(e){throw await win(l.id).catch(console.error),e}},clear:()=>{e(wun)}})),Tun={availableGlucoseReadings:[],selectedReadingId:null},J8=kK()((e,t)=>({...Tun,glucoseStoreActions:{set:t=>{e(e=>({...e,...t}))},addAvailableGlucoseReading:t=>{e(e=>{let n=e.availableGlucoseReadings.findIndex(e=>e.id===t.id||e.source===t.source);if(n!==-1){let r=[...e.availableGlucoseReadings];return r[n]=t,{...e,availableGlucoseReadings:r}}return{...e,availableGlucoseReadings:[...e.availableGlucoseReadings,t]}})},setAvailableGlucoseReadings:t=>{e(e=>({...e,availableGlucoseReadings:t}))},setSelectedReadingId:t=>{e(e=>({...e,selectedReadingId:t}))},removeReadingsByDeviceName:t=>{e(e=>{let n=e.availableGlucoseReadings.filter(e=>!(`deviceName`in e)||e.deviceName!==t),r=e.availableGlucoseReadings.find(t=>t.id===e.selectedReadingId),i=r&&`deviceName`in r&&r.deviceName===t?null:e.selectedReadingId;return{...e,availableGlucoseReadings:n,selectedReadingId:i}})},getReadingById:e=>e===null?null:t().availableGlucoseReadings.find(t=>t.id===e)??null,clear:()=>{e(Tun)}}})),Eun={isGoToSettingsPressed:!1,isNoBGModalVisible:!1,showCalculationInfoModal:!1,showDiscardCalculationModal:!1,showDiscardSmartPenSetupModal:!1,showSyncErrorModal:!1},Y8=kK()(e=>({...Eun,modalStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(Eun)}}})),Dun={noteId:null,noteBody:``,displayImageUri:null},X8=kK()(e=>({...Dun,noteStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(Dun)}}}));V();var Z8={top:10,bottom:10,left:20,right:20},Q8=()=>{let{goBack:e}=XQ(),{COLORS:t}=J();return(0,W.jsx)(Kp,{onPress:e,testID:`header-back-button`,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:t.bgBtnSecondary,borderColor:t.border}],hitSlop:Z8,children:(0,W.jsx)(P8t,{height:28,width:28})})},$8=({onPress:e})=>{let{pop:t}=XQ(),{COLORS:n}=J();return(0,W.jsx)(Kp,{onPress:e??(()=>t()),testID:`header-close-button`,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:n.bgBtnSecondary,borderColor:n.border}],hitSlop:Z8,children:(0,W.jsx)(I8t,{height:28,width:28})})},Oun=({style:e})=>{let{navigate:t}=XQ(),{COLORS:n}=J(),r=(0,H.useRef)(0);return(0,W.jsx)(Kp,{onPress:(0,H.useCallback)(()=>{let e=Date.now();e-r.current<500||(r.current=e,C6(S6.SettingsTabPress),VK?(q8.getState().clear(),J8.getState().glucoseStoreActions.clear(),X8.getState().noteStoreActions.clear(),t(Q.ConfirmPINCode)):t(Q.SettingsStack))},[t]),testID:`header-settings-button`,style:({pressed:t})=>[t5.button,{opacity:t?.5:1,backgroundColor:n.bgBtnSecondary,borderColor:n.border},e],hitSlop:Z8,children:(0,W.jsx)($8t,{})})},kun=({onPress:e,testID:t=`header-info-button`,style:n})=>{let{COLORS:r}=J(),{modalStoreActions:i}=Y8();return(0,W.jsx)(Kp,{onPress:e??(()=>i.set({showCalculationInfoModal:!0})),testID:t,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:r.bgBtnSecondary,borderColor:r.border},n],hitSlop:Z8,children:(0,W.jsx)(B8t,{height:28,width:28})})},e5=({onPress:e,disabled:t=!1})=>{let{COLORS:n}=J();return(0,W.jsx)(Kp,{testID:`header-confirm-button`,style:({pressed:e})=>[t5.button,{opacity:e||t?.5:1,backgroundColor:n.bgBrand,borderWidth:0}],onPress:e,disabled:t,hitSlop:Z8,children:(0,W.jsx)(R2,{height:28,width:28,color:n.iconButtonPrimary})})},Aun=({onPress:e})=>{let{COLORS:t}=J();return(0,W.jsx)(Kp,{testID:`header-edit-button`,onPress:e,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:t.bgBtnSecondary,borderColor:t.border}],hitSlop:Z8,children:(0,W.jsx)(R8t,{height:28,width:28})})},jun=({onPress:e,isLocked:t})=>{let{COLORS:n}=J();return(0,W.jsx)(Kp,{testID:`header-lock-button`,onPress:e,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:n.bgBtnSecondary,borderColor:n.border}],hitSlop:Z8,children:t?(0,W.jsx)(H8t,{height:28,width:28}):(0,W.jsx)(Q8t,{height:28,width:28})})},t5=R.create({button:{padding:8,borderRadius:22,borderWidth:1}});({...q.Poppins.medium_Base});var n5={cardStyle:{flex:1},headerShown:!0,headerLeft:Q8,headerTitleStyle:{...q.Poppins.medium_Base},headerTitleAlign:`center`,headerTitleAllowFontScaling:!1,title:``},Mun={...n5,animation:`slide_from_bottom`,presentation:`modal`,headerLeft:$8,headerLeftContainerStyle:{flex:1},headerTitleContainerStyle:{flex:3,alignItems:`center`},headerRightContainerStyle:{flex:1}},Nun=async e=>{let t=`${NK.ASSET_BASE_URL}/assets/${e}`,n=await w6(t,{method:`GET`,headers:{Accept:`application/json`}});return await y0(n,Y.StatusCode.OK,t),n.json()},Pun=async e=>{let t=`${NK.ASSET_BASE_URL}/assets/${e}`;await y0(await w6(t,{method:`DELETE`}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)},r5=[`foods`,`personal`],Fun=()=>{let{data:e=[],isLoading:t,isError:n,refetch:r}=M1({queryKey:r5,queryFn:min,staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{personalFoods:e,isPersonalFoodsLoading:t,isPersonalFoodsError:n,refetchPersonalFoods:r}},Iun=()=>{let e=j1(),{mutateAsync:t,isPending:n,isError:r,error:i}=z1t({mutationFn:xin,onSuccess:()=>{e.invalidateQueries({queryKey:r5})}});return{createPersonalFood:t,isCreatingPersonalFood:n,createPersonalFoodError:r?i:null}},Lun=e=>[`foods`,`item`,e],Run=e=>{let{data:t=null,isLoading:n,isError:r,refetch:i}=M1({queryKey:Lun(e),queryFn:()=>vin(e),staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{food:t,isFoodLoading:n,isFoodError:r,refetchFood:i}},i5=[`foods`,`search`],zun=e=>[...i5,e],Bun=e=>{let{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:zun(e),queryFn:()=>_in(e),enabled:e.length>2,staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{foodSearchResults:t,isFoodSearchLoading:n,isFoodSearchError:r,refetchFoodSearch:i}},Vun=()=>{let e=j1(),{mutateAsync:t,isPending:n}=z1t({mutationFn:e=>bin(e),onSuccess:(t,n)=>{e.setQueryData(r5,e=>e?.filter(e=>e.id!==n)),e.setQueriesData({queryKey:i5},e=>e?.filter(e=>e.id!==n)),e.setQueryData(Lun(n),null),e.invalidateQueries({queryKey:r5}),e.invalidateQueries({queryKey:i5})}});return{deletePersonalFood:t,isDeletingPersonalFood:n}},Hun=()=>{let e=j1(),{mutateAsync:t,isPending:n}=z1t({mutationFn:({foodId:e,request:t})=>yin(e,t),onSuccess:t=>{e.setQueryData(Lun(t.id),t),e.setQueryData(r5,e=>e?.map(e=>e.id===t.id?t:e)),e.setQueriesData({queryKey:i5},e=>e?.map(e=>e.id===t.id?t:e)),e.invalidateQueries({queryKey:r5}),e.invalidateQueries({queryKey:i5})}});return{updatePersonalFood:t,isUpdatingPersonalFood:n}};V();var Uun={outlineStyle:`none`};function Wun({value:e,onChangeText:t,imageUri:n,containerStyle:r,testID:i,autoFocus:a,maxLength:o=1024}){let{COLORS:s}=J(),{t:c}=RK(),l=(0,H.useRef)(null);return(0,H.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{l.current?.focus()},300);return()=>{clearTimeout(e)}},[a]),(0,W.jsxs)(B,{style:[Gun.container,{backgroundColor:s.bgInputActive},r],testID:i,children:[(0,W.jsx)(am,{ref:l,value:e,onChangeText:t,placeholder:c(`notes_placeholder`),placeholderTextColor:s.labelTertiary,multiline:!0,maxLength:o,style:[Gun.input,{color:s.labelPrimary},Uun],cursorColor:s.iconBrand,testID:`${i}-input`}),!!n&&(0,W.jsx)(gd,{source:{uri:n},style:Gun.image,resizeMode:`cover`,testID:`${i}-image`})]})}var Gun=R.create({container:{borderRadius:16,padding:16,minHeight:160},input:{...q.Poppins.regular_Base,flex:1,marginBottom:16,textAlignVertical:`top`,maxHeight:300},image:{width:`100%`,height:234,borderRadius:12,marginTop:12}});V();function Kun({onPress:e}){let{t}=RK(),{COLORS:n}=J();return(0,W.jsx)(Kp,{accessibilityRole:`button`,style:[qun.button,{backgroundColor:n.iosKeyboardPicker}],onPress:e,testID:`wheel-picker-modal-cancel`,children:(0,W.jsx)(Id,{maxFontSizeMultiplier:g0.s3,style:[qun.buttonText,{color:n.textKeyboardButtons}],children:t(`button_cancel`)})})}var qun=R.create({button:{borderRadius:13},buttonText:{fontSize:17,fontWeight:`600`,paddingHorizontal:16,paddingVertical:15,textAlign:`center`}}),a5=H.memo(Kun);V();function Jun({onPress:e}){let{t}=RK(),{COLORS:n}=J();return(0,W.jsx)(Kp,{accessibilityRole:`button`,style:[Yun.button,{backgroundColor:n.iosKeyboardPicker}],onPress:e,testID:`wheel-picker-modal-confirm`,children:(0,W.jsx)(Id,{maxFontSizeMultiplier:g0.s3,style:[Yun.buttonText,{color:n.textKeyboardButtons}],children:t(`button_confirm`)})})}var Yun=R.create({button:{borderBottomLeftRadius:13,borderBottomRightRadius:13},buttonText:{fontSize:17,fontWeight:`400`,paddingHorizontal:16,paddingVertical:15,textAlign:`center`}}),o5=H.memo(Jun),Xun=c({HapticFeedbackTypes:()=>Qun,default:()=>$un,triggerHaptic:()=>Zun});function Zun(e=`selection`,t){}var Qun,$un,edn=o((()=>{Qun=function(e){return e.selection=`selection`,e.impactLight=`impactLight`,e.impactMedium=`impactMedium`,e.impactHeavy=`impactHeavy`,e.rigid=`rigid`,e.soft=`soft`,e.notificationSuccess=`notificationSuccess`,e.notificationWarning=`notificationWarning`,e.notificationError=`notificationError`,e.clockTick=`clockTick`,e.contextClick=`contextClick`,e.keyboardPress=`keyboardPress`,e.keyboardRelease=`keyboardRelease`,e.keyboardTap=`keyboardTap`,e.longPress=`longPress`,e.textHandleMove=`textHandleMove`,e.virtualKey=`virtualKey`,e.virtualKeyRelease=`virtualKeyRelease`,e.effectClick=`effectClick`,e.effectDoubleClick=`effectDoubleClick`,e.effectHeavyClick=`effectHeavyClick`,e.effectTick=`effectTick`,e}({}),$un={trigger:(e,t)=>{}}}));edn(),V();var tdn=22,ndn=26;function rdn({textStyle:e,style:t,height:n,fontScale:r,option:i,onItemPress:a}){let{COLORS:o}=J();return(0,W.jsx)(B,{style:[idn.item,t,{height:n}],children:(0,W.jsx)(Kp,{style:idn.itemPressable,onPress:a,children:(0,W.jsx)(Id,{allowFontScaling:!1,style:[e,idn.itemText,{fontSize:tdn*r,lineHeight:ndn*r,color:o.labelPrimary}],children:i})})})}var idn=R.create({item:{alignItems:`center`,justifyContent:`center`,zIndex:100},itemPressable:{width:`100%`},itemText:{textAlign:`center`,fontWeight:`400`}}),adn=H.memo(rdn);V();function odn({itemHeight:e,visibleRest:t}){let{COLORS:n}=J(),r=e*t;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(M2.default,{colors:[n.iosKeyboardPicker+`FF`,n.iosKeyboardPicker+`4D`],style:[sdn.mask,{top:0,height:r}]}),(0,W.jsx)(M2.default,{colors:[n.iosKeyboardPicker+`4D`,n.iosKeyboardPicker+`FF`],style:[sdn.mask,{bottom:0,height:r}]})]})}var sdn=R.create({mask:{position:`absolute`,left:0,right:0,pointerEvents:`none`}}),cdn=(0,H.memo)(odn);V();function ldn({testID:e,initialScrollIndex:t,options:n,onChange:r,selectedIndicatorStyle:i={},containerStyle:a={},itemStyle:o={},itemTextStyle:s={},itemHeight:c=36,visibleRest:l=3,decelerationRate:u=`normal`,containerProps:d={},flatListProps:f={},accessibilityLabel:p,ref:m}){let{t:h}=RK(),{COLORS:g}=J(),{width:_,fontScale:v}=Cm(),y=Math.min(v,g0.s3),b=Math.round(c*y),x=(1+l*2)*b,S=(0,H.useRef)(null),C=(0,H.useRef)(null);(0,H.useImperativeHandle)(m,()=>({scrollToIndex(e){S.current?.scrollToIndex({index:e,animated:!0})}}),[]);let[w]=(0,H.useState)(new jf.Value(0)),T=(0,H.useMemo)(()=>{let e=[...n];for(let t=0;t<l;t++)e.unshift(null),e.push(null);return e},[n,l]),E=(0,H.useMemo)(()=>[...Array(T.length)].map((e,t)=>t*b),[T,b]),D=(0,H.useCallback)(e=>{VK||C.current!==e&&(C.current=e)},[]),O=(0,H.useCallback)(e=>{let t=e.nativeEvent.contentOffset.y,i=Math.min(n.length-1,Math.max(0,Math.round(t/b)));D(i),VK&&(r(i),S.current?.scrollToIndex({index:i,animated:!0}))},[D,b,r,n.length]),k=F2t((...e)=>{let t=e[0];O(t)},100),A=(0,H.useCallback)(e=>{let t=e.nativeEvent.contentOffset.y,i=Math.min(b*(n.length-1),Math.max(t,0)),a=Math.floor(Math.floor(i)/b);Math.floor(i%b)>b/2&&a++,r(a)},[b,r,n.length]);return(0,W.jsxs)(B,{accessible:!0,accessibilityHint:h(`wheelpicker_accessibility_label`),accessibilityLabel:p,accessibilityRole:`adjustable`,style:[udn.container,{backgroundColor:g.iosKeyboardPicker,height:x,width:_},a],...d,children:[(0,W.jsx)(B,{style:[udn.selectedIndicator,{backgroundColor:g.iosSelectorKeyboard},{transform:[{translateY:-b/2}],height:b,width:_-32-20},i]}),(0,W.jsx)(jf.FlatList,{...f,testID:e,ref:S,showsVerticalScrollIndicator:!1,removeClippedSubviews:oyt,onScroll:jf.event([{nativeEvent:{contentOffset:{y:w}}}],{useNativeDriver:!VK,listener:VK?k:O}),scrollEventThrottle:16,initialScrollIndex:t,onMomentumScrollEnd:A,snapToInterval:b,snapToOffsets:E,decelerationRate:u,getItemLayout:(e,t)=>({length:b,offset:b*t,index:t}),data:T,keyExtractor:(e,t)=>t.toString(),windowSize:31,initialNumToRender:l*2+1,maxToRenderPerBatch:12,updateCellsBatchingPeriod:50,renderItem:({item:e,index:t})=>(0,W.jsx)(adn,{option:e,style:o,textStyle:s,height:b,fontScale:y,onItemPress:()=>{let e=Math.max(0,Math.min(t-l,n.length-1));S.current?.scrollToIndex({index:e,animated:!0})}},`option-${t}`)}),(0,W.jsx)(cdn,{itemHeight:b,visibleRest:l})]})}var udn=R.create({container:{borderTopLeftRadius:13,borderTopRightRadius:13,alignSelf:`center`},selectedIndicator:{position:`absolute`,borderRadius:7,top:`50%`,alignSelf:`center`}}),s5=H.memo(ldn);V();function ddn({items:e,isVisible:t,onCancel:n,onConfirm:r,onModalHide:i,initialScrollIndex:a,accessibilityLabel:o,testID:s}){let{COLORS:c}=J(),[l,u]=(0,H.useState)(a),{width:d}=Cm();(0,H.useEffect)(()=>{u(a)},[a]);let f=(0,H.useCallback)(e=>{u(e)},[]),p=(0,H.useCallback)(()=>{r(parseFloat(e[l]),l)},[e,r,l]),m=(0,H.useCallback)(()=>{u(a),n()},[a,n]);return(0,W.jsx)(Q2,{isVisible:t,containerStyle:{backgroundColor:c.bgTransparent},onModalHide:i,children:(0,W.jsxs)(B,{children:[(0,W.jsx)(B,{style:fdn.pickersContainer,children:(0,W.jsx)(s5,{testID:s,initialScrollIndex:a,options:e,onChange:f,accessibilityLabel:o,containerStyle:{width:d-32}})}),(0,W.jsxs)(B,{style:fdn.buttonContainer,children:[(0,W.jsx)(o5,{onPress:p}),(0,W.jsx)(a5,{onPress:m})]})]})})}var c5=H.memo(ddn),fdn=R.create({pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},buttonContainer:{gap:8}});function l5(e){let t=j1(),[n,r]=(0,H.useState)(null);return(0,H.useEffect)(()=>{if(!e){r(null);return}(async()=>{r((await t.fetchQuery({queryKey:[`asset`,e],queryFn:()=>Nun(e),staleTime:Y.Milliseconds.Minute*5})).downloadUrl)})().catch(console.error)},[e,t]),n}V();var pdn=({isLiquid:e,setSelected:t})=>{let{COLORS:n}=J();return(0,W.jsxs)(B,{style:[u5.container,{backgroundColor:n.bgSegmentContainer,borderColor:n.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[u5.segment,!e&&{backgroundColor:n.bgSegmentPrimary}],onPress:()=>{t(!1)},testID:`food-type-food-${e}`,children:(0,W.jsx)(X,{style:[u5.value,{color:e?n.textLabelInactive:n.textLabelActive}],maxFontSizeMultiplier:g0.s0,children:`g`})}),(0,W.jsx)(Kp,{style:[u5.segment,e&&{backgroundColor:n.bgSegmentPrimary}],onPress:()=>{t(!0)},testID:`food-type-drink-${e}`,children:(0,W.jsx)(X,{style:[u5.value,{color:e?n.textLabelActive:n.textLabelInactive}],maxFontSizeMultiplier:g0.s0,children:`ml`})})]})},u5=R.create({container:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`,borderRadius:32,padding:4,borderWidth:1},segment:{flex:1,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,paddingVertical:4,paddingHorizontal:10,borderRadius:16},value:{...q.Poppins.medium_Base}}),d5=({onModalHide:e})=>{let{t}=RK(),{showSyncErrorModal:n,modalStoreActions:r}=Y8();return(0,W.jsx)(Q2,{isVisible:n,onModalHide:e,onModalShow:()=>{C6(S6.ErrorOffline)},title:t(`glucose_modal_changes_title`),message:t(`glucose_modal_changes_body`),buttons:[{title:t(`glucose_modal_changes_button_confirm`),onPress:()=>{r.set({showSyncErrorModal:!1})}}]})};V();var mdn={title:``,carbohydrates:null,measure:`g`,description:``},hdn=e=>e?{title:e.title,carbohydrates:e.nutritionPer100g.carbohydrates.value,measure:e.measures[0]?.unit,description:e.description??``}:mdn,gdn=q2(0,100),_dn=`create-food`,vdn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{createPersonalFood:n,isCreatingPersonalFood:r}=Iun(),{updatePersonalFood:i,isUpdatingPersonalFood:a}=Hun(),{deletePersonalFood:o,isDeletingPersonalFood:s}=Vun(),{removeFoodIntakeItem:c}=q8(),l=QQ(),u=l.params?.personalFoodId,{personalFoods:d}=Fun(),f=u?d.find(e=>e.id===u):void 0,{modalStoreActions:p}=Y8(),m=XQ(),h=U8(),{bottomWithScroll:g}=B2(),[_,v]=(0,H.useState)(()=>hdn(f)),y=(0,H.useRef)(_),b=(0,H.useRef)(!!f);(0,H.useEffect)(()=>{if(b.current||!f||(b.current=!0,_!==y.current))return;let e=hdn(f);y.current=e,v(e)},[f,_]);let[x,S]=(0,H.useState)(!1),[C,w]=(0,H.useState)(0),[T,E]=(0,H.useState)(!1),[D,O]=(0,H.useState)(!1),k=(0,H.useRef)(!1),[A,ee]=(0,H.useState)(!1),te=(0,H.useRef)(!1),ne=l5(f?.imageId??null),re=_.title.trim().length>0&&_.carbohydrates!==null,ie=T||r||a||s,j=y.current,ae=_.title!==j.title||_.carbohydrates!==j.carbohydrates||_.measure!==j.measure||_.description!==j.description,oe=(0,H.useCallback)(()=>{if(!ae){m.pop();return}ee(!0)},[ae,m]);(0,H.useEffect)(()=>{let r=async()=>{E(!0);try{if(u)if(_.carbohydrates!==j.carbohydrates||_.measure!==j.measure){let e=await n({title:_.title.trim(),description:_.description.trim()||null,imageId:f?.imageId??null,measures:[{unit:_.measure,gramsPerUnit:1}],nutritionPer100g:{carbohydrates:{unit:`g`,value:_.carbohydrates??0}}});try{await o(u)}catch(t){throw await o(e.id).catch(console.error),t}c(u,`id`)}else await i({foodId:u,request:{title:_.title.trim(),description:_.description.trim()||null}});else await n({title:_.title.trim(),description:_.description.trim()||null,measures:[{unit:_.measure,gramsPerUnit:1}],nutritionPer100g:{carbohydrates:{unit:`g`,value:_.carbohydrates??0}}});m.getState().routes.some(({key:e})=>e===l.key)&&m.pop(),C6(S6.FoodLibraryCreatePress)}catch{p.set({showSyncErrorModal:!0})}finally{E(!1)}};m.setOptions({headerTransparent:!0,gestureEnabled:!1,header:()=>(0,W.jsx)(G8,{title:_.title||e(`add_food_segment_food`),LeftButton:(0,W.jsx)($8,{onPress:oe}),RightButton:ie?(0,W.jsx)(np,{size:`small`,color:t.iconBrand,style:f5.activityIndicator}):(0,W.jsx)(e5,{onPress:r,disabled:!ae||!re}),overlay:!0})})},[re,ae,m,_,p,ie,t.iconBrand,n,i,o,c,j.carbohydrates,j.measure,f?.imageId,u,l.key,oe,e]);let se=(0,H.useCallback)(()=>{qf.dismiss(),w(Math.max(0,_.carbohydrates??0)),S(!0)},[_.carbohydrates]),ce=(0,H.useCallback)(e=>{v(t=>({...t,carbohydrates:e})),S(!1)},[]),M=(0,H.useCallback)(e=>{v(t=>({...t,description:e}))},[]),N=(0,H.useCallback)(()=>{te.current=!0,ee(!1)},[]),P=(0,H.useCallback)(()=>{te.current&&(te.current=!1,m.pop())},[m]),le=(0,H.useCallback)(()=>{k.current=!0,O(!1)},[]),ue=(0,H.useCallback)(async()=>{if(!(!k.current||!f)){k.current=!1;try{f.imageId&&await Pun(f.imageId).catch(console.error),await o(f.id),c(f.id,`id`),m.getState().routes.some(({key:e})=>e===l.key)&&m.pop()}catch{p.set({showSyncErrorModal:!0})}}},[f,o,c,m,l.key,p]);return(0,W.jsxs)(ys,{testID:`${_dn}-scroll`,keyboardDismissMode:`on-drag`,keyboardShouldPersistTaps:`always`,contentContainerStyle:{paddingTop:h+8,paddingBottom:g},style:{backgroundColor:t.bgSheet},children:[(0,W.jsxs)(B,{style:f5.container,children:[(0,W.jsxs)(B,{style:f5.mandatorySection,children:[(0,W.jsx)(H5t,{value:_.title,placeholder:_.measure===`mL`?e(`food_add_library_input_drink_name`):e(`food_add_library_input_name`),onChangeText:e=>v(t=>({...t,title:e})),maxLength:255,testID:`${_dn}-name`,autoFocus:!u}),(0,W.jsx)(t4,{title:e(`food_add_library_item_carbs`),onPress:se,renderRightSlot:()=>(0,W.jsxs)(X,{style:[f5.rightSlot,{color:t.labelPrimary}],testID:`${_dn}-carbohydrates`,children:[_.carbohydrates??`-`,` / 100g`]})})]}),(0,W.jsxs)(B,{style:f5.measurementSection,children:[(0,W.jsx)(X,{style:[f5.measurementQuestion,{color:t.labelPrimary}],children:e(`food_unitToggle_title`)}),(0,W.jsx)(pdn,{isLiquid:_.measure===`mL`,setSelected:e=>{v(t=>({...t,measure:e?`mL`:`g`}))}})]}),(0,W.jsx)(Wun,{value:_.description,onChangeText:M,maxLength:255,imageUri:ne,testID:`create-food-notes`}),!!f&&(0,W.jsx)(I2,{type:F2.ErrorSecondary,title:e(`button_delete_food`),testID:`delete_food_button`,disabled:ie,onPress:()=>O(!0),style:f5.deleteButton})]}),(0,W.jsx)(c5,{isVisible:x,items:gdn,initialScrollIndex:C,onCancel:()=>S(!1),onConfirm:ce,testID:`create-food-wheel-picker`}),(0,W.jsx)(Q2,{isVisible:A,title:e(`logbook_personal_modal_discard_title`),onModalHide:P,buttons:[{title:e(`button_discard_changes`),type:F2.Error,testID:`discard-button`,onPress:N},{title:e(`button_keep_editing`),type:F2.Secondary,testID:`keep-button`,onPress:()=>ee(!1)}]}),(0,W.jsx)(Q2,{isVisible:D,title:e(`food_modal_delete_food_title`),onModalHide:ue,buttons:[{title:e(`button_delete_food`),type:F2.Error,testID:`delete_modal_delete_button`,onPress:le},{title:e(`button_cancel`),type:F2.Secondary,testID:`delete_modal_cancel_button`,onPress:()=>O(!1)}]}),(0,W.jsx)(d5,{})]})},f5=R.create({container:{flex:1,paddingHorizontal:16,gap:16},mandatorySection:{gap:8},measurementSection:{gap:10},measurementQuestion:{...q.Poppins.regular_SM},rightSlot:{...q.Poppins.regular_Base,marginRight:8},deleteButton:{marginTop:8},activityIndicator:{width:44,height:44}});function ydn({uri:e,style:t,onLoadEnd:n}){let r=(0,H.useRef)(null);return(0,H.useEffect)(()=>{let e=r.current;if(!(!n||!e))return e.addEventListener(`load`,n),()=>{e.removeEventListener(`load`,n)}},[r,n]),(0,W.jsx)(`iframe`,{ref:r,src:e,style:t})}function bdn(){let{language:e}=IK.getState();return`https://pdf.hedia.io/IFU/${e}/Hedia-IFU-${x6}`}V();var xdn=()=>(0,W.jsx)(ydn,{style:Sdn.iframe,uri:bdn()}),Sdn=R.create({iframe:{flex:1}}),Cdn=s(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),wdn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=(V(),d(wm)).StyleSheet.create({container:{flex:1,overflow:`hidden`},loadingOrErrorView:{position:`absolute`,flex:1,justifyContent:`center`,alignItems:`center`,height:`100%`,width:`100%`,backgroundColor:`white`},loadingProgressBar:{height:20},errorText:{fontSize:14,textAlign:`center`,marginBottom:2},errorTextTitle:{fontSize:15,fontWeight:`500`,marginBottom:10},webView:{backgroundColor:`#ffffff`},flexStart:{alignSelf:`flex-start`},colorRed:{color:`red`}})})),Tdn=u(s((e=>{var t=Cdn();Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.WebView=void 0,t(m());var n=(V(),d(wm)),r=t(wdn()),i=Xq();e.default=e.WebView=function(){return(0,i.jsx)(n.View,{style:r.default.flexStart,children:(0,i.jsx)(n.Text,{style:r.default.colorRed,children:`React Native WebView does not support this platform.`})})}}))());V(),fQ(),l0();function Edn({url:e,testID:t,incognito:n=!0,onNavigationStateChange:r,spinnerSize:i=15,style:a}){let{t:o}=RK(),{COLORS:s}=J(),{colorScheme:c}=d0(),l=_0(c),{bottom:u}=n0(),[d,f]=(0,H.useState)(!1),[p,m]=(0,H.useState)(null),[h,g]=(0,H.useState)(null),_=(0,H.useMemo)(()=>`document.cookie = "theme=${l}; path=/; SameSite=Lax";`,[l]);return e?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Tdn.default,{source:{uri:e},testID:t,incognito:n,startInLoadingState:!0,renderLoading:()=>(0,W.jsx)(B,{style:p5.centerContainer,children:(0,W.jsx)(S4,{source:C4.LOADING_SPINNER,autoPlay:!0,style:{height:`${i}%`}})}),setSupportMultipleWindows:!1,onHttpError:()=>{f(!0),m(o(`global_modal_swr_title`)),g(o(`global_modal_swr_body`)),console.error(`WebViewLoader onHttpError: `,e)},onError:t=>{let n=t.nativeEvent.description;f(!0),n.includes(`ERR_INTERNET_DISCONNECTED`)?(m(o(`settings_modal_no_internet_title`)),g(o(`settings_modal_no_internet_body`))):(m(o(`global_modal_swr_title`)),g(o(`global_modal_swr_body`))),console.error(`WebViewLoader onError: `,e,n)},injectedJavaScriptBeforeContentLoaded:_,onNavigationStateChange:r,style:{backgroundColor:s.bgPrimary},containerStyle:[p5.container,{backgroundColor:s.bgPrimary,paddingBottom:u},a]}),d&&(0,W.jsxs)(dQ.View,{entering:rQ.duration(300).delay(2e3),style:p5.centerContainer,children:[(0,W.jsx)(X,{style:[p5.errorTitle,{color:s.labelPrimary}],children:p}),(0,W.jsx)(X,{style:[p5.errorSubtitle,{color:s.labelSecondary}],children:h})]})]}):null}var p5=R.create({container:{height:`100%`},centerContainer:{height:`100%`,justifyContent:`center`,marginHorizontal:16},errorTitle:{...q.Poppins.semiBold_2XL,textAlign:`center`},errorSubtitle:{...q.Poppins.regular_Base,textAlign:`center`}});V();function Ddn(){let e=Nsn();return VK?(0,W.jsx)(ydn,{style:Odn.iframe,uri:`https://www.hedia.com/support/partner`}):(0,W.jsx)(Edn,{url:`https://www.hedia.com/support/native`,testID:`support-webview`,style:{paddingTop:e}})}var Odn=R.create({iframe:{flex:1}}),kdn=()=>({min:Y.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:Y.CONSTANTS.CARBOHYDRATES_INPUT_MAX});q2(Y.CONSTANTS.CARBOHYDRATES_INPUT_MIN,Y.CONSTANTS.CARBOHYDRATES_INPUT_MAX),V();function Adn({children:e,offset:t=47}){let{COLORS:n}=J(),{bottom:r}=B2();return(0,W.jsxs)(B,{children:[(0,W.jsx)(M2.default,{colors:[X2(n.bgPrimary,0),n.bgPrimary],style:[jdn.gradient,{height:r+t+16}],pointerEvents:`none`}),(0,W.jsx)(B,{style:[{paddingBottom:r},jdn.contentContainer],children:e})]})}var jdn=R.create({gradient:{position:`absolute`,bottom:0,left:0,right:0},contentContainer:{position:`absolute`,bottom:0,left:0,right:0,marginHorizontal:16}}),Mdn=(0,H.memo)(Adn);V();var Ndn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{showCalculationInfoModal:n,modalStoreActions:r}=Y8(),i=(0,H.useMemo)(()=>[{testID:`close-button`,title:e(`button_close`),onPress:()=>{r.set({showCalculationInfoModal:!1})}}],[r,e]);return(0,W.jsxs)(Q2,{testID:`calculation_info_modal`,isVisible:n,title:e(`calcflow_modal_info_title`),buttons:i,enableScroll:!0,containerStyle:m5.modal,children:[(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_insulin_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_insulin_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_glucose_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_glucose_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_carbohydrates_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_carbohydrates_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_activity_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_activity_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_notes_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_notes_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_calculate_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_calculate_body`)})]},`calculation_info_modal`)},m5=R.create({modal:{maxHeight:`92%`},header:{...q.Poppins.semiBold_Base,marginTop:16},text:{...q.Poppins.regular_Base}}),Pdn=async e=>{let t=`${NK.NOTE_BASE_URL}/notes`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),n.json()},Fdn=async e=>{let t=`${NK.NOTE_BASE_URL}/notes/${e}`,n=await w6(t,{method:`GET`,headers:{Accept:`application/json`}});return await y0(n,Y.StatusCode.OK,t),n.json()},Idn=async(e,t)=>{let n=`${NK.NOTE_BASE_URL}/notes/${e}`,r=await w6(n,{method:Y.HTTPRequestMethod.PATCH,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(t)});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.PATCH),r.json()},Ldn=async e=>{let t=`${NK.NOTE_BASE_URL}/notes/${e}`;await y0(await w6(t,{method:`DELETE`}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)};function Rdn(){let e=j1(),[t,n]=(0,H.useState)(``),[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(!1),s=(0,H.useRef)(null),c=(0,H.useRef)(``),l=(0,H.useRef)(null),u=(0,H.useRef)(t);u.current=t;let d=(0,H.useCallback)(async t=>{if(s.current===null){l.current=t,s.current=t,i(!0),o(!1);try{let r=await e.fetchQuery({queryKey:[`note`,t],queryFn:()=>Fdn(t),staleTime:Y.Milliseconds.Minute*5});s.current=r.id,c.current=r.body,n(r.body)}catch{s.current=null,o(!0)}finally{i(!1)}}},[e]),f=(0,H.useCallback)(()=>{let e=l.current;e&&d(e).catch(console.error)},[d]);return{noteBody:t,setNoteBody:n,displayImageUri:null,onImageSelected:()=>void 0,onImageRemoved:()=>void 0,loadNote:d,saveNote:(0,H.useCallback)(async()=>{let t=u.current;if(!t.trim())return s.current&&=(await Ldn(s.current),e.removeQueries({queryKey:[`note`,s.current]}),null),null;if(s.current&&t===c.current)return s.current;if(s.current){let n=await Idn(s.current,{body:t});return e.setQueryData([`note`,n.id],n),s.current}let n=await Pdn({body:t});return s.current=n.id,e.setQueryData([`note`,n.id],n),n.id},[e]),deleteNoteAndAssets:(0,H.useCallback)(async t=>{try{let n=await e.fetchQuery({queryKey:[`note`,t],queryFn:()=>Fdn(t),staleTime:Y.Milliseconds.Minute*5});for(let t of n.assetIds)await Pun(t).catch(console.error),e.removeQueries({queryKey:[`asset`,t]});await Ldn(t),e.removeQueries({queryKey:[`note`,t]})}catch(e){console.error(`[useNotes::deleteNoteAndAssets] Failed:`,e)}},[e]),discardChanges:()=>Promise.resolve(),isLoading:r,loadFailed:a,retryLoad:f,hasNoteContent:(0,H.useMemo)(()=>!a&&t.trim().length>0,[t,a]),isNoteModified:(0,H.useMemo)(()=>t!==c.current,[t])}}var zdn={selectedEventUUID:null,activityDurationSeconds:0},h5=kK()(e=>({...zdn,activityStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(zdn)}}})),Bdn={setupCalculatorSettings:{},totalDailyDosage:null},Vdn=kK()(e=>({...Bdn,setupCalculatorActions:{setSetupCalculatorStoreValues:t=>{e(e=>({setupCalculatorSettings:{...e.setupCalculatorSettings,...t}}))},setTotalDailyDosage:t=>{e({totalDailyDosage:t})},clear:()=>{e(Bdn)}}})),g5=()=>Vdn(e=>e.setupCalculatorActions),_5=()=>Vdn(e=>e.setupCalculatorSettings),Hdn=()=>Vdn(e=>e.totalDailyDosage),Udn={privacyNoticeAccepted:!1,extraFoodItems:[],visualSearchId:null},v5=kK()(jK(e=>({...Udn,acceptPrivacyNotice:()=>{e({privacyNoticeAccepted:!0})},addExtraFoodItem:t=>{e(e=>{let n=e.extraFoodItems.findIndex(e=>e.foodItem.id===t.foodItem.id);return n===-1?{extraFoodItems:[...e.extraFoodItems,t]}:{extraFoodItems:e.extraFoodItems.map((e,r)=>r===n?t:e)}})},setVisualSearchId:t=>{e({visualSearchId:t})},clearExtraFoodItems:()=>{e({extraFoodItems:[]})},clearVisualSearchId:()=>{e({visualSearchId:null})},clear:()=>{e(Udn)}}),{name:`VISUAL_SEARCH_STORE`,storage:AK(FK)})),y5=()=>{q8.getState().clear(),J8.getState().glucoseStoreActions.clear(),h5.getState().activityStoreActions.clear(),X8.getState().noteStoreActions.clear()},Wdn=()=>{let{t:e}=RK(),{showDiscardCalculationModal:t,modalStoreActions:n,isGoToSettingsPressed:r}=Y8(),{deleteNoteAndAssets:i}=Rdn(),a=XQ(),o=(0,H.useRef)(!1),s=(0,H.useCallback)(()=>{let e=X8.getState().noteId;e&&i(e).catch(console.error),y5(),o.current=!0,n.set({showDiscardCalculationModal:!1})},[i,n]),c=(0,H.useCallback)(()=>{o.current&&(o.current=!1,a.pop()),r&&((oyt||HK)&&a.reset({index:1,routes:[{name:Q.MainBottomTabs},{name:Q.SettingsStack,state:{routes:[{name:Q.Settings},{name:Q.ActivitySettings}],index:1}}]}),n.set({isGoToSettingsPressed:!1}))},[r,n,a]),l=(0,H.useMemo)(()=>[{testID:`discard-button`,title:e(`calcflow_modal_discard_cal_button`),type:F2.Error,onPress:s},{testID:`cancel-button`,title:e(`button_cancel`),type:F2.Secondary,onPress:()=>{n.set({showDiscardCalculationModal:!1,isGoToSettingsPressed:!1})}}],[s,n,e]);return(0,W.jsx)(Q2,{testID:`discard_calculation_modal`,isVisible:t,title:e(`calcflow_modal_discard_cal_title`),onModalHide:c,buttons:l},`discard_calculation_modal`)};function Gdn(e,t){let n=H2(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=V2(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Kdn(e,t,n){let r=H2(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=V2(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=Gdn(o);return r.setMonth(t,Math.min(a,s)),r}function qdn(e,t,n){let r=H2(e,n?.in);return isNaN(+r)?V2(n?.in||e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=Kdn(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function Jdn(e,t,n){return Tan(e,-t,n)}var b5=function(e){return e.Create=`Create`,e.Edit=`Edit`,e.Delete=`Delete`,e}({});function Ydn(){let e=qdn(Jdn(new Date,4),{seconds:0,milliseconds:0});return i8.getLogbooks(e).map(e=>({uuid:e.uuid,time:e.entry_timestamp,insulinValue:e.insulin_entered_units?.toString()??``}))}function Xdn(){let[e,t]=(0,H.useState)(Ydn),[n,r]=(0,H.useState)(null),[i,a]=(0,H.useState)(!1),[o,s]=(0,H.useState)(`Create`),[c,l]=(0,H.useState)(void 0),u=(0,H.useCallback)(()=>{t(Ydn())},[]);return(0,H.useEffect)(()=>{n&&u()},[n,u]),i$((0,H.useCallback)(()=>{u()},[u])),(0,H.useEffect)(()=>{a8.syncAll().catch(console.error).finally(()=>{u()})},[u]),{entries:e,animatedEntryId:n,isInfoModalVisible:i,setIsInfoModalVisible:a,registerInsulinAction:o,editingInsulinEntry:c,refresh:u,handleEditInsulinEntry:(0,H.useCallback)(t=>{let n=e.find(e=>e.uuid===t);n&&(s(`Edit`),l(n))},[e]),handleEntryAnimationFinished:(0,H.useCallback)(()=>{r(null)},[]),handleRegisterInsulinPressed:(0,H.useCallback)(()=>{s(`Create`),l(void 0)},[]),handleRegisterInsulinClose:(0,H.useCallback)(e=>{r(e||`deleted-${Date.now()}`)},[])}}if(!H.useState)throw Error(`mobx-react-lite requires React with Hooks support`);if(!Ytn)throw Error(`mobx-react-lite@3 requires mobx at least version 6 to be available`);var x5=v();function Zdn(e){e()}function Qdn(e){e||=Zdn,Ftn({reactionScheduler:e})}function $dn(e){return Ltn(e)}var efn=!1;function tfn(){return efn}var nfn=1e4,rfn=1e4,ifn=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){e===void 0&&(e=nfn),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,rfn))}}),e}(),afn=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:ifn)(function(e){var t;(t=e.reaction)==null||t.dispose(),e.reaction=null}),ofn=s((e=>{var t=m();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),sfn=s(((e,t)=>{t.exports=ofn()}))();function cfn(e){e.reaction=new z3(`observer${e.name}`,function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)==null||t.call(e)})}function lfn(e,t){if(t===void 0&&(t=`observed`),tfn())return e();var n=H.useRef(null);if(!n.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return afn.unregister(r),r.onStoreChange=e,r.reaction||(cfn(r),r.stateVersion=Symbol()),function(){var e;r.onStoreChange=null,(e=r.reaction)==null||e.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};n.current=r}var i=n.current;i.reaction||(cfn(i),afn.register(n,i,i)),H.useDebugValue(i.reaction,$dn),(0,sfn.useSyncExternalStore)(i.subscribe,i.getSnapshot,i.getSnapshot);var a,o;if(i.reaction.track(function(){try{a=e()}catch(e){o=e}}),o)throw o;return a}var ufn=typeof Symbol==`function`&&Symbol.for,dfn=Object.getOwnPropertyDescriptor(function(){},`name`)?.configurable??!1,ffn=ufn?Symbol.for(`react.forward_ref`):typeof H.forwardRef==`function`&&(0,H.forwardRef)(function(e){return null}).$$typeof,pfn=ufn?Symbol.for(`react.memo`):typeof H.memo==`function`&&(0,H.memo)(function(e){return null}).$$typeof;function S5(e,t){if(pfn&&e.$$typeof===pfn)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(tfn())return e;var n=t?.forwardRef??!1,r=e,i=e.displayName||e.name;if(ffn&&e.$$typeof===ffn&&(n=!0,r=e.render,typeof r!=`function`))throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a=function(e,t){return lfn(function(){return r(e,t)},i)};return a.displayName=e.displayName,dfn&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes),n&&(a=(0,H.forwardRef)(a)),a=(0,H.memo)(a),hfn(e,a),a}var mfn={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function hfn(e,t){Object.keys(e).forEach(function(n){mfn[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}function gfn(e){var t=e.children,n=e.render;t&&n&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var r=t||n;return typeof r==`function`?lfn(r):null}gfn.displayName=`Observer`,Qdn(x5.unstable_batchedUpdates),afn.finalizeAllImmediately,V();function _fn(){return H.useEffect(()=>{console.warn(`DateTimePicker is not supported on: ${z.OS}`)},[]),null}var vfn=_fn;V();var C5=(e,t)=>{let n=e.indexOf(t);return n===-1?0:n},w5=(e,t)=>{let n=new Date(e);return n.setHours(t,0,0,0),{date:n,formatted:Y6(n,`HH:mm`)}},T5=Array.from({length:60},(e,t)=>t.toString().padStart(2,`0`));function yfn({isVisible:e,initialValue:t,min:n,max:r,onCancel:i,onConfirm:a,onModalHide:o}){let{COLORS:s}=J(),{width:c}=Cm(),l=(0,H.useRef)(null),u=(0,H.useRef)(null),[d,f]=(0,H.useState)(t),p=(0,H.useMemo)(()=>{if(!n||!r){let e=new Date;return Array.from({length:24},(t,n)=>w5(e,n))}let e=n.getHours(),t=r.getHours(),i=[];if(T5t(n,r)&&n<r&&e<=t)for(let r=e;r<=t;r++)i.push(w5(n,r));else{for(let t=e;t<24;t++)i.push(w5(n,t));for(let e=0;e<=t;e++)i.push(w5(r,e))}return i},[n,r]),m=(0,H.useMemo)(()=>p.map(e=>Y6(e.date,`HH`)),[p]),h=(0,H.useMemo)(()=>{let[e]=Y6(t,`HH:mm`).split(`:`);return C5(m,e)},[t,m]),g=(0,H.useMemo)(()=>{let[,e]=Y6(t,`HH:mm`).split(`:`);return C5(T5,e)},[t]),_=(0,H.useMemo)(()=>{let[e]=Y6(d,`HH:mm`).split(`:`);return C5(m,e)},[d,m]),v=(0,H.useMemo)(()=>{let[,e]=Y6(d,`HH:mm`).split(`:`);return C5(T5,e)},[d]),y=(0,H.useMemo)(()=>n?C5(m,Y6(n,`HH`)):null,[n,m]),b=(0,H.useMemo)(()=>r?C5(m,Y6(r,`HH`)):null,[r,m]),x=(0,H.useMemo)(()=>n?parseInt(Y6(n,`mm`),10):null,[n]),S=(0,H.useMemo)(()=>r?parseInt(Y6(r,`mm`),10):null,[r]),C=(0,H.useCallback)((e,t)=>{let n=e<0||e>=m.length,r=t<0||t>=T5.length;if(n||r)return;let i=p[e].date;f(qdn(i,{minutes:parseInt(T5[t],10),seconds:0,milliseconds:0}))},[m.length,p]),w=(0,H.useCallback)(e=>{u.current?.scrollToIndex(e)},[]),T=(0,H.useCallback)(e=>{if(b===null||y===null||S===null||x===null){C(e,v);return}let t=v;if(e===y&&v<x){t=x,w(x),C(e,t);return}if(e===b&&v>S){t=S,w(S),C(e,t);return}C(e,v)},[b,y,S,x,v,C,w]),E=(0,H.useCallback)(e=>{if(b===null||y===null||S===null||x===null){C(_,e);return}let t=e;if(_===y&&e<x){t=x,w(x),C(_,t);return}if(_===b&&e>S){t=S,w(S),C(_,t);return}C(_,t)},[b,S,y,x,_,C,w]),D=(0,H.useCallback)(()=>{a(d)},[a,d]),O=(0,H.useCallback)(()=>{f(t),i()},[i,t]);return(0,W.jsx)(Q2,{isVisible:e,containerStyle:{backgroundColor:s.bgTransparent},onModalHide:o,children:(0,W.jsxs)(B,{children:[(0,W.jsxs)(B,{style:E5.pickersContainer,children:[(0,W.jsx)(s5,{ref:l,initialScrollIndex:h,options:m,onChange:T,containerStyle:[E5.itemContainerLeft,{width:(c-32)/2}],selectedIndicatorStyle:[E5.selectedIndicatorLeft,{width:(c-32)/2-10}],itemStyle:E5.itemLeft,testID:`hours-wheel-picker`},`hours-wheel-picker`),(0,W.jsx)(s5,{ref:u,initialScrollIndex:g,options:T5,onChange:E,containerStyle:[E5.itemContainerRight,{width:(c-32)/2}],selectedIndicatorStyle:[E5.selectedIndicatorRight,{width:(c-32)/2-10}],itemStyle:E5.itemRight,testID:`minutes-wheel-picker`},`minutes-wheel-picker`)]}),(0,W.jsxs)(B,{style:E5.buttonContainer,children:[(0,W.jsx)(o5,{onPress:D}),(0,W.jsx)(a5,{onPress:O})]})]})})}var bfn=H.memo(yfn),E5=R.create({buttonContainer:{gap:8},pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:`flex-end`,marginRight:16},itemRight:{alignSelf:`flex-start`,marginLeft:16},selectedIndicatorRight:{alignSelf:`flex-start`,borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:`flex-end`,borderTopRightRadius:0,borderBottomRightRadius:0}}),xfn=({onPress:e})=>(0,W.jsx)(o5,{onPress:e}),Sfn=({onPress:e})=>(0,W.jsx)(a5,{onPress:e}),Cfn=.5,wfn=e=>{switch(e){case Y.InjectionMethod.PenWhole:return q2(Y.CONSTANTS.INSULIN_DOSE_MIN,Y.CONSTANTS.INSULIN_DOSE_MAX);case Y.InjectionMethod.PenHalf:return w5t(Y.CONSTANTS.INSULIN_DOSE_MIN,Y.CONSTANTS.INSULIN_DOSE_MAX,Cfn);case Y.InjectionMethod.Pump:return J2(Y.CONSTANTS.INSULIN_DOSE_MIN,Y.CONSTANTS.INSULIN_DOSE_MAX);default:throw Error(`[insulin::getInsulinInputSequentialArray] Unsupported injection method!`)}},Tfn=e=>{switch(e){case Y.InjectionMethod.PenWhole:return 0;case Y.InjectionMethod.PenHalf:return 1;case Y.InjectionMethod.Pump:return 1;default:throw Error(`[insulin::getInsulinInputDecimalPlaces] Unsupported injection method!`)}};V(),l0();function Efn({action:e=b5.Create,insulinEntry:t,onClose:n}){let{t:r}=RK(),{COLORS:i}=J(),{bottom:a}=n0(),{colorScheme:o}=d0(),s=_0(o),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(t?.insulinValue),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(t?.time),[g,_]=(0,H.useState)(),[v,y]=(0,H.useState)(!1),[b,x]=(0,H.useState)(!1),S=(0,H.useRef)(!1),{initialInsulinValue:C,initialDate:w}=(0,H.useMemo)(()=>({initialInsulinValue:t?.insulinValue,initialDate:t?.time}),[t]),T=(0,H.useCallback)(()=>{l(!0)},[]);(0,H.useEffect)(()=>{e===b5.Create&&setTimeout(()=>{T()},300),d(t?.insulinValue),h(t?.time)},[e,T,t]);let E=H6.injectionMethod;if(E===void 0)throw Error(`[RegisterActiveInsulin::render] injectionMethod is undefined`);let D=(0,H.useMemo)(()=>wfn(E),[E]),O=(0,H.useCallback)(async()=>{try{if(!u||!m){console.error(`[RegisterActiveInsulin::handleConfirm] insulinValue or date is undefined`),y(!0);return}let r=e===b5.Create,i=r?Van({entry_timestamp:m,insulin_entered_units:parseFloat(u)}):{...i8.getLogbookByUUID(t.uuid),entry_timestamp:m,insulin_entered_units:parseFloat(u)};if(!await i8.addLogbook(i,r?void 0:t.uuid)){y(!0);return}n(i.uuid)}catch(e){console.error(`[RegisterActiveInsulin::handleConfirm] Error saving insulin entry:`,e),y(!0)}},[m,u,e,t,n]),k=(0,H.useCallback)(async()=>{try{if(!t)return;await i8.deleteLogbook(t.uuid)?n():y(!0)}catch(e){console.error(`[RegisterActiveInsulin::deleteInsulinEntry] Error deleting insulin entry:`,e),y(!0)}},[t,n]),A=(0,H.useCallback)(()=>{S.current=!0,x(!1)},[]),ee=(0,H.useCallback)(()=>{S.current&&(S.current=!1,k().catch(console.error))},[k]),te=(0,H.useCallback)(()=>{p(!0)},[]),ne=(0,H.useCallback)(e=>{let t=new Date,n=h5t(e,{start:qdn(Jdn(t,4),{seconds:0,milliseconds:0}),end:t})?void 0:r(`error_insulin_intake_hint`);h(e),_(n),p(!1)},[r]),re=(0,H.useCallback)(()=>{p(!1)},[]),ie=(0,H.useCallback)(e=>{d(e.toString()),l(!1)},[]),j=(0,H.useMemo)(()=>{if(!u)return 0;let e=Tfn(E);return D.findIndex(t=>t===parseFloat(u).toFixed(e))},[u,D,E]);function ae(){return(0,W.jsxs)(B,{style:D5.header,children:[(0,W.jsx)($8,{onPress:n}),(0,W.jsx)(X,{style:D5.headerTitle,numberOfLines:1,ellipsizeMode:`middle`,children:r(`register_insulin_title`,{timeFourHour:Y6(Jdn(new Date,4),`HH:mm`)})}),(0,W.jsx)(e5,{onPress:O,disabled:!m||!u||!!g||w===m&&C===u})]})}function oe(){return(0,W.jsx)(B,{style:[D5.setTimeButton,{backgroundColor:i.bgPill}],children:(0,W.jsx)(X,{style:[D5.setTimeText,{color:i.labelPrimary},f&&{color:i.textLink},!!g&&{color:i.textInputDanger}],children:m?Y6(m,`HH:mm`):r(`register_insulin_time_button_unit`)})})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ae,{}),(0,W.jsxs)(ys,{contentContainerStyle:D5.contentContainer,children:[(0,W.jsxs)(B,{style:D5.screen,children:[(0,W.jsx)(t4,{title:r(`register_insulin_input_title`),testID:`insulin-input`,onPress:T,renderRightSlot:()=>(0,W.jsxs)(B,{style:D5.insulinRightSlot,children:[(0,W.jsx)(X,{style:[D5.insulinText,{color:i.labelPrimary}],children:u}),(0,W.jsx)(X,{style:[D5.unitsText,{color:i.labelPrimary}],children:r(u&&parseFloat(u)===1?`unit`:`units`)})]}),style:c?{borderColor:i.borderInputFocus}:void 0}),(0,W.jsx)(N2,{isAnimated:!!g,children:(0,W.jsx)(t4,{renderLeftSlot:()=>(0,W.jsx)(X,{children:r(`register_insulin_time_input_title`)}),testID:`time-input`,errorMessage:g,onPress:te,renderRightSlot:oe,style:f?{flexWrap:`wrap`,paddingVertical:8,borderColor:i.borderInputFocus}:D5.rowInsulin})})]}),e===b5.Edit&&(0,W.jsx)(I2,{title:r(`button_delete`),onPress:()=>{x(!0)},type:F2.Error})]}),(0,W.jsx)(c5,{isVisible:c,items:D,onConfirm:ie,onCancel:()=>{l(!1)},initialScrollIndex:j,testID:`insulin-wheel-picker`}),HK?(0,W.jsx)(vfn,{testID:`date-time-picker`,isVisible:f,display:`spinner`,date:m??new Date,mode:new Date().getHours()>=4?`time`:`datetime`,minimumDate:new Date(1900,0,1),maximumDate:new Date,onConfirm:ne,onCancel:re,customConfirmButtonIOS:xfn,customCancelButtonIOS:Sfn,pickerContainerStyleIOS:{backgroundColor:i.iosKeyboardPicker},themeVariant:s,isDarkModeEnabled:s===`dark`,pickerStyleIOS:D5.alignCenter,modalStyleIOS:{paddingBottom:a},is24Hour:!0,locale:`en_GB`}):(0,W.jsx)(bfn,{isVisible:f,initialValue:m??new Date,onConfirm:ne,onCancel:re}),(0,W.jsx)(Q2,{isVisible:b,onModalHide:ee,title:r(`register_insulin_modal_title`),message:r(`register_insulin_modal_body`),buttons:[{title:r(`button_delete`),testID:`confirm_delete`,type:F2.Error,onPress:A},{title:r(`button_cancel`),type:F2.Secondary,onPress:()=>{x(!1)}}]}),(0,W.jsx)(Q2,{isVisible:v,title:r(`glucose_modal_changes_title`),message:r(`glucose_modal_changes_body`),buttons:[{title:r(`glucose_modal_changes_button_confirm`),onPress:()=>{y(!1)}}]})]})}var Dfn=S5(Efn),D5=R.create({header:{width:`100%`,flexDirection:`row`,justifyContent:`space-between`,alignItems:`center`,paddingHorizontal:16,paddingBottom:12},headerTitle:{...q.Poppins.medium_Base,flex:1,textAlign:`center`,marginHorizontal:8},contentContainer:{flex:1,paddingHorizontal:16,paddingTop:32,paddingBottom:440,gap:24},screen:{gap:16},rowInsulin:{flexWrap:`wrap`,paddingVertical:8},insulinRightSlot:{flexDirection:`row`,flex:1,alignItems:`center`,marginRight:8},setTimeButton:{borderRadius:16,paddingHorizontal:12,paddingVertical:8},setTimeText:{...q.Poppins.medium_Base},insulinText:{...q.Poppins.medium_Base,marginRight:4},unitsText:{...q.Poppins.medium_Base},alignCenter:{alignSelf:`center`}});V();function Ofn({entriesCount:e,onInfoPress:t}){let{t:n}=RK(),{COLORS:r}=J(),i=e>0;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:O5.iconContainer,children:[(0,W.jsx)(V8t,{}),(0,W.jsx)(Kp,{testID:`info-button`,style:O5.infoIconButton,onPress:t,children:(0,W.jsx)(B8t,{height:32,width:32,color:r.iconBrand})})]}),(0,W.jsx)(X,{style:O5.title,children:n(i?`Recent_insulin_title`:`Recent_insulin_empty_title`)}),(0,W.jsx)(X,{style:[O5.subtitle,O5.headerSubtitle,{color:r.labelSecondary}],children:n(i?`recent_insulin_body`:`Recent_insulin_empty_body`)})]})}function kfn(){return(0,W.jsx)(B,{style:O5.separatorList})}var O5=R.create({iconContainer:{marginBottom:16},title:{...q.Poppins.semiBold_2XL,marginBottom:8},subtitle:{...q.Poppins.regular_SM},headerSubtitle:{marginBottom:48},infoIconButton:{position:`absolute`,right:0},separatorList:{height:8}});V(),l0();function Afn({onNoInsulinPressed:e}){let{t}=RK(),{COLORS:n}=J(),{entries:r,animatedEntryId:i,isInfoModalVisible:a,setIsInfoModalVisible:o,registerInsulinAction:s,editingInsulinEntry:c,handleEditInsulinEntry:l,handleEntryAnimationFinished:u,handleRegisterInsulinPressed:d,handleRegisterInsulinClose:f}=Xdn(),p=(0,H.useRef)(null),m=(0,H.useCallback)(()=>{C6(S6.RecentInsulinRegisterPress),d(),p.current?.present()},[d]),h=(0,H.useCallback)(e=>{f(e),p.current?.close()},[f]),g=(0,H.useCallback)(e=>{l(e),p.current?.present()},[l]);return(0,W.jsxs)(c0,{edges:[`bottom`],children:[(0,W.jsx)(nl,{testID:`active_insulin_list`,data:r,keyExtractor:e=>e.uuid,contentContainerStyle:k5.contentContainer,ListHeaderComponent:()=>(0,W.jsx)(Ofn,{entriesCount:r.length,onInfoPress:()=>{o(!0)}}),ListHeaderComponentStyle:void 0,renderItem:({item:e,index:n})=>{let r=parseFloat(e.insulinValue)===1?t(`unit`):t(`units`);return(0,W.jsx)(b8t,{isAnimated:i===e.uuid,onAnimationFinished:u,children:(0,W.jsx)(t4,{title:Y6(e.time,`HH:mm`),onPress:()=>{g(e.uuid)},testID:`entry-${n}`,renderRightSlot:()=>(0,W.jsxs)(B,{style:k5.rightSlot,children:[(0,W.jsx)(X,{style:k5.insulinValueText,children:`${e.insulinValue} ${r}`}),(0,W.jsx)(z2,{})]})})})},ItemSeparatorComponent:kfn,ListFooterComponent:()=>(0,W.jsxs)(B,{style:k5.buttonsWrapper,children:[(0,W.jsx)(I2,{title:r.length>0?t(`recent_insulin_button_add`):t(`recent_insulin_empty_button_add`),onPress:m,testID:`register-insulin-button`,type:r.length>0?F2.Secondary:F2.Primary}),(0,W.jsx)(I2,{title:r.length>0?t(`Recent_insulin_button_continue`):t(`recent_insulin_empty_button_continue`),type:r.length>0?F2.Primary:F2.Secondary,onPress:e})]}),ListFooterComponentStyle:k5.footer}),(0,W.jsx)(PQ,{ref:p,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:n.bgSheet,borderRadius:36},stackBehavior:`push`,enablePanDownToClose:!1,children:(0,W.jsx)(IQ,{children:(0,W.jsx)(Dfn,{action:s,insulinEntry:c,onClose:h})})}),(0,W.jsx)(Q2,{isVisible:a,onRequestClose:()=>{o(!1)},title:t(`Recent_insulin_modal_title`),message:t(`Recent_insulin_modal_body`),buttons:[{title:t(`button_close`),onPress:()=>{o(!1)}}]},`recent_insulin_info`)]})}var k5=R.create({contentContainer:{paddingHorizontal:16,paddingBottom:16},footer:{paddingTop:48},buttonsWrapper:{gap:8},rightSlot:{flexDirection:`row`,alignItems:`center`},insulinValueText:{...q.Poppins.regular_Base,marginRight:16}}),A5=()=>J8(e=>e.selectedReadingId&&e.availableGlucoseReadings.find(t=>t.id===e.selectedReadingId)||null),jfn=e=>J8(t=>t.availableGlucoseReadings.find(t=>t.source===e)||null),j5=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,M5=globalThis,Mfn=`10.30.0`;function N5(){return Nfn(M5),M5}function Nfn(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.30.0`,t[Mfn]=t[`10.30.0`]||{}}function P5(e,t,n=M5){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Mfn]=r[`10.30.0`]||{};return i[e]||(i[e]=t())}var Pfn=`Sentry Logger `,Ffn={};function Ifn(e){if(!(`console`in M5))return e();let t=M5.console,n={},r=Object.keys(Ffn);r.forEach(e=>{let r=Ffn[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Lfn(){Wfn().enabled=!0}function Rfn(){Wfn().enabled=!1}function zfn(){return Wfn().enabled}function Bfn(...e){Ufn(`log`,...e)}function Vfn(...e){Ufn(`warn`,...e)}function Hfn(...e){Ufn(`error`,...e)}function Ufn(e,...t){j5&&zfn()&&Ifn(()=>{M5.console[e](`${Pfn}[${e}]:`,...t)})}function Wfn(){return j5?P5(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var F5={enable:Lfn,disable:Rfn,isEnabled:zfn,log:Bfn,warn:Vfn,error:Hfn},Gfn=`<anonymous>`;function Kfn(e){try{return!e||typeof e!=`function`?Gfn:e.name||Gfn}catch{return Gfn}}function qfn(e){return`__v_isVNode`in e&&e.__v_isVNode?`[VueVNode]`:`[VueViewModel]`}var Jfn=Object.prototype.toString;function Yfn(e){switch(Jfn.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return L5(e,Error)}}function Xfn(e,t){return Jfn.call(e)===`[object ${t}]`}function I5(e){return Xfn(e,`String`)}function Zfn(e){return Xfn(e,`Object`)}function Qfn(e){return typeof Event<`u`&&L5(e,Event)}function $fn(e){return typeof Element<`u`&&L5(e,Element)}function epn(e){return Xfn(e,`RegExp`)}function tpn(e){return!!(e?.then&&typeof e.then==`function`)}function npn(e){return Zfn(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function L5(e,t){try{return e instanceof t}catch{return!1}}function rpn(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue||e.__v_isVNode))}var ipn=M5,apn=80;function opn(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||apn;for(;n&&i++<5&&(o=spn(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function spn(e,t){let n=e,r=[];if(!n?.tagName)return``;if(ipn.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&I5(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function R5(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{j5&&F5.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function cpn(e){if(Yfn(e))return{message:e.message,name:e.name,stack:e.stack,...upn(e)};if(Qfn(e)){let t={type:e.type,target:lpn(e.target),currentTarget:lpn(e.currentTarget),...upn(e)};return typeof CustomEvent<`u`&&L5(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lpn(e){try{return $fn(e)?opn(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}}function upn(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function dpn(e){return fpn(e,new Map)}function fpn(e,t){if(typeof e!=`object`||!e)return e;let n=t.get(e);if(n!==void 0)return n;if(Array.isArray(e)){let n=[];return t.set(e,n),e.forEach(e=>{n.push(fpn(e,t))}),n}if(ppn(e)){let n={};return t.set(e,n),Object.keys(e).forEach(r=>{let i=e[r];i!==void 0&&(n[r]=fpn(i,t))}),n}return e}function ppn(e){let t=e.constructor;return t===Object||t===void 0}function mpn(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function hpn(e,t,n=!1){return I5(e)?epn(t)?t.test(e):I5(t)?n?e===t:e.includes(t):!1:!1}function gpn(){let e=M5;return e.crypto||e.msCrypto}var _pn;function vpn(){return Math.random()*16}function z5(e=gpn()){try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,``)}catch{}return _pn||=`10000000100040008000100000000000`,_pn.replace(/[018]/g,e=>(e^(vpn()&15)>>e/4).toString(16))}var ypn=1e3;function bpn(){return Date.now()/ypn}function xpn(){let{performance:e}=M5;if(!e?.now||!e.timeOrigin)return bpn;let t=e.timeOrigin;return()=>(t+e.now())/ypn}var Spn;function B5(){return(Spn??=xpn())()}function Cpn(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||B5(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:z5()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function wpn(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=wpn(r[e],t[e],n-1));return r}function V5(){return z5()}function Tpn(){return z5().substring(16)}var Epn=`_sentrySpan`;function H5(e,t){t?R5(e,Epn,t):delete e[Epn]}function U5(e){return e[Epn]}var Dpn=100,W5=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:V5(),sampleRand:Math.random()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,H5(t,U5(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Cpn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=(n instanceof e?n.getScopeData():Zfn(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,H5(this,void 0),this._attachments=[],this.setPropagationContext({traceId:V5(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Dpn;if(n<=0)return this;let r={timestamp:bpn(),...e,message:e.message?mpn(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:U5(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=wpn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||z5();if(!this._client)return j5&&F5.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||z5();if(!this._client)return j5&&F5.warn(`No client configured on scope - will not capture message!`),r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t?.event_id||z5();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(j5&&F5.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Opn(){return P5(`defaultCurrentScope`,()=>new W5)}function kpn(){return P5(`defaultIsolationScope`,()=>new W5)}var Apn=class{constructor(e,t){let n;n=e||new W5;let r;r=t||new W5,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return tpn(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function G5(){let e=Nfn(N5());return e.stack=e.stack||new Apn(Opn(),kpn())}function jpn(e){return G5().withScope(e)}function Mpn(e,t){let n=G5();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Npn(e){return G5().withScope(()=>e(G5().getIsolationScope()))}function Ppn(){return{withIsolationScope:Npn,withScope:jpn,withSetScope:Mpn,withSetIsolationScope:(e,t)=>Npn(t),getCurrentScope:()=>G5().getScope(),getIsolationScope:()=>G5().getIsolationScope()}}function K5(e){let t=Nfn(e);return t.acs?t.acs:Ppn()}function q5(){return K5(N5()).getCurrentScope()}function J5(){return K5(N5()).getIsolationScope()}function Fpn(){return P5(`globalScope`,()=>new W5)}function Ipn(...e){let t=K5(N5());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Y5(){return q5().getClient()}var X5=`sentry.source`,Lpn=`sentry.sample_rate`,Rpn=`sentry.op`,Z5=`sentry.origin`,zpn=`sentry.idle_span_finish_reason`,Bpn=`sentry.measurement_unit`,Vpn=`sentry.measurement_value`,Hpn=`sentry.custom_span_name`,Upn=`sentry.profile_id`,Wpn=`sentry.exclusive_time`,Gpn=`_sentryScope`,Kpn=`_sentryIsolationScope`;function qpn(e){try{let t=M5.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Jpn(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}function Ypn(e,t,n){e&&(R5(e,Kpn,qpn(n)),R5(e,Gpn,t))}function Xpn(e){let t=e;return{scope:t[Gpn],isolationScope:Jpn(t[Kpn])}}var Zpn=/^sentry-/;function Qpn(e){let t=$pn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(Zpn)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function $pn(e){if(!(!e||!I5(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=emn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):emn(e)}function emn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var tmn=/^o(\d+)\./;function nmn(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function rmn(e){return e.match(tmn)?.[1]}function imn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=rmn(n)),r}function amn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var omn=!1;function smn(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=$5(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function cmn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Q5(e){return typeof e==`number`?lmn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?lmn(e.getTime()):B5()}function lmn(e){return e>9999999999?e/1e3:e}function $5(e){if(dmn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(umn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0,start_timestamp:Q5(i),timestamp:Q5(o)||void 0,status:fmn(s),op:r[Rpn],origin:r[Z5],links:cmn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function umn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function dmn(e){return typeof e.getSpanJSON==`function`}function e7(e){let{traceFlags:t}=e.spanContext();return t===1}function fmn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}var t7=`_sentryChildSpans`,pmn=`_sentryRootSpan`;function mmn(e,t){R5(t,pmn,e[pmn]||e),e[t7]?e[t7].add(t):R5(e,t7,new Set([t]))}function hmn(e,t){e[t7]&&e[t7].delete(t)}function n7(e){let t=new Set;function n(e){if(!t.has(e)&&e7(e)){t.add(e);let r=e[t7]?Array.from(e[t7]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}function r7(e){return e[pmn]||e}function gmn(){let e=K5(N5());return e.getActiveSpan?e.getActiveSpan():U5(q5())}function _mn(){omn||=(Ifn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function i7(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||Y5()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function vmn(e){F5.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ymn(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(bmn(n)){if(hpn(e.description,n))return j5&&vmn(e),!0;continue}if(!n.name&&!n.op)continue;let t=n.name?hpn(e.description,n.name):!0,r=n.op?e.op&&hpn(e.op,n.op):!0;if(t&&r)return j5&&vmn(e),!0}return!1}function bmn(e){return typeof e==`string`||e instanceof RegExp}var xmn=`_frozenDsc`;function a7(e,t){R5(e,xmn,t)}function Smn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:imn(t)};return t.emit(`createDsc`,i),i}function o7(e){let t=Y5();if(!t)return{};let n=r7(e),r=$5(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[xmn];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&Qpn(l);if(u)return s(u);let d=Smn(e.spanContext().traceId,t),f=i[X5],p=r.description;return f!==`url`&&p&&(d.transaction=p),i7()&&(d.sampled=String(e7(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??Xpn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}var s7=class{constructor(e={}){this._traceId=e.traceId||V5(),this._spanId=e.spanId||Tpn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function Cmn(e,t=100,n=1/0){try{return wmn(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function wmn(e,t,n=1/0,r=1/0,i=Dmn()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Tmn(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__==`number`?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return wmn(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=cpn(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=wmn(e,t,c-1,r,i),d++}return o(t),u}function Tmn(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof globalThis<`u`&&t===globalThis)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(rpn(t))return qfn(t);if(npn(t))return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${Kfn(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let n=Emn(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function Emn(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Dmn(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Omn(e,t=[]){return[e,t]}function kmn(e){return[{type:`span`},e]}function Amn(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=o7(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:nmn(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>!ymn($5(e),c)):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=$5(e);return s(t)||(_mn(),t)}:$5,f=[];for(let e of l){let t=d(e);t&&f.push(kmn(t))}return Omn(o,f)}function jmn(e){if(!j5)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:r}=$5(e),{spanId:i}=e.spanContext(),a=e7(e),o=r7(e),s=o===e,c=`[Tracing] Starting ${a?`sampled`:`unsampled`} ${s?`root `:``}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&l.push(`parent ID: ${r}`),!s){let{op:e,description:t}=$5(o);l.push(`root ID: ${o.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}F5.log(`${c}
889
+ `)};t(),document.head.contains(e)||document.head.appendChild(e),window.addEventListener(`resize`,t),o=()=>{window.removeEventListener(`resize`,t)}}else document.getElementById(i)?.remove();return a(e===t.width&&n===t.height),o},[t.height,t.width]),(0,W.jsx)(B,{...r,pointerEvents:`box-none`,style:[e&&i?Fln.page:Fln.card,n]})}var Fln=R.create({page:{minHeight:`100%`},card:{flex:1,overflow:`hidden`}});V();var Iln=.3,Lln=1,I8=0,Rln=z.OS!==`web`,zln=e=>{if(e){let t=R.flatten(e);return`opacity`in t&&t.opacity!=null}return!1},Bln=({closing:e,layout:t,gestureDirection:n,direction:r,preloaded:i})=>!e&&!i?0:T8(t,n,r===`rtl`),Vln=({style:e})=>e?(0,W.jsx)(jf.View,{pointerEvents:`none`,style:[L8.overlay,e]}):null;function Hln({shadowEnabled:e=!1,gestureEnabled:t=!0,gestureVelocityImpact:n=Iln,overlay:r=Vln,animated:i,interpolationIndex:a,opening:o,closing:s,next:c,current:l,gesture:u,layout:d,insets:f,direction:p,pageOverflowEnabled:m,gestureDirection:h,onOpen:g,onClose:_,onTransition:v,onGestureBegin:y,onGestureCanceled:b,onGestureEnd:x,children:S,overlayEnabled:C,gestureResponseDistance:w,transitionSpec:T,preloaded:E,styleInterpolator:D,containerStyle:O,contentStyle:k}){let A=H.useRef(!1),ee=H.useRef(void 0),te=H.useRef(void 0),ne=H.useRef(void 0),re=H.useRef(void 0),ie=H.useRef(void 0),[j]=H.useState(()=>new jf.Value(I8)),[ae]=H.useState(()=>new jf.Value(w8(h,p===`rtl`))),[oe]=H.useState(()=>({width:new jf.Value(d.width),height:new jf.Value(d.height)})),[se]=H.useState(()=>new jf.Value(I8)),ce=HQ(()=>{te.current===void 0&&(te.current=Ms.createInteractionHandle())}),M=HQ(()=>{te.current!==void 0&&(Ms.clearInteractionHandle(te.current),te.current=void 0)}),N=HQ(({closing:e,velocity:t})=>{let n=Bln({closing:e,layout:d,gestureDirection:h,direction:p,preloaded:E});ee.current=n,j.setValue(e?Lln:I8);let r=e?T.close:T.open,a=r.animation===`spring`?jf.spring:jf.timing;clearTimeout(re.current),ne.current!==void 0&&cancelAnimationFrame(ne.current),v?.({closing:e,gesture:t!==void 0});let o=()=>{e?_():g(),ne.current=requestAnimationFrame(()=>{de()})};i?(ce(),a(u,{...r.config,velocity:t,toValue:n,useNativeDriver:Rln,isInteraction:!1}).start(({finished:e})=>{M(),clearTimeout(re.current),e&&o()})):o()}),P=HQ(({nativeEvent:e})=>{switch(e.state){case C8.ACTIVE:clearTimeout(re.current),clearTimeout(ie.current),se.setValue(Lln),ce(),y?.();break;case C8.CANCELLED:case C8.FAILED:se.setValue(I8),M(),N({closing:s,velocity:h===`vertical`||h===`vertical-inverted`?e.velocityY:e.velocityX}),b?.();break;case C8.END:{se.setValue(I8);let t,r,i;h===`vertical`||h===`vertical-inverted`?(t=d.height,r=e.translationY,i=e.velocityY):(t=d.width,r=e.translationX,i=e.velocityX);let a=(r+i*n)*w8(h,p===`rtl`)>t/2?i!==0||r!==0:s;N({closing:a,velocity:i}),a&&(re.current=setTimeout(()=>{_(),ie.current=setTimeout(()=>{de()},32)},16)),x?.();break}}});H.useLayoutEffect(()=>{oe.width.setValue(d.width),oe.height.setValue(d.height),ae.setValue(w8(h,p===`rtl`))},[h,p,ae,oe.width,oe.height,d.width,d.height]);let le=H.useRef(null);H.useEffect(()=>()=>{M(),ne.current&&cancelAnimationFrame(ne.current),clearTimeout(re.current),clearTimeout(ie.current)},[]);let ue=H.useRef(void 0),de=HQ(()=>{if(clearTimeout(re.current),clearTimeout(ie.current),!A.current)clearTimeout(ue.current),ue.current=setTimeout(()=>{A.current=!0,N({closing:s})},0);else{let e=le.current?.opening,t=le.current?Bln(le.current):null,n=Bln({closing:s,layout:d,gestureDirection:h,direction:p,preloaded:E});t!==n||ee.current!==n?N({closing:s}):typeof e==`boolean`&&o&&!e&&(u.setValue(T8(d,h,p===`rtl`)),N({closing:s}))}});H.useEffect(()=>{E||(de(),le.current={opening:o,closing:s,layout:d,gestureDirection:h,direction:p,preloaded:E})},[N,s,p,u,h,d,o,E,de]);let fe=H.useMemo(()=>({index:a,current:{progress:l},next:c&&{progress:c},closing:j,swiping:se,inverted:ae,layouts:{screen:d},insets:{top:f.top,right:f.right,bottom:f.bottom,left:f.left}}),[a,l,c,j,se,ae,d,f.top,f.right,f.bottom,f.left]),{containerStyle:pe,cardStyle:me,overlayStyle:he,shadowStyle:ge}=H.useMemo(()=>D(fe),[D,fe]),F=H.useMemo(()=>t?jf.event([{nativeEvent:h===`vertical`||h===`vertical-inverted`?{translationY:u}:{translationX:u}}],{useNativeDriver:Rln}):void 0,[u,h,t]),{backgroundColor:_e}=R.flatten(k||{}),I=typeof _e==`string`?(0,v8.default)(_e).alpha()===0:!1;return(0,W.jsxs)(kln.Provider,{value:fe,children:[z.OS===`web`?null:(0,W.jsx)(jf.View,{style:{opacity:l},collapsable:!1}),C?(0,W.jsx)(B,{pointerEvents:`box-none`,style:R.absoluteFill,children:r({style:he})}):null,(0,W.jsx)(jf.View,{pointerEvents:`box-none`,style:[L8.container,pe,O],children:(0,W.jsx)(Bsn,{enabled:d.width!==0&&t,onGestureEvent:F,onHandlerStateChange:P,...Mln({layout:d,direction:p,gestureDirection:h,gestureResponseDistance:w}),children:(0,W.jsxs)(jf.View,{pointerEvents:`box-none`,needsOffscreenAlphaCompositing:zln(me),style:[L8.container,me],children:[e&&ge&&!I?(0,W.jsx)(jf.View,{pointerEvents:`none`,style:[L8.shadow,h===`horizontal`?[L8.shadowHorizontal,L8.shadowStart]:h===`horizontal-inverted`?[L8.shadowHorizontal,L8.shadowEnd]:h===`vertical`?[L8.shadowVertical,L8.shadowTop]:[L8.shadowVertical,L8.shadowBottom],{backgroundColor:_e},ge]}):null,(0,W.jsx)(Pln,{enabled:m,layout:d,style:k,children:S})]})})})]})}var L8=R.create({container:{flex:1},overlay:{flex:1,backgroundColor:`#000`},shadow:{position:`absolute`},shadowHorizontal:{top:0,bottom:0,width:3,...Nln({offset:{width:-1,height:1},radius:5,opacity:.3})},shadowStart:{start:0},shadowEnd:{end:0},shadowVertical:{start:0,end:0,height:3,...Nln({offset:{width:1,height:-1},radius:5,opacity:.3})},shadowTop:{top:0},shadowBottom:{bottom:0}});V();var Uln=H.forwardRef(({focused:e,active:t,animated:n,isNextScreenTransparent:r,detachCurrentScreen:i,children:a},o)=>{let[s,c]=H.useState(!1);H.useImperativeHandle(o,()=>({setInert:c}),[]);let l=!n&&r===!1&&i!==!1&&!e;return(0,W.jsx)(B,{"aria-hidden":!e,pointerEvents:(n?s:!e)?`none`:`box-none`,style:[R.absoluteFill,{overflow:t?void 0:`hidden`,display:z.OS!==`web`&&l?`none`:`flex`,visibility:l?`hidden`:`visible`}],collapsable:!1,children:a})});Uln.displayName=`CardA11yWrapper`,V();var Wln=.1;function Gln({interpolationIndex:e,index:t,active:n,opening:r,closing:i,gesture:a,focused:o,modal:s,getPreviousScene:c,getFocusedRoute:l,hasAbsoluteFloatHeader:u,headerHeight:d,onHeaderHeightChange:f,isParentHeaderShown:p,isNextScreenTransparent:m,detachCurrentScreen:h,layout:g,onCloseRoute:_,onOpenRoute:v,onGestureCancel:y,onGestureEnd:b,onGestureStart:x,onTransitionEnd:S,onTransitionStart:C,preloaded:w,renderHeader:T,safeAreaInsetBottom:E,safeAreaInsetLeft:D,safeAreaInsetRight:O,safeAreaInsetTop:k,scene:A}){let ee=H.useRef(null),{direction:te}=l$(),ne=H.useContext(Msn),{options:re}=A.descriptor,{onPageChangeStart:ie,onPageChangeCancel:j,onPageChangeConfirm:ae}=Oln({enabled:o&&re.keyboardHandlingEnabled!==!1,focused:o}),oe=()=>{let{route:e}=A.descriptor;S({route:e},!1),v({route:e})},se=()=>{let{route:e}=A.descriptor;S({route:e},!0),_({route:e})},ce=()=>{let{route:e}=A.descriptor;ie(),x({route:e})},M=()=>{let{route:e}=A.descriptor;j(),y({route:e})},N=()=>{let{route:e}=A.descriptor;b({route:e})},P=({closing:e,gesture:t})=>{ee.current?.setInert(e);let{route:r}=A.descriptor;ae?.({gesture:t,active:n,closing:e}),C?.({route:r},e)},le={top:k,right:O,bottom:E,left:D},{colors:ue}=r$();H.useEffect(()=>{let e=A.progress.next?.addListener?.(({value:e})=>{ee.current?.setInert(e>Wln)});return()=>{e&&A.progress.next?.removeListener?.(e)}},[A.progress.next]);let{presentation:de,animation:fe,cardOverlay:pe,cardOverlayEnabled:me,cardShadowEnabled:he,cardStyle:ge,cardStyleInterpolator:F,gestureDirection:_e,gestureEnabled:I,gestureResponseDistance:ve,gestureVelocityImpact:ye,headerMode:be,headerShown:xe,headerTransparent:L,transitionSpec:Se}=A.descriptor.options,{buildHref:Ce}=hKt(),we=c({route:A.descriptor.route}),Te,Ee;if(we){let{options:e,route:t}=we.descriptor;Te=nsn(e,t.name),Ee=Ce(t.name,t.params)}let De=we!=null,Oe=H.useMemo(()=>{if(De)return{href:Ee,title:Te}},[De,Te,Ee]),ke=fe!==`none`;return(0,W.jsx)(Uln,{ref:ee,focused:o,active:n,animated:ke,isNextScreenTransparent:m,detachCurrentScreen:h,children:(0,W.jsx)(Hln,{animated:ke,interpolationIndex:e,gestureDirection:_e,layout:g,insets:le,direction:te,gesture:a,current:A.progress.current,next:A.progress.next,opening:r,closing:i,onOpen:oe,onClose:se,overlay:pe,overlayEnabled:me,shadowEnabled:he,onTransition:P,onGestureBegin:ce,onGestureCanceled:M,onGestureEnd:N,gestureEnabled:t===0?!1:I,gestureResponseDistance:ve,gestureVelocityImpact:ye,transitionSpec:Se,styleInterpolator:F,pageOverflowEnabled:be!==`float`&&de!==`modal`,preloaded:w,containerStyle:u&&be!==`screen`?{marginTop:d}:null,contentStyle:[{backgroundColor:de===`transparentModal`?`transparent`:ue.background},ge],children:(0,W.jsx)(B,{style:qln.container,children:(0,W.jsxs)(zsn.Provider,{value:s,children:[be===`float`?null:T({mode:`screen`,layout:g,scenes:[we,A],getPreviousScene:c,getFocusedRoute:l,onContentHeightChange:f,style:[qln.header,L?{minHeight:d}:null]}),(0,W.jsx)(B,{style:qln.scene,children:(0,W.jsx)(jsn.Provider,{value:Oe,children:(0,W.jsx)(x8.Provider,{value:p||xe!==!1,children:(0,W.jsx)(Msn.Provider,{value:xe===!1?ne??0:d,children:A.descriptor.render()})})})})]})})})})}var Kln=H.memo(Gln),qln=R.create({container:{flex:1},header:{zIndex:1},scene:{flex:1}});V();var Jln={default:f8,fade:jon,fade_from_bottom:Eon,fade_from_right:kon,none:f8,reveal_from_bottom:Don,scale_from_center:Oon,slide_from_left:Non,slide_from_right:d8,slide_from_bottom:z.select({ios:won,default:Aon})},Yln=1e-5,R8=0,Xln=1,Zln=2,Qln=Object.freeze({options:{}}),$ln=(e,t)=>{let{cardStyleInterpolator:n}=e[t].descriptor.options,r=0;for(let i=t-1;i>=0&&e[i]?.descriptor.options.cardStyleInterpolator===n;i--)r++;return r},z8=e=>e===non||e.name===`forModalPresentationIOS`,eun=(e,t,n)=>{if(n)return!0;let{cardStyleInterpolator:r}=e.descriptor.options;return z8(r)&&t!==0},tun=(e,t,n,r,i,a)=>e.reduce((o,s,c)=>{let{headerStatusBarHeight:l=n?0:t.top,headerStyle:u}=s.descriptor.options,d=R.flatten(u||{}),f=`height`in d&&typeof d.height==`number`?d.height:a[s.route.key],p=eun(s,$ln(e,c),r);return o[s.route.key]=typeof f==`number`?f:tsn(i,p,l),o},{}),nun=(e,t,n)=>{if(t?.gestureDirection)return T8(e,t.gestureDirection,n);let r=t?.presentation===`modal`?Mon.gestureDirection:f8.gestureDirection;return T8(e,t?.animation?Jln[t?.animation]?.gestureDirection:r,n)},run=(e,t,n,r)=>{let i=nun({width:Math.max(1,t.width),height:Math.max(1,t.height)},n,r);return i>0?e.interpolate({inputRange:[0,i],outputRange:[1,0]}):e.interpolate({inputRange:[i,0],outputRange:[0,1]})};function iun(e){let t=z.OS!==`web`&&z.OS!==`windows`&&z.OS!==`macos`;return e??(t?`default`:`none`)}function aun(e){return iun(e)!==`none`}var oun=class extends H.Component{static getDerivedStateFromProps(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;let n=[...e.routes,...e.state.preloadedRoutes].reduce((n,r)=>{let i=e.descriptors[r.key]||e.preloadedDescriptors[r.key],{animation:a}=i?.options||{};return n[r.key]=t.gestures[r.key]||new jf.Value(e.openingRouteKeys.includes(r.key)&&aun(a)||e.state.preloadedRoutes.includes(r)?nun(t.layout,i?.options,e.direction===`rtl`):0),n},{}),r=Jsn([...e.routes,...e.state.preloadedRoutes],{...e.descriptors,...e.preloadedDescriptors}),i=[...e.routes,...e.state.preloadedRoutes].map((i,a,o)=>{let s=e.state.preloadedRoutes.includes(i),c=s?void 0:o[a-1],l=s?void 0:o[a+1],u=t.scenes[a],d=n[i.key],f=c?n[c.key]:void 0,p=l?n[l.key]:void 0,m=(s?e.preloadedDescriptors:e.descriptors)[i.key]||t.descriptors[i.key]||(u?u.descriptor:Qln),h=l&&(e.descriptors[l?.key]||t.descriptors[l?.key])?.options,g=c&&(e.descriptors[c?.key]||t.descriptors[c?.key])?.options,_=a!==o.length-1&&h&&h?.presentation!==`transparentModal`?h:m.options,v=r.includes(i.key),y=iun(_.animation),b=aun(y),x=y==="default"?_.presentation===`transparentModal`?jon:_.presentation===`modal`||v?Mon:f8:Jln[y],{gestureEnabled:S=z.OS===`ios`&&b,gestureDirection:C=x.gestureDirection,transitionSpec:w=x.transitionSpec,cardStyleInterpolator:T=b?x.cardStyleInterpolator:lon,headerStyleInterpolator:E=x.headerStyleInterpolator,cardOverlayEnabled:D=z.OS!==`ios`&&_.presentation!==`transparentModal`||z8(T)}=_,O=m.options.headerMode??(!(_.presentation===`modal`||_.presentation===`transparentModal`||h?.presentation===`modal`||h?.presentation===`transparentModal`||z8(T))&&z.OS===`ios`&&m.options.header===void 0?`float`:`screen`),k=e.direction===`rtl`,A={route:i,descriptor:{...m,options:{...m.options,animation:y,cardOverlayEnabled:D,cardStyleInterpolator:T,gestureDirection:C,gestureEnabled:S,headerStyleInterpolator:E,transitionSpec:w,headerMode:O}},progress:{current:run(d,t.layout,m.options,k),next:p&&h?.presentation!==`transparentModal`?run(p,t.layout,h,k):void 0,previous:f?run(f,t.layout,g,k):void 0},__memo:[t.layout,m,h,g,d,p,f]};return u&&A.__memo.every((e,t)=>u.__memo[t]===e)?u:A}),a=t.activeStates;if(e.routes.length!==t.routes.length){let n=1;for(let t=e.routes.length-1;t>=0;t--){let{options:r}=i[t].descriptor,{detachPreviousScreen:a=r.presentation===`transparentModal`?!1:z8(r.cardStyleInterpolator)?t!==qsn(i,e=>{let{cardStyleInterpolator:t}=e.descriptor.options;return t===non||t?.name===`forModalPresentationIOS`}):!0}=r;if(a===!1)n++;else if(t<=e.routes.length-2)break}a=e.routes.map((e,r,a)=>{let o,s=t.activeStates[r],c=r>=a.length-n;if(s===R8&&!c)o=R8;else{let e=i[a.length-1],t=r===a.length-1?Zln:c?Xln:R8;o=e?e.progress.current.interpolate({inputRange:[0,1-Yln,1],outputRange:[1,1,t],extrapolate:`clamp`}):Xln}return o})}return{routes:e.routes,scenes:i,gestures:n,descriptors:e.descriptors,activeStates:a,headerHeights:tun(i,e.insets,e.isParentHeaderShown,e.isParentModal,t.layout,t.headerHeights)}}constructor(e){super(e),this.state={routes:[],scenes:[],gestures:{},layout:Lsn.initialMetrics.frame,descriptors:this.props.descriptors,activeStates:[],headerHeights:{}}}handleLayout=e=>{let{height:t,width:n}=e.nativeEvent.layout,r={width:n,height:t};this.setState((e,i)=>t===e.layout.height&&n===e.layout.width?null:{layout:r,headerHeights:tun(e.scenes,i.insets,i.isParentHeaderShown,i.isParentModal,r,e.headerHeights)})};handleHeaderLayout=({route:e,height:t})=>{this.setState(({headerHeights:n})=>n[e.key]===t?null:{headerHeights:{...n,[e.key]:t}})};getFocusedRoute=()=>{let{state:e}=this.props;return e.routes[e.index]};getPreviousScene=({route:e})=>{let{getPreviousRoute:t}=this.props,{scenes:n}=this.state,r=t({route:e});if(r)return n.find(e=>e.descriptor.route.key===r.key)};render(){let{insets:e,state:t,routes:n,openingRouteKeys:r,closingRouteKeys:i,onOpenRoute:a,onCloseRoute:o,renderHeader:s,isParentHeaderShown:c,isParentModal:l,onTransitionStart:u,onTransitionEnd:d,onGestureStart:f,onGestureEnd:p,onGestureCancel:m,detachInactiveScreens:h=z.OS===`web`||z.OS===`android`||z.OS===`ios`}=this.props,{scenes:g,layout:_,gestures:v,activeStates:y,headerHeights:b}=this.state,x=t.routes[t.index],S=b[x.key],C=this.state.scenes.slice(-2).some(e=>{let{headerMode:t,headerTransparent:n,headerShown:r=!0}=e.descriptor.options??{};return!!(n||r===!1||t===`screen`)});return(0,W.jsxs)(B,{style:B8.container,children:[s({mode:`float`,layout:_,scenes:g,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,style:[B8.floating,C&&[{height:S},B8.absolute]]}),(0,W.jsx)(Eln,{enabled:h,style:B8.container,onLayout:this.handleLayout,children:[...n,...t.preloadedRoutes].map((S,w)=>{let T=x.key===S.key,E=v[S.key],D=g[w],O=t.preloadedRoutes.includes(S)&&!n.includes(S);if(t.preloadedRoutes.includes(S)&&n.includes(S)&&w>=n.length)return null;let{headerShown:k=!0,headerTransparent:A,freezeOnBlur:ee,autoHideHomeIndicator:te}=D.descriptor.options,ne=e.top,re=e.right,ie=e.bottom,j=e.left,ae=k===!1?0:b[S.key],oe=$ln(g,w),se=eun(D,oe,l),ce=g[w+1]?.descriptor.options.presentation===`transparentModal`,M=g[w+1]?.descriptor.options.detachPreviousScreen!==!1,N=O?R8:y[w];return(0,W.jsx)(Dln,{style:[R.absoluteFill],enabled:h,active:N,freezeOnBlur:ee,shouldFreeze:N===R8&&!O,homeIndicatorHidden:te,pointerEvents:`box-none`,children:(0,W.jsx)(Kln,{index:w,interpolationIndex:oe,modal:se,active:w===n.length-1,focused:T,opening:r.includes(S.key),closing:i.includes(S.key),layout:_,gesture:E,scene:D,safeAreaInsetTop:ne,safeAreaInsetRight:re,safeAreaInsetBottom:ie,safeAreaInsetLeft:j,onGestureStart:f,onGestureCancel:m,onGestureEnd:p,headerHeight:ae,isParentHeaderShown:c,onHeaderHeightChange:this.handleHeaderLayout,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,hasAbsoluteFloatHeader:C&&!A,renderHeader:s,onOpenRoute:a,onCloseRoute:o,onTransitionStart:u,onTransitionEnd:d,isNextScreenTransparent:ce,detachCurrentScreen:M,preloaded:O})},S.key)})})]})}},B8=R.create({container:{flex:1},absolute:{position:`absolute`,top:0,start:0,end:0},floating:{zIndex:1}});V(),l0();var sun=Vsn??B,cun=(e,t)=>e.length===t.length&&e.every((e,n)=>Object.is(e,t[n])),lun=class extends H.Component{static getDerivedStateFromProps(e,t){let n=[...e.state.routes,...e.state.preloadedRoutes],r=t.previousState?[...t.previousState.routes,...t.previousState.preloadedRoutes]:[];if(cun(n.map(e=>e.key),r.map(e=>e.key))&&t.routes.length){let i=t.routes.filter(n=>t.closingRouteKeys.includes(n.key)&&!e.state.routes.some(e=>e.key===n.key)),a=t.routes.filter(n=>t.replacingRouteKeys.includes(n.key)&&!e.state.routes.some(e=>e.key===n.key)),o=e.state.routes.slice();if(a.length&&o.splice(o.length-1,0,...a),i.length&&o.push(...i),!cun(n,r)){let e=n.reduce((e,t)=>(e[t.key]=t,e),{});o=o.map(t=>e[t.key]||t)}let s=[...o,...e.state.preloadedRoutes].reduce((n,r)=>(n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n),{});return{routes:o,previousState:e.state,descriptors:s}}let i=e.state.index<e.state.routes.length-1?e.state.routes.slice(0,e.state.index+1):e.state.routes,{openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s}=t;o=o.filter(e=>!i.some(t=>t.key===e)),s=s.filter(e=>!i.some(t=>t.key===e));let c=t.previousState?t.previousState.routes[t.previousState.index]:void 0,l=i[i.length-1],u=n=>aun((e.descriptors[n]||t.descriptors[n])?.options.animation),d=n=>(e.descriptors[n]||t.descriptors[n]).options.animationTypeForReplace??`push`;if(c&&c.key!==l.key){if(r.some(e=>e.key===l.key)&&!i.some(e=>e.key===c.key))u(c.key)&&!o.includes(c.key)&&(o=[...o,c.key],a=a.filter(e=>e!==c.key),s=s.filter(e=>e!==c.key),i=[...i,c]);else if(u(l.key)&&!a.includes(l.key)&&(a=[...a,l.key],o=o.filter(e=>e!==l.key),s=s.filter(e=>e!==l.key),!i.some(e=>e.key===c.key)))if(a=a.filter(e=>e!==c.key),d(l.key)===`pop`)o=[...o,c.key],a=a.filter(e=>e!==l.key),i=[...i,c];else{s=[...s,c.key],o=o.filter(e=>e!==c.key),i=i.slice(),i.splice(i.length-1,0,c);let e=t.routes.filter(e=>s.includes(e.key)&&!i.some(t=>t.key===e.key));e.length&&i.splice(i.length-2,0,...e)}}else (s.length||o.length)&&(i=i.slice(),i.splice(i.length-1,0,...t.routes.filter(({key:e})=>u(e)?s.includes(e)||o.includes(e):!1)));if(!i.length)throw Error(`There should always be at least one route in the navigation state.`);let f=[...i,...e.state.preloadedRoutes].reduce((n,r)=>(n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n),{});return{routes:i,previousState:e.state,openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s,descriptors:f}}state={routes:[],previousState:void 0,openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}};getPreviousRoute=({route:e})=>{let{closingRouteKeys:t,replacingRouteKeys:n}=this.state,r=this.state.routes.filter(r=>r.key===e.key||!t.includes(r.key)&&!n.includes(r.key));return r[r.findIndex(t=>t.key===e.key)-1]};renderHeader=e=>(0,W.jsx)(Gsn,{...e});handleOpenRoute=({route:e})=>{let{state:t,navigation:n}=this.props,{closingRouteKeys:r,replacingRouteKeys:i}=this.state;r.some(t=>t===e.key)&&i.every(t=>t!==e.key)&&t.routeNames.includes(e.name)&&!t.routes.some(t=>t.key===e.key)?n.dispatch(t=>{let n=[...t.routes.filter(t=>t.key!==e.key),e];return RQ({...t,routes:n,index:n.length-1})}):this.setState(t=>{let n=t.routes.findIndex(t=>t.key===e.key),r=new Set(t.routes.slice(0,n).filter(e=>t.replacingRouteKeys.includes(e.key)).map(e=>e.key));return{routes:t.routes.filter(e=>!r.has(e.key)),openingRouteKeys:t.openingRouteKeys.filter(t=>t!==e.key),closingRouteKeys:t.closingRouteKeys.filter(t=>t!==e.key),replacingRouteKeys:t.replacingRouteKeys.filter(e=>!r.has(e))}})};handleCloseRoute=({route:e})=>{let{state:t,navigation:n}=this.props;t.routes.some(t=>t.key===e.key)?n.dispatch({...VQ.pop(),source:e.key,target:t.key}):this.setState(t=>({routes:t.routes.filter(t=>t.key!==e.key),openingRouteKeys:t.openingRouteKeys.filter(t=>t!==e.key),closingRouteKeys:t.closingRouteKeys.filter(t=>t!==e.key)}))};handleTransitionStart=({route:e},t)=>this.props.navigation.emit({type:`transitionStart`,data:{closing:t},target:e.key});handleTransitionEnd=({route:e},t)=>this.props.navigation.emit({type:`transitionEnd`,data:{closing:t},target:e.key});handleGestureStart=({route:e})=>{this.props.navigation.emit({type:`gestureStart`,target:e.key})};handleGestureEnd=({route:e})=>{this.props.navigation.emit({type:`gestureEnd`,target:e.key})};handleGestureCancel=({route:e})=>{this.props.navigation.emit({type:`gestureCancel`,target:e.key})};render(){let{state:e,descriptors:t,...n}=this.props,{routes:r,descriptors:i,openingRouteKeys:a,closingRouteKeys:o}=this.state,s=e.preloadedRoutes.reduce((e,t)=>(e[t.key]=e[t.key]||this.props.describe(t,!0),e),{});return(0,W.jsx)(sun,{style:uun.container,children:(0,W.jsx)(Lsn,{children:(0,W.jsx)(i0.Consumer,{children:t=>(0,W.jsx)(zsn.Consumer,{children:c=>(0,W.jsx)(x8.Consumer,{children:l=>(0,W.jsx)(oun,{insets:t,isParentHeaderShown:l,isParentModal:c,getPreviousRoute:this.getPreviousRoute,routes:r,openingRouteKeys:a,closingRouteKeys:o,onOpenRoute:this.handleOpenRoute,onCloseRoute:this.handleCloseRoute,onTransitionStart:this.handleTransitionStart,onTransitionEnd:this.handleTransitionEnd,renderHeader:this.renderHeader,state:e,descriptors:i,onGestureStart:this.handleGestureStart,onGestureEnd:this.handleGestureEnd,onGestureCancel:this.handleGestureCancel,preloadedDescriptors:s,...n})})})})})})}},uun=R.create({container:{flex:1}});function dun({id:e,initialRouteName:t,UNSTABLE_routeNamesChangeBehavior:n,children:r,layout:i,screenListeners:a,screenOptions:o,screenLayout:s,UNSTABLE_router:c,...l}){let{direction:u}=l$(),{state:d,describe:f,descriptors:p,navigation:m,NavigationContent:h}=XGt(qUt,{id:e,initialRouteName:t,UNSTABLE_routeNamesChangeBehavior:n,children:r,layout:i,screenListeners:a,screenOptions:o,screenLayout:s,UNSTABLE_router:c});return H.useEffect(()=>m.addListener?.(`tabPress`,e=>{let t=m.isFocused();requestAnimationFrame(()=>{d.index>0&&t&&!e.defaultPrevented&&m.dispatch({...VQ.popToTop(),target:d.key})})}),[m,d.index,d.key]),(0,W.jsx)(h,{children:(0,W.jsx)(lun,{...l,direction:u,state:d,describe:f,descriptors:p,navigation:m})})}function V8(e){return DWt(dun)(e)}V();var fun={blurredTopClearBottom:`linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%)`,blurredBottomClearTop:`linear-gradient(to top, #000 0%, #000 50%, transparent 100%)`,blurredCenterClearTopAndBottom:`linear-gradient(to bottom, transparent 0%, #000 50%, transparent 100%)`},pun=`blur(5px)`,mun=({direction:e,style:t})=>{let n=fun[e];return(0,W.jsx)(B,{style:[t,{backdropFilter:pun,WebkitBackdropFilter:pun,maskImage:n,WebkitMaskImage:n}],pointerEvents:`none`})};V();var hun=50,H8=44,gun=44,_un=10,vun=54,yun=6;function U8(e=!1){let{top:t}=B2();return(e?16:t)+vun}var bun=(0,H.memo)(function({title:e,LeftButton:t,RightButton:n,BottomContent:r,hasHeaderRow:i,style:a}){let[o,s]=(0,H.useState)(H8),[c,l]=(0,H.useState)(H8),{COLORS:u}=J(),d=(0,H.useMemo)(()=>Math.max(o,c,H8),[o,c]),f=(0,H.useCallback)(e=>{let t=Math.round(e.nativeEvent.layout.width);t&&t!==o&&s(t)},[o]),p=(0,H.useCallback)(e=>{let t=Math.round(e.nativeEvent.layout.width);t&&t!==c&&l(t)},[c]);return(0,W.jsxs)(B,{style:a,children:[i&&(0,W.jsxs)(B,{style:W8.headerRow,children:[(0,W.jsx)(B,{style:[W8.sideContainer,{minWidth:d}],onLayout:f,children:t??(0,W.jsx)(B,{style:{minWidth:d}})}),e?(0,W.jsx)(X,{style:[W8.headerTitle,{color:u.textNavigationBar}],numberOfLines:1,allowFontScaling:!1,children:e}):(0,W.jsx)(B,{style:W8.placeHolderTitle}),(0,W.jsx)(B,{style:[W8.sideContainer,{minWidth:d}],onLayout:p,children:n??(0,W.jsx)(B,{style:{minWidth:d}})})]}),r]})});function xun({title:e,LeftButton:t,RightButton:n,BottomContent:r,extraBlurSize:i=0,skipTopInset:a=!1,color:o,overlay:s=!1}){let{COLORS:c}=J(),{top:l}=B2(),u=a?16:l,d=o??c.bgPrimary,f=X2(d,0),p=e!==void 0||t!==void 0||n!==void 0,m=r&&p?hun+i:0+i,h=(0,H.useMemo)(()=>({backdrop:{height:u+vun+yun+m},container:{marginTop:u}}),[u,m]),g=VK&&s?W8.overlay:void 0;return HK||VK?(0,W.jsxs)(B,{style:g,children:[(0,W.jsxs)(B,{style:{pointerEvents:`none`},children:[(0,W.jsx)(M2.default,{colors:[d,f],style:[W8.gradient,h.backdrop]}),(0,W.jsx)(mun,{direction:`blurredTopClearBottom`,style:[W8.blur,h.backdrop],fallbackColor:d})]}),(0,W.jsx)(bun,{title:e,LeftButton:t,RightButton:n,BottomContent:r,style:h.container,hasHeaderRow:p})]}):(0,W.jsxs)(B,{children:[(0,W.jsx)(M2.default,{colors:[d,f],style:[W8.gradient,h.backdrop,{pointerEvents:`none`}]}),(0,W.jsx)(bun,{title:e,LeftButton:t,RightButton:n,BottomContent:r,style:h.container,hasHeaderRow:p})]})}var W8=R.create({headerRow:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:16,justifyContent:`space-between`,paddingBottom:_un},sideContainer:{minWidth:H8,minHeight:gun,alignItems:`center`},gradient:{position:`absolute`,top:0,left:0,right:0},blur:{position:`absolute`,top:0,left:0,right:0},overlay:{position:`absolute`,top:0,left:0,right:0},headerTitle:{...q.Poppins.medium_Base,flex:1,textAlign:`center`,paddingHorizontal:16},placeHolderTitle:{flex:1}}),G8=(0,H.memo)(xun),Q=function(e){return e.MainBottomTabs=`MainBottomTabs`,e.SettingsStack=`SettingsStack`,e.Calculation=`Calculation`,e.VisualSearchIntro=`VisualSearchIntro`,e.VisualSearchPrivacyNoticeWebView=`VisualSearchPrivacyNoticeWebView`,e.VisualSearchEducation=`VisualSearchEducation`,e.VisualSearch=`VisualSearch`,e.FoodLibrary=`FoodLibrary`,e.LoadingRecommendation=`LoadingRecommendation`,e.Recommendation=`Recommendation`,e.LeavingRecommendation=`LeavingRecommendation`,e.DashboardTab=`DashboardTab`,e.LogbooksTab=`LogbooksTab`,e.FoodTab=`FoodTab`,e.Dashboard=`Dashboard`,e.ActiveInsulinChart=`ActiveInsulinChart`,e.MyDay=`MyDay`,e.GlucoseBGM=`GlucoseBGM`,e.GlucoseCGM=`GlucoseCGM`,e.CarbohydrateChart=`CarbohydrateChart`,e.RapidInsulinChart=`RapidInsulinChart`,e.TimeInRange=`TimeInRange`,e.FoodAndDrink=`FoodAndDrink`,e.FoodSubcategories=`FoodSubcategories`,e.CuratedFood=`CuratedFood`,e.PersonalFood=`PersonalFood`,e.PersonalFoodItem=`PersonalFoodItem`,e.CuratedFoodItem=`CuratedFoodItem`,e.Settings=`Settings`,e.ProfileStack=`ProfileStack`,e.GlucoseSettings=`GlucoseSettings`,e.ActivitySettings=`ActivitySettings`,e.InsulinSettingsStack=`InsulinSettingsStack`,e.Notifications=`Notifications`,e.AppleHealth=`AppleHealth`,e.Theme=`Theme`,e.SetupGlucoseMeters=`SetupGlucoseMeters`,e.IFU=`IFU`,e.Support=`Support`,e.SupportWebView=`SupportWebView`,e.SupportContact=`SupportContact`,e.Legal=`Legal`,e.GlucoseUnit=`GlucoseUnit`,e.ChangePINCode=`ChangePINCode`,e.ConfirmPINCode=`ConfirmPINCode`,e.Profile=`Profile`,e.AccountWebView=`AccountWebView`,e.PINCode=`PINCode`,e.InsulinSettings=`InsulinSettings`,e.TreatmentType=`TreatmentType`,e.RapidActingInsulin=`RapidActingInsulin`,e.LongActingInsulin=`LongActingInsulin`,e.NovoPenSetupScreen1=`NovoPenSetupScreen1`,e.NovoPenSetupScreen2=`NovoPenSetupScreen2`,e.NovoPenSetupScreen3=`NovoPenSetupScreen3`,e.NovoPenSetupScreen4=`NovoPenSetupScreen4`,e.SmartPenSetupStack=`SmartPenSetupStack`,e.SmartPenSetupScreen1=`SmartPenSetupScreen1`,e.SmartPenSetupScreen2=`SmartPenSetupScreen2`,e.RenameSmartPen=`RenameSmartPen`,e.NewCalculationStack=`NewCalculationStack`,e.CreateLogbook=`CreateLogbook`,e.CreateFood=`CreateFood`,e.RecommendationLogbook=`RecommendationLogbook`,e.LicensingStatus=`LicensingStatus`,e.LicensingWebView=`LicensingWebView`,e.SetupCGMWebview=`SetupCGMWebview`,e.SetupForecastWebview=`SetupForecastWebview`,e.NovoPenSetupStack=`NovoPenSetupStack`,e}({}),K8=function(e){return e.SetupBolusCalculator=`SetupBolusCalculator`,e.QuickGuideStack=`QuickGuideStack`,e.PINCodeSetup=`PINCodeSetup`,e.SetupStart=`SetupStart`,e.Setup=`Setup`,e.QuickGuideStart=`QuickGuideStart`,e.QuickGuide=`QuickGuide`,e.QuickGuideAllSet=`QuickGuideAllSet`,e}({}),Sun=async e=>{let t=`${NK.HEDIA_API_URL_V3}/data/objects`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),await n.json()},Cun=e=>{let t=e.reduce((e,t)=>e+I6(t.amount,t.foodItem.measures[0].gramsPerUnit,t.foodItem.nutritionPer100g.carbohydrates.value),0);return Math.round(t)},wun={foodIntakeItems:[],visualSearchIds:[],foodIntakeCarbsAmount:0,manualCarbsInput:0},q8=kK()((e,t)=>({...wun,setManualCarbsInput:t=>{e({manualCarbsInput:Math.round(t)})},addVisualSearchId:t=>{e(e=>({visualSearchIds:[...e.visualSearchIds,t]}))},addFoodIntakeItem:t=>{e(e=>{let n=e.foodIntakeItems.findIndex(e=>e.foodItem.id===t.foodItem.id),r;r=n===-1?[...e.foodIntakeItems,t]:e.foodIntakeItems.map((e,r)=>r===n?t:e);let i=Cun(r);return{foodIntakeItems:r,foodIntakeCarbsAmount:i}})},removeFoodIntakeItem:(t,n)=>{e(e=>{let r=e.foodIntakeItems.filter(({foodItem:e})=>!(n===`id`?e.id===t:e.title===t));return{foodIntakeItems:r,foodIntakeCarbsAmount:Cun(r)}})},saveCarbohydrates:async e=>{let{foodIntakeItems:n,foodIntakeCarbsAmount:r,manualCarbsInput:i,visualSearchIds:a}=t();if(!n.length&&!i)return null;let o=e.toISOString(),s=n.map(e=>({type:`referenced`,foodId:e.foodItem.id,quantity:{unit:e.foodItem.measures[0].unit,value:e.amount*e.foodItem.measures[0].gramsPerUnit}})),c=i>0?[{type:`standalone`,nutritionPerItem:{carbohydrates:{unit:`g`,value:i}},title:null}]:[],l=await Cin({startDate:o,endDate:o,visualSearchIds:a,items:[...s,...c]});try{return{sampleId:(await Sun({type:`carbohydrates`,startDate:o,endDate:o,quantity:{unit:`g`,value:r+i},metadata:{foodIntakeId:l.id}})).id,foodIntakeId:l.id}}catch(e){throw await win(l.id).catch(console.error),e}},clear:()=>{e(wun)}})),Tun={availableGlucoseReadings:[],selectedReadingId:null},J8=kK()((e,t)=>({...Tun,glucoseStoreActions:{set:t=>{e(e=>({...e,...t}))},addAvailableGlucoseReading:t=>{e(e=>{let n=e.availableGlucoseReadings.findIndex(e=>e.id===t.id||e.source===t.source);if(n!==-1){let r=[...e.availableGlucoseReadings];return r[n]=t,{...e,availableGlucoseReadings:r}}return{...e,availableGlucoseReadings:[...e.availableGlucoseReadings,t]}})},setAvailableGlucoseReadings:t=>{e(e=>({...e,availableGlucoseReadings:t}))},setSelectedReadingId:t=>{e(e=>({...e,selectedReadingId:t}))},removeReadingsByDeviceName:t=>{e(e=>{let n=e.availableGlucoseReadings.filter(e=>!(`deviceName`in e)||e.deviceName!==t),r=e.availableGlucoseReadings.find(t=>t.id===e.selectedReadingId),i=r&&`deviceName`in r&&r.deviceName===t?null:e.selectedReadingId;return{...e,availableGlucoseReadings:n,selectedReadingId:i}})},getReadingById:e=>e===null?null:t().availableGlucoseReadings.find(t=>t.id===e)??null,clear:()=>{e(Tun)}}})),Eun={isGoToSettingsPressed:!1,isNoBGModalVisible:!1,showCalculationInfoModal:!1,showDiscardCalculationModal:!1,showDiscardSmartPenSetupModal:!1,showSyncErrorModal:!1},Y8=kK()(e=>({...Eun,modalStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(Eun)}}})),Dun={noteId:null,noteBody:``,displayImageUri:null},X8=kK()(e=>({...Dun,noteStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(Dun)}}}));V();var Z8={top:10,bottom:10,left:20,right:20},Q8=()=>{let{goBack:e}=XQ(),{COLORS:t}=J();return(0,W.jsx)(Kp,{onPress:e,testID:`header-back-button`,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:t.bgBtnSecondary,borderColor:t.border}],hitSlop:Z8,children:(0,W.jsx)(P8t,{height:28,width:28})})},$8=({onPress:e})=>{let{pop:t}=XQ(),{COLORS:n}=J();return(0,W.jsx)(Kp,{onPress:e??(()=>t()),testID:`header-close-button`,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:n.bgBtnSecondary,borderColor:n.border}],hitSlop:Z8,children:(0,W.jsx)(I8t,{height:28,width:28})})},Oun=({style:e})=>{let{navigate:t}=XQ(),{COLORS:n}=J(),r=(0,H.useRef)(0);return(0,W.jsx)(Kp,{onPress:(0,H.useCallback)(()=>{let e=Date.now();e-r.current<500||(r.current=e,C6(S6.SettingsTabPress),VK?(q8.getState().clear(),J8.getState().glucoseStoreActions.clear(),X8.getState().noteStoreActions.clear(),t(Q.ConfirmPINCode)):t(Q.SettingsStack))},[t]),testID:`header-settings-button`,style:({pressed:t})=>[t5.button,{opacity:t?.5:1,backgroundColor:n.bgBtnSecondary,borderColor:n.border},e],hitSlop:Z8,children:(0,W.jsx)($8t,{})})},kun=({onPress:e,testID:t=`header-info-button`,style:n})=>{let{COLORS:r}=J(),{modalStoreActions:i}=Y8();return(0,W.jsx)(Kp,{onPress:e??(()=>i.set({showCalculationInfoModal:!0})),testID:t,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:r.bgBtnSecondary,borderColor:r.border},n],hitSlop:Z8,children:(0,W.jsx)(B8t,{height:28,width:28})})},e5=({onPress:e,disabled:t=!1})=>{let{COLORS:n}=J();return(0,W.jsx)(Kp,{testID:`header-confirm-button`,style:({pressed:e})=>[t5.button,{opacity:e||t?.5:1,backgroundColor:n.bgBrand,borderWidth:0}],onPress:e,disabled:t,hitSlop:Z8,children:(0,W.jsx)(R2,{height:28,width:28,color:n.iconButtonPrimary})})},Aun=({onPress:e})=>{let{COLORS:t}=J();return(0,W.jsx)(Kp,{testID:`header-edit-button`,onPress:e,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:t.bgBtnSecondary,borderColor:t.border}],hitSlop:Z8,children:(0,W.jsx)(R8t,{height:28,width:28})})},jun=({onPress:e,isLocked:t})=>{let{COLORS:n}=J();return(0,W.jsx)(Kp,{testID:`header-lock-button`,onPress:e,style:({pressed:e})=>[t5.button,{opacity:e?.5:1,backgroundColor:n.bgBtnSecondary,borderColor:n.border}],hitSlop:Z8,children:t?(0,W.jsx)(H8t,{height:28,width:28}):(0,W.jsx)(Q8t,{height:28,width:28})})},t5=R.create({button:{padding:8,borderRadius:22,borderWidth:1}});({...q.Poppins.medium_Base});var n5={cardStyle:{flex:1},headerShown:!0,headerLeft:Q8,headerTitleStyle:{...q.Poppins.medium_Base},headerTitleAlign:`center`,headerTitleAllowFontScaling:!1,title:``},Mun={...n5,animation:`slide_from_bottom`,presentation:`modal`,headerLeft:$8,headerLeftContainerStyle:{flex:1},headerTitleContainerStyle:{flex:3,alignItems:`center`},headerRightContainerStyle:{flex:1}},Nun=async e=>{let t=`${NK.ASSET_BASE_URL}/assets/${e}`,n=await w6(t,{method:`GET`,headers:{Accept:`application/json`}});return await y0(n,Y.StatusCode.OK,t),n.json()},Pun=async e=>{let t=`${NK.ASSET_BASE_URL}/assets/${e}`;await y0(await w6(t,{method:`DELETE`}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)},r5=[`foods`,`personal`],Fun=()=>{let{data:e=[],isLoading:t,isError:n,refetch:r}=M1({queryKey:r5,queryFn:min,staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{personalFoods:e,isPersonalFoodsLoading:t,isPersonalFoodsError:n,refetchPersonalFoods:r}},Iun=()=>{let e=j1(),{mutateAsync:t,isPending:n,isError:r,error:i}=z1t({mutationFn:xin,onSuccess:()=>{e.invalidateQueries({queryKey:r5})}});return{createPersonalFood:t,isCreatingPersonalFood:n,createPersonalFoodError:r?i:null}},Lun=e=>[`foods`,`item`,e],Run=e=>{let{data:t=null,isLoading:n,isError:r,refetch:i}=M1({queryKey:Lun(e),queryFn:()=>vin(e),staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{food:t,isFoodLoading:n,isFoodError:r,refetchFood:i}},i5=[`foods`,`search`],zun=e=>[...i5,e],Bun=e=>{let{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:zun(e),queryFn:()=>_in(e),enabled:e.length>2,staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{foodSearchResults:t,isFoodSearchLoading:n,isFoodSearchError:r,refetchFoodSearch:i}},Vun=()=>{let e=j1(),{mutateAsync:t,isPending:n}=z1t({mutationFn:e=>bin(e),onSuccess:(t,n)=>{e.setQueryData(r5,e=>e?.filter(e=>e.id!==n)),e.setQueriesData({queryKey:i5},e=>e?.filter(e=>e.id!==n)),e.setQueryData(Lun(n),null),e.invalidateQueries({queryKey:r5}),e.invalidateQueries({queryKey:i5})}});return{deletePersonalFood:t,isDeletingPersonalFood:n}},Hun=()=>{let e=j1(),{mutateAsync:t,isPending:n}=z1t({mutationFn:({foodId:e,request:t})=>yin(e,t),onSuccess:t=>{e.setQueryData(Lun(t.id),t),e.setQueryData(r5,e=>e?.map(e=>e.id===t.id?t:e)),e.setQueriesData({queryKey:i5},e=>e?.map(e=>e.id===t.id?t:e)),e.invalidateQueries({queryKey:r5}),e.invalidateQueries({queryKey:i5})}});return{updatePersonalFood:t,isUpdatingPersonalFood:n}};V();var Uun={outlineStyle:`none`};function Wun({value:e,onChangeText:t,imageUri:n,containerStyle:r,testID:i,autoFocus:a,maxLength:o=1024}){let{COLORS:s}=J(),{t:c}=RK(),l=(0,H.useRef)(null);return(0,H.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{l.current?.focus()},300);return()=>{clearTimeout(e)}},[a]),(0,W.jsxs)(B,{style:[Gun.container,{backgroundColor:s.bgInputActive},r],testID:i,children:[(0,W.jsx)(am,{ref:l,value:e,onChangeText:t,placeholder:c(`notes_placeholder`),placeholderTextColor:s.labelTertiary,multiline:!0,maxLength:o,style:[Gun.input,{color:s.labelPrimary},Uun],cursorColor:s.iconBrand,testID:`${i}-input`}),!!n&&(0,W.jsx)(gd,{source:{uri:n},style:Gun.image,resizeMode:`cover`,testID:`${i}-image`})]})}var Gun=R.create({container:{borderRadius:16,padding:16,minHeight:160},input:{...q.Poppins.regular_Base,flex:1,marginBottom:16,textAlignVertical:`top`,maxHeight:300},image:{width:`100%`,height:234,borderRadius:12,marginTop:12}});V();function Kun({onPress:e}){let{t}=RK(),{COLORS:n}=J();return(0,W.jsx)(Kp,{accessibilityRole:`button`,style:[qun.button,{backgroundColor:n.iosKeyboardPicker}],onPress:e,testID:`wheel-picker-modal-cancel`,children:(0,W.jsx)(Id,{maxFontSizeMultiplier:g0.s3,style:[qun.buttonText,{color:n.textKeyboardButtons}],children:t(`button_cancel`)})})}var qun=R.create({button:{borderRadius:13},buttonText:{fontSize:17,fontWeight:`600`,paddingHorizontal:16,paddingVertical:15,textAlign:`center`}}),a5=H.memo(Kun);V();function Jun({onPress:e}){let{t}=RK(),{COLORS:n}=J();return(0,W.jsx)(Kp,{accessibilityRole:`button`,style:[Yun.button,{backgroundColor:n.iosKeyboardPicker}],onPress:e,testID:`wheel-picker-modal-confirm`,children:(0,W.jsx)(Id,{maxFontSizeMultiplier:g0.s3,style:[Yun.buttonText,{color:n.textKeyboardButtons}],children:t(`button_confirm`)})})}var Yun=R.create({button:{borderBottomLeftRadius:13,borderBottomRightRadius:13},buttonText:{fontSize:17,fontWeight:`400`,paddingHorizontal:16,paddingVertical:15,textAlign:`center`}}),o5=H.memo(Jun),Xun=c({HapticFeedbackTypes:()=>Qun,default:()=>$un,triggerHaptic:()=>Zun});function Zun(e=`selection`,t){}var Qun,$un,edn=o((()=>{Qun=function(e){return e.selection=`selection`,e.impactLight=`impactLight`,e.impactMedium=`impactMedium`,e.impactHeavy=`impactHeavy`,e.rigid=`rigid`,e.soft=`soft`,e.notificationSuccess=`notificationSuccess`,e.notificationWarning=`notificationWarning`,e.notificationError=`notificationError`,e.clockTick=`clockTick`,e.contextClick=`contextClick`,e.keyboardPress=`keyboardPress`,e.keyboardRelease=`keyboardRelease`,e.keyboardTap=`keyboardTap`,e.longPress=`longPress`,e.textHandleMove=`textHandleMove`,e.virtualKey=`virtualKey`,e.virtualKeyRelease=`virtualKeyRelease`,e.effectClick=`effectClick`,e.effectDoubleClick=`effectDoubleClick`,e.effectHeavyClick=`effectHeavyClick`,e.effectTick=`effectTick`,e}({}),$un={trigger:(e,t)=>{}}}));edn(),V();var tdn=22,ndn=26;function rdn({textStyle:e,style:t,height:n,fontScale:r,option:i,onItemPress:a}){let{COLORS:o}=J();return(0,W.jsx)(B,{style:[idn.item,t,{height:n}],children:(0,W.jsx)(Kp,{style:idn.itemPressable,onPress:a,children:(0,W.jsx)(Id,{allowFontScaling:!1,style:[e,idn.itemText,{fontSize:tdn*r,lineHeight:ndn*r,color:o.labelPrimary}],children:i})})})}var idn=R.create({item:{alignItems:`center`,justifyContent:`center`,zIndex:100},itemPressable:{width:`100%`},itemText:{textAlign:`center`,fontWeight:`400`}}),adn=H.memo(rdn);V();function odn({itemHeight:e,visibleRest:t}){let{COLORS:n}=J(),r=e*t;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(M2.default,{colors:[n.iosKeyboardPicker+`FF`,n.iosKeyboardPicker+`4D`],style:[sdn.mask,{top:0,height:r}]}),(0,W.jsx)(M2.default,{colors:[n.iosKeyboardPicker+`4D`,n.iosKeyboardPicker+`FF`],style:[sdn.mask,{bottom:0,height:r}]})]})}var sdn=R.create({mask:{position:`absolute`,left:0,right:0,pointerEvents:`none`}}),cdn=(0,H.memo)(odn);V();function ldn({testID:e,initialScrollIndex:t,options:n,onChange:r,selectedIndicatorStyle:i={},containerStyle:a={},itemStyle:o={},itemTextStyle:s={},itemHeight:c=36,visibleRest:l=3,decelerationRate:u=`normal`,containerProps:d={},flatListProps:f={},accessibilityLabel:p,ref:m}){let{t:h}=RK(),{COLORS:g}=J(),{width:_,fontScale:v}=Cm(),y=Math.min(v,g0.s3),b=Math.round(c*y),x=(1+l*2)*b,S=(0,H.useRef)(null),C=(0,H.useRef)(null);(0,H.useImperativeHandle)(m,()=>({scrollToIndex(e){S.current?.scrollToIndex({index:e,animated:!0})}}),[]);let[w]=(0,H.useState)(new jf.Value(0)),T=(0,H.useMemo)(()=>{let e=[...n];for(let t=0;t<l;t++)e.unshift(null),e.push(null);return e},[n,l]),E=(0,H.useMemo)(()=>[...Array(T.length)].map((e,t)=>t*b),[T,b]),D=(0,H.useCallback)(e=>{VK||C.current!==e&&(C.current=e)},[]),O=(0,H.useCallback)(e=>{let t=e.nativeEvent.contentOffset.y,i=Math.min(n.length-1,Math.max(0,Math.round(t/b)));D(i),VK&&(r(i),S.current?.scrollToIndex({index:i,animated:!0}))},[D,b,r,n.length]),k=F2t((...e)=>{let t=e[0];O(t)},100),A=(0,H.useCallback)(e=>{let t=e.nativeEvent.contentOffset.y,i=Math.min(b*(n.length-1),Math.max(t,0)),a=Math.floor(Math.floor(i)/b);Math.floor(i%b)>b/2&&a++,r(a)},[b,r,n.length]);return(0,W.jsxs)(B,{accessible:!0,accessibilityHint:h(`wheelpicker_accessibility_label`),accessibilityLabel:p,accessibilityRole:`adjustable`,style:[udn.container,{backgroundColor:g.iosKeyboardPicker,height:x,width:_},a],...d,children:[(0,W.jsx)(B,{style:[udn.selectedIndicator,{backgroundColor:g.iosSelectorKeyboard},{transform:[{translateY:-b/2}],height:b,width:_-32-20},i]}),(0,W.jsx)(jf.FlatList,{...f,testID:e,ref:S,showsVerticalScrollIndicator:!1,removeClippedSubviews:oyt,onScroll:jf.event([{nativeEvent:{contentOffset:{y:w}}}],{useNativeDriver:!VK,listener:VK?k:O}),scrollEventThrottle:16,initialScrollIndex:t,onMomentumScrollEnd:A,snapToInterval:b,snapToOffsets:E,decelerationRate:u,getItemLayout:(e,t)=>({length:b,offset:b*t,index:t}),data:T,keyExtractor:(e,t)=>t.toString(),windowSize:31,initialNumToRender:l*2+1,maxToRenderPerBatch:12,updateCellsBatchingPeriod:50,renderItem:({item:e,index:t})=>(0,W.jsx)(adn,{option:e,style:o,textStyle:s,height:b,fontScale:y,onItemPress:()=>{let e=Math.max(0,Math.min(t-l,n.length-1));S.current?.scrollToIndex({index:e,animated:!0})}},`option-${t}`)}),(0,W.jsx)(cdn,{itemHeight:b,visibleRest:l})]})}var udn=R.create({container:{borderTopLeftRadius:13,borderTopRightRadius:13,alignSelf:`center`},selectedIndicator:{position:`absolute`,borderRadius:7,top:`50%`,alignSelf:`center`}}),s5=H.memo(ldn);V();function ddn({items:e,isVisible:t,onCancel:n,onConfirm:r,onModalHide:i,initialScrollIndex:a,accessibilityLabel:o,testID:s}){let{COLORS:c}=J(),[l,u]=(0,H.useState)(a),{width:d}=Cm();(0,H.useEffect)(()=>{u(a)},[a]);let f=(0,H.useCallback)(e=>{u(e)},[]),p=(0,H.useCallback)(()=>{r(parseFloat(e[l]),l)},[e,r,l]),m=(0,H.useCallback)(()=>{u(a),n()},[a,n]);return(0,W.jsx)(Q2,{isVisible:t,containerStyle:{backgroundColor:c.bgTransparent},onModalHide:i,children:(0,W.jsxs)(B,{children:[(0,W.jsx)(B,{style:fdn.pickersContainer,children:(0,W.jsx)(s5,{testID:s,initialScrollIndex:a,options:e,onChange:f,accessibilityLabel:o,containerStyle:{width:d-32}})}),(0,W.jsxs)(B,{style:fdn.buttonContainer,children:[(0,W.jsx)(o5,{onPress:p}),(0,W.jsx)(a5,{onPress:m})]})]})})}var c5=H.memo(ddn),fdn=R.create({pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},buttonContainer:{gap:8}});function l5(e){let t=j1(),[n,r]=(0,H.useState)(null);return(0,H.useEffect)(()=>{if(!e){r(null);return}(async()=>{r((await t.fetchQuery({queryKey:[`asset`,e],queryFn:()=>Nun(e),staleTime:Y.Milliseconds.Minute*5})).downloadUrl)})().catch(console.error)},[e,t]),n}V();var pdn=({isLiquid:e,setSelected:t})=>{let{COLORS:n}=J();return(0,W.jsxs)(B,{style:[u5.container,{backgroundColor:n.bgSegmentContainer,borderColor:n.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[u5.segment,!e&&{backgroundColor:n.bgSegmentPrimary}],onPress:()=>{t(!1)},testID:`food-type-food-${e}`,children:(0,W.jsx)(X,{style:[u5.value,{color:e?n.textLabelInactive:n.textLabelActive}],maxFontSizeMultiplier:g0.s0,children:`g`})}),(0,W.jsx)(Kp,{style:[u5.segment,e&&{backgroundColor:n.bgSegmentPrimary}],onPress:()=>{t(!0)},testID:`food-type-drink-${e}`,children:(0,W.jsx)(X,{style:[u5.value,{color:e?n.textLabelActive:n.textLabelInactive}],maxFontSizeMultiplier:g0.s0,children:`ml`})})]})},u5=R.create({container:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`,borderRadius:32,padding:4,borderWidth:1},segment:{flex:1,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,paddingVertical:4,paddingHorizontal:10,borderRadius:16},value:{...q.Poppins.medium_Base}}),d5=({onModalHide:e})=>{let{t}=RK(),n=xWt(),{showSyncErrorModal:r,modalStoreActions:i}=Y8();return(0,W.jsx)(Q2,{isVisible:r&&n,onModalHide:e,onModalShow:()=>{C6(S6.ErrorOffline)},title:t(`glucose_modal_changes_title`),message:t(`glucose_modal_changes_body`),buttons:[{title:t(`glucose_modal_changes_button_confirm`),onPress:()=>{i.set({showSyncErrorModal:!1})}}]})};V();var mdn={title:``,carbohydrates:null,measure:`g`,description:``},hdn=e=>e?{title:e.title,carbohydrates:e.nutritionPer100g.carbohydrates.value,measure:e.measures[0]?.unit,description:e.description??``}:mdn,gdn=q2(0,100),_dn=`create-food`,vdn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{createPersonalFood:n,isCreatingPersonalFood:r}=Iun(),{updatePersonalFood:i,isUpdatingPersonalFood:a}=Hun(),{deletePersonalFood:o,isDeletingPersonalFood:s}=Vun(),{removeFoodIntakeItem:c}=q8(),l=QQ(),u=l.params?.personalFoodId,{personalFoods:d}=Fun(),f=u?d.find(e=>e.id===u):void 0,{modalStoreActions:p}=Y8(),m=XQ(),h=U8(),{bottomWithScroll:g}=B2(),[_,v]=(0,H.useState)(()=>hdn(f)),y=(0,H.useRef)(_),b=(0,H.useRef)(!!f);(0,H.useEffect)(()=>{if(b.current||!f||(b.current=!0,_!==y.current))return;let e=hdn(f);y.current=e,v(e)},[f,_]);let[x,S]=(0,H.useState)(!1),[C,w]=(0,H.useState)(0),[T,E]=(0,H.useState)(!1),[D,O]=(0,H.useState)(!1),k=(0,H.useRef)(!1),[A,ee]=(0,H.useState)(!1),te=(0,H.useRef)(!1),ne=l5(f?.imageId??null),re=_.title.trim().length>0&&_.carbohydrates!==null,ie=T||r||a||s,j=y.current,ae=_.title!==j.title||_.carbohydrates!==j.carbohydrates||_.measure!==j.measure||_.description!==j.description,oe=(0,H.useCallback)(()=>{if(!ae){m.pop();return}ee(!0)},[ae,m]);(0,H.useEffect)(()=>{let r=async()=>{E(!0);try{if(u)if(_.carbohydrates!==j.carbohydrates||_.measure!==j.measure){let e=await n({title:_.title.trim(),description:_.description.trim()||null,imageId:f?.imageId??null,measures:[{unit:_.measure,gramsPerUnit:1}],nutritionPer100g:{carbohydrates:{unit:`g`,value:_.carbohydrates??0}}});try{await o(u)}catch(t){throw await o(e.id).catch(console.error),t}c(u,`id`)}else await i({foodId:u,request:{title:_.title.trim(),description:_.description.trim()||null}});else await n({title:_.title.trim(),description:_.description.trim()||null,measures:[{unit:_.measure,gramsPerUnit:1}],nutritionPer100g:{carbohydrates:{unit:`g`,value:_.carbohydrates??0}}});m.getState().routes.some(({key:e})=>e===l.key)&&m.pop(),C6(S6.FoodLibraryCreatePress)}catch{p.set({showSyncErrorModal:!0})}finally{E(!1)}};m.setOptions({headerTransparent:!0,gestureEnabled:!1,header:()=>(0,W.jsx)(G8,{title:_.title||e(`add_food_segment_food`),LeftButton:(0,W.jsx)($8,{onPress:oe}),RightButton:ie?(0,W.jsx)(np,{size:`small`,color:t.iconBrand,style:f5.activityIndicator}):(0,W.jsx)(e5,{onPress:r,disabled:!ae||!re}),overlay:!0})})},[re,ae,m,_,p,ie,t.iconBrand,n,i,o,c,j.carbohydrates,j.measure,f?.imageId,u,l.key,oe,e]);let se=(0,H.useCallback)(()=>{qf.dismiss(),w(Math.max(0,_.carbohydrates??0)),S(!0)},[_.carbohydrates]),ce=(0,H.useCallback)(e=>{v(t=>({...t,carbohydrates:e})),S(!1)},[]),M=(0,H.useCallback)(e=>{v(t=>({...t,description:e}))},[]),N=(0,H.useCallback)(()=>{te.current=!0,ee(!1)},[]),P=(0,H.useCallback)(()=>{te.current&&(te.current=!1,m.pop())},[m]),le=(0,H.useCallback)(()=>{k.current=!0,O(!1)},[]),ue=(0,H.useCallback)(async()=>{if(!(!k.current||!f)){k.current=!1;try{f.imageId&&await Pun(f.imageId).catch(console.error),await o(f.id),c(f.id,`id`),m.getState().routes.some(({key:e})=>e===l.key)&&m.pop()}catch{p.set({showSyncErrorModal:!0})}}},[f,o,c,m,l.key,p]);return(0,W.jsxs)(ys,{testID:`${_dn}-scroll`,keyboardDismissMode:`on-drag`,keyboardShouldPersistTaps:`always`,contentContainerStyle:{paddingTop:h+8,paddingBottom:g},style:{backgroundColor:t.bgSheet},children:[(0,W.jsxs)(B,{style:f5.container,children:[(0,W.jsxs)(B,{style:f5.mandatorySection,children:[(0,W.jsx)(H5t,{value:_.title,placeholder:_.measure===`mL`?e(`food_add_library_input_drink_name`):e(`food_add_library_input_name`),onChangeText:e=>v(t=>({...t,title:e})),maxLength:255,testID:`${_dn}-name`,autoFocus:!u}),(0,W.jsx)(t4,{title:e(`food_add_library_item_carbs`),onPress:se,renderRightSlot:()=>(0,W.jsxs)(X,{style:[f5.rightSlot,{color:t.labelPrimary}],testID:`${_dn}-carbohydrates`,children:[_.carbohydrates??`-`,` / 100g`]})})]}),(0,W.jsxs)(B,{style:f5.measurementSection,children:[(0,W.jsx)(X,{style:[f5.measurementQuestion,{color:t.labelPrimary}],children:e(`food_unitToggle_title`)}),(0,W.jsx)(pdn,{isLiquid:_.measure===`mL`,setSelected:e=>{v(t=>({...t,measure:e?`mL`:`g`}))}})]}),(0,W.jsx)(Wun,{value:_.description,onChangeText:M,maxLength:255,imageUri:ne,testID:`create-food-notes`}),!!f&&(0,W.jsx)(I2,{type:F2.ErrorSecondary,title:e(`button_delete_food`),testID:`delete_food_button`,disabled:ie,onPress:()=>O(!0),style:f5.deleteButton})]}),(0,W.jsx)(c5,{isVisible:x,items:gdn,initialScrollIndex:C,onCancel:()=>S(!1),onConfirm:ce,testID:`create-food-wheel-picker`}),(0,W.jsx)(Q2,{isVisible:A,title:e(`logbook_personal_modal_discard_title`),onModalHide:P,buttons:[{title:e(`button_discard_changes`),type:F2.Error,testID:`discard-button`,onPress:N},{title:e(`button_keep_editing`),type:F2.Secondary,testID:`keep-button`,onPress:()=>ee(!1)}]}),(0,W.jsx)(Q2,{isVisible:D,title:e(`food_modal_delete_food_title`),onModalHide:ue,buttons:[{title:e(`button_delete_food`),type:F2.Error,testID:`delete_modal_delete_button`,onPress:le},{title:e(`button_cancel`),type:F2.Secondary,testID:`delete_modal_cancel_button`,onPress:()=>O(!1)}]}),(0,W.jsx)(d5,{})]})},f5=R.create({container:{flex:1,paddingHorizontal:16,gap:16},mandatorySection:{gap:8},measurementSection:{gap:10},measurementQuestion:{...q.Poppins.regular_SM},rightSlot:{...q.Poppins.regular_Base,marginRight:8},deleteButton:{marginTop:8},activityIndicator:{width:44,height:44}});function ydn({uri:e,style:t,onLoadEnd:n}){let r=(0,H.useRef)(null);return(0,H.useEffect)(()=>{let e=r.current;if(!(!n||!e))return e.addEventListener(`load`,n),()=>{e.removeEventListener(`load`,n)}},[r,n]),(0,W.jsx)(`iframe`,{ref:r,src:e,style:t})}function bdn(){let{language:e}=IK.getState();return`https://pdf.hedia.io/IFU/${e}/Hedia-IFU-${x6}`}V();var xdn=()=>(0,W.jsx)(ydn,{style:Sdn.iframe,uri:bdn()}),Sdn=R.create({iframe:{flex:1}}),Cdn=s(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),wdn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=(V(),d(wm)).StyleSheet.create({container:{flex:1,overflow:`hidden`},loadingOrErrorView:{position:`absolute`,flex:1,justifyContent:`center`,alignItems:`center`,height:`100%`,width:`100%`,backgroundColor:`white`},loadingProgressBar:{height:20},errorText:{fontSize:14,textAlign:`center`,marginBottom:2},errorTextTitle:{fontSize:15,fontWeight:`500`,marginBottom:10},webView:{backgroundColor:`#ffffff`},flexStart:{alignSelf:`flex-start`},colorRed:{color:`red`}})})),Tdn=u(s((e=>{var t=Cdn();Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.WebView=void 0,t(m());var n=(V(),d(wm)),r=t(wdn()),i=Xq();e.default=e.WebView=function(){return(0,i.jsx)(n.View,{style:r.default.flexStart,children:(0,i.jsx)(n.Text,{style:r.default.colorRed,children:`React Native WebView does not support this platform.`})})}}))());V(),fQ(),l0();function Edn({url:e,testID:t,incognito:n=!0,onNavigationStateChange:r,spinnerSize:i=15,style:a}){let{t:o}=RK(),{COLORS:s}=J(),{colorScheme:c}=d0(),l=_0(c),{bottom:u}=n0(),[d,f]=(0,H.useState)(!1),[p,m]=(0,H.useState)(null),[h,g]=(0,H.useState)(null),_=(0,H.useMemo)(()=>`document.cookie = "theme=${l}; path=/; SameSite=Lax";`,[l]);return e?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Tdn.default,{source:{uri:e},testID:t,incognito:n,startInLoadingState:!0,renderLoading:()=>(0,W.jsx)(B,{style:p5.centerContainer,children:(0,W.jsx)(S4,{source:C4.LOADING_SPINNER,autoPlay:!0,style:{height:`${i}%`}})}),setSupportMultipleWindows:!1,onHttpError:()=>{f(!0),m(o(`global_modal_swr_title`)),g(o(`global_modal_swr_body`)),console.error(`WebViewLoader onHttpError: `,e)},onError:t=>{let n=t.nativeEvent.description;f(!0),n.includes(`ERR_INTERNET_DISCONNECTED`)?(m(o(`settings_modal_no_internet_title`)),g(o(`settings_modal_no_internet_body`))):(m(o(`global_modal_swr_title`)),g(o(`global_modal_swr_body`))),console.error(`WebViewLoader onError: `,e,n)},injectedJavaScriptBeforeContentLoaded:_,onNavigationStateChange:r,style:{backgroundColor:s.bgPrimary},containerStyle:[p5.container,{backgroundColor:s.bgPrimary,paddingBottom:u},a]}),d&&(0,W.jsxs)(dQ.View,{entering:rQ.duration(300).delay(2e3),style:p5.centerContainer,children:[(0,W.jsx)(X,{style:[p5.errorTitle,{color:s.labelPrimary}],children:p}),(0,W.jsx)(X,{style:[p5.errorSubtitle,{color:s.labelSecondary}],children:h})]})]}):null}var p5=R.create({container:{height:`100%`},centerContainer:{height:`100%`,justifyContent:`center`,marginHorizontal:16},errorTitle:{...q.Poppins.semiBold_2XL,textAlign:`center`},errorSubtitle:{...q.Poppins.regular_Base,textAlign:`center`}});V();function Ddn(){let e=Nsn();return VK?(0,W.jsx)(ydn,{style:Odn.iframe,uri:`https://www.hedia.com/support/partner`}):(0,W.jsx)(Edn,{url:`https://www.hedia.com/support/native`,testID:`support-webview`,style:{paddingTop:e}})}var Odn=R.create({iframe:{flex:1}}),kdn=()=>({min:Y.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:Y.CONSTANTS.CARBOHYDRATES_INPUT_MAX});q2(Y.CONSTANTS.CARBOHYDRATES_INPUT_MIN,Y.CONSTANTS.CARBOHYDRATES_INPUT_MAX),V();function Adn({children:e,offset:t=47}){let{COLORS:n}=J(),{bottom:r}=B2();return(0,W.jsxs)(B,{children:[(0,W.jsx)(M2.default,{colors:[X2(n.bgPrimary,0),n.bgPrimary],style:[jdn.gradient,{height:r+t+16}],pointerEvents:`none`}),(0,W.jsx)(B,{style:[{paddingBottom:r},jdn.contentContainer],children:e})]})}var jdn=R.create({gradient:{position:`absolute`,bottom:0,left:0,right:0},contentContainer:{position:`absolute`,bottom:0,left:0,right:0,marginHorizontal:16}}),Mdn=(0,H.memo)(Adn);V();var Ndn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{showCalculationInfoModal:n,modalStoreActions:r}=Y8(),i=(0,H.useMemo)(()=>[{testID:`close-button`,title:e(`button_close`),onPress:()=>{r.set({showCalculationInfoModal:!1})}}],[r,e]);return(0,W.jsxs)(Q2,{testID:`calculation_info_modal`,isVisible:n,title:e(`calcflow_modal_info_title`),buttons:i,enableScroll:!0,containerStyle:m5.modal,children:[(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_insulin_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_insulin_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_glucose_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_glucose_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_carbohydrates_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_carbohydrates_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_activity_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_activity_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_notes_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_notes_body`)}),(0,W.jsx)(X,{style:[m5.header,{color:t.labelPrimary}],children:e(`calcflow_modal_info_calculate_title`)}),(0,W.jsx)(X,{style:[m5.text,{color:t.labelSecondary}],children:e(`calcflow_modal_info_calculate_body`)})]},`calculation_info_modal`)},m5=R.create({modal:{maxHeight:`92%`},header:{...q.Poppins.semiBold_Base,marginTop:16},text:{...q.Poppins.regular_Base}}),Pdn=async e=>{let t=`${NK.NOTE_BASE_URL}/notes`,n=await w6(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(e)});return await y0(n,Y.StatusCode.CREATED,t,Y.HTTPRequestMethod.POST),n.json()},Fdn=async e=>{let t=`${NK.NOTE_BASE_URL}/notes/${e}`,n=await w6(t,{method:`GET`,headers:{Accept:`application/json`}});return await y0(n,Y.StatusCode.OK,t),n.json()},Idn=async(e,t)=>{let n=`${NK.NOTE_BASE_URL}/notes/${e}`,r=await w6(n,{method:Y.HTTPRequestMethod.PATCH,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(t)});return await y0(r,Y.StatusCode.OK,n,Y.HTTPRequestMethod.PATCH),r.json()},Ldn=async e=>{let t=`${NK.NOTE_BASE_URL}/notes/${e}`;await y0(await w6(t,{method:`DELETE`}),Y.StatusCode.NO_CONTENT,t,Y.HTTPRequestMethod.DELETE)};function Rdn(){let e=j1(),[t,n]=(0,H.useState)(``),[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(!1),s=(0,H.useRef)(null),c=(0,H.useRef)(``),l=(0,H.useRef)(null),u=(0,H.useRef)(t);u.current=t;let d=(0,H.useCallback)(async t=>{if(s.current===null){l.current=t,s.current=t,i(!0),o(!1);try{let r=await e.fetchQuery({queryKey:[`note`,t],queryFn:()=>Fdn(t),staleTime:Y.Milliseconds.Minute*5});s.current=r.id,c.current=r.body,n(r.body)}catch{s.current=null,o(!0)}finally{i(!1)}}},[e]),f=(0,H.useCallback)(()=>{let e=l.current;e&&d(e).catch(console.error)},[d]);return{noteBody:t,setNoteBody:n,displayImageUri:null,onImageSelected:()=>void 0,onImageRemoved:()=>void 0,loadNote:d,saveNote:(0,H.useCallback)(async()=>{let t=u.current;if(!t.trim())return s.current&&=(await Ldn(s.current),e.removeQueries({queryKey:[`note`,s.current]}),null),null;if(s.current&&t===c.current)return s.current;if(s.current){let n=await Idn(s.current,{body:t});return e.setQueryData([`note`,n.id],n),s.current}let n=await Pdn({body:t});return s.current=n.id,e.setQueryData([`note`,n.id],n),n.id},[e]),deleteNoteAndAssets:(0,H.useCallback)(async t=>{try{let n=await e.fetchQuery({queryKey:[`note`,t],queryFn:()=>Fdn(t),staleTime:Y.Milliseconds.Minute*5});for(let t of n.assetIds)await Pun(t).catch(console.error),e.removeQueries({queryKey:[`asset`,t]});await Ldn(t),e.removeQueries({queryKey:[`note`,t]})}catch(e){console.error(`[useNotes::deleteNoteAndAssets] Failed:`,e)}},[e]),discardChanges:()=>Promise.resolve(),isLoading:r,loadFailed:a,retryLoad:f,hasNoteContent:(0,H.useMemo)(()=>!a&&t.trim().length>0,[t,a]),isNoteModified:(0,H.useMemo)(()=>t!==c.current,[t])}}var zdn={selectedEventUUID:null,activityDurationSeconds:0},h5=kK()(e=>({...zdn,activityStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(zdn)}}})),Bdn={setupCalculatorSettings:{},totalDailyDosage:null},Vdn=kK()(e=>({...Bdn,setupCalculatorActions:{setSetupCalculatorStoreValues:t=>{e(e=>({setupCalculatorSettings:{...e.setupCalculatorSettings,...t}}))},setTotalDailyDosage:t=>{e({totalDailyDosage:t})},clear:()=>{e(Bdn)}}})),g5=()=>Vdn(e=>e.setupCalculatorActions),_5=()=>Vdn(e=>e.setupCalculatorSettings),Hdn=()=>Vdn(e=>e.totalDailyDosage),Udn={privacyNoticeAccepted:!1,extraFoodItems:[],visualSearchId:null},v5=kK()(jK(e=>({...Udn,acceptPrivacyNotice:()=>{e({privacyNoticeAccepted:!0})},addExtraFoodItem:t=>{e(e=>{let n=e.extraFoodItems.findIndex(e=>e.foodItem.id===t.foodItem.id);return n===-1?{extraFoodItems:[...e.extraFoodItems,t]}:{extraFoodItems:e.extraFoodItems.map((e,r)=>r===n?t:e)}})},setVisualSearchId:t=>{e({visualSearchId:t})},clearExtraFoodItems:()=>{e({extraFoodItems:[]})},clearVisualSearchId:()=>{e({visualSearchId:null})},clear:()=>{e(Udn)}}),{name:`VISUAL_SEARCH_STORE`,storage:AK(FK)})),y5=()=>{q8.getState().clear(),J8.getState().glucoseStoreActions.clear(),h5.getState().activityStoreActions.clear(),X8.getState().noteStoreActions.clear()},Wdn=()=>{let{t:e}=RK(),{showDiscardCalculationModal:t,modalStoreActions:n,isGoToSettingsPressed:r}=Y8(),{deleteNoteAndAssets:i}=Rdn(),a=XQ(),o=(0,H.useRef)(!1),s=(0,H.useCallback)(()=>{let e=X8.getState().noteId;e&&i(e).catch(console.error),y5(),o.current=!0,n.set({showDiscardCalculationModal:!1})},[i,n]),c=(0,H.useCallback)(()=>{o.current&&(o.current=!1,a.pop()),r&&((oyt||HK)&&a.reset({index:1,routes:[{name:Q.MainBottomTabs},{name:Q.SettingsStack,state:{routes:[{name:Q.Settings},{name:Q.ActivitySettings}],index:1}}]}),n.set({isGoToSettingsPressed:!1}))},[r,n,a]),l=(0,H.useMemo)(()=>[{testID:`discard-button`,title:e(`calcflow_modal_discard_cal_button`),type:F2.Error,onPress:s},{testID:`cancel-button`,title:e(`button_cancel`),type:F2.Secondary,onPress:()=>{n.set({showDiscardCalculationModal:!1,isGoToSettingsPressed:!1})}}],[s,n,e]);return(0,W.jsx)(Q2,{testID:`discard_calculation_modal`,isVisible:t,title:e(`calcflow_modal_discard_cal_title`),onModalHide:c,buttons:l},`discard_calculation_modal`)};function Gdn(e,t){let n=H2(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=V2(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Kdn(e,t,n){let r=H2(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=V2(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=Gdn(o);return r.setMonth(t,Math.min(a,s)),r}function qdn(e,t,n){let r=H2(e,n?.in);return isNaN(+r)?V2(n?.in||e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=Kdn(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function Jdn(e,t,n){return Tan(e,-t,n)}var b5=function(e){return e.Create=`Create`,e.Edit=`Edit`,e.Delete=`Delete`,e}({});function Ydn(){let e=qdn(Jdn(new Date,4),{seconds:0,milliseconds:0});return i8.getLogbooks(e).map(e=>({uuid:e.uuid,time:e.entry_timestamp,insulinValue:e.insulin_entered_units?.toString()??``}))}function Xdn(){let[e,t]=(0,H.useState)(Ydn),[n,r]=(0,H.useState)(null),[i,a]=(0,H.useState)(!1),[o,s]=(0,H.useState)(`Create`),[c,l]=(0,H.useState)(void 0),u=(0,H.useCallback)(()=>{t(Ydn())},[]);return(0,H.useEffect)(()=>{n&&u()},[n,u]),i$((0,H.useCallback)(()=>{u()},[u])),(0,H.useEffect)(()=>{a8.syncAll().catch(console.error).finally(()=>{u()})},[u]),{entries:e,animatedEntryId:n,isInfoModalVisible:i,setIsInfoModalVisible:a,registerInsulinAction:o,editingInsulinEntry:c,refresh:u,handleEditInsulinEntry:(0,H.useCallback)(t=>{let n=e.find(e=>e.uuid===t);n&&(s(`Edit`),l(n))},[e]),handleEntryAnimationFinished:(0,H.useCallback)(()=>{r(null)},[]),handleRegisterInsulinPressed:(0,H.useCallback)(()=>{s(`Create`),l(void 0)},[]),handleRegisterInsulinClose:(0,H.useCallback)(e=>{r(e||`deleted-${Date.now()}`)},[])}}if(!H.useState)throw Error(`mobx-react-lite requires React with Hooks support`);if(!Ytn)throw Error(`mobx-react-lite@3 requires mobx at least version 6 to be available`);var x5=v();function Zdn(e){e()}function Qdn(e){e||=Zdn,Ftn({reactionScheduler:e})}function $dn(e){return Ltn(e)}var efn=!1;function tfn(){return efn}var nfn=1e4,rfn=1e4,ifn=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){e===void 0&&(e=nfn),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,rfn))}}),e}(),afn=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:ifn)(function(e){var t;(t=e.reaction)==null||t.dispose(),e.reaction=null}),ofn=s((e=>{var t=m();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),sfn=s(((e,t)=>{t.exports=ofn()}))();function cfn(e){e.reaction=new z3(`observer${e.name}`,function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)==null||t.call(e)})}function lfn(e,t){if(t===void 0&&(t=`observed`),tfn())return e();var n=H.useRef(null);if(!n.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return afn.unregister(r),r.onStoreChange=e,r.reaction||(cfn(r),r.stateVersion=Symbol()),function(){var e;r.onStoreChange=null,(e=r.reaction)==null||e.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};n.current=r}var i=n.current;i.reaction||(cfn(i),afn.register(n,i,i)),H.useDebugValue(i.reaction,$dn),(0,sfn.useSyncExternalStore)(i.subscribe,i.getSnapshot,i.getSnapshot);var a,o;if(i.reaction.track(function(){try{a=e()}catch(e){o=e}}),o)throw o;return a}var ufn=typeof Symbol==`function`&&Symbol.for,dfn=Object.getOwnPropertyDescriptor(function(){},`name`)?.configurable??!1,ffn=ufn?Symbol.for(`react.forward_ref`):typeof H.forwardRef==`function`&&(0,H.forwardRef)(function(e){return null}).$$typeof,pfn=ufn?Symbol.for(`react.memo`):typeof H.memo==`function`&&(0,H.memo)(function(e){return null}).$$typeof;function S5(e,t){if(pfn&&e.$$typeof===pfn)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(tfn())return e;var n=t?.forwardRef??!1,r=e,i=e.displayName||e.name;if(ffn&&e.$$typeof===ffn&&(n=!0,r=e.render,typeof r!=`function`))throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a=function(e,t){return lfn(function(){return r(e,t)},i)};return a.displayName=e.displayName,dfn&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes),n&&(a=(0,H.forwardRef)(a)),a=(0,H.memo)(a),hfn(e,a),a}var mfn={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function hfn(e,t){Object.keys(e).forEach(function(n){mfn[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}function gfn(e){var t=e.children,n=e.render;t&&n&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var r=t||n;return typeof r==`function`?lfn(r):null}gfn.displayName=`Observer`,Qdn(x5.unstable_batchedUpdates),afn.finalizeAllImmediately,V();function _fn(){return H.useEffect(()=>{console.warn(`DateTimePicker is not supported on: ${z.OS}`)},[]),null}var vfn=_fn;V();var C5=(e,t)=>{let n=e.indexOf(t);return n===-1?0:n},w5=(e,t)=>{let n=new Date(e);return n.setHours(t,0,0,0),{date:n,formatted:Y6(n,`HH:mm`)}},T5=Array.from({length:60},(e,t)=>t.toString().padStart(2,`0`));function yfn({isVisible:e,initialValue:t,min:n,max:r,onCancel:i,onConfirm:a,onModalHide:o}){let{COLORS:s}=J(),{width:c}=Cm(),l=(0,H.useRef)(null),u=(0,H.useRef)(null),[d,f]=(0,H.useState)(t),p=(0,H.useMemo)(()=>{if(!n||!r){let e=new Date;return Array.from({length:24},(t,n)=>w5(e,n))}let e=n.getHours(),t=r.getHours(),i=[];if(T5t(n,r)&&n<r&&e<=t)for(let r=e;r<=t;r++)i.push(w5(n,r));else{for(let t=e;t<24;t++)i.push(w5(n,t));for(let e=0;e<=t;e++)i.push(w5(r,e))}return i},[n,r]),m=(0,H.useMemo)(()=>p.map(e=>Y6(e.date,`HH`)),[p]),h=(0,H.useMemo)(()=>{let[e]=Y6(t,`HH:mm`).split(`:`);return C5(m,e)},[t,m]),g=(0,H.useMemo)(()=>{let[,e]=Y6(t,`HH:mm`).split(`:`);return C5(T5,e)},[t]),_=(0,H.useMemo)(()=>{let[e]=Y6(d,`HH:mm`).split(`:`);return C5(m,e)},[d,m]),v=(0,H.useMemo)(()=>{let[,e]=Y6(d,`HH:mm`).split(`:`);return C5(T5,e)},[d]),y=(0,H.useMemo)(()=>n?C5(m,Y6(n,`HH`)):null,[n,m]),b=(0,H.useMemo)(()=>r?C5(m,Y6(r,`HH`)):null,[r,m]),x=(0,H.useMemo)(()=>n?parseInt(Y6(n,`mm`),10):null,[n]),S=(0,H.useMemo)(()=>r?parseInt(Y6(r,`mm`),10):null,[r]),C=(0,H.useCallback)((e,t)=>{let n=e<0||e>=m.length,r=t<0||t>=T5.length;if(n||r)return;let i=p[e].date;f(qdn(i,{minutes:parseInt(T5[t],10),seconds:0,milliseconds:0}))},[m.length,p]),w=(0,H.useCallback)(e=>{u.current?.scrollToIndex(e)},[]),T=(0,H.useCallback)(e=>{if(b===null||y===null||S===null||x===null){C(e,v);return}let t=v;if(e===y&&v<x){t=x,w(x),C(e,t);return}if(e===b&&v>S){t=S,w(S),C(e,t);return}C(e,v)},[b,y,S,x,v,C,w]),E=(0,H.useCallback)(e=>{if(b===null||y===null||S===null||x===null){C(_,e);return}let t=e;if(_===y&&e<x){t=x,w(x),C(_,t);return}if(_===b&&e>S){t=S,w(S),C(_,t);return}C(_,t)},[b,S,y,x,_,C,w]),D=(0,H.useCallback)(()=>{a(d)},[a,d]),O=(0,H.useCallback)(()=>{f(t),i()},[i,t]);return(0,W.jsx)(Q2,{isVisible:e,containerStyle:{backgroundColor:s.bgTransparent},onModalHide:o,children:(0,W.jsxs)(B,{children:[(0,W.jsxs)(B,{style:E5.pickersContainer,children:[(0,W.jsx)(s5,{ref:l,initialScrollIndex:h,options:m,onChange:T,containerStyle:[E5.itemContainerLeft,{width:(c-32)/2}],selectedIndicatorStyle:[E5.selectedIndicatorLeft,{width:(c-32)/2-10}],itemStyle:E5.itemLeft,testID:`hours-wheel-picker`},`hours-wheel-picker`),(0,W.jsx)(s5,{ref:u,initialScrollIndex:g,options:T5,onChange:E,containerStyle:[E5.itemContainerRight,{width:(c-32)/2}],selectedIndicatorStyle:[E5.selectedIndicatorRight,{width:(c-32)/2-10}],itemStyle:E5.itemRight,testID:`minutes-wheel-picker`},`minutes-wheel-picker`)]}),(0,W.jsxs)(B,{style:E5.buttonContainer,children:[(0,W.jsx)(o5,{onPress:D}),(0,W.jsx)(a5,{onPress:O})]})]})})}var bfn=H.memo(yfn),E5=R.create({buttonContainer:{gap:8},pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:`flex-end`,marginRight:16},itemRight:{alignSelf:`flex-start`,marginLeft:16},selectedIndicatorRight:{alignSelf:`flex-start`,borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:`flex-end`,borderTopRightRadius:0,borderBottomRightRadius:0}}),xfn=({onPress:e})=>(0,W.jsx)(o5,{onPress:e}),Sfn=({onPress:e})=>(0,W.jsx)(a5,{onPress:e}),Cfn=.5,wfn=e=>{switch(e){case Y.InjectionMethod.PenWhole:return q2(Y.CONSTANTS.INSULIN_DOSE_MIN,Y.CONSTANTS.INSULIN_DOSE_MAX);case Y.InjectionMethod.PenHalf:return w5t(Y.CONSTANTS.INSULIN_DOSE_MIN,Y.CONSTANTS.INSULIN_DOSE_MAX,Cfn);case Y.InjectionMethod.Pump:return J2(Y.CONSTANTS.INSULIN_DOSE_MIN,Y.CONSTANTS.INSULIN_DOSE_MAX);default:throw Error(`[insulin::getInsulinInputSequentialArray] Unsupported injection method!`)}},Tfn=e=>{switch(e){case Y.InjectionMethod.PenWhole:return 0;case Y.InjectionMethod.PenHalf:return 1;case Y.InjectionMethod.Pump:return 1;default:throw Error(`[insulin::getInsulinInputDecimalPlaces] Unsupported injection method!`)}};V(),l0();function Efn({action:e=b5.Create,insulinEntry:t,onClose:n}){let{t:r}=RK(),{COLORS:i}=J(),{bottom:a}=n0(),{colorScheme:o}=d0(),s=_0(o),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(t?.insulinValue),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(t?.time),[g,_]=(0,H.useState)(),[v,y]=(0,H.useState)(!1),[b,x]=(0,H.useState)(!1),S=(0,H.useRef)(!1),{initialInsulinValue:C,initialDate:w}=(0,H.useMemo)(()=>({initialInsulinValue:t?.insulinValue,initialDate:t?.time}),[t]),T=(0,H.useCallback)(()=>{l(!0)},[]);(0,H.useEffect)(()=>{e===b5.Create&&setTimeout(()=>{T()},300),d(t?.insulinValue),h(t?.time)},[e,T,t]);let E=H6.injectionMethod;if(E===void 0)throw Error(`[RegisterActiveInsulin::render] injectionMethod is undefined`);let D=(0,H.useMemo)(()=>wfn(E),[E]),O=(0,H.useCallback)(async()=>{try{if(!u||!m){console.error(`[RegisterActiveInsulin::handleConfirm] insulinValue or date is undefined`),y(!0);return}let r=e===b5.Create,i=r?Van({entry_timestamp:m,insulin_entered_units:parseFloat(u)}):{...i8.getLogbookByUUID(t.uuid),entry_timestamp:m,insulin_entered_units:parseFloat(u)};if(!await i8.addLogbook(i,r?void 0:t.uuid)){y(!0);return}n(i.uuid)}catch(e){console.error(`[RegisterActiveInsulin::handleConfirm] Error saving insulin entry:`,e),y(!0)}},[m,u,e,t,n]),k=(0,H.useCallback)(async()=>{try{if(!t)return;await i8.deleteLogbook(t.uuid)?n():y(!0)}catch(e){console.error(`[RegisterActiveInsulin::deleteInsulinEntry] Error deleting insulin entry:`,e),y(!0)}},[t,n]),A=(0,H.useCallback)(()=>{S.current=!0,x(!1)},[]),ee=(0,H.useCallback)(()=>{S.current&&(S.current=!1,k().catch(console.error))},[k]),te=(0,H.useCallback)(()=>{p(!0)},[]),ne=(0,H.useCallback)(e=>{let t=new Date,n=h5t(e,{start:qdn(Jdn(t,4),{seconds:0,milliseconds:0}),end:t})?void 0:r(`error_insulin_intake_hint`);h(e),_(n),p(!1)},[r]),re=(0,H.useCallback)(()=>{p(!1)},[]),ie=(0,H.useCallback)(e=>{d(e.toString()),l(!1)},[]),j=(0,H.useMemo)(()=>{if(!u)return 0;let e=Tfn(E);return D.findIndex(t=>t===parseFloat(u).toFixed(e))},[u,D,E]);function ae(){return(0,W.jsxs)(B,{style:D5.header,children:[(0,W.jsx)($8,{onPress:n}),(0,W.jsx)(X,{style:D5.headerTitle,numberOfLines:1,ellipsizeMode:`middle`,children:r(`register_insulin_title`,{timeFourHour:Y6(Jdn(new Date,4),`HH:mm`)})}),(0,W.jsx)(e5,{onPress:O,disabled:!m||!u||!!g||w===m&&C===u})]})}function oe(){return(0,W.jsx)(B,{style:[D5.setTimeButton,{backgroundColor:i.bgPill}],children:(0,W.jsx)(X,{style:[D5.setTimeText,{color:i.labelPrimary},f&&{color:i.textLink},!!g&&{color:i.textInputDanger}],children:m?Y6(m,`HH:mm`):r(`register_insulin_time_button_unit`)})})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ae,{}),(0,W.jsxs)(ys,{contentContainerStyle:D5.contentContainer,children:[(0,W.jsxs)(B,{style:D5.screen,children:[(0,W.jsx)(t4,{title:r(`register_insulin_input_title`),testID:`insulin-input`,onPress:T,renderRightSlot:()=>(0,W.jsxs)(B,{style:D5.insulinRightSlot,children:[(0,W.jsx)(X,{style:[D5.insulinText,{color:i.labelPrimary}],children:u}),(0,W.jsx)(X,{style:[D5.unitsText,{color:i.labelPrimary}],children:r(u&&parseFloat(u)===1?`unit`:`units`)})]}),style:c?{borderColor:i.borderInputFocus}:void 0}),(0,W.jsx)(N2,{isAnimated:!!g,children:(0,W.jsx)(t4,{renderLeftSlot:()=>(0,W.jsx)(X,{children:r(`register_insulin_time_input_title`)}),testID:`time-input`,errorMessage:g,onPress:te,renderRightSlot:oe,style:f?{flexWrap:`wrap`,paddingVertical:8,borderColor:i.borderInputFocus}:D5.rowInsulin})})]}),e===b5.Edit&&(0,W.jsx)(I2,{title:r(`button_delete`),onPress:()=>{x(!0)},type:F2.Error})]}),(0,W.jsx)(c5,{isVisible:c,items:D,onConfirm:ie,onCancel:()=>{l(!1)},initialScrollIndex:j,testID:`insulin-wheel-picker`}),HK?(0,W.jsx)(vfn,{testID:`date-time-picker`,isVisible:f,display:`spinner`,date:m??new Date,mode:new Date().getHours()>=4?`time`:`datetime`,minimumDate:new Date(1900,0,1),maximumDate:new Date,onConfirm:ne,onCancel:re,customConfirmButtonIOS:xfn,customCancelButtonIOS:Sfn,pickerContainerStyleIOS:{backgroundColor:i.iosKeyboardPicker},themeVariant:s,isDarkModeEnabled:s===`dark`,pickerStyleIOS:D5.alignCenter,modalStyleIOS:{paddingBottom:a},is24Hour:!0,locale:`en_GB`}):(0,W.jsx)(bfn,{isVisible:f,initialValue:m??new Date,onConfirm:ne,onCancel:re}),(0,W.jsx)(Q2,{isVisible:b,onModalHide:ee,title:r(`register_insulin_modal_title`),message:r(`register_insulin_modal_body`),buttons:[{title:r(`button_delete`),testID:`confirm_delete`,type:F2.Error,onPress:A},{title:r(`button_cancel`),type:F2.Secondary,onPress:()=>{x(!1)}}]}),(0,W.jsx)(Q2,{isVisible:v,title:r(`glucose_modal_changes_title`),message:r(`glucose_modal_changes_body`),buttons:[{title:r(`glucose_modal_changes_button_confirm`),onPress:()=>{y(!1)}}]})]})}var Dfn=S5(Efn),D5=R.create({header:{width:`100%`,flexDirection:`row`,justifyContent:`space-between`,alignItems:`center`,paddingHorizontal:16,paddingBottom:12},headerTitle:{...q.Poppins.medium_Base,flex:1,textAlign:`center`,marginHorizontal:8},contentContainer:{flex:1,paddingHorizontal:16,paddingTop:32,paddingBottom:440,gap:24},screen:{gap:16},rowInsulin:{flexWrap:`wrap`,paddingVertical:8},insulinRightSlot:{flexDirection:`row`,flex:1,alignItems:`center`,marginRight:8},setTimeButton:{borderRadius:16,paddingHorizontal:12,paddingVertical:8},setTimeText:{...q.Poppins.medium_Base},insulinText:{...q.Poppins.medium_Base,marginRight:4},unitsText:{...q.Poppins.medium_Base},alignCenter:{alignSelf:`center`}});V();function Ofn({entriesCount:e,onInfoPress:t}){let{t:n}=RK(),{COLORS:r}=J(),i=e>0;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:O5.iconContainer,children:[(0,W.jsx)(V8t,{}),(0,W.jsx)(Kp,{testID:`info-button`,style:O5.infoIconButton,onPress:t,children:(0,W.jsx)(B8t,{height:32,width:32,color:r.iconBrand})})]}),(0,W.jsx)(X,{style:O5.title,children:n(i?`Recent_insulin_title`:`Recent_insulin_empty_title`)}),(0,W.jsx)(X,{style:[O5.subtitle,O5.headerSubtitle,{color:r.labelSecondary}],children:n(i?`recent_insulin_body`:`Recent_insulin_empty_body`)})]})}function kfn(){return(0,W.jsx)(B,{style:O5.separatorList})}var O5=R.create({iconContainer:{marginBottom:16},title:{...q.Poppins.semiBold_2XL,marginBottom:8},subtitle:{...q.Poppins.regular_SM},headerSubtitle:{marginBottom:48},infoIconButton:{position:`absolute`,right:0},separatorList:{height:8}});V(),l0();function Afn({onNoInsulinPressed:e}){let{t}=RK(),{COLORS:n}=J(),{entries:r,animatedEntryId:i,isInfoModalVisible:a,setIsInfoModalVisible:o,registerInsulinAction:s,editingInsulinEntry:c,handleEditInsulinEntry:l,handleEntryAnimationFinished:u,handleRegisterInsulinPressed:d,handleRegisterInsulinClose:f}=Xdn(),p=(0,H.useRef)(null),m=(0,H.useCallback)(()=>{C6(S6.RecentInsulinRegisterPress),d(),p.current?.present()},[d]),h=(0,H.useCallback)(e=>{f(e),p.current?.close()},[f]),g=(0,H.useCallback)(e=>{l(e),p.current?.present()},[l]);return(0,W.jsxs)(c0,{edges:[`bottom`],children:[(0,W.jsx)(nl,{testID:`active_insulin_list`,data:r,keyExtractor:e=>e.uuid,contentContainerStyle:k5.contentContainer,ListHeaderComponent:()=>(0,W.jsx)(Ofn,{entriesCount:r.length,onInfoPress:()=>{o(!0)}}),ListHeaderComponentStyle:void 0,renderItem:({item:e,index:n})=>{let r=parseFloat(e.insulinValue)===1?t(`unit`):t(`units`);return(0,W.jsx)(b8t,{isAnimated:i===e.uuid,onAnimationFinished:u,children:(0,W.jsx)(t4,{title:Y6(e.time,`HH:mm`),onPress:()=>{g(e.uuid)},testID:`entry-${n}`,renderRightSlot:()=>(0,W.jsxs)(B,{style:k5.rightSlot,children:[(0,W.jsx)(X,{style:k5.insulinValueText,children:`${e.insulinValue} ${r}`}),(0,W.jsx)(z2,{})]})})})},ItemSeparatorComponent:kfn,ListFooterComponent:()=>(0,W.jsxs)(B,{style:k5.buttonsWrapper,children:[(0,W.jsx)(I2,{title:r.length>0?t(`recent_insulin_button_add`):t(`recent_insulin_empty_button_add`),onPress:m,testID:`register-insulin-button`,type:r.length>0?F2.Secondary:F2.Primary}),(0,W.jsx)(I2,{title:r.length>0?t(`Recent_insulin_button_continue`):t(`recent_insulin_empty_button_continue`),type:r.length>0?F2.Primary:F2.Secondary,onPress:e})]}),ListFooterComponentStyle:k5.footer}),(0,W.jsx)(PQ,{ref:p,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:n.bgSheet,borderRadius:36},stackBehavior:`push`,enablePanDownToClose:!1,children:(0,W.jsx)(IQ,{children:(0,W.jsx)(Dfn,{action:s,insulinEntry:c,onClose:h})})}),(0,W.jsx)(Q2,{isVisible:a,onRequestClose:()=>{o(!1)},title:t(`Recent_insulin_modal_title`),message:t(`Recent_insulin_modal_body`),buttons:[{title:t(`button_close`),onPress:()=>{o(!1)}}]},`recent_insulin_info`)]})}var k5=R.create({contentContainer:{paddingHorizontal:16,paddingBottom:16},footer:{paddingTop:48},buttonsWrapper:{gap:8},rightSlot:{flexDirection:`row`,alignItems:`center`},insulinValueText:{...q.Poppins.regular_Base,marginRight:16}}),A5=()=>J8(e=>e.selectedReadingId&&e.availableGlucoseReadings.find(t=>t.id===e.selectedReadingId)||null),jfn=e=>J8(t=>t.availableGlucoseReadings.find(t=>t.source===e)||null),j5=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,M5=globalThis,Mfn=`10.30.0`;function N5(){return Nfn(M5),M5}function Nfn(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.30.0`,t[Mfn]=t[`10.30.0`]||{}}function P5(e,t,n=M5){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Mfn]=r[`10.30.0`]||{};return i[e]||(i[e]=t())}var Pfn=`Sentry Logger `,Ffn={};function Ifn(e){if(!(`console`in M5))return e();let t=M5.console,n={},r=Object.keys(Ffn);r.forEach(e=>{let r=Ffn[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Lfn(){Wfn().enabled=!0}function Rfn(){Wfn().enabled=!1}function zfn(){return Wfn().enabled}function Bfn(...e){Ufn(`log`,...e)}function Vfn(...e){Ufn(`warn`,...e)}function Hfn(...e){Ufn(`error`,...e)}function Ufn(e,...t){j5&&zfn()&&Ifn(()=>{M5.console[e](`${Pfn}[${e}]:`,...t)})}function Wfn(){return j5?P5(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var F5={enable:Lfn,disable:Rfn,isEnabled:zfn,log:Bfn,warn:Vfn,error:Hfn},Gfn=`<anonymous>`;function Kfn(e){try{return!e||typeof e!=`function`?Gfn:e.name||Gfn}catch{return Gfn}}function qfn(e){return`__v_isVNode`in e&&e.__v_isVNode?`[VueVNode]`:`[VueViewModel]`}var Jfn=Object.prototype.toString;function Yfn(e){switch(Jfn.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return L5(e,Error)}}function Xfn(e,t){return Jfn.call(e)===`[object ${t}]`}function I5(e){return Xfn(e,`String`)}function Zfn(e){return Xfn(e,`Object`)}function Qfn(e){return typeof Event<`u`&&L5(e,Event)}function $fn(e){return typeof Element<`u`&&L5(e,Element)}function epn(e){return Xfn(e,`RegExp`)}function tpn(e){return!!(e?.then&&typeof e.then==`function`)}function npn(e){return Zfn(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function L5(e,t){try{return e instanceof t}catch{return!1}}function rpn(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue||e.__v_isVNode))}var ipn=M5,apn=80;function opn(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||apn;for(;n&&i++<5&&(o=spn(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function spn(e,t){let n=e,r=[];if(!n?.tagName)return``;if(ipn.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&I5(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function R5(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{j5&&F5.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function cpn(e){if(Yfn(e))return{message:e.message,name:e.name,stack:e.stack,...upn(e)};if(Qfn(e)){let t={type:e.type,target:lpn(e.target),currentTarget:lpn(e.currentTarget),...upn(e)};return typeof CustomEvent<`u`&&L5(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lpn(e){try{return $fn(e)?opn(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}}function upn(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function dpn(e){return fpn(e,new Map)}function fpn(e,t){if(typeof e!=`object`||!e)return e;let n=t.get(e);if(n!==void 0)return n;if(Array.isArray(e)){let n=[];return t.set(e,n),e.forEach(e=>{n.push(fpn(e,t))}),n}if(ppn(e)){let n={};return t.set(e,n),Object.keys(e).forEach(r=>{let i=e[r];i!==void 0&&(n[r]=fpn(i,t))}),n}return e}function ppn(e){let t=e.constructor;return t===Object||t===void 0}function mpn(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function hpn(e,t,n=!1){return I5(e)?epn(t)?t.test(e):I5(t)?n?e===t:e.includes(t):!1:!1}function gpn(){let e=M5;return e.crypto||e.msCrypto}var _pn;function vpn(){return Math.random()*16}function z5(e=gpn()){try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,``)}catch{}return _pn||=`10000000100040008000100000000000`,_pn.replace(/[018]/g,e=>(e^(vpn()&15)>>e/4).toString(16))}var ypn=1e3;function bpn(){return Date.now()/ypn}function xpn(){let{performance:e}=M5;if(!e?.now||!e.timeOrigin)return bpn;let t=e.timeOrigin;return()=>(t+e.now())/ypn}var Spn;function B5(){return(Spn??=xpn())()}function Cpn(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||B5(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:z5()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function wpn(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=wpn(r[e],t[e],n-1));return r}function V5(){return z5()}function Tpn(){return z5().substring(16)}var Epn=`_sentrySpan`;function H5(e,t){t?R5(e,Epn,t):delete e[Epn]}function U5(e){return e[Epn]}var Dpn=100,W5=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:V5(),sampleRand:Math.random()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,H5(t,U5(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Cpn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=(n instanceof e?n.getScopeData():Zfn(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,H5(this,void 0),this._attachments=[],this.setPropagationContext({traceId:V5(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Dpn;if(n<=0)return this;let r={timestamp:bpn(),...e,message:e.message?mpn(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:U5(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=wpn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||z5();if(!this._client)return j5&&F5.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||z5();if(!this._client)return j5&&F5.warn(`No client configured on scope - will not capture message!`),r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t?.event_id||z5();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(j5&&F5.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Opn(){return P5(`defaultCurrentScope`,()=>new W5)}function kpn(){return P5(`defaultIsolationScope`,()=>new W5)}var Apn=class{constructor(e,t){let n;n=e||new W5;let r;r=t||new W5,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return tpn(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function G5(){let e=Nfn(N5());return e.stack=e.stack||new Apn(Opn(),kpn())}function jpn(e){return G5().withScope(e)}function Mpn(e,t){let n=G5();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Npn(e){return G5().withScope(()=>e(G5().getIsolationScope()))}function Ppn(){return{withIsolationScope:Npn,withScope:jpn,withSetScope:Mpn,withSetIsolationScope:(e,t)=>Npn(t),getCurrentScope:()=>G5().getScope(),getIsolationScope:()=>G5().getIsolationScope()}}function K5(e){let t=Nfn(e);return t.acs?t.acs:Ppn()}function q5(){return K5(N5()).getCurrentScope()}function J5(){return K5(N5()).getIsolationScope()}function Fpn(){return P5(`globalScope`,()=>new W5)}function Ipn(...e){let t=K5(N5());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Y5(){return q5().getClient()}var X5=`sentry.source`,Lpn=`sentry.sample_rate`,Rpn=`sentry.op`,Z5=`sentry.origin`,zpn=`sentry.idle_span_finish_reason`,Bpn=`sentry.measurement_unit`,Vpn=`sentry.measurement_value`,Hpn=`sentry.custom_span_name`,Upn=`sentry.profile_id`,Wpn=`sentry.exclusive_time`,Gpn=`_sentryScope`,Kpn=`_sentryIsolationScope`;function qpn(e){try{let t=M5.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Jpn(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}function Ypn(e,t,n){e&&(R5(e,Kpn,qpn(n)),R5(e,Gpn,t))}function Xpn(e){let t=e;return{scope:t[Gpn],isolationScope:Jpn(t[Kpn])}}var Zpn=/^sentry-/;function Qpn(e){let t=$pn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(Zpn)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function $pn(e){if(!(!e||!I5(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=emn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):emn(e)}function emn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var tmn=/^o(\d+)\./;function nmn(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function rmn(e){return e.match(tmn)?.[1]}function imn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=rmn(n)),r}function amn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var omn=!1;function smn(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=$5(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function cmn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Q5(e){return typeof e==`number`?lmn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?lmn(e.getTime()):B5()}function lmn(e){return e>9999999999?e/1e3:e}function $5(e){if(dmn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(umn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0,start_timestamp:Q5(i),timestamp:Q5(o)||void 0,status:fmn(s),op:r[Rpn],origin:r[Z5],links:cmn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function umn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function dmn(e){return typeof e.getSpanJSON==`function`}function e7(e){let{traceFlags:t}=e.spanContext();return t===1}function fmn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}var t7=`_sentryChildSpans`,pmn=`_sentryRootSpan`;function mmn(e,t){R5(t,pmn,e[pmn]||e),e[t7]?e[t7].add(t):R5(e,t7,new Set([t]))}function hmn(e,t){e[t7]&&e[t7].delete(t)}function n7(e){let t=new Set;function n(e){if(!t.has(e)&&e7(e)){t.add(e);let r=e[t7]?Array.from(e[t7]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}function r7(e){return e[pmn]||e}function gmn(){let e=K5(N5());return e.getActiveSpan?e.getActiveSpan():U5(q5())}function _mn(){omn||=(Ifn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function i7(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||Y5()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function vmn(e){F5.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ymn(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(bmn(n)){if(hpn(e.description,n))return j5&&vmn(e),!0;continue}if(!n.name&&!n.op)continue;let t=n.name?hpn(e.description,n.name):!0,r=n.op?e.op&&hpn(e.op,n.op):!0;if(t&&r)return j5&&vmn(e),!0}return!1}function bmn(e){return typeof e==`string`||e instanceof RegExp}var xmn=`_frozenDsc`;function a7(e,t){R5(e,xmn,t)}function Smn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:imn(t)};return t.emit(`createDsc`,i),i}function o7(e){let t=Y5();if(!t)return{};let n=r7(e),r=$5(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[xmn];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&Qpn(l);if(u)return s(u);let d=Smn(e.spanContext().traceId,t),f=i[X5],p=r.description;return f!==`url`&&p&&(d.transaction=p),i7()&&(d.sampled=String(e7(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??Xpn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}var s7=class{constructor(e={}){this._traceId=e.traceId||V5(),this._spanId=e.spanId||Tpn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function Cmn(e,t=100,n=1/0){try{return wmn(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function wmn(e,t,n=1/0,r=1/0,i=Dmn()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Tmn(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__==`number`?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return wmn(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=cpn(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=wmn(e,t,c-1,r,i),d++}return o(t),u}function Tmn(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof globalThis<`u`&&t===globalThis)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(rpn(t))return qfn(t);if(npn(t))return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${Kfn(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let n=Emn(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function Emn(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Dmn(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Omn(e,t=[]){return[e,t]}function kmn(e){return[{type:`span`},e]}function Amn(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=o7(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:nmn(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>!ymn($5(e),c)):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=$5(e);return s(t)||(_mn(),t)}:$5,f=[];for(let e of l){let t=d(e);t&&f.push(kmn(t))}return Omn(o,f)}function jmn(e){if(!j5)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:r}=$5(e),{spanId:i}=e.spanContext(),a=e7(e),o=r7(e),s=o===e,c=`[Tracing] Starting ${a?`sampled`:`unsampled`} ${s?`root `:``}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&l.push(`parent ID: ${r}`),!s){let{op:e,description:t}=$5(o);l.push(`root ID: ${o.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}F5.log(`${c}
890
890
  ${l.join(`
891
891
  `)}`)}function Mmn(e){if(!j5)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=$5(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${r7(e)===e?`root `:``}span "${t}" with ID ${r}`;F5.log(i)}function Nmn(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[Bpn],i=n[Vpn];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}var Pmn=1e3,c7=class{constructor(e={}){this._traceId=e.traceId||V5(),this._spanId=e.spanId||Tpn(),this._startTime=e.startTimestamp||B5(),this._links=e.links,this._attributes={},this.setAttributes({[Z5]:`manual`,[Rpn]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=Q5(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(X5,`custom`),this}end(e){this._endTime||(this._endTime=Q5(e),Mmn(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Rpn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:fmn(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Z5],profile_id:this._attributes[Upn],exclusive_time:this._attributes[Wpn],measurements:Nmn(this._events),is_segment:this._isStandaloneSpan&&r7(this)===this||void 0,segment_id:this._isStandaloneSpan?r7(this).spanContext().spanId:void 0,links:cmn(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){j5&&F5.log(`[Tracing] Adding an event to span:`,e);let r=Fmn(t)?t:n||B5(),i=Fmn(t)?{}:t||{},a={name:e,time:Q5(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=Y5();if(e&&e.emit(`spanEnd`,this),!(this._isStandaloneSpan||this===r7(this)))return;if(this._isStandaloneSpan){this._sampled?Rmn(Amn([this],e)):(j5&&F5.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}let t=this._convertSpanToTransaction();t&&(Xpn(this).scope||q5()).captureEvent(t)}_convertSpanToTransaction(){if(!Imn($5(this)))return;this._name||=(j5&&F5.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:e,isolationScope:t}=Xpn(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let r=n7(this).filter(e=>e!==this&&!Lmn(e)).map(e=>$5(e)).filter(Imn),i=this._attributes[X5];delete this._attributes[Hpn],r.forEach(e=>{delete e.data[Hpn]});let a={contexts:{trace:smn(this)},spans:r.length>Pmn?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Pmn):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:o7(this)},request:n,...i&&{transaction_info:{source:i}}},o=Nmn(this._events);return o&&Object.keys(o).length&&(j5&&F5.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(o,void 0,2)),a.measurements=o),a}};function Fmn(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Imn(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Lmn(e){return e instanceof c7&&e.isStandaloneSpan()}function Rmn(e){let t=Y5();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function zmn(e,t,n){if(!i7(e))return[!1];let r,i;typeof e.tracesSampler==`function`?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),r=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(i=e.tracesSampleRate,r=!0):i=t.parentSampled;let a=amn(i);if(a===void 0)return j5&&F5.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!a)return j5&&F5.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,a,r];let o=n<a;return o||j5&&F5.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,a,r]}var Bmn=`__SENTRY_SUPPRESS_TRACING__`;function Vmn(e){let t=Gmn();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=Wmn(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>Ipn(e.scope,t):i===void 0?e=>e():e=>Hmn(i,e))(()=>{let t=q5(),a=Jmn(t,i);return e.onlyIfParent&&!a?new s7:Umn({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}function Hmn(e,t){let n=Gmn();return n.withActiveSpan?n.withActiveSpan(e,t):Ipn(n=>(H5(n,e||void 0),t(n)))}function Umn({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!i7()){let r=new s7;return(n||!e)&&a7(r,{sampled:`false`,sample_rate:`0`,transaction:t.name,...o7(r)}),r}let i=J5(),a;if(e&&!n)a=qmn(e,r,t),mmn(e,a);else if(e){let n=o7(e),{traceId:i,spanId:o}=e.spanContext(),s=e7(e);a=Kmn({traceId:i,parentSpanId:o,...t},r,s),a7(a,n)}else{let{traceId:e,dsc:n,parentSpanId:o,sampled:s}={...i.getPropagationContext(),...r.getPropagationContext()};a=Kmn({traceId:e,parentSpanId:o,...t},r,s),n&&a7(a,n)}return jmn(a),Ypn(a,r,i),a}function Wmn(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=Q5(e.startTime),delete n.startTime,n}return t}function Gmn(){return K5(N5())}function Kmn(e,t,n){let r=Y5(),i=r?.getOptions()||{},{name:a=``}=e,o={spanAttributes:{...e.attributes},spanName:a,parentSampled:n};r?.emit(`beforeSampling`,o,{decision:!1});let s=o.parentSampled??n,c=o.spanAttributes,l=t.getPropagationContext(),[u,d,f]=t.getScopeData().sdkProcessingMetadata[Bmn]?[!1]:zmn(i,{name:a,parentSampled:s,attributes:c,parentSampleRate:amn(l.dsc?.sample_rate)},l.sampleRand),p=new c7({...e,attributes:{[X5]:`custom`,[Lpn]:d!==void 0&&f?d:void 0,...c},sampled:u});return!u&&r&&(j5&&F5.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),r.recordDroppedEvent(`sample_rate`,`transaction`)),r&&r.emit(`spanStart`,p),p}function qmn(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=t.getScopeData().sdkProcessingMetadata[Bmn]?!1:e7(e),o=a?new c7({...n,parentSpanId:r,traceId:i,sampled:a}):new s7({traceId:i});mmn(e,o);let s=Y5();return s&&(s.emit(`spanStart`,o),n.endTimestamp&&s.emit(`spanEnd`,o)),o}function Jmn(e,t){if(t)return t;if(t===null)return;let n=U5(e);if(!n)return;let r=Y5();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?r7(n):n}var Ymn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Xmn=`heartbeatFailed`,Zmn=`idleTimeout`,Qmn=`finalTimeout`,$mn=`externalFinish`;function ehn(e,t={}){let n=new Map,r=!1,i,a=$mn,o=!t.disableAutoFinish,s=[],{idleTimeout:c=Ymn.idleTimeout,finalTimeout:l=Ymn.finalTimeout,childSpanTimeout:u=Ymn.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,p=Y5();if(!p||!i7()){let e=new s7;return a7(e,{sample_rate:`0`,sampled:`false`,...o7(e)}),e}let m=q5(),h=gmn(),g=thn(e);g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),t instanceof s7)return;let[r,...i]=n,a=Q5(r||B5()),o=n7(g).filter(e=>e!==g),s=$5(g);if(!o.length||!f)return S(a),Reflect.apply(e,t,[a,...i]);let c=p.getOptions().ignoreSpans,u=o?.reduce((e,t)=>{let n=$5(t);return!n.timestamp||c&&ymn(n,c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),m=s.start_timestamp,h=Math.min(m?m+l/1e3:1/0,Math.max(m||-1/0,Math.min(a,u||1/0)));return S(h),Reflect.apply(e,t,[h,...i])}});function _(){i&&=(clearTimeout(i),void 0)}function v(e){_(),i=setTimeout(()=>{!r&&n.size===0&&o&&(a=Zmn,g.end(e))},c)}function y(e){i=setTimeout(()=>{!r&&o&&(a=Xmn,g.end(e))},u)}function b(e){_(),n.set(e,!0),y(B5()+u/1e3)}function x(e){n.has(e)&&n.delete(e),n.size===0&&v(B5()+c/1e3)}function S(e){r=!0,n.clear(),s.forEach(e=>e()),H5(m,h);let t=$5(g),{start_timestamp:i}=t;if(!i)return;t.data[`sentry.idle_span_finish_reason`]||g.setAttribute(zpn,a);let o=t.status;(!o||o===`unknown`)&&g.setStatus({code:1}),F5.log(`[Tracing] Idle span "${t.op}" finished`);let u=n7(g).filter(e=>e!==g),d=0;u.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),j5&&F5.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=$5(t),i=r<=e,a=(l+c)/1e3,o=n-r<=a;if(j5){let e=JSON.stringify(t,void 0,2);i?o||F5.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):F5.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!o||!i)&&(hmn(g,t),d++)}),d>0&&g.setAttribute(`sentry.idle_span_discarded_spans`,d)}return s.push(p.on(`spanStart`,e=>{r||e===g||$5(e).timestamp||e instanceof c7&&e.isStandaloneSpan()||n7(g).includes(e)&&b(e.spanContext().spanId)})),s.push(p.on(`spanEnd`,e=>{r||x(e.spanContext().spanId)})),s.push(p.on(`idleSpanEnableAutoFinish`,e=>{e===g&&(o=!0,v(),n.size&&y())})),t.disableAutoFinish||v(),setTimeout(()=>{r||(g.setStatus({code:2,message:`deadline_exceeded`}),a=Qmn,g.end())},l),g}function thn(e){let t=Vmn(e);return H5(q5(),t),j5&&F5.log(`[Tracing] Started span is an idle span`),t}function nhn(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return q5().captureMessage(e,n,r)}function rhn(){return J5().lastEventId()}var ihn=100;function ahn(e,t){let n=Y5(),r=J5();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ihn}=n.getOptions();if(a<=0)return;let o={timestamp:bpn(),...e},s=i?Ifn(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}function ohn(e,t={},n=q5()){let{message:r,name:i,email:a,url:o,source:s,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:a,name:i,message:r,url:o,source:s,associated_event_id:c}},type:`feedback`,level:`info`,tags:l},d=n?.getClient()||Y5();return d&&d.emit(`beforeSendFeedback`,u,t),n.captureEvent(u,t)}var shn=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},chn={},l7=M5;new RegExp([`ReactNativeRenderer-dev\\.js$`,`MessageQueue\\.js$`].join(`|`));function lhn(e){let t=typeof e!=`string`&&`exception`in e&&e.exception?.values?e.exception.values:[];for(let e of t)if(e.mechanism&&e.mechanism.handled===!1&&e.mechanism.type===`onerror`)return!0;return!1}var uhn=()=>{let e=N5(),t=e.__SENTRY__=e.__SENTRY__||{};return t[Mfn]=t[`10.30.0`]||{}};function dhn(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}var u7=[],fhn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;for(let e=0;e<64;++e)u7[e]=fhn[e];function phn(e){return u7[e>>18&63]+u7[e>>12&63]+u7[e>>6&63]+u7[e&63]}function mhn(e,t,n){let r,i=[];for(let a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(phn(r));return i.join(``)}function hhn(e){let t,n=e.length,r=n%3,i=[],a=16383;for(let t=0,o=n-r;t<o;t+=a)i.push(mhn(e,t,t+a>o?o:t+a));return r===1?(t=e[n-1],i.push(`${u7[t>>2]+u7[t<<4&63]}==`)):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(`${u7[t>>10]+u7[t>>4&63]+u7[t<<2&63]}=`)),i.join(``)}var ghn=()=>{let e=uhn();l7.TextEncoder?e.encodePolyfill=_hn(l7.TextEncoder):e.encodePolyfill=vhn},_hn=e=>t=>new e().encode(t),vhn=e=>new Uint8Array(dhn(e));function d7(e){let t=uhn();return t.encodePolyfill||ghn(),t.encodePolyfill(e)}function yhn(){return l7.expo?.modules?.ExpoGo??void 0}V();function bhn(){return l7.RN$Bridgeless===!0||l7.__turboModuleProxy!=null}function xhn(){return!!yhn()}function f7(){return z.OS===`web`}function Shn(){return z.OS!==`web`}var Chn=`value`;function whn(e){let t=Cmn(e);return typeof t==`object`&&t&&!Array.isArray(t)&&t.constructor===Object?t:{[Chn]:t}}V();var p7=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Thn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Ehn(){return bhn()?chn.TurboModuleRegistry?.get(`RNSentry`):Oi.RNSentry}var m7=Ehn(),h7=d7(`
892
- `),Dhn={fetchModules(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let e=yield m7.fetchModules();return e?JSON.parse(e):null})},sendEnvelope(e){return p7(this,void 0,void 0,function*(){if(!this.enableNative){F5.warn(`Event was skipped as native SDK is not enabled.`);return}if(!this._isModuleLoaded(m7))throw this._NativeClientError;let[t,n]=e,r=d7(JSON.stringify(t)),i=new Uint8Array(r.length+h7.length);i.set(r),i.set(h7,r.length);let a=!1;for(let e of n){let[t,n]=this._processItem(e),r,o;typeof n==`string`?(r=`text/plain`,o=d7(n)):n instanceof Uint8Array?(r=typeof t.content_type==`string`?t.content_type:`application/octet-stream`,o=n):(r=typeof t.content_type==`string`?t.content_type:`application/json`,o=d7(JSON.stringify(n)),a||=lhn(n)),t.content_type=r,t.length=o.length;let s=d7(JSON.stringify(t)),c=new Uint8Array(i.length+s.length+h7.length+o.length+h7.length);c.set(i),c.set(s,i.length),c.set(h7,i.length+s.length),c.set(o,i.length+s.length+h7.length),c.set(h7,i.length+s.length+h7.length+o.length),i=c}yield m7.captureEnvelope(hhn(i),{hardCrashed:a})})},initNativeSdk(e){return p7(this,void 0,void 0,function*(){let t=Object.assign(Object.assign({enableNative:!0,autoInitializeNativeSdk:!0},e),e.enableLogs===void 0?{}:{enableLogs:e.enableLogs&&e.logsOrigin!==`js`});if(!t.enableNative)return t.enableNativeNagger&&F5.warn(`Note: Native Sentry SDK is disabled.`),this.enableNative=!1,!1;if(!t.autoInitializeNativeSdk)return t.enableNativeNagger&&F5.warn(`Note: Native Sentry SDK was not initialized automatically, you will need to initialize it manually. If you wish to disable the native SDK and get rid of this warning, pass enableNative: false`),this.enableNative=!0,!1;if(!t.dsn)return F5.warn(`Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized.`),this.enableNative=!1,!1;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let n=t.ignoreErrors?.filter(e=>typeof e==`string`),r=t.ignoreErrors?.filter(e=>e instanceof RegExp).map(e=>e.source);n&&n.length>0&&(t.ignoreErrorsStr=n),r&&r.length>0&&(t.ignoreErrorsRegex=r);let{beforeSend:i,beforeBreadcrumb:a,beforeSendTransaction:o,beforeSendMetric:s,integrations:c,ignoreErrors:l,logsOrigin:u}=t,d=Thn(t,[`beforeSend`,`beforeBreadcrumb`,`beforeSendTransaction`,`beforeSendMetric`,`integrations`,`ignoreErrors`,`logsOrigin`]),f=yield m7.initNativeSdk(d);return this.nativeIsReady=f,this.enableNative=!0,f})},fetchNativeLogAttributes(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeLogAttributes()})},fetchNativeRelease(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeRelease()})},fetchNativeSdkInfo(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeSdkInfo()})},fetchNativeDeviceContexts(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeDeviceContexts()})},fetchNativeAppStart(){return p7(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(m7)?m7.fetchNativeAppStart():(F5.error(this._NativeClientError),null):(F5.warn(this._DisabledNativeError),null)})},fetchNativeFrames(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeFrames()})},nativeCrash(){if(this.enableNative){if(!this._isModuleLoaded(m7))throw this._NativeClientError;m7.crash()}},setUser(e){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let t=null,n=null;if(e){let{id:r,ip_address:i,email:a,username:o,geo:s}=e,c=Thn(e,[`id`,`ip_address`,`email`,`username`,`geo`]),l={id:r,ip_address:i,email:a,username:o,geo:s};t=this._serializeObject(l),n=this._serializeObject(c)}m7.setUser(t,n)},setTag(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let n=typeof t==`string`?t:JSON.stringify(t);m7.setTag(e,n)},setExtra(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;if(typeof t==`string`)return m7.setExtra(e,t);if(t===void 0)return m7.setExtra(e,`undefined`);let n;try{let e=Cmn(t);n=JSON.stringify(e)}catch(e){F5.error("Extra for key ${key} not passed to native SDK, because it contains non-stringifiable values",e)}return typeof n==`string`?m7.setExtra(e,n):m7.setExtra(e,`**non-stringifiable**`)},addBreadcrumb(e){if(this.enableNative){if(!this._isModuleLoaded(m7))throw this._NativeClientError;m7.addBreadcrumb(Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))}},clearBreadcrumbs(){if(this.enableNative){if(!this._isModuleLoaded(m7))throw this._NativeClientError;m7.clearBreadcrumbs()}},setContext(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;if(t===null)return m7.setContext(e,null);let n;try{n=whn(t)}catch(e){F5.error("Context for key ${key} not passed to native SDK, because it contains non-serializable values",e)}n?m7.setContext(e,n):m7.setContext(e,{error:`**non-serializable**`})},closeNativeSdk(){return p7(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(m7))return m7.closeNativeSdk().then(()=>{this.enableNative=!1})})},disableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(m7)&&m7.disableNativeFramesTracking()},enableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(m7)&&m7.enableNativeFramesTracking()},isNativeAvailable(){return this._isModuleLoaded(m7)},captureScreenshot(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)return F5.warn(this._DisabledNativeError),null;if(!this._isModuleLoaded(m7))return F5.error(this._NativeClientError),null;let e;try{e=yield m7.captureScreenshot()}catch(e){F5.warn(`Failed to capture screenshot`,e)}return e?e.map(e=>Object.assign(Object.assign({},e),{data:new Uint8Array(e.data)})):null})},fetchViewHierarchy(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let e=yield m7.fetchViewHierarchy();return e?new Uint8Array(e):null})},startProfiling(e){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let{started:t,error:n}=m7.startProfiling(e);return t?F5.log(`[NATIVE] Start Profiling`):F5.error(`[NATIVE] Start Profiling Failed`,n),!!t},stopProfiling(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let{profile:e,nativeProfile:t,androidProfile:n,error:r}=m7.stopProfiling();if(!e||r)return F5.error(`[NATIVE] Stop Profiling Failed`,r),null;z.OS===`ios`&&!t&&F5.warn(`[NATIVE] Stop Profiling Failed: No Native Profile`),z.OS===`android`&&!n&&F5.warn(`[NATIVE] Stop Profiling Failed: No Android Profile`);try{return{hermesProfile:JSON.parse(e),nativeProfile:t,androidProfile:n}}catch(e){return F5.error(`[NATIVE] Failed to parse Hermes Profile JSON`,e),null}},fetchNativePackageName(){return!this.enableNative||!this._isModuleLoaded(m7)?null:m7.fetchNativePackageName()||null},fetchNativeStackFramesBy(e){return!this.enableNative||!this._isModuleLoaded(m7)?null:m7.fetchNativeStackFramesBy(e)||null},initNativeReactNavigationNewFrameTracking(){return p7(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(m7))return m7.initNativeReactNavigationNewFrameTracking()})},captureReplay(e){return p7(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(m7)?(yield m7.captureReplay(e))||null:(F5.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is not available.`),Promise.resolve(null)):(F5.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is disabled.`),Promise.resolve(null))})},getCurrentReplayId(){return this.enableNative?this._isModuleLoaded(m7)?m7.getCurrentReplayId()||null:(F5.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is not available.`),null):(F5.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is disabled.`),null)},crashedLastRun(){return p7(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(m7))return null;let e=yield m7.crashedLastRun();return typeof e==`boolean`?e:null})},getNewScreenTimeToDisplay(){return!this.enableNative||!this._isModuleLoaded(m7)?Promise.resolve(null):m7.getNewScreenTimeToDisplay()},getDataFromUri(e){return p7(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(m7))return null;try{let t=yield m7.getDataFromUri(e);return new Uint8Array(t)}catch(e){return F5.error(`Error:`,e),null}})},popTimeToDisplayFor(e){if(!this.enableNative||!this._isModuleLoaded(m7))return Promise.resolve(null);try{return m7.popTimeToDisplayFor(e)}catch(e){return F5.error(`Error:`,e),Promise.resolve(null)}},setActiveSpanId(e){if(!(!this.enableNative||!this._isModuleLoaded(m7)))try{m7.setActiveSpanId(e)}catch(e){F5.error(`Error:`,e);return}},encodeToBase64(e){return p7(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(m7))return Promise.resolve(null);try{let t=Array.from(e);return(yield m7.encodeToBase64(t))||null}catch(e){return F5.error(`Error:`,e),Promise.resolve(null)}})},primitiveProcessor:function(e){return e},_processItem(e){let[t,n]=e;if(t.type==`event`||t.type==`transaction`){let e=this._processLevels(n);return Dhn.platform===`android`&&`message`in e&&(e.message={message:e.message}),[t,e]}return e},_serializeObject(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];t[n]=typeof r==`string`?r:JSON.stringify(r)}),t},_processLevels(e){return Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0,breadcrumbs:e.breadcrumbs?.map(e=>Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))})},_processLevel(e){return e==`log`?`debug`:e},_isModuleLoaded(e){return!!e},_setPrimitiveProcessor:function(e){this.primitiveProcessor=e},_DisabledNativeError:new shn(`Native is disabled`),_NativeClientError:new shn(`Native Client is not available, can't start on native.`),enableNative:!0,nativeIsReady:!1,platform:z.OS};function Ohn(e){return p7(this,void 0,void 0,function*(){return Dhn.getDataFromUri(e)})}function khn(e){return e instanceof c7}function Ahn(e){return e===r7(e)}V(),z.OS===`android`||z.OS;var jhn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Mhn=`MobileFeedback`,Nhn=(e={})=>{let{buttonOptions:t,screenshotButtonOptions:n,colorScheme:r,themeLight:i,themeDark:a}=e;return{name:Mhn,options:jhn(e,[`buttonOptions`,`screenshotButtonOptions`,`colorScheme`,`themeLight`,`themeDark`]),buttonOptions:t||{},screenshotButtonOptions:n||{},colorScheme:r||`system`,themeLight:i||{},themeDark:a||{}}},Phn=()=>Y5()?.getIntegrationByName(Mhn),Fhn=()=>{let e=Phn();return e?.colorScheme?e.colorScheme:`system`},Ihn=()=>{let e=Phn();return e?e.themeLight:{}},Lhn=()=>{let e=Phn();return e?e.themeDark:{}},Rhn=`ui.action.touch`,zhn=`auto.interaction`,Bhn=`manual.interaction`;V();var Vhn=(e,t)=>{if(!Ahn(t)||!khn(t)){F5.warn(`Not sampling childless spans only works for Sentry Transactions (Root Spans).`);return}e.on(`spanEnd`,e=>{e===t&&n7(t).length<=1&&(F5.log(`Not sampling as ${$5(t).op} transaction has no child spans.`),t._sampled=!1)})},Hhn=(e,t)=>{let n=Wf.addEventListener(`change`,e=>{e===`background`&&(F5.log(`Setting ${$5(t).op} transaction to cancelled because the app is in the background.`),t.setStatus({code:2,message:`cancelled`}),t.end())});n&&e.on(`spanEnd`,e=>{var r;e===t&&(F5.log(`Removing AppState listener for ${$5(t).op} transaction.`),(r=n?.remove)==null||r.call(n))})};V();var Uhn=(e,{finalTimeout:t,idleTimeout:n})=>{let r=Y5();if(!r)return F5.warn(`[startIdleSpan] Can't create idle span, missing client.`),new s7;if(Wf.currentState===`background`)return F5.log(`[startIdleSpan] App is already in background, not starting span for ${e.name}`),new s7;q5().setPropagationContext({traceId:V5(),sampleRand:Math.random()});let i=ehn(e,{finalTimeout:t,idleTimeout:n});return Hhn(r,i),i};function Whn(e){return[zhn,Bhn].includes($5(e).origin||``)}var Ghn=`_sentrySpan`;function Khn(e){delete e[Ghn]}var qhn=class{constructor({cleanupInterval:e=5e3,ttl:t=2e3}={}){this._ttl=t,this._map=new Map,this._cleanupIntervalMs=e,this.startCleanup()}set(e,t){if(this._cleanupInterval||this.startCleanup(),typeof t!=`object`||!t||!(`then`in t)){this._map.set(e,{value:t,expiresAt:Date.now()+this._ttl,promise:null});return}let n={value:void 0,expiresAt:null,promise:t};this._map.set(e,n),t.then(e=>{n.value=e,n.expiresAt=Date.now()+this._ttl,n.promise=null},()=>{n.expiresAt=Date.now()+this._ttl,n.promise=null})}pop(e){let t=this.get(e);return this._map.delete(e),t}get(e){let t=this._map.get(e);if(t)return t.promise?t.promise:(t.expiresAt&&t.expiresAt<=Date.now()&&this._map.delete(e),t.value)}has(e){let t=this._map.get(e);return t?t.promise?!0:t.expiresAt&&t.expiresAt<=Date.now()?(this._map.delete(e),!1):!0:!1}ttl(e){let t=this._map.get(e);if(t?.expiresAt){let e=t.expiresAt-Date.now();return e>0?e:0}}cleanup(){let e=Date.now();for(let[t,n]of this._map.entries())n.expiresAt&&n.expiresAt<=e&&this._map.delete(t);this._map.size||this.stopCleanup()}clear(){this._cleanupInterval&&clearInterval(this._cleanupInterval),this._map.clear()}stopCleanup(){this._cleanupInterval&&clearInterval(this._cleanupInterval)}startCleanup(){this._cleanupInterval=setInterval(()=>this.cleanup(),this._cleanupIntervalMs)}},Jhn=`ReactNativeTracing`;f7();function Yhn(){let e=Y5();if(e)return Xhn(e)}function Xhn(e){return e.getIntegrationByName(Jhn)}var g7=`UserInteraction`,Zhn=e=>{let t=Y5();if(!t)return;let n=Yhn();if(!n){F5.log(`[${g7}] Tracing integration is not available. Can not start user interaction span.`);return}let r=t.getOptions(),{elementId:i,op:a}=e;if(!r.enableUserInteractionTracing){F5.log(`[${g7}] User Interaction Tracing is disabled.`);return}if(!i){F5.log(`[${g7}] User Interaction Tracing can not create transaction with undefined elementId.`);return}if(!n.state.currentRoute){F5.log(`[${g7}] User Interaction Tracing can not create transaction without a current route.`);return}let o=gmn(),s=o&&!Whn(o);if(o&&s){F5.warn(`[${g7}] Did not create ${a} transaction because active transaction ${$5(o).description} exists on the scope.`);return}let c=`${n.state.currentRoute}.${i}`;if(o&&$5(o).description===c&&$5(o).op===a){F5.warn(`[${g7}] Did not create ${a} transaction because it the same transaction ${$5(o).description} already exists on the scope.`);return}let l=q5(),u={name:c,op:a,scope:l};Khn(l);let d=Uhn(u,{idleTimeout:n.options.idleTimeoutMs,finalTimeout:n.options.finalTimeoutMs});return d.setAttribute(Z5,Bhn),Vhn(t,d),F5.log(`[${g7}] User Interaction Tracing Created ${a} transaction ${c}.`),d};new qhn({ttl:6e4}),V();function Qhn(){let{major:e,minor:t}=chn.ReactNativeVersion?.version||{};return e&&e>0||t&&t>=69||!1}var $hn=e=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e),egn=e=>{if(typeof atob!=`function`||!f7())throw Error(`atob is not available in this environment.`);let t=atob(e);return new Uint8Array([...t].map(e=>e.charCodeAt(0)))},_7=(e,t)=>{f7()&&l7.alert!==void 0?l7.alert(`${e}\n${t}`):Li.alert(e,t)},tgn={onFormOpen:()=>{},onFormClose:()=>{},onAddScreenshot:e=>{},onSubmitSuccess:()=>{},onSubmitError:()=>{},onFormSubmitted:()=>{},showBranding:!0,isEmailRequired:!1,shouldValidateEmail:!0,isNameRequired:!1,showEmail:!0,showName:!0,enableScreenshot:!1,enableTakeScreenshot:!1,cancelButtonLabel:`Cancel`,emailLabel:`Email`,emailPlaceholder:`your.email@example.org`,formTitle:`Report a Bug`,isRequiredLabel:`(required)`,messageLabel:`Description`,messagePlaceholder:`What's the bug? What did you expect?`,nameLabel:`Name`,namePlaceholder:`Your Name`,submitButtonLabel:`Send Bug Report`,errorTitle:`Error`,formError:`Please fill out all required fields.`,emailError:`Please enter a valid email address.`,captureScreenshotError:`Error capturing screenshot. Please try again.`,successMessageText:`Thank you for your report!`,addScreenshotButtonLabel:`Add a screenshot`,removeScreenshotButtonLabel:`Remove screenshot`,captureScreenshotButtonLabel:`Take a screenshot`,genericError:`Unable to send feedback due to an unexpected error.`},ngn=e=>({container:{flex:1,padding:20,backgroundColor:e.background},title:{fontSize:24,fontWeight:`bold`,marginBottom:20,textAlign:`left`,flex:1,color:e.foreground},label:{marginBottom:4,fontSize:16,color:e.foreground},input:{height:50,borderColor:e.border,borderWidth:1,borderRadius:5,paddingHorizontal:10,marginBottom:15,fontSize:16,color:e.foreground},textArea:{height:100,textAlignVertical:`top`,color:e.foreground},screenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:`center`,flex:1,borderWidth:1,borderColor:e.border},screenshotContainer:{flexDirection:`row`,alignItems:`center`,width:`100%`,marginBottom:20},screenshotThumbnail:{width:50,height:50,borderRadius:5,marginRight:10},screenshotText:{color:e.foreground,fontSize:16},takeScreenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:`center`,borderWidth:1,borderColor:e.border,marginTop:-10,marginBottom:20},takeScreenshotText:{color:e.foreground,fontSize:16},submitButton:{backgroundColor:e.accentBackground,paddingVertical:15,borderRadius:5,alignItems:`center`,marginBottom:10},submitText:{color:e.accentForeground,fontSize:18},cancelButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:`center`,borderWidth:1,borderColor:e.border},cancelText:{color:e.foreground,fontSize:16},titleContainer:{flexDirection:`row`,width:`100%`},sentryLogo:{width:40,height:40,tintColor:e.sentryLogo}});V();function rgn(){let e=Fhn(),t=e===`system`?Pf.getColorScheme():e,n=Object.assign(Object.assign({},ign),Ihn()),r=Object.assign(Object.assign({},agn),Lhn());return t===`dark`?r:n}var ign={accentBackground:`rgba(88, 74, 192, 1)`,accentForeground:`#ffffff`,foreground:`#2b2233`,background:`#ffffff`,border:`rgba(41, 35, 47, 0.13)`,feedbackIcon:`rgba(54, 45, 89, 1)`,sentryLogo:`rgba(54, 45, 89, 1)`},agn={accentBackground:`rgba(88, 74, 192, 1)`,accentForeground:`#ffffff`,foreground:`#ebe6ef`,background:`#29232f`,border:`rgba(235, 230, 239, 0.15)`,feedbackIcon:`#ffffff`,sentryLogo:`#ffffff`};function ogn(){var e;Y5()?.getIntegrationByName(`MobileFeedback`)||(e=Y5())==null||e.addIntegration(Nhn())}function sgn(){var e;Y5()?.getIntegrationByName(`AutoInjectMobileScreenshotButton`)||(e=Y5())==null||e.addIntegration({name:`AutoInjectMobileScreenshotButton`})}var cgn=()=>{},lgn=class{static get _feedbackComponentName(){throw Error(`Subclasses must override feedbackComponentName`)}static initialize(e){this._setVisibility=e}static reset(){this._isVisible=!1,this._setVisibility=cgn}static show(){this._setVisibility===cgn?console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' to be called before 'show${this._feedbackComponentName}()'.`):(this._isVisible=!0,this._setVisibility(!0))}static hide(){this._setVisibility===cgn?console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' before interacting with the widget.`):(this._isVisible=!1,this._setVisibility(!1))}static isFormVisible(){return this._isVisible}};lgn._isVisible=!1;var ugn=class extends lgn{static get _feedbackComponentName(){return`FeedbackButton`}},dgn=class extends lgn{static get _feedbackComponentName(){return`ScreenshotButton`}},fgn=()=>{ugn.hide()},pgn=()=>{if(f7()){F5.warn(`ScreenshotButton is not supported on Web.`);return}sgn(),dgn.show()};V(),H.Component,V();var mgn,hgn=()=>{let e=mgn;return mgn=void 0,e};H.Component,V();var ggn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},_gn=class e extends H.Component{constructor(t){super(t),this._didSubmitForm=!1,this.handleFeedbackSubmit=()=>{let{name:e,email:t,description:n}=this.state,{onSubmitSuccess:r,onSubmitError:i,onFormSubmitted:a}=this.props,o=this.props,s=e?.trim(),c=t?.trim(),l=n?.trim();if(this.props.isNameRequired&&!s||this.props.isEmailRequired&&!c||!l){_7(o.errorTitle,o.formError);return}if(this.props.shouldValidateEmail&&(this.props.isEmailRequired||c.length>0)&&!$hn(c)){_7(o.errorTitle,o.emailError);return}let u=this.state.filename&&this.state.attachment?[{filename:this.state.filename,data:this.state.attachment}]:void 0,d={message:l,name:s,email:c,associatedEventId:rhn()};try{a||this.setState({isVisible:!1}),ohn(d,u?{attachments:u}:void 0),r({name:s,email:c,message:l,attachments:u}),_7(o.successMessageText,``),a(),this._didSubmitForm=!0}catch(e){let t=`Feedback form submission failed: ${e}`;i(Error(t)),_7(o.errorTitle,o.genericError),F5.error(`Feedback form submission failed: ${e}`)}},this.onScreenshotButtonPress=()=>ggn(this,void 0,void 0,function*(){if(this._hasScreenshot())this.setState({filename:void 0,attachment:void 0,attachmentUri:void 0});else{let{imagePicker:e}=this.props;if(e){let t=e.launchImageLibraryAsync?()=>e.launchImageLibraryAsync?.call(e,{mediaTypes:[`images`],base64:f7()}):e.launchImageLibrary?()=>e.launchImageLibrary?.call(e,{mediaType:`photo`,includeBase64:f7()}):null;if(!t){F5.warn(`No compatible image picker library found. Please provide a valid image picker library.`);return}let n=yield t();if(n?.assets&&n.assets.length>0)if(f7()){let e=n.assets[0]?.fileName,t=n.assets[0]?.uri,r=n.assets[0]?.base64,i=r?egn(r):void 0;i?this.setState({filename:e,attachment:i,attachmentUri:t}):F5.error(`Failed to read image data on the web`)}else{let e=n.assets[0]?.fileName,t=n.assets[0]?.uri;t&&Ohn(t).then(n=>{n==null?(this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,t)):this.setState({filename:e,attachment:n,attachmentUri:t})}).catch(e=>{this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,t,`error: `,e)})}}else{let{onAddScreenshot:e}=Object.assign(Object.assign({},tgn),this.props);e(e=>{Ohn(e).then(t=>{t==null?(this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,e)):this.setState({filename:`feedback_screenshot`,attachment:t,attachmentUri:e})}).catch(t=>{this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,e,`error: `,t)})})}}}),this._setCapturedScreenshot=e=>{e.data==null?F5.error(`Failed to read image data from:`,e.filename):(F5.log(`Setting captured screenshot:`,e.filename),Dhn.encodeToBase64(e.data).then(t=>{if(t!=null){let n=`data:${e.contentType};base64,${t}`;this.setState({filename:e.filename,attachment:e.data,attachmentUri:n})}else F5.error(`Failed to read image data from:`,e.filename)}).catch(t=>{F5.error(`Failed to read image data from:`,e.filename,`error: `,t)}))},this._saveFormState=()=>{e._savedState=Object.assign({},this.state)},this._clearFormState=()=>{e._savedState={name:``,email:``,description:``,filename:void 0,attachment:void 0,attachmentUri:void 0}},this._hasScreenshot=()=>this.state.filename!==void 0&&this.state.attachment!==void 0&&this.state.attachmentUri!==void 0,this._getUser=()=>q5().getUser()||J5().getUser()||Fpn().getUser(),this._showImageRetrievalDevelopmentNote=()=>{xhn()&&_7(`Development note`,`The feedback widget cannot retrieve image data in Expo Go. Please build your app to test this functionality.`)};let n={useSentryUser:{email:this.props?.useSentryUser?.email||this._getUser()?.email||``,name:this.props?.useSentryUser?.name||this._getUser()?.name||``}};this.state={isVisible:!0,name:e._savedState.name||n.useSentryUser.name,email:e._savedState.email||n.useSentryUser.email,description:e._savedState.description||``,filename:e._savedState.filename||void 0,attachment:e._savedState.attachment||void 0,attachmentUri:e._savedState.attachmentUri||void 0},ogn()}static reset(){e._savedState={name:``,email:``,description:``,filename:void 0,attachment:void 0,attachmentUri:void 0}}componentDidMount(){this._themeListener=Pf.addChangeListener(()=>{this.forceUpdate()})}componentWillUnmount(){this._didSubmitForm?(this._clearFormState(),this._didSubmitForm=!1):this._saveFormState(),this._themeListener&&this._themeListener.remove()}render(){let e=rgn(),{name:t,email:n,description:r}=this.state,{onFormClose:i}=this.props,a=this.props,o=this.props,s=this.props,c=Object.assign(Object.assign({},ngn(e)),this.props.styles),l=()=>{i?i():this.setState({isVisible:!1})};if(!this.state.isVisible)return null;let u=hgn();return u===`ErrorCapturingScreenshot`?setTimeout(()=>ggn(this,void 0,void 0,function*(){_7(s.errorTitle,s.captureScreenshotError)}),100):u&&this._setCapturedScreenshot(u),H.createElement(xm,{onPress:Shn()?qf.dismiss:void 0,accessible:!1,accessibilityElementsHidden:!1},H.createElement(B,{style:c.container},H.createElement(B,{style:c.titleContainer},H.createElement(Id,{style:c.title,testID:`sentry-feedback-form-title`},s.formTitle),a.showBranding&&H.createElement(gd,{source:{uri:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAC4BAMAAABUVL5sAAAAD1BMVEUAAAA2Llo3LVk4LFg2LVmgcvrUAAAABHRSTlMAgL9ARyeO/QAAA7pJREFUeNrtWltynDAQFBIHIFUcgCQ6AIk5AAjd/0ypxFk3ouUCNJofl/rHy75a09MzI7Q2DQ0NDQ0NDQ0NDQ0N9eF+xPh9MKpwPv6FLss7R9yMImz8j8nowb9IglFDF6N+KCNIdqMFcGjpBbVUXdzHqKsXUhJGNb2g1vz6azRgX8XulUwMtVZjFsWkvFz10s0ooEO+9Vpxj/6rp9eI5VsdE6eJcDCxilqICiZWMHBSMkBVA2vq1SVrVyr6Ea5VMjHqjytTwcAgRVJ0DAy9VoWUTNT3tQysZGIYmGNTKHfK0q6oFkysYWCuHB0DaxX9yHLx5JKrhVC0TGwjWNRMvNAuW6PoR4TCepnqLLuiicEyKJq4g2C6Rc+hsInlgtHCF41OrD65INisObksbKy2/YJg9U08sGBTbRN3YaBQQu2i74/mcQil6vZr5C0dQpGbGKJvdOA1VDVxd5LHooPR5BJPdwql5vaLeq9FQZKJpa1kOoUSKpq45+m+ZK93aUpSwRyuafslUguCIZRZamKoBYQT80QmlqnF38p6bSIDcyg2q5fw/uo8dx0upZMLLdadQ1kgkNDEOOGiYYXjVKGJ8V00rEggcErurxAKCwQTi9RCAW7UFcUm5vPAOFNXFBY9DggQyp76jnIkOyBwaeqtyMScEu7w4JRNLnyQOjyvACcWpR145g6PV1fp9mvE0jMd3tWZXDR3/Ud2cSXZfmHhvNpEoFlgYsjFHX4AJc3kXXSTyEfDTrz94ptE1qvS9ouG1Ud2sQT5PVcHg3FL78FIYUpqxWK1yLzMxNzhHVaLzItMzB0eB/S4CDRHC+AzFTjhAiSSHx9tpgJXqnmhXi7VizM/F5v4V5oVqOIp81PpEW4Xt7PUA0kEe5WZ2PLt7ZopDg8Seue9GpxoU0WrHyFPgYlzmyrKPDxcpFeX3YRS5mGvxybmsC2tPhLJQxPzdsfliwMeLjAx9wcujoFIaEAX/KSYXz0s+9TE/E7LX0yF8lQvitl99sVjSgITl/yk6Lk48JjfGadnanHml8xjMvFTA+eL42CRwDKEZwbm4rBMyAmdH6UEz8HDTPj4d4ie1EJxJCQg56DXaxKOl0iGz0jcdebZluzhbFSA1yEZ2JzbHZKQe3I/EK4CErTHbwn84ZP+8Poxqrd/+I2cXJAw0v9VAkBiI3DhLryZEe6SXNeJk5HcHFu+Aom5wiIn2a7niZiE1WKMUhIOhNFJSQZzh0VG8tPcQufLSQI46sO9vcM0NDQ0NDQ0NDQ0NHxF/AFGJOBYBWrb5gAAAABJRU5ErkJggg==`},style:c.sentryLogo,testID:`sentry-logo`})),a.showName&&H.createElement(H.Fragment,null,H.createElement(Id,{style:c.label},s.nameLabel,a.isNameRequired&&` ${s.isRequiredLabel}`),H.createElement(am,{style:c.input,testID:`sentry-feedback-name-input`,placeholder:s.namePlaceholder,value:t,onChangeText:e=>this.setState({name:e})})),a.showEmail&&H.createElement(H.Fragment,null,H.createElement(Id,{style:c.label},s.emailLabel,a.isEmailRequired&&` ${s.isRequiredLabel}`),H.createElement(am,{style:c.input,testID:`sentry-feedback-email-input`,placeholder:s.emailPlaceholder,keyboardType:`email-address`,value:n,onChangeText:e=>this.setState({email:e})})),H.createElement(Id,{style:c.label},s.messageLabel,` ${s.isRequiredLabel}`),H.createElement(am,{style:[c.input,c.textArea],testID:`sentry-feedback-message-input`,placeholder:s.messagePlaceholder,value:r,onChangeText:e=>this.setState({description:e}),multiline:!0}),(a.enableScreenshot||o.imagePicker||this._hasScreenshot())&&H.createElement(B,{style:c.screenshotContainer},this.state.attachmentUri&&H.createElement(gd,{source:{uri:this.state.attachmentUri},style:c.screenshotThumbnail}),H.createElement(_p,{style:c.screenshotButton,onPress:this.onScreenshotButtonPress},H.createElement(Id,{style:c.screenshotText},this._hasScreenshot()?s.removeScreenshotButtonLabel:s.addScreenshotButtonLabel))),Shn()&&a.enableTakeScreenshot&&!this.state.attachmentUri&&H.createElement(_p,{style:c.takeScreenshotButton,onPress:()=>{fgn(),l(),pgn()}},H.createElement(Id,{style:c.takeScreenshotText,testID:`sentry-feedback-take-screenshot-button`},s.captureScreenshotButtonLabel)),H.createElement(_p,{style:c.submitButton,onPress:this.handleFeedbackSubmit},H.createElement(Id,{style:c.submitText,testID:`sentry-feedback-submit-button`},s.submitButtonLabel)),H.createElement(_p,{style:c.cancelButton,onPress:l},H.createElement(Id,{style:c.cancelText},s.cancelButtonLabel))))}};_gn.defaultProps=tgn,_gn._savedState={name:``,email:``,description:``,filename:void 0,attachment:void 0,attachmentUri:void 0},V(),Qhn(),H.Component;function vgn(e,t=()=>{}){return{name:e,setupOnce:t}}V(),Ei.hasViewManagerConfig&&Ei.hasViewManagerConfig(`RNSentryOnDrawReporter`),H.Component,V();var ygn=R.create({wrapperView:{flex:1}}),bgn=`touch`,xgn=`user`,Sgn=20,Cgn=`sentry-label`,v7=`data-sentry-component`,y7=`data-sentry-element`,b7=`data-sentry-source-file`,wgn=class e extends H.Component{constructor(){super(...arguments),this.name=`TouchEventBoundary`}componentDidMount(){var e;let t=Y5();(e=t?.addIntegration)==null||e.call(t,vgn(this.name))}render(){return H.createElement(B,{style:ygn.wrapperView,onTouchStart:this._onTouchStart.bind(this)},this.props.children)}_logTouchEvent(e,t){let n=e[0];if(!n){F5.warn(`[TouchEvents] No root component found in touch path.`);return}let r=t||`${n.name}${n.file?` (${n.file})`:``}`,i={category:this.props.breadcrumbCategory,data:{path:e},level:`info`,message:`Touch event within element: ${r}`,type:this.props.breadcrumbType};ahn(i),F5.log(`[TouchEvents] ${i.message}`)}_isNameIgnored(e){let t=this.props.ignoreNames||[];return this.props.ignoredDisplayNames&&(t=[...t,...this.props.ignoredDisplayNames]),t.some(t=>typeof t==`string`&&e===t||t instanceof RegExp&&e.match(t))}_onTouchStart(t){if(!t._targetInst)return;let n=t._targetInst,r=[];for(;n&&this.props.maxComponentTreeSize&&r.length<this.props.maxComponentTreeSize&&n.elementType?.displayName!==e.displayName;){let e=Tgn(n,this.props.labelName);this._pushIfNotIgnored(r,e),n=n.return}let i=r.find(e=>e.label)?.label;r.length>0&&this._logTouchEvent(r,i);let a=Zhn({elementId:i,op:Rhn});a&&a.setAttribute(Z5,zhn)}_pushIfNotIgnored(e,t){return!t||!t.name&&!t.label||t.name&&this._isNameIgnored(t.name)||t.label&&this._isNameIgnored(t.label)||e.length>0&&JSON.stringify(e[e.length-1])===JSON.stringify(t)?!1:(e.push(t),!0)}};wgn.displayName=`__Sentry.TouchEventBoundary`,wgn.defaultProps={breadcrumbCategory:bgn,breadcrumbType:xgn,ignoreNames:[],maxComponentTreeSize:Sgn};function Tgn(e,t){let n=e.elementType?.displayName,r=e.memoizedProps;return r?dpn({name:Egn(r)||n,element:Dgn(r),file:Ogn(r),label:kgn(r,t)}):n?{name:n}:void 0}function Egn(e){return typeof e[v7]==`string`&&e[v7].length>0&&e[v7]!==`unknown`&&e[v7]||void 0}function Dgn(e){return typeof e[y7]==`string`&&e[y7].length>0&&e[y7]!==`unknown`&&e[y7]||void 0}function Ogn(e){return typeof e[b7]==`string`&&e[b7].length>0&&e[b7]!==`unknown`&&e[b7]||void 0}function kgn(e,t){return typeof e[Cgn]==`string`&&e[Cgn].length>0?e[Cgn]:typeof t==`string`&&typeof e[t]==`string`&&e[t].length>0?e[t]:void 0}function Agn(){return Object.assign({},j6())}function jgn(e,t){let n=Mgn(t)?new t(0):V2(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Mgn(e){return typeof e==`function`&&e.prototype?.constructor===e}var Ngn=10,Pgn=class{subPriority=0;validate(e,t){return!0}},Fgn=class extends Pgn{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},Ign=class extends Pgn{priority=Ngn;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>V2(t,e))}set(e,t){return t.timestampIsSet?e:V2(e,jgn(e,this.context))}},x7=class{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new Fgn(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},Lgn=class extends x7{priority=140;parse(e,t,n){switch(t){case`G`:case`GG`:case`GGG`:return n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`});case`GGGGG`:return n.era(e,{width:`narrow`});default:return n.era(e,{width:`wide`})||n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`R`,`u`,`t`,`T`]},S7={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},C7={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function w7(e,t){return e&&{value:t(e.value),rest:e.rest}}function T7(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function E7(e,t){let n=t.match(e);if(!n)return null;if(n[0]===`Z`)return{value:0,rest:t.slice(1)};let r=n[1]===`+`?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*d5t+a*u5t+o*f5t),rest:t.slice(n[0].length)}}function Rgn(e){return T7(S7.anyDigitsSigned,e)}function D7(e,t){switch(e){case 1:return T7(S7.singleDigit,t);case 2:return T7(S7.twoDigits,t);case 3:return T7(S7.threeDigits,t);case 4:return T7(S7.fourDigits,t);default:return T7(RegExp(`^\\d{1,`+e+`}`),t)}}function zgn(e,t){switch(e){case 1:return T7(S7.singleDigitSigned,t);case 2:return T7(S7.twoDigitsSigned,t);case 3:return T7(S7.threeDigitsSigned,t);case 4:return T7(S7.fourDigitsSigned,t);default:return T7(RegExp(`^-?\\d{1,`+e+`}`),t)}}function Bgn(e){switch(e){case`morning`:return 4;case`evening`:return 17;case`pm`:case`noon`:case`afternoon`:return 12;default:return 0}}function Vgn(e,t){let n=t>0,r=n?t:1-t,i;if(r<=50)i=e||100;else{let t=r+50,n=Math.trunc(t/100)*100,a=e>=t%100;i=e+n-(a?100:0)}return n?i:1-i}function Hgn(e){return e%400==0||e%4==0&&e%100!=0}var Ugn=class extends x7{priority=130;incompatibleTokens=[`Y`,`R`,`u`,`w`,`I`,`i`,`e`,`c`,`t`,`T`];parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`yy`});switch(t){case`y`:return w7(D7(4,e),r);case`yo`:return w7(n.ordinalNumber(e,{unit:`year`}),r);default:return w7(D7(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=Vgn(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Wgn=class extends x7{priority=130;parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`YY`});switch(t){case`Y`:return w7(D7(4,e),r);case`Yo`:return w7(n.ordinalNumber(e,{unit:`year`}),r);default:return w7(D7(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=Jin(e,r);if(n.isTwoDigitYear){let t=Vgn(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),M6(e,r)}let a=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),M6(e,r)}incompatibleTokens=[`y`,`R`,`u`,`Q`,`q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]},Ggn=class extends x7{priority=130;parse(e,t){return zgn(t===`R`?4:t.length,e)}set(e,t,n){let r=V2(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),W6(r)}incompatibleTokens=[`G`,`y`,`Y`,`u`,`Q`,`q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},Kgn=class extends x7{priority=130;parse(e,t){return zgn(t===`u`?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`G`,`y`,`Y`,`R`,`w`,`I`,`i`,`e`,`c`,`t`,`T`]},qgn=class extends x7{priority=120;parse(e,t,n){switch(t){case`Q`:case`QQ`:return D7(t.length,e);case`Qo`:return n.ordinalNumber(e,{unit:`quarter`});case`QQQ`:return n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`});case`QQQQQ`:return n.quarter(e,{width:`narrow`,context:`formatting`});default:return n.quarter(e,{width:`wide`,context:`formatting`})||n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},Jgn=class extends x7{priority=120;parse(e,t,n){switch(t){case`q`:case`qq`:return D7(t.length,e);case`qo`:return n.ordinalNumber(e,{unit:`quarter`});case`qqq`:return n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`});case`qqqqq`:return n.quarter(e,{width:`narrow`,context:`standalone`});default:return n.quarter(e,{width:`wide`,context:`standalone`})||n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`Q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},Ygn=class extends x7{incompatibleTokens=[`Y`,`R`,`q`,`Q`,`L`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`];priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`M`:return w7(T7(S7.month,e),r);case`MM`:return w7(D7(2,e),r);case`Mo`:return w7(n.ordinalNumber(e,{unit:`month`}),r);case`MMM`:return n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`});case`MMMMM`:return n.month(e,{width:`narrow`,context:`formatting`});default:return n.month(e,{width:`wide`,context:`formatting`})||n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},Xgn=class extends x7{priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`L`:return w7(T7(S7.month,e),r);case`LL`:return w7(D7(2,e),r);case`Lo`:return w7(n.ordinalNumber(e,{unit:`month`}),r);case`LLL`:return n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`});case`LLLLL`:return n.month(e,{width:`narrow`,context:`standalone`});default:return n.month(e,{width:`wide`,context:`standalone`})||n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]};function Zgn(e,t,n){let r=H2(e,n?.in),i=Xin(r,n)-t;return r.setDate(r.getDate()-i*7),H2(r,n?.in)}var Qgn=class extends x7{priority=100;parse(e,t,n){switch(t){case`w`:return T7(S7.week,e);case`wo`:return n.ordinalNumber(e,{unit:`week`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return M6(Zgn(e,n,r),r)}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]};function $gn(e,t,n){let r=H2(e,n?.in),i=qin(r,n)-t;return r.setDate(r.getDate()-i*7),r}var e_n=class extends x7{priority=100;parse(e,t,n){switch(t){case`I`:return T7(S7.week,e);case`Io`:return n.ordinalNumber(e,{unit:`week`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return W6($gn(e,n))}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},t_n=[31,28,31,30,31,30,31,31,30,31,30,31],n_n=[31,29,31,30,31,30,31,31,30,31,30,31],r_n=class extends x7{priority=90;subPriority=1;parse(e,t,n){switch(t){case`d`:return T7(S7.date,e);case`do`:return n.ordinalNumber(e,{unit:`date`});default:return D7(t.length,e)}}validate(e,t){let n=Hgn(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=n_n[r]:t>=1&&t<=t_n[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]},i_n=class extends x7{priority=90;subpriority=1;parse(e,t,n){switch(t){case`D`:case`DD`:return T7(S7.dayOfYear,e);case`Do`:return n.ordinalNumber(e,{unit:`date`});default:return D7(t.length,e)}}validate(e,t){return Hgn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`L`,`w`,`I`,`d`,`E`,`i`,`e`,`c`,`t`,`T`]};function O7(e,t,n){let r=H2(e,n?.in);return isNaN(t)?V2(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function a_n(e,t,n){let r=j6(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=H2(e,n?.in),o=a.getDay(),s=(t%7+7)%7,c=7-i;return O7(a,t<0||t>6?t-(o+c)%7:(s+c)%7-(o+c)%7,n)}var o_n=class extends x7{priority=90;parse(e,t,n){switch(t){case`E`:case`EE`:case`EEE`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`EEEEE`:return n.day(e,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=a_n(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`D`,`i`,`e`,`c`,`t`,`T`]},s_n=class extends x7{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`e`:case`ee`:return w7(D7(t.length,e),i);case`eo`:return w7(n.ordinalNumber(e,{unit:`day`}),i);case`eee`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`eeeee`:return n.day(e,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=a_n(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`c`,`t`,`T`]},c_n=class extends x7{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`c`:case`cc`:return w7(D7(t.length,e),i);case`co`:return w7(n.ordinalNumber(e,{unit:`day`}),i);case`ccc`:return n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});case`ccccc`:return n.day(e,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});default:return n.day(e,{width:`wide`,context:`standalone`})||n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=a_n(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`e`,`t`,`T`]};function l_n(e,t){let n=H2(e,t?.in).getDay();return n===0?7:n}function u_n(e,t,n){let r=H2(e,n?.in);return O7(r,t-l_n(r,n),n)}var d_n=class extends x7{priority=90;parse(e,t,n){let r=e=>e===0?7:e;switch(t){case`i`:case`ii`:return D7(t.length,e);case`io`:return n.ordinalNumber(e,{unit:`day`});case`iii`:return w7(n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiii`:return w7(n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiiii`:return w7(n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);default:return w7(n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=u_n(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`E`,`e`,`c`,`t`,`T`]},f_n=class extends x7{priority=80;parse(e,t,n){switch(t){case`a`:case`aa`:case`aaa`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`aaaaa`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Bgn(n),0,0,0),e}incompatibleTokens=[`b`,`B`,`H`,`k`,`t`,`T`]},p_n=class extends x7{priority=80;parse(e,t,n){switch(t){case`b`:case`bb`:case`bbb`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`bbbbb`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Bgn(n),0,0,0),e}incompatibleTokens=[`a`,`B`,`H`,`k`,`t`,`T`]},m_n=class extends x7{priority=80;parse(e,t,n){switch(t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`BBBBB`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Bgn(n),0,0,0),e}incompatibleTokens=[`a`,`b`,`t`,`T`]},h_n=class extends x7{priority=70;parse(e,t,n){switch(t){case`h`:return T7(S7.hour12h,e);case`ho`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`H`,`K`,`k`,`t`,`T`]},g_n=class extends x7{priority=70;parse(e,t,n){switch(t){case`H`:return T7(S7.hour23h,e);case`Ho`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`K`,`k`,`t`,`T`]},__n=class extends x7{priority=70;parse(e,t,n){switch(t){case`K`:return T7(S7.hour11h,e);case`Ko`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`h`,`H`,`k`,`t`,`T`]},v_n=class extends x7{priority=70;parse(e,t,n){switch(t){case`k`:return T7(S7.hour24h,e);case`ko`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){let r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`H`,`K`,`t`,`T`]},y_n=class extends x7{priority=60;parse(e,t,n){switch(t){case`m`:return T7(S7.minute,e);case`mo`:return n.ordinalNumber(e,{unit:`minute`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=[`t`,`T`]},b_n=class extends x7{priority=50;parse(e,t,n){switch(t){case`s`:return T7(S7.second,e);case`so`:return n.ordinalNumber(e,{unit:`second`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=[`t`,`T`]},x_n=class extends x7{priority=30;parse(e,t){return w7(D7(t.length,e),e=>Math.trunc(e*10**(-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=[`t`,`T`]},S_n=class extends x7{priority=10;parse(e,t){switch(t){case`X`:return E7(C7.basicOptionalMinutes,e);case`XX`:return E7(C7.basic,e);case`XXXX`:return E7(C7.basicOptionalSeconds,e);case`XXXXX`:return E7(C7.extendedOptionalSeconds,e);default:return E7(C7.extended,e)}}set(e,t,n){return t.timestampIsSet?e:V2(e,e.getTime()-U6(e)-n)}incompatibleTokens=[`t`,`T`,`x`]},C_n=class extends x7{priority=10;parse(e,t){switch(t){case`x`:return E7(C7.basicOptionalMinutes,e);case`xx`:return E7(C7.basic,e);case`xxxx`:return E7(C7.basicOptionalSeconds,e);case`xxxxx`:return E7(C7.extendedOptionalSeconds,e);default:return E7(C7.extended,e)}}set(e,t,n){return t.timestampIsSet?e:V2(e,e.getTime()-U6(e)-n)}incompatibleTokens=[`t`,`T`,`X`]},w_n=class extends x7{priority=40;parse(e){return Rgn(e)}set(e,t,n){return[V2(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens=`*`},T_n=class extends x7{priority=20;parse(e){return Rgn(e)}set(e,t,n){return[V2(e,n),{timestampIsSet:!0}]}incompatibleTokens=`*`},E_n={G:new Lgn,y:new Ugn,Y:new Wgn,R:new Ggn,u:new Kgn,Q:new qgn,q:new Jgn,M:new Ygn,L:new Xgn,w:new Qgn,I:new e_n,d:new r_n,D:new i_n,E:new o_n,e:new s_n,c:new c_n,i:new d_n,a:new f_n,b:new p_n,B:new m_n,h:new h_n,H:new g_n,K:new __n,k:new v_n,m:new y_n,s:new b_n,S:new x_n,X:new S_n,x:new C_n,t:new w_n,T:new T_n},D_n=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,O_n=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,k_n=/^'([^]*?)'?$/,A_n=/''/g,j_n=/\S/,M_n=/[a-zA-Z]/;function k7(e,t,n,r){let i=()=>V2(r?.in||n,NaN),a=Agn(),o=r?.locale??a.locale??Bin,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():H2(n,r?.in);let l={firstWeekContainsDate:s,weekStartsOn:c,locale:o},u=[new Ign(r?.in,n)],d=t.match(O_n).map(e=>{let t=e[0];if(t in nan){let n=nan[t];return n(e,o.formatLong)}return e}).join(``).match(D_n),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&san(n)&&can(n,t,e),!r?.useAdditionalDayOfYearTokens&&oan(n)&&can(n,t,e);let a=n[0],s=E_n[a];if(s){let{incompatibleTokens:t}=s;if(Array.isArray(t)){let e=f.find(e=>t.includes(e.token)||e.token===a);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if(s.incompatibleTokens===`*`&&f.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:a,fullToken:n});let r=s.run(e,n,o.match,l);if(!r)return i();u.push(r.setter),e=r.rest}else{if(a.match(M_n))throw RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if(n===`''`?n=`'`:a===`'`&&(n=N_n(n)),e.indexOf(n)===0)e=e.slice(n.length);else return i()}}if(e.length>0&&j_n.test(e))return i();let p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),m=H2(n,r?.in);if(isNaN(+m))return i();let h={};for(let e of p){if(!e.validate(m,l))return i();let t=e.set(m,h,l);Array.isArray(t)?(m=t[0],Object.assign(h,t[1])):m=t}return m}function N_n(e){return e.match(k_n)[1].replace(A_n,`'`)}var P_n=[`M/d/yyyy h:mm:ss a`,`M/d/yyyy H:mm:ss`,`d/M/yyyy H:mm:ss`,`d/M/yyyy h:mm:ss a`,`d.M.yyyy H:mm:ss`,`d.M.yyyy h:mm:ss a`,`yyyy-M-d H:mm:ss`,`yyyy-M-d'T'H:mm:ss`],F_n=!1,I_n=e=>{for(let t of P_n){let n=k7(e,t,new Date);if(dan(n))return n}return F_n||(F_n=!0,nhn(`Libre timestamp unparsable`,{level:`warning`,tags:{integration:`libre`},extra:{timestamp:e}})),null},L_n=(e,t)=>e===null?[]:(e.data?.graphData??[]).reduce((e,n)=>{let r=I_n(n.Timestamp);return r===null||e.push({startDate:r,quantity:{value:Q6(n.ValueInMgPerDl,Y.BloodGlucoseUnit.MG_DL,t),unit:t}}),e},[]),R_n=e=>{if(e===null)return null;let t=e.data?.connection.glucoseMeasurement||e.data?.connection.glucoseItem;if(t===null||!t)return null;let n=I_n(t.Timestamp);return n===null?null:{startDate:n,quantity:{value:t.ValueInMgPerDl,unit:Y.BloodGlucoseUnit.MG_DL}}},z_n=(e,t)=>{let n=new Map;for(let t of e)n.set(new Date(t.startDate).getTime(),t);for(let e of t)n.set(new Date(e.startDate).getTime(),e);return Array.from(n.values())},B_n={credentials:null,patientId:null,cgmData:[],glucoseReading:null},V_n=kK()((e,t)=>({...B_n,setCredentials(t){e({credentials:t})},setPatientId(t){e({patientId:t})},setCgmData(n){let r=t().cgmData;e({cgmData:z_n(r,n)})},setLatestCgmReading(t){e({glucoseReading:t})},clear:()=>{e(B_n)}})),H_n={cgmApps:[],forecastApps:[]};kK()(jK(e=>({...H_n,setCgmApps(t){e({cgmApps:t})},setForecastApps(t){e({forecastApps:t})},clear:()=>{e(H_n)}}),{name:`APPS_STORE`,storage:AK(FK)}));var U_n=s(((e,t)=>{t.exports={}})),W_n=s(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r():typeof define==`function`&&define.amd?define([],r):n.CryptoJS=r()})(e,function(){var e=e||function(e,t){var n;if(typeof window<`u`&&window.crypto&&(n=window.crypto),typeof self<`u`&&self.crypto&&(n=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<`u`&&window.msCrypto&&(n=window.msCrypto),!n&&typeof globalThis<`u`&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof f==`function`)try{n=U_n()}catch{}var r=function(){if(n){if(typeof n.getRandomValues==`function`)try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes==`function`)try{return n.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},o=a.lib={},s=o.Base=function(){return{extend:function(e){var t=i(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=o.WordArray=s.extend({init:function(e,n){e=this.words=e||[],n==t?this.sigBytes=e.length*4:this.sigBytes=n},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new c.init(t,e)}}),l=a.enc={},u=l.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new c.init(n,t)}},p=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},m=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=t?e.ceil(s):e.max((s|0)-this._minBufferSize,0);var l=s*o,u=e.min(l*4,a);if(l){for(var d=0;d<l;d+=o)this._doProcessBlock(i,d);n=i.splice(0,l),r.sigBytes-=u}return new c.init(n,u)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=m.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=a.algo={};return a}(Math);return e})})),G_n=u(s(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(W_n()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[],c=[];(function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return(e-(e|0))*4294967296|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,1/2))),c[i]=n(t.pow(r,1/3)),i++),r++})();var l=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=0;p<64;p++){if(p<16)l[p]=e[t+p]|0;else{var m=l[p-15],h=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=l[p-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[p]=h+l[p-7]+_+l[p-16]}var v=s&u^~s&d,y=r&i^r&a^i&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),S=f+x+v+c[p]+l[p],C=b+y;f=d,d=u,u=s,s=o+S|0,o=a,a=i,i=r,r=S+C|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=n.length*4,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=a._createHelper(u),n.HmacSHA256=a._createHmacHelper(u)})(Math),e.SHA256})}))());function K_n(e){return typeof e==`object`&&!!e&&`redirect`in e}function q_n(e){return typeof e==`object`&&!!e&&`user`in e}function J_n(e){return typeof e==`object`&&!!e&&`code`in e}var Y_n=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`LibreError`}},X_n=class extends Y_n{failures;lockout;constructor(e,t,n,r){super(e,t),this.failures=n,this.lockout=r,this.name=`LibreLoginError`}},Z_n=1e3,Q_n={Authorization:``,product:`llu.android`,version:`4.16.0`,"cache-control":`no-cache`},$_n=class{async login(e,t,n=`eu`){let r={headers:{Accept:`application/json`,"Content-Type":`application/json`,...Q_n},body:JSON.stringify({email:e,password:t}),method:Y.HTTPRequestMethod.POST},i=`https://api-${n}.libreview.io/llu/auth/login`,a=await fetch(i,r);if(a.status!==Y.StatusCode.OK)throw new Y_n(`Libre request failed`,a.status);let o=await a.json();if(`data`in o){let r=o.data;if(K_n(r))return this.login(e,t,r.region);if(q_n(r))return{token:r.authTicket.token,accountId:r.user.id,region:n,tokenExpiry:new Date(r.authTicket.expires*Z_n)};if(J_n(r))throw new X_n(`Login failed: ${r.message} (probably invalid credentials)`,r.code,r.data.failures,r.data.lockout)}throw Error(`Unknown response`)}async getConnections(e){return(await this.makeAuthorizedRequest(e,`/llu/connections`)).data}async getGraphData(e,t){return await this.makeAuthorizedRequest(e,`/llu/connections/${t}/graph`)}async makeAuthorizedRequest(e,t){let n={headers:{...Q_n,Authorization:`Bearer ${e.token}`,"Account-Id":(0,G_n.default)(e.accountId).toString()}},r=`https://api-${e.region}.libreview.io${t}`,i=await fetch(r,n);if(i.status!==Y.StatusCode.OK)throw new Y_n(`Libre request failed`,i.status);return i.json()}},evn=async(e=!1)=>{try{let t=new URL(`${NK.HEDIA_LIBRE_APP_BASE_URL}/credentials`);t.searchParams.append(`forceRefresh`,`${e}`);let n=await w6(t.toString());return await y0(n,Y.StatusCode.OK,t.toString()),await n.json()}catch(e){return console.error(e),null}},tvn=e=>{let{credentials:t,patientId:n,setCredentials:r,setPatientId:i,setCgmData:a,setLatestCgmReading:o}=V_n();return{fetchLibreCgmData:(0,H.useCallback)(async()=>{if(!e||t===null||n===null)return;let s=new $_n;try{let c=await s.getGraphData(t,n);if(!c.data?.graphData){let e=await evn(!0);r(e===null?null:e.libreTokenBundle),i(e===null?null:e.librePatientId);return}a(L_n(c,e)),o(R_n(c))}catch(e){console.error(e)}},[t,n,e,r,i,a,o])}};V();var nvn={top:16,bottom:16,left:16,right:16};function rvn({activity:e,isChecked:t,index:n=0,onEdit:r,toggleActivitySwitch:i}){let{t:a}=RK(),{COLORS:o}=J();if(!H6.activity)throw Error(`[ActivityCard::render] No settings found!`);if(!H6.glucoseUnit)throw Error(`[ActivityCard::render] No glucose unit found!`);let{activityIntensity:s,durationSeconds:c,startTimestamp:l,type:u,uuid:d}=e;if(!l)throw Error(`[ActivityCard::render] No startTimestamp!`);let f=s?Z6[s]():null,p=(0,H.useMemo)(()=>Math.round(c/60),[c]),[m,h]=(0,H.useState)(Aan(l,p)),g=(0,H.useMemo)(()=>{try{let e=H6.activity;if(!e)throw Error(`[ActivityCard::reduction] No settings found!`);return((0,N6.getReduction)(p,e,s,new Date(l))*100).toFixed(0)}catch(e){return console.error(`Error calculating reduction for activity`,e),null}},[s,p,l]),_=t?1:.5,v=`activity-${p}-${s}-${u}-${t}`.toLowerCase(),y=`activity-card-${n}`;return(0,H.useEffect)(()=>{let e=()=>setInterval(()=>{h(Aan(l,p))},Y.Milliseconds.Minute),n=e=>{e&&clearInterval(e)},r=t?e():null;return()=>{n(r)}},[t,l,p]),g===null?null:(0,W.jsxs)(Kp,{testID:v,style:[A7.card,{backgroundColor:o.bgSecondary}],onPress:()=>{r(d)},children:[(0,W.jsxs)(B,{style:A7.headerContainer,children:[(0,W.jsxs)(B,{style:A7.left,children:[(0,W.jsxs)(B,{style:[A7.headerContent,{opacity:_}],children:[(0,W.jsx)(O8t,{height:24,width:24,color:o.iconButtonSecondary}),(0,W.jsxs)(X,{style:A7.header,children:[`${kan(p)} ${a(`activity_card__active_min`)}`,f&&`, `+f]})]}),(0,W.jsxs)(X,{style:[A7.expiresIn,{color:o.labelSecondary,opacity:_}],children:[a(`activity_card_active_time`),` `,m]})]}),(0,W.jsx)(Kp,{onPress:()=>{i(d)},hitSlop:nvn,children:(0,W.jsx)(tm,{testID:`${y}-${t}`,value:t,onValueChange:()=>{i(d)},trackColor:{true:o.bgSliderForeground,false:o.bgSliderBackground},thumbColor:o.toggleKnob,activeThumbColor:o.toggleKnob,activeTrackColor:o.bgSliderForeground})})]}),!!g&&(0,W.jsxs)(B,{style:[A7.reduction,{opacity:_}],children:[(0,W.jsx)(X,{style:A7.reductionText,children:a(`activity_card_insulinReduction`)}),(0,W.jsx)(X,{style:A7.reductionValue,children:` ${g}%`})]})]})}var A7=R.create({card:{marginBottom:12,overflow:`hidden`,borderRadius:16,padding:16},headerContainer:{flexDirection:`row`,justifyContent:`space-between`},left:{flex:1},headerContent:{flexDirection:`row`,alignItems:`center`,gap:4},header:{...q.Poppins.regular_SM},expiresIn:{...q.Poppins.regular_XS,marginBottom:8},reduction:{flexDirection:`row`,alignItems:`baseline`,justifyContent:`space-between`,gap:8},reductionText:{...q.Poppins.regular_SM,flexShrink:1},reductionValue:{...q.Poppins.bold_2XL}});V();var ivn=({selectedActivity:e,onClose:t})=>{let{t:n}=RK(),{COLORS:r}=J(),{navigate:i}=XQ(),{activityStoreActions:a}=h5(),{modalStoreActions:o,isGoToSettingsPressed:s}=Y8(),[c,l]=(0,H.useState)(!1),{activity:u}=H6;if(u===void 0)throw Error(`[CreateActivity::render] activitySettings is undefined`);let d=(0,H.useMemo)(()=>({uuid:K2(),startTimestamp:null,deleted:!1,type:null,activityIntensity:null,durationSeconds:0}),[]),f=(0,H.useMemo)(()=>e??d,[d,e]),p=(0,H.useMemo)(()=>f.startTimestamp===null?null:new Date(f.startTimestamp).getTime()+f.durationSeconds*Y.Milliseconds.Second>Date.now()?0:1,[f]),[m,h]=(0,H.useState)(f),[g,_]=(0,H.useState)(p),v=(0,H.useMemo)(()=>g===null?!1:g===1?m.durationSeconds>0&&!!m.startTimestamp:m.durationSeconds>0&&!!m.activityIntensity&&!!m.startTimestamp,[m,g]),y=(0,H.useMemo)(()=>!Y2(m,f),[m,f]),b=(0,H.useCallback)(async()=>{let n=e?.uuid,r=n?{...m,uuid:K2()}:m;if(await F6.create(r,n)){let e=F6.getEventWithHighestReduction(u);a.set({selectedEventUUID:e?.uuid??r.uuid,activityDurationSeconds:e?.durationSeconds??0}),C6(n?S6.ActivityEditPress:S6.ActivityAddPress),t()}else o.set({showSyncErrorModal:!0})},[m,u,a,o,t,e?.uuid]),x=e=>{h(t=>({...t,...e}))},S=e=>{let t=e*60,n=Date.now()-(g===1?t*Y.Milliseconds.Second:0);x({durationSeconds:t,startTimestamp:new Date(n).toISOString()})},C=e=>{x({activityIntensity:Y.ActivityIntensity[e]})},w=()=>{_(0),m.durationSeconds!==0&&x({startTimestamp:new Date().toISOString()})},T=()=>{_(1),x({activityIntensity:null}),m.durationSeconds!==0&&x({startTimestamp:new Date(Date.now()-m.durationSeconds*Y.Milliseconds.Second).toISOString()})},E=()=>{x({durationSeconds:0,activityIntensity:null})},D=()=>{E(),o.set({isGoToSettingsPressed:!0})},O=()=>{s&&(t(),o.set({showDiscardCalculationModal:!VK}),VK&&(i(Q.SettingsStack,{screen:Q.ActivitySettings}),o.set({isGoToSettingsPressed:!1})))},k=(0,H.useMemo)(()=>Math.round(m.durationSeconds/60),[m.durationSeconds]),A=(0,H.useMemo)(()=>{if(!v)return!1;let{activityIntensity:e}=m,{hard:t,light:n,moderate:r,post:i}=u,a=g===0;if(g===1)return k===120?i.fromSixtyone!==null:!0;if(a){if(k===60&&e===Y.ActivityIntensity.hard)return t.fromFortysix!==null;if(k===120&&e===Y.ActivityIntensity.hard)return t.fromSixtyone!==null;if(k===120&&e===Y.ActivityIntensity.moderate)return r.fromSixtyone!==null;if(k===120&&e===Y.ActivityIntensity.light)return n.fromSixtyone!==null}return!0},[m,u,g,v,k]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(SUt,{testID:`create-activity-scroll-view`,style:[j7.container,{backgroundColor:r.bgSheet}],contentContainerStyle:j7.contentContainer,children:[(0,W.jsxs)(B,{style:j7.header,children:[(0,W.jsx)($8,{onPress:t}),(0,W.jsx)(e5,{onPress:b,disabled:!v||!y})]}),(0,W.jsxs)(B,{style:j7.cardMandatory,children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(X,{style:[j7.headerTitle,{color:r.labelSecondary}],children:n(`new_activity_when_title`)}),(0,W.jsxs)(B,{style:[j7.segmentContainer,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[j7.segment,g===0&&{backgroundColor:r.bgSegmentPrimary}],onPress:w,testID:`starting-now-touchable-${g===0}`,children:(0,W.jsx)(X,{style:[j7.value,{color:g===0?r.textLabelActive:r.textLabelInactive}],children:n(`new_activity_when_option1`)})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,g===1&&{backgroundColor:r.bgSegmentPrimary}],onPress:T,testID:`just-finished-now-touchable-${g===1}`,children:(0,W.jsx)(X,{style:[j7.value,{color:g===1?r.textLabelActive:r.textLabelInactive}],children:n(`new_activity_when_option2`)})})]})]}),(0,W.jsxs)(B,{children:[(0,W.jsx)(X,{style:[j7.headerTitle,{color:r.labelSecondary}],children:n(`new_activity_duration_title`)}),(0,W.jsxs)(B,{style:[j7.segmentContainer,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[j7.segment,k===29&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(29)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===29?r.textLabelActive:r.textLabelInactive}],children:`0-29`})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,k===45&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(45)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===45?r.textLabelActive:r.textLabelInactive}],children:`30-45`})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,k===60&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(60)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===60?r.textLabelActive:r.textLabelInactive}],children:`46-60`})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,k===120&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(120)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===120?r.textLabelActive:r.textLabelInactive}],children:`61-120`})})]})]}),(0,W.jsxs)(B,{style:{opacity:g===1?.5:1},children:[(0,W.jsxs)(B,{style:{flexDirection:`row`,justifyContent:`space-between`},children:[(0,W.jsx)(X,{style:[j7.headerTitle,{color:r.labelSecondary}],children:n(`new_activity_intensity_title`)}),(0,W.jsx)(Kp,{onPress:()=>{g!==1&&l(!0)},children:(0,W.jsx)(B8t,{width:24,height:24,color:r.iconBrand})})]}),(0,W.jsxs)(B,{style:[j7.segmentContainer,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[j7.segment,m.activityIntensity===Y.ActivityIntensity.light&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{g!==1&&C(Y.ActivityIntensity.light)},testID:`activity-light-touchable-${m.activityIntensity===Y.ActivityIntensity.light}`,children:(0,W.jsx)(X,{style:[j7.value,{color:m.activityIntensity===Y.ActivityIntensity.light?r.textLabelActive:r.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:n(`activity_intensity_1`)})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,m.activityIntensity===Y.ActivityIntensity.moderate&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{g!==1&&C(Y.ActivityIntensity.moderate)},testID:`activity-moderate-touchable-${m.activityIntensity===Y.ActivityIntensity.moderate}`,children:(0,W.jsx)(X,{style:[j7.value,{color:m.activityIntensity===Y.ActivityIntensity.moderate?r.textLabelActive:r.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:n(`activity_intensity_2`)})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,m.activityIntensity===Y.ActivityIntensity.hard&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{g!==1&&C(Y.ActivityIntensity.hard)},testID:`activity-hard-touchable-${m.activityIntensity===Y.ActivityIntensity.hard}`,children:(0,W.jsx)(X,{style:[j7.value,{color:m.activityIntensity===Y.ActivityIntensity.hard?r.textLabelActive:r.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:n(`activity_intensity_3`)})})]})]})]})]}),(0,W.jsx)(d5,{}),(0,W.jsx)(Q2,{isVisible:!A&&v,title:n(`new_activity_modal_reduction_title`),message:n(`new_activity_modal_reduction_subtitle`),onModalHide:O,buttons:[{title:n(`button_settings`),testID:`settings-button`,onPress:D},{title:n(`button_cancel`),testID:`cancel-button`,onPress:E,type:F2.Secondary}]}),(0,W.jsxs)(Q2,{isVisible:c,title:n(`calcflow_activityInfo_modal_title`),buttons:[{title:n(`button_close`),onPress:()=>{l(!1)}}],children:[(0,W.jsx)(X,{style:j7.intensityDescriptionTitle,children:n(`calcflow_activityInfo_modal_intensity1_title`)}),(0,W.jsx)(X,{style:[j7.intensityDescriptionText,{color:r.labelSecondary}],children:n(`calcflow_activityInfo_modal_intensity1_body`)}),(0,W.jsx)(X,{style:j7.intensityDescriptionTitle,children:n(`calcflow_activityInfo_modal_intensity2_title`)}),(0,W.jsx)(X,{style:[j7.intensityDescriptionText,{color:r.labelSecondary}],children:n(`calcflow_activityInfo_modal_intensity2_body`)}),(0,W.jsx)(X,{style:j7.intensityDescriptionTitle,children:n(`calcflow_activityInfo_modal_intensity3_title`)}),(0,W.jsx)(X,{style:[j7.intensityDescriptionText,{color:r.labelSecondary}],children:n(`calcflow_activityInfo_modal_intensity3_body`)})]})]})},j7=R.create({container:{marginHorizontal:16},contentContainer:{paddingBottom:64},header:{flexDirection:`row`,justifyContent:`space-between`,marginBottom:32},cardMandatory:{gap:24},headerTitle:{...q.Poppins.regular_SM,marginHorizontal:16,marginBottom:8},segmentContainer:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`,borderRadius:16,borderWidth:1,padding:2},segment:{flex:1,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,alignSelf:`stretch`,paddingVertical:4,paddingHorizontal:10,borderRadius:16},borderLeft:{alignSelf:`center`,height:16,width:1},value:{...q.Poppins.regular_Base},intensityDescriptionTitle:{...q.Poppins.semiBold_Base,marginTop:16},intensityDescriptionText:{...q.Poppins.regular_Base}}),avn=S5(ivn);V();var ovn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{addListener:n,removeListener:r}=XQ(),i=(0,H.useRef)(null),a=(0,H.useRef)(!1),{activity:o}=H6,{selectedEventUUID:s,activityStoreActions:c}=h5(),[l,u]=(0,H.useState)(null),[d,f]=(0,H.useState)([]);(0,H.useEffect)(()=>{if(!a.current){let e=F6.getEventWithHighestReduction(o);c.set({selectedEventUUID:e?.uuid??null,activityDurationSeconds:e?.durationSeconds??0}),a.current=!0}},[o,c]);let p=()=>{f(F6.getActiveEvents())};(0,H.useEffect)(()=>{let e=Wf.addEventListener(`change`,e=>{e===`active`&&p()});return n(`focus`,p),()=>{r(`focus`,p),e.remove()}},[r,n]);let m=(0,H.useCallback)(e=>{let t=F6.getByUUID(e);c.set({selectedEventUUID:s===e?null:e,activityDurationSeconds:s===e?0:t.durationSeconds})},[c,s]),h=()=>{C6(S6.CalculationActivityPress),i.current?.present()},g=e=>{u(F6.getByUUID(e)),h()};return(0,W.jsxs)(W.Fragment,{children:[d.map((e,t)=>(0,W.jsx)(rvn,{index:t,toggleActivitySwitch:m,isChecked:s===e.uuid,onEdit:g,activity:e},e.uuid)),(0,W.jsxs)(Kp,{testID:`add-activity-button`,onPress:()=>{qf.dismiss(),h()},style:({pressed:e})=>[svn.smallButton,{backgroundColor:t.bgButtonSecondary,opacity:e?.5:1}],children:[(0,W.jsx)(O8t,{color:t.iconButtonSecondary}),(0,W.jsx)(X,{style:svn.buttonText,children:e(`calcflow_activity_button_add`)})]}),(0,W.jsx)(B,{style:{height:24,borderTopWidth:1,borderTopColor:t.divider}}),(0,W.jsx)(PQ,{ref:i,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:t.bgSheet,borderRadius:36},enablePanDownToClose:!1,children:(0,W.jsx)(avn,{selectedActivity:l,onClose:()=>{u(null),i.current?.close(),p()}})})]})},svn=R.create({smallButton:{flexDirection:`row`,alignSelf:`flex-start`,alignItems:`center`,borderRadius:16,paddingHorizontal:16,paddingVertical:8,marginBottom:24,gap:8},buttonText:{...q.Poppins.medium_SM,alignSelf:`center`}});V();var cvn=()=>{let{COLORS:e}=J(),{navigate:t}=XQ(),{foodIntakeItems:n,removeFoodIntakeItem:r}=q8(),i=(0,H.useCallback)((e,t)=>{e?r(e,`id`):r(t,`title`)},[r]),a=(0,H.useCallback)(e=>{if(e.source===`curated`){t(Q.FoodLibrary,{screen:Q.CuratedFoodItem,params:{foodId:e.id,categoryId:e.categoryId}});return}t(Q.FoodLibrary,{screen:Q.PersonalFoodItem,params:{foodId:e.id}})},[t]),o=(0,H.useCallback)(({item:t,index:n,itemKey:r})=>{let{measures:o,nutritionPer100g:s,id:c,title:l}=t.foodItem,u=I6(t.amount,o[0].gramsPerUnit,s.carbohydrates.value);return(0,W.jsxs)(B,{style:[M7.pill,{backgroundColor:e.bgPill}],children:[(0,W.jsxs)(Kp,{onPress:()=>{a(t.foodItem)},style:({pressed:e})=>[M7.pillContent,{opacity:e?.5:1}],testID:`carbs-item-${n}`,children:[(0,W.jsx)(X,{numberOfLines:1,ellipsizeMode:`middle`,style:[M7.title,{color:e.labelPrimary}],testID:`carbs-item-${n}-title`,children:l}),(0,W.jsx)(X,{style:[M7.value,{color:e.labelPrimary}],testID:`carbs-item-${n}-amount`,children:`${u} g`})]}),(0,W.jsx)(Kp,{onPress:()=>{i(c,l)},testID:`carbs-item-${n}-remove-icon`,hitSlop:16,children:(0,W.jsx)(F8t,{width:16,height:16})})]},r)},[e.bgPill,e.labelPrimary,a,i]);return(0,W.jsx)(B,{style:M7.container,children:n.map((e,t)=>o({item:e,index:t,itemKey:e.foodItem.id||`${t}-${e.foodItem.title}`}))})},M7=R.create({container:{flexDirection:`row`,flexWrap:`wrap`,padding:16,gap:8},pill:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:8,paddingVertical:6,borderRadius:16,maxWidth:`100%`},pillContent:{flexDirection:`row`,alignItems:`center`,flexShrink:1},title:{...q.Poppins.regular_XS,marginRight:2,flexShrink:1},value:{...q.Poppins.regular_XS,marginRight:2}});V();var lvn=(0,H.forwardRef)(({onFocusChange:e},t)=>{let{t:n}=RK(),{COLORS:r}=J(),{navigate:i}=XQ(),a=(0,H.useRef)(null);(0,H.useImperativeHandle)(t,()=>({blur:()=>a.current?.blur()}));let{foodIntakeItems:o,foodIntakeCarbsAmount:s,manualCarbsInput:c,setManualCarbsInput:l}=q8(),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(``),m=xWt();(0,H.useEffect)(()=>{m&&!u&&p(c===0?``:c.toString())},[m,u,c]);let h=()=>{a.current?.focus(),d(!0),e?.(!0)},g=()=>{C6(S6.CalculationCarbsPress),h()},_=()=>{d(!1),e?.(!1),l(Number(f)),C6(S6.CalculationManualInput)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:[N7.carbsSection,{backgroundColor:r.bgListActive,borderColor:u?r.borderInputFocus:r.bgListActive}],children:[(0,W.jsx)(t4,{testID:`carbs-input`,renderLeftSlot:()=>(0,W.jsxs)(B,{style:N7.inputRow,children:[(0,W.jsx)(k8t,{width:24,height:24,color:r.labelPrimary}),(0,W.jsx)(X,{testID:`carbs-input-unit`,children:n(`calcflow_carbohydrates_title`)})]}),renderRightSlot:()=>(0,W.jsxs)(B,{style:N7.inputRow,children:[(0,W.jsx)(k2,{testID:`carbs-input-field`,ref:a,value:f,onFocus:g,onBlur:_,onChangeText:p,style:[N7.numberInput,{color:r.labelPrimary}],selectTextOnFocus:!!f&&!u}),(0,W.jsx)(X,{style:[N7.unit,{color:r.labelPrimary}],children:`g`})]}),onPress:h,containerStyle:{borderBottomLeftRadius:0,borderBottomRightRadius:0},style:{paddingVertical:12,backgroundColor:r.bgListActive}}),o.length>0&&(0,W.jsxs)(B,{style:{borderTopWidth:1,borderTopColor:r.divider},children:[(0,W.jsx)(cvn,{}),(0,W.jsx)(E8t,{}),(0,W.jsxs)(B,{style:[N7.totalContainer,{backgroundColor:r.bgListActive}],children:[(0,W.jsx)(X,{style:N7.totalTitle,children:n(`calcflow_carbohydrates_total`)}),(0,W.jsxs)(B,{style:N7.totalGramsContainer,children:[(0,W.jsx)(X,{style:N7.totalValue,testID:`total-carbs-value`,children:s+c}),(0,W.jsx)(X,{style:N7.totalUnits,testID:`total-carbs-unit`,children:n(`my_food_add_unit`)})]})]})]})]}),(0,W.jsxs)(B,{style:N7.buttonsContainer,children:[(0,W.jsxs)(Kp,{testID:`add-food-from-library-button`,onPress:()=>{C6(S6.CalculationFoodLibraryPress),i(Q.FoodLibrary)},style:({pressed:e})=>[N7.smallButton,{backgroundColor:r.bgButtonSecondary,opacity:e?.5:1}],children:[(0,W.jsx)(J8t,{color:r.labelPrimary}),(0,W.jsx)(X,{style:[N7.title,{color:r.textButtonSecondary}],children:n(`calcflow_button_foodLibrary`)})]}),!VK&&(0,W.jsx)(R7t,{onPress:()=>{if(C6(S6.CalculationScanFoodPress),!v5.getState().privacyNoticeAccepted){i(Q.VisualSearchIntro);return}i(Q.VisualSearch)},text:n(`calcflow_button_scan`),style:N7.scanFoodButton})]}),(0,W.jsx)(B,{style:{height:24,borderTopWidth:1,borderTopColor:r.divider}})]})});lvn.displayName=`Carbs`;var N7=R.create({inputRow:{flexDirection:`row`,justifyContent:`flex-start`,alignItems:`center`,marginRight:8,gap:4},carbsSection:{borderWidth:2,borderRadius:16,marginBottom:12},numberInput:{...q.Poppins.regular_Base,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),textAlign:`right`,maxWidth:40},totalContainer:{flexDirection:`row`,justifyContent:`space-between`,alignItems:`baseline`,padding:16,paddingTop:8,borderRadius:16},totalTitle:{...q.Poppins.medium_Base},totalGramsContainer:{flexDirection:`row`,alignItems:`baseline`},totalValue:{...q.Poppins.bold_2XL},totalUnits:{...q.Poppins.medium_Base,marginLeft:8},unit:{...q.Poppins.regular_Base},buttonsContainer:{flexDirection:`row`,justifyContent:`flex-start`,gap:12},smallButton:{flexDirection:`row`,alignItems:`center`,alignSelf:`flex-start`,borderRadius:16,paddingHorizontal:16,paddingVertical:8,marginBottom:24,gap:8},scanFoodButton:{alignSelf:`flex-start`,marginBottom:24},title:{...q.Poppins.medium_SM,alignSelf:`center`}}),uvn=`hda`,dvn=e=>e.device_name.toLowerCase()===uvn||e.source_name.toLowerCase()===uvn,fvn=e=>({id:e.id,object_id:e.id,user_id:e.userId,type:e.type,quantity:{unit:e.quantity.unit.toLowerCase(),value:e.quantity.value},timestamp:new Date(e.startDate),source_id:e.source.id,device_name:e.device.name,source_name:e.source.name}),pvn=(e,t=Date.now())=>e.map(fvn).filter(e=>!dvn(e)&&e.timestamp.getTime()<=t).sort((e,t)=>t.timestamp.getTime()-e.timestamp.getTime())[0]??null,mvn=(e,t)=>{let{inputMax:n,inputMin:r}=X6(t);return!isNaN(e)&&e>=r&&e<=n};V();var hvn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{glucoseStoreActions:n}=J8(),r=jfn(`external`),i=A5()?.source===`external`,{glucoseUnit:a}=H6;if(a===void 0)throw Error(`[Glucose::render] glucoseUnit must be non-undefined.`);let[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1);P2t(()=>{r&&s(Date.now()-r.timestamp>Y.Milliseconds.Minute*10)},1e3),(0,H.useEffect)(()=>{(async()=>{try{let e=`${NK.HEDIA_API_URL_V2}/samples`,t=await w6(e);await y0(t,Y.StatusCode.OK,e);let r=await t.json();if(r.length===0)return;let i=pvn(r);if(!i)return;let{unit:a,value:o}=i.quantity;if(!mvn(o,a)){n.setSelectedReadingId(null);return}let s={id:K2(),source:`external`,value:o,unit:a,sampleId:i.id,sourceId:i.source_id,sourceName:i.source_name,deviceName:i.device_name,timestamp:i.timestamp.getTime()};n.addAvailableGlucoseReading(s),n.setSelectedReadingId(s.id),Hnn(i)}catch(e){console.error(`[DevicesSection.web::getSamples]`,e)}})()},[n]);let u=(0,H.useCallback)(()=>{if(NK.IS_PRODUCTION===`true`)return;let e={id:`TEST`,object_id:`TEST`,user_id:`TEST`,type:`blood_glucose`,timestamp:new Date(Date.now()-(Math.random()*4+5)*Y.Milliseconds.Minute),source_id:`TEST`,quantity:{unit:Y.BloodGlucoseUnit.MMOL_L,value:Math.random()*32.199999999999996+1.1},source_name:`HDA Test Name`,device_name:`HDA Test Device`},t={id:K2(),source:`external`,value:e.quantity.value,unit:e.quantity.unit,timestamp:e.timestamp.getTime(),sampleId:e.id,sourceId:e.source_id,sourceName:e.source_name,deviceName:e.device_name};n.addAvailableGlucoseReading(t),n.setSelectedReadingId(t.id)},[n]);return(0,W.jsxs)(B,{style:P7.container,children:[r?.source===`external`?(0,W.jsx)(Kp,{style:[P7.button,{backgroundColor:i?t.bgButtonPrimary:t.bgButtonSecondary}],onPress:()=>{!o&&n.setSelectedReadingId(r.id)},children:(0,W.jsx)(X,{style:[P7.title,{color:i?t.textButtonPrimary:t.textButtonSecondary}],children:r.deviceName})}):(0,W.jsx)(Kp,{style:[P7.button,{backgroundColor:t.bgButtonSecondary}],onPress:()=>{l(!0)},onLongPress:()=>{u()},children:(0,W.jsx)(X,{style:[P7.title,{color:t.labelPrimary}],children:e(`import_modal_reading_title`)})}),(0,W.jsx)(Q2,{isVisible:c,title:e(`import_modal_reading_title`),message:e(`import_modal_reading_body`),buttons:[{testID:`close-button`,title:e(`button_close`),onPress:()=>{l(!1)}}]})]})},P7=R.create({container:{marginTop:12},button:{alignSelf:`flex-start`,paddingVertical:8,paddingHorizontal:16,borderRadius:16},title:{...q.Poppins.medium_SM}});V();var gvn=e=>e.replace(`,`,`.`),_vn=300,vvn=(0,H.forwardRef)(({onFocusChange:e},t)=>{let{t:n}=RK(),{COLORS:r}=J(),i=(0,H.useRef)(null);(0,H.useImperativeHandle)(t,()=>({blur:()=>i.current?.blur()}));let{glucoseUnit:a}=H6;if(a===void 0)throw Error(`[Glucose::render] glucoseUnit must be non-undefined.`);let{decimalPlaces:o,inputMax:s,inputMin:c,text:l}=(0,H.useMemo)(()=>X6(a),[a]),[u,d]=(0,H.useState)(``),[f,p]=(0,H.useState)(!1),m=A5(),{glucoseStoreActions:h,availableGlucoseReadings:g}=J8(),{isNoBGModalVisible:_,modalStoreActions:v}=Y8(),[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(!1),[C,w]=(0,H.useState)(`hidden`),[T,E]=(0,H.useState)(`hidden`);i$((0,H.useCallback)(()=>{let e=setInterval(()=>{let e=m?.timestamp;T===`open`||!e||m.source===`cgm`||Date.now()-e>Y.Milliseconds.Minute*10&&(E(`open`),d(``))},1e3);return()=>{clearInterval(e)}},[T,m])),(0,H.useEffect)(()=>{d(m===null?``:$6(m.value,m.unit,a))},[m,a]);let D=()=>{u===``||m===null||m.source===`manual`?A():w(`open`)},O=(0,H.useCallback)(e=>{d(gvn(e))},[]),k=(0,H.useCallback)(()=>{C6(S6.CalculationGlucosePress),p(!0),e?.(!0)},[e]),A=(0,H.useCallback)(()=>{i.current?.focus()},[]),ee=(0,H.useCallback)(()=>{if(VK){A();return}setTimeout(A,_vn)},[A]),te=(0,H.useCallback)(()=>{d(m&&$6(m.value,m.unit,a)||``)},[a,m]),ne=(0,H.useCallback)(()=>g.find(e=>{let t=$6(e.value,e.unit,a),n=Date.now()-e.timestamp>Y.Milliseconds.Minute*10;return t===u&&e.source!==`manual`&&!n}),[g,a,u]),re=(0,H.useCallback)(e=>!isNaN(e)&&e>=c&&e<=s,[s,c]),ie=(0,H.useCallback)(e=>({id:K2(),source:`manual`,value:e,unit:a,timestamp:Date.now()}),[a]),j=(0,H.useCallback)(()=>{if(p(!1),e?.(!1),u===``){h.setSelectedReadingId(null);return}let t=ne();if(t){h.setSelectedReadingId(t.id);return}let n=parseFloat(u);if(!re(n)){S(!0);return}d(n.toFixed(o));let r=ie(n);h.addAvailableGlucoseReading(r),h.setSelectedReadingId(r.id)},[ie,ne,o,h,u,re,e]),ae=()=>{(0,x5.flushSync)(()=>{w(`hidden`),h.setSelectedReadingId(null)}),ee()},oe=()=>{w(`closing`)},se=()=>{w(`hidden`)},ce=()=>{C6(S6.ExpiredGlucose),h.setSelectedReadingId(null)},M=()=>{(0,x5.flushSync)(()=>{E(`hidden`)}),ee()},N=()=>{E(`closing`)},P=()=>{E(`hidden`)},le=()=>{(0,x5.flushSync)(()=>{v.set({isNoBGModalVisible:!1})}),ee()},ue=()=>{b(!0),v.set({isNoBGModalVisible:!1})},de=()=>{b(!1)},fe=m===null||m.source===`manual`;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(t4,{testID:`glucose-input`,renderLeftSlot:()=>{let e=ne(),t;switch(e?.source){case`cgm`:t=n(`from_source`,{source:e.sourceName});break;case`device`:t=n(`from_source`,{source:e.deviceName});break;default:t=n(`calcflow_glucose_title`);break}return(0,W.jsxs)(B,{style:F7.inputRow,children:[(0,W.jsx)(L8t,{height:24,width:24,color:r.labelPrimary}),(0,W.jsx)(X,{testID:`glucose-input-unit`,ellipsizeMode:`tail`,numberOfLines:1,style:F7.sourceText,children:t})]})},renderRightSlot:()=>(0,W.jsxs)(B,{style:F7.rightSlot,children:[(0,W.jsx)(k2,{testID:`glucose-input-field`,ref:i,value:u,inputMode:a===Y.BloodGlucoseUnit.MMOL_L?`decimal`:`numeric`,maxLength:a===Y.BloodGlucoseUnit.MMOL_L?4:3,editable:fe||f,onChangeText:O,onFocus:k,onBlur:j,style:[F7.numberInput,{color:fe?r.labelPrimary:r.labelBrand,width:a===Y.BloodGlucoseUnit.MMOL_L?48:36}],selectTextOnFocus:!!u&&!f}),(0,W.jsx)(X,{style:[F7.unit,{color:fe?r.labelPrimary:r.labelBrand}],children:l})]}),onPress:D,style:{...F7.groupedRow,...f&&{borderColor:r.borderInputFocus}}}),(0,W.jsx)(hvn,{glucoseUnit:a,inputRef:i}),(0,W.jsx)(B,{style:[F7.divider,{borderTopColor:r.divider}]}),T!==`hidden`&&(0,W.jsx)(Q2,{isVisible:T===`open`,title:n(`calcflow_modal_expired_title`),message:n(`calcflow_modal_expired_body`),icon:()=>(0,W.jsx)(L8t,{width:96,height:96,color:r.labelPrimary}),onModalShow:ce,onModalHide:P,buttons:[{title:n(`calcflow_modal_expire_button_add`),onPress:M},{title:n(`button_cancel`),type:F2.Secondary,onPress:N}]}),(0,W.jsx)(Q2,{isVisible:x,title:n(`calcflow_modal_glucose_invalid_title`,{min:Ian(c,a),max:Ian(s,a)}),buttons:[{testID:`close-button`,title:n(`button_close`),onPress:()=>{S(!1),te()}}]}),C!==`hidden`&&(0,W.jsx)(Q2,{isVisible:C===`open`,title:n(`calcflow_modal_change_synced_value_title`),onModalHide:se,buttons:[{testID:`change-button`,type:F2.Error,title:n(`calcflow_modal_button_changeValue`),onPress:ae},{testID:`keep-button`,type:F2.Secondary,title:n(`calcflow_modal_button_keepValue`),onPress:oe}]}),(_||y)&&(0,W.jsx)(Q2,{isVisible:_,title:n(`calcflow_modal_enter_glucose_title`),message:n(`calcflow_modal_enter_glucose_body`),icon:()=>(0,W.jsx)(L8t,{width:96,height:96,color:r.labelPrimary}),onModalHide:de,buttons:[{title:n(`calcflow_modal_enter_glucose_button_add`),onPress:le},{title:n(`button_cancel`),type:F2.Secondary,onPress:ue}]})]})});vvn.displayName=`Glucose`;var F7=R.create({groupedRow:{paddingVertical:12},inputRow:{flexDirection:`row`,justifyContent:`flex-start`,alignItems:`center`,marginRight:8,gap:4},rightSlot:{flexDirection:`row`,alignItems:`center`,marginRight:8,gap:4},sourceText:{flexShrink:1},numberInput:{...q.Poppins.regular_Base,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),textAlign:`right`,textAlignVertical:`center`},unit:{...q.Poppins.regular_Base},divider:{marginTop:24,height:24,borderTopWidth:1}});V();function yvn({description:e,assetId:t,imageUri:n,onPress:r,testID:i}){let{COLORS:a}=J(),{t:o}=RK(),s=l5(n?void 0:t),c=n??s,l=e||o(`notes_placeholder`),u=l===o(`notes_placeholder`);return u&&!c?null:(0,W.jsxs)(Kp,{style:({pressed:e})=>[bvn.container,{backgroundColor:a.bgSecondary},e&&r&&{opacity:.9}],onPress:r,disabled:!r,testID:`${i}-button`,children:[(0,W.jsx)(X,{style:[bvn.text,{color:u?a.labelTertiary:a.labelPrimary}],children:l}),!!c&&(0,W.jsx)(gd,{source:{uri:c},style:bvn.thumbnail,resizeMode:`cover`,testID:`${i}-thumbnail`})]})}var bvn=R.create({container:{flexDirection:`row`,borderRadius:16,padding:16,gap:12,alignItems:`flex-start`},text:{...q.Poppins.regular_Base,flex:1},thumbnail:{width:64,height:64,borderRadius:8}});V();var xvn=({onClose:e,onConfirm:t})=>{let{COLORS:n}=J(),{t:r}=RK(),{noteId:i}=X8(),{noteStoreActions:a}=X8(),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1),{noteBody:u,setNoteBody:d,loadNote:f,saveNote:p,isLoading:m,hasNoteContent:h}=Rdn();(0,H.useEffect)(()=>{i&&f(i).catch(console.error)},[i,f]);let g=(0,H.useCallback)(async()=>{s(!0);try{let e=await p();a.set({noteId:e,noteBody:u}),t()}catch{l(!0)}finally{s(!1)}},[p,a,u,t]),_=(0,H.useCallback)(()=>{e()},[e]),v=!h||o;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:Svn.header,children:[(0,W.jsx)($8,{onPress:_}),o?(0,W.jsx)(np,{size:`small`,color:n.iconBrand}):(0,W.jsx)(e5,{onPress:g,disabled:v})]}),m?(0,W.jsx)(B,{style:Svn.loader,children:(0,W.jsx)(np,{size:`large`,color:n.iconBrand})}):(0,W.jsx)(Wun,{value:u,onChangeText:d,testID:`calculation-notes`,autoFocus:!0,containerStyle:Svn.container}),(0,W.jsx)(Q2,{isVisible:c,testID:`note-save-failed-modal`,title:r(`notes_cannotSave_modal_header`),message:r(`notes_cannotSave_modal_body`),buttons:[{title:r(`glucose_modal_changes_button_confirm`),testID:`note-save-failed-confirm-button`,type:F2.Primary,onPress:()=>{l(!1)}}]})]})},Svn=R.create({header:{flexDirection:`row`,justifyContent:`space-between`,alignItems:`center`,paddingHorizontal:16,paddingBottom:12},loader:{flex:1,justifyContent:`center`,alignItems:`center`,minHeight:200},container:{margin:16}});V();var Cvn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{noteBody:n,displayImageUri:r}=X8(),i=(0,H.useRef)(null),a=()=>{C6(S6.CalculationNotesPress),qf.dismiss(),i.current?.present()};return(0,W.jsxs)(W.Fragment,{children:[n.trim()||r?(0,W.jsx)(B,{style:wvn.noteContainer,children:(0,W.jsx)(yvn,{description:n,imageUri:r,onPress:a,testID:`note-display`})}):(0,W.jsxs)(Kp,{testID:`add-notes-button`,onPress:a,style:({pressed:e})=>[wvn.smallButton,{backgroundColor:t.bgButtonSecondary,opacity:e?.5:1}],children:[(0,W.jsx)(K8t,{height:20,width:20,color:t.labelPrimary}),(0,W.jsx)(X,{style:[wvn.title,{color:t.textButtonSecondary}],children:e(`calcflow_notes_button_add`)})]}),(0,W.jsx)(PQ,{ref:i,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:t.bgSheet,borderRadius:36},enablePanDownToClose:!1,enableDynamicSizing:!1,snapPoints:[`85%`],children:(0,W.jsx)(IQ,{children:(0,W.jsx)(xvn,{onClose:()=>{qf.dismiss(),i.current?.dismiss()},onConfirm:()=>{qf.dismiss(),i.current?.dismiss()}})})})]})},wvn=R.create({smallButton:{flexDirection:`row`,alignSelf:`flex-start`,alignItems:`center`,borderRadius:16,paddingHorizontal:16,paddingVertical:8,marginBottom:24,gap:8},noteContainer:{marginBottom:24},title:{...q.Poppins.medium_SM,alignSelf:`center`}});V();var Tvn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{bottomWithFooterButton:n}=B2(),r=U8(),i=(0,H.useRef)(null),a=XQ(),o=QQ(),{modalStoreActions:s}=Y8(),{noteId:c}=X8(),{foodIntakeItems:l,manualCarbsInput:u,foodIntakeCarbsAmount:d}=q8(),[f,p]=(0,H.useState)(!1),m=A5(),h=o.params?.errorType??null,g=h===zK.Sync,_=(0,H.useRef)(!1),v=(0,H.useRef)(!1),y=(0,H.useRef)(null),b=(0,H.useRef)(null),x=(0,H.useCallback)(e=>{_.current=e},[]),S=(0,H.useCallback)(e=>{v.current=e},[]),{fetchLibreCgmData:C}=tvn(),w=(0,H.useCallback)(()=>(C6(S6.AbortCalculationPress),m||u>0||l.length>0||c?s.set({showDiscardCalculationModal:!0}):a.goBack(),!0),[u,a,m,s,l.length,c]);i$((0,H.useCallback)(()=>{if(VK)return;let e=Gf.addEventListener(`hardwareBackPress`,w);return()=>{e.remove()}},[w])),(0,H.useEffect)(()=>{C()},[C]),(0,H.useLayoutEffect)(()=>{a.setOptions({headerTransparent:!0,header:()=>(0,W.jsx)(G8,{title:e(`calcflow_navigation`),LeftButton:VK?void 0:(0,W.jsx)($8,{onPress:w}),RightButton:VK?(0,W.jsxs)(B,{style:[I7.buttonsWrapper,{backgroundColor:t.bgButtonSecondary,borderColor:t.border}],children:[(0,W.jsx)(kun,{style:I7.noBorder}),(0,W.jsx)(Oun,{style:I7.noBorder})]}):(0,W.jsx)(kun,{}),overlay:!0})})},[t.bgButtonSecondary,t.border,w,a,e]);let[T,E]=(0,H.useState)(VK);(0,H.useEffect)(()=>{if(!VK)return a.addListener(`transitionStart`,({data:e})=>{e.closing||!a.isFocused()||E(!0)})},[a]),(0,H.useEffect)(()=>{if(!T)return;let e=setTimeout(()=>{i.current?.present()},100);return()=>{clearTimeout(e)}},[T]);let D=(0,H.useCallback)(()=>{if(_.current||v.current){y.current?.blur(),b.current?.blur();return}if(m===null){C6(S6.SummaryEmptyGlucose),s.set({isNoBGModalVisible:!0});return}if(d+u>kdn().max){p(!0);return}a.navigate(Q.LoadingRecommendation)},[m,a,s,d,u]),O=(0,H.useCallback)(()=>{C6(S6.RecentInsulinContinuePress),i.current?.close()},[]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`calculation-scroll-view`,keyboardShouldPersistTaps:`handled`,contentContainerStyle:[I7.scrollView,{backgroundColor:t.bgPrimary,paddingTop:r+16,paddingBottom:n}],children:[(0,W.jsx)(vvn,{ref:b,onFocusChange:S}),(0,W.jsx)(lvn,{ref:y,onFocusChange:x}),(0,W.jsx)(ovn,{}),(0,W.jsx)(Cvn,{})]}),(0,W.jsx)(Mdn,{children:(0,W.jsx)(I2,{type:F2.Primary,testID:`calculate-button`,title:e(`calcflow_button_calculate`),onPress:D,inactive:m===null})}),(0,W.jsx)(PQ,{ref:i,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:t.bgSheet,borderRadius:36},enablePanDownToClose:!1,children:(0,W.jsx)(IQ,{children:(0,W.jsx)(Afn,{onNoInsulinPressed:O})})}),(0,W.jsx)(Q2,{isVisible:h!==null,title:e(g?`recommendation_no_save_modal_title`:`rejected_input_modal_title`),message:e(g?`recommendation_no_save_modal_body`:`rejected_input_modal_body`),buttons:[{title:e(`button_close`),onPress:()=>{a.navigate(Q.Calculation)}}]}),(0,W.jsx)(Q2,{isVisible:f,title:e(`calcflow_carbohydrates_invalid_modal_title`),message:e(`calcflow_carbohydrates_invalid_modal_body`),buttons:[{title:e(`button_close`),onPress:()=>{p(!1)}}]}),(0,W.jsx)(Ndn,{}),(0,W.jsx)(Wdn,{})]})},I7=R.create({scrollView:{paddingHorizontal:16},buttonsWrapper:{flexDirection:`row`,padding:0,borderRadius:44,borderWidth:1},noBorder:{borderWidth:0}});V();var Evn=1e3;function Dvn(){let e=XQ(),t=QQ(),[n,r]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{setTimeout(()=>{r(!0)},Evn)},[]),(0,H.useEffect)(()=>{n&&(VK?(window.location.href=`/redirect?status=success`,PK.clearAll()):e.popTo(Q.MainBottomTabs,{screen:Q.DashboardTab,params:{screen:Q.Dashboard,params:{action:nyt.Saved,logbookEntry:t.params.logbookEntry}}}))},[n,e,t.params.logbookEntry]),(0,W.jsx)(B,{style:Ovn.animationContainer,children:(0,W.jsx)(S4,{autoPlay:!0,source:C4.LEAVING_RECOMMENDATION,style:Ovn.animation,webStyle:Ovn.animation,resizeMode:`cover`,loop:!1})})}var Ovn=R.create({animationContainer:{flex:1,justifyContent:`center`,alignItems:`center`},animation:{width:256,height:256}}),kvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SHARED_COLORS=e.LIGHT_COLORS=e.DARK_COLORS=void 0,e.DARK_COLORS={base100:`#616161`,base200:`#555555`,base300:`#4A4A4A`,base350:`#404040`,base400:`#363636`,base500:`#373739`,base600:`#2A2A2C`,base700:`#1C1C1E`,base800:`#141414`,base900:`#000000`,base100a:`#E9E0FF1A`,base600a:`#2A2A2C99`,base700a:`#1C1C1E80`,base800a:`#14141499`,primary100:`#B5D8FF`,primary200:`#9EC6FF`,primary300:`#87B5FF`,primary400:`#73ADFF`,primary500:`#5F99F9`,primary600:`#4A85F0`,primary700:`#4A73ED`,primary800:`#4A5DEB`,primary900:`#3D4AC6`,primary100a:`#B5D8FF99`,primary300a:`#87B5FF4D`,primary400a:`#73ADFF80`,primary900a:`#3D4AC699`,red50:`#F9E6E9`,red100:`#F9C9CE`,red200:`#EA9797`,red300:`#E07171`,red400:`#EA514E`,red500:`#EF4235`,red600:`#E03834`,red700:`#CF2E2E`,red800:`#C22727`,red900:`#B31B1B`,red300a:`#E0717166`,green50:`#E3F0E4`,green100:`#C4E1C5`,green200:`#A2D2A4`,green300:`#7EC381`,green400:`#64B768`,green500:`#4AAC4E`,green600:`#429D46`,green700:`#378B3B`,green800:`#2D7B31`,green900:`#1A5C1F`,yellow50:`#FAF8E2`,yellow100:`#FAF4C0`,yellow200:`#FAF09A`,yellow300:`#FAEC74`,yellow400:`#FAE956`,yellow500:`#FAE63A`,yellow600:`#F8D434`,yellow700:`#F6BC2C`,yellow800:`#F4A524`,yellow900:`#F07C17`,shadow:`#FFFFFF00`,iosKeyboardPicker:`#282828`,iosSelectorKeyboard:`#5858593D`,gradientQuickGuideBottom:`#000000`,gradientQuickGuideTop:`#0000000D`,graphActiveInsulin:`#66D6FF`,graphActiveInsulinSecondary:`#66D6FF1A`,graphCarbohydrate:`#FFB224`,graphCarbohydrateSecondary:`#E88C2B`,graphGlucoseAverage:`#FF8CD8`,graphPhysicalActivity:`#D7EB98`,graphPhysicalActivitySecondary:`#79A762`,graphRapid:`#66D6FF`,graphRapidSecondary:`#00ACEB`,rectangleRangeGraphMyDay:`#5CE59C33`,graphVeryHighGlucose:`#F07C17`,graphVeryHighGlucoseSecondary:`#F4A524`,graphHighGlucose:`#F6BC2C`,graphHighGlucoseSecondary:`#F8D434`,graphTargetGlucose:`#4AAC4E`,graphTargetGlucoseSecondary:`#64B768`,graphLowGlucose:`#EF4235`,graphLowGlucoseSecondary:`#EA514E`,graphVeryLowGlucose:`#B31B1B`,graphVeryLowGlucoseSecondary:`#C22727`},e.LIGHT_COLORS={base50:`#FFFFFF`,base100:`#F7F7FA`,base200:`#F2F2F7`,base300:`#ECECF1`,base400:`#E0E0E6`,base500:`#CFCFD7`,base600:`#B5B5BD`,base700:`#9999A3`,base800:`#6E6E78`,base900:`#3F3F46`,base100a:`#F7F7FA1A`,base600a:`#B5B5BD99`,base700a:`#9999A3B3`,base900a:`#3F3F4699`,primary100:`#EEF0FE`,primary200:`#D7DBFB`,primary300:`#B6BFF8`,primary400:`#8F9EF4`,primary500:`#4A5DEB`,primary600:`#3F4DD5`,primary700:`#3540B8`,primary800:`#2D359B`,primary900:`#242A7C`,primary100a:`#B5D8FF99`,primary300a:`#87B5FF4D`,primary400a:`#73ADFF80`,primary900a:`#3D4AC699`,red50:`#F9E6E9`,red100:`#FCCBCB`,red200:`#F9A6A7`,red300:`#F47475`,red400:`#EB494B`,red500:`#D82E30`,red600:`#B62325`,red700:`#962021`,red800:`#7D2021`,red900:`#440B0D`,red300a:`#E0717166`,green50:`#E3F0E4`,green100:`#BEF6D2`,green200:`#8DEEAF`,green300:`#59DC86`,green400:`#39C365`,green500:`#2BA250`,green600:`#237F42`,green700:`#1F6437`,green800:`#1A522F`,green900:`#092E17`,yellow50:`#FAF8E2`,yellow100:`#FAF5C5`,yellow200:`#F9ED7D`,yellow300:`#FAE84D`,yellow400:`#FAE84D`,yellow500:`#F7C62F`,yellow600:`#F6B82B`,yellow700:`#F3A425`,yellow800:`#F2941F`,yellow900:`#F0831A`,shadow:`#00000029`,iosKeyboardPicker:`#FFFFFF`,iosSelectorKeyboard:`#F4F4F4`,gradientQuickGuideBottom:`#FFFFFF`,gradientQuickGuideTop:`#FFFFFF0D`,graphActiveInsulin:`#008DFF`,graphActiveInsulinSecondary:`#42ABFF1A`,graphCarbohydrate:`#FF9E38`,graphCarbohydrateSecondary:`#EB892F`,graphGlucoseAverage:`#E539AB`,graphPhysicalActivity:`#5BA400`,graphPhysicalActivitySecondary:`#5DA800`,graphRapid:`#008DFF`,graphRapidSecondary:`#42ABFF`,rectangleRangeGraphMyDay:`#5CE59C33`,graphVeryHighGlucose:`#FF9000`,graphVeryHighGlucoseSecondary:`#F07C00`,graphHighGlucose:`#EAB308`,graphHighGlucoseSecondary:`#F8C62B`,graphTargetGlucose:`#008B4F`,graphTargetGlucoseSecondary:`#089B5C`,graphLowGlucose:`#BC0027`,graphLowGlucoseSecondary:`#DC2626`,graphVeryLowGlucose:`#A30022`,graphVeryLowGlucoseSecondary:`#94001F`},e.SHARED_COLORS={white100:`#FFFFFF0D`,white200:`#FFFFFF1A`,white300:`#FFFFFF33`,white400:`#FFFFFF66`,white500:`#FFFFFF99`,white600:`#FFFFFFCC`,white700:`#FFFFFFE6`,white800:`#FFFFFFF2`,white900:`#FFFFFF`,black100:`#0000000D`,black200:`#0000001A`,black300:`#00000033`,black400:`#0000004D`,black500:`#00000080`,black600:`#000000A6`,black700:`#000000D9`,black800:`#000000F2`,black900:`#000000`,noRisk:`#DFB38F`,lowRisk:`#DB988D`,moderateRisk:`#A76762`,highRisk:`#773751`,iosTextStatusBar:`#FFFFFF`,iosAccentBlue:`#0A84FF`,iosButtonHighlight:`#434343`,iosKeyboard:`#383838BF`,transparent:`transparent`,plusInnerShadow:`#8752F2`,plusOuterShadow:`#6422EE`}})),Avn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DARK_SEMANTIC_COLORS=void 0;var t=kvn(),n={...t.DARK_COLORS,...t.SHARED_COLORS};e.DARK_SEMANTIC_COLORS={bgPrimary:n.base900,bgSecondary:n.base700,bgTertiary:n.base600,bgMultiSheet:n.white300,bgSheet:n.base900,bgModal:n.base700,bgOverlay:n.black500,bgBrand:n.primary800,bgToggle:n.base350,bgSpecial:n.base900,bgTransparent:n.transparent,labelPrimary:n.white900,labelSecondary:n.white500,labelTertiary:n.white400,labelBrand:n.primary500,labelBrandInactive:n.primary400a,bgActivationCode:n.base700,borderActivationCodeDanger:n.red500,borderActivationCodeFocus:n.primary500,textActivationCodeDanger:n.red500,textButtonPrimary:n.white900,textButtonPrimaryDisabled:n.white400,bgButtonPrimary:n.primary800,bgButtonPrimaryDisabled:n.primary900,iconButtonPrimary:n.white900,iconButtonPrimaryDisabled:n.white400,textButtonSecondary:n.white900,textButtonSecondaryDisabled:n.white400,bgButtonSecondary:n.base600,bgButtonSecondaryDisabled:n.base100a,iconButtonSecondary:n.white900,iconButtonSecondaryDisabled:n.white400,textButtonPlain:n.white900,textButtonPlainDisabled:n.white400,iconButtonPlain:n.white900,iconButtonPlainDisabled:n.white400,textButtonPrimaryDanger:n.white900,textButtonPrimaryDangerDisabled:n.white400,bgButtonPrimaryDanger:n.red700,bgButtonPrimaryDangerDisabled:n.red300a,iconButtonPrimaryDanger:n.white900,iconButtonPrimaryDangerDisabled:n.white400,textButtonSecondaryDanger:n.red600,textButtonSecondaryDangerDisabled:n.red300a,bgButtonSecondaryDanger:n.base600,bgButtonSecondaryDangerDisabled:n.base100a,iconButtonSecondaryDanger:n.red600,iconButtonSecondaryDangerDisabled:n.red300a,textLink:n.primary500,buttonBorder:n.shadow,borderAvatar:n.white500,paginationActive:n.primary800,paginationInactive:n.white300,graphDivider:n.white300,borderGraphNow:n.white900,overlay:n.black500,nowOverlay:n.white200,veryHighGlucose:n.yellow900,veryHighGlucoseSecondary:n.yellow800,highGlucose:n.yellow700,highGlucoseSecondary:n.yellow600,targetGlucose:n.green500,targetGlucoseSecondary:n.green400,lowGlucose:n.red500,lowGlucoseSecondary:n.red400,veryLowGlucose:n.red900,veryLowGlucoseSecondary:n.red800,graphGlucoseAverage:n.graphGlucoseAverage,graphDotGlucoseAverage:n.green500,graphDotStrokeGlucoseAverage:n.white900,graphActiveInsulin:n.graphActiveInsulin,graphActiveInsulinSecondary:n.graphActiveInsulinSecondary,strokeDotGraphActiveInsulin:n.white900,graphOverlay:n.base700a,graphRapid:n.graphRapid,graphRapidSecondary:n.graphRapidSecondary,graphCarbohydrate:n.graphCarbohydrate,graphCarbohydrateSecondary:n.graphCarbohydrateSecondary,graphPhysicalActivity:n.graphPhysicalActivity,graphPhysicalActivitySecondary:n.graphPhysicalActivitySecondary,rectangleRangeGraphMyDay:n.rectangleRangeGraphMyDay,bgInputActive:n.base600,bgInputInactive:n.base700,bgInputHover:n.white300,borderInputFocus:n.primary500,borderInputDanger:n.red500,textInputDanger:n.red500,bgSecondaryInputInactive:n.base600,bgSecondaryInputActive:n.base600,bgListActive:n.base600,bgListInactive:n.base700,bgListHover:n.white300,bgListPlainHover:n.white200,bgLogbookManual:n.base600,bgLogbookRecommendation:n.base700,borderListFocused:n.primary500,textListHightlight:n.primary500,iosTextStatusBar:n.white900,iosBGNudge:n.white900,iosKeyboardPicker:n.iosKeyboardPicker,iosSelectorKeyboard:n.iosSelectorKeyboard,iosButtonHighlight:n.iosButtonHighlight,iosKeyboard:n.iosKeyboard,textKeyboardButtons:n.iosAccentBlue,textNavigationBar:n.white900,bgNavigationBar:n.base800,textNavigationBarLabel:n.primary500,iconNavigationBarActive:n.primary500,bgCalculatorActive:n.primary900,bgCalculatorInactive:n.base600,iconActive:n.white900,borderCalculator:n.base600,bgIconBolus:n.primary900,bgNumber:n.white600,textNumber:n.black900,bgSegmentContainer:n.base600,bgSegmentCard:n.base600,bgSegmentPrimary:n.primary800,textLabelActive:n.white900,textLabelInactive:n.white900,bgSliderBackground:n.base500,bgSliderForeground:n.primary600,bgSliderKnob:n.white900,bgSliderCalculator:n.base500,textSlider:n.white900,iconSearch:n.white500,textSearchPlaceholder:n.white500,textSearchText:n.white900,bgSearch:n.white300,bgToastDefault:n.base300,textToastDefault:n.white900,iconToastDefault:n.white900,textTableActive:n.white900,textTableSecondary:n.white500,textTableHighlight:n.primary500,bgTableOdd:n.base600,bgTableEven:n.base700,textCarbRecommendation:n.white900,iconCarbRecommendation:n.white900,bgGradientTop:n.primary700,bgGradientBottom:n.primary600,bgLogbookTop:n.base600,bgGradientOverlayTop:n.black100,bgGradientOverlayBottom:n.black900,divider:n.white200,iconBrand:n.primary500,iconBrandInactive:n.primary400a,iconSuccess:n.green500,iconWarning:n.yellow800,iconDanger:n.red500,textSuccess:n.green500,textWarning:n.yellow800,textDanger:n.red700,textPdf:n.black900,toggleKnob:n.white900,plusInnerShadow:n.plusInnerShadow,plusOuterShadow:n.plusOuterShadow,gradientQuickGuide:[n.gradientQuickGuideTop,n.gradientQuickGuideBottom],gradientActiveInsulin:[n.graphActiveInsulinSecondary,n.graphActiveInsulin],gradientCarbohydrates:[n.graphCarbohydrateSecondary,n.graphCarbohydrate],gradientPhysicalActivity:[n.graphPhysicalActivitySecondary,n.graphPhysicalActivity],gradientRapid:[n.graphRapidSecondary,n.graphRapid],gradientVeryHigh:[n.graphVeryHighGlucose,n.graphVeryHighGlucoseSecondary],gradientHigh:[n.graphHighGlucose,n.graphHighGlucoseSecondary],gradientTarget:[n.graphTargetGlucose,n.graphTargetGlucoseSecondary],gradientLow:[n.graphLowGlucoseSecondary,n.graphLowGlucose],gradientVeryLow:[n.graphVeryLowGlucose,n.graphVeryLowGlucoseSecondary]}})),jvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LIGHT_SEMANTIC_COLORS=void 0;var t=kvn(),n={...t.LIGHT_COLORS,...t.SHARED_COLORS};e.LIGHT_SEMANTIC_COLORS={bgPrimary:n.base200,bgSecondary:n.base50,bgTertiary:n.base100,bgMultiSheet:n.black300,bgSheet:n.base200,bgModal:n.base100,bgOverlay:n.black500,bgBrand:n.primary500,bgToggle:n.base500,bgSpecial:n.base50,bgTransparent:n.transparent,labelPrimary:n.black900,labelSecondary:n.black500,labelTertiary:n.black400,labelBrand:n.primary600,labelBrandInactive:n.primary400a,bgActivationCode:n.base700,borderActivationCodeDanger:n.red500,borderActivationCodeFocus:n.primary500,textActivationCodeDanger:n.red500,textButtonPrimary:n.white900,textButtonPrimaryDisabled:n.white400,bgButtonPrimary:n.primary500,bgButtonPrimaryDisabled:n.primary400,iconButtonPrimary:n.white900,iconButtonPrimaryDisabled:n.white400,textButtonSecondary:n.black900,textButtonSecondaryDisabled:n.black400,bgButtonSecondary:n.base50,bgButtonSecondaryDisabled:n.base400,iconButtonSecondary:n.black900,iconButtonSecondaryDisabled:n.black400,textButtonPlain:n.black900,textButtonPlainDisabled:n.black400,iconButtonPlain:n.black900,iconButtonPlainDisabled:n.black400,textButtonPrimaryDanger:n.white900,textButtonPrimaryDangerDisabled:n.white400,bgButtonPrimaryDanger:n.red600,bgButtonPrimaryDangerDisabled:n.red800,iconButtonPrimaryDanger:n.white900,iconButtonPrimaryDangerDisabled:n.white400,textButtonSecondaryDanger:n.red500,textButtonSecondaryDangerDisabled:n.red300a,bgButtonSecondaryDanger:n.base50,bgButtonSecondaryDangerDisabled:n.base400,iconButtonSecondaryDanger:n.red500,iconButtonSecondaryDangerDisabled:n.red300a,textLink:n.primary500,buttonBorder:n.base300,borderAvatar:n.white500,paginationActive:n.primary800,paginationInactive:n.black300,graphDivider:n.white200,borderGraphNow:n.black900,overlay:n.white500,nowOverlay:n.white300,veryHighGlucose:n.yellow900,veryHighGlucoseSecondary:n.yellow800,highGlucose:n.yellow700,highGlucoseSecondary:n.yellow600,targetGlucose:n.green600,targetGlucoseSecondary:n.green500,lowGlucose:n.red500,lowGlucoseSecondary:n.red400,veryLowGlucose:n.red700,veryLowGlucoseSecondary:n.red600,graphGlucoseAverage:n.graphGlucoseAverage,graphDotGlucoseAverage:n.green500,graphDotStrokeGlucoseAverage:n.white900,graphActiveInsulin:n.graphActiveInsulin,graphActiveInsulinSecondary:n.graphActiveInsulinSecondary,strokeDotGraphActiveInsulin:n.white900,graphOverlay:n.white900,graphRapid:n.graphRapid,graphRapidSecondary:n.graphRapidSecondary,graphCarbohydrate:n.graphCarbohydrate,graphCarbohydrateSecondary:n.graphCarbohydrateSecondary,graphPhysicalActivity:n.graphPhysicalActivity,graphPhysicalActivitySecondary:n.graphPhysicalActivitySecondary,rectangleRangeGraphMyDay:n.rectangleRangeGraphMyDay,bgInputActive:n.base50,bgInputInactive:n.base400,bgInputHover:n.black100,borderInputFocus:n.primary500,borderInputDanger:n.red500,textInputDanger:n.red500,bgSecondaryInputInactive:n.base200,bgSecondaryInputActive:n.base50,bgListActive:n.base50,bgListInactive:n.base400,bgListHover:n.black100,bgListPlainHover:n.black100,bgLogbookManual:n.primary300a,bgLogbookRecommendation:n.base50,borderListFocused:n.primary500,textListHightlight:n.primary500,iosTextStatusBar:n.black900,iosBGNudge:n.black900,iosKeyboardPicker:n.iosKeyboardPicker,iosSelectorKeyboard:n.iosSelectorKeyboard,iosButtonHighlight:n.white700,iosKeyboard:n.iosKeyboard,textKeyboardButtons:n.iosAccentBlue,textNavigationBar:n.black900,bgNavigationBar:n.base100,textNavigationBarLabel:n.primary500,iconNavigationBarActive:n.primary500,bgCalculatorActive:n.primary500,bgCalculatorInactive:n.white900,iconActive:n.white900,borderCalculator:n.base300,bgIconBolus:n.primary500,bgNumber:n.black500,textNumber:n.white900,bgSegmentContainer:n.base50,bgSegmentCard:n.base100,bgSegmentPrimary:n.primary500,textLabelActive:n.white900,textLabelInactive:n.base900,bgSliderBackground:n.black200,bgSliderForeground:n.primary600,bgSliderKnob:n.primary600,bgSliderCalculator:n.white900,textSlider:n.black900,iconSearch:n.black500,textSearchPlaceholder:n.black500,textSearchText:n.black900,bgSearch:n.base50,bgToastDefault:n.base50,textToastDefault:n.black900,iconToastDefault:n.black900,textTableActive:n.black900,textTableSecondary:n.black500,textTableHighlight:n.primary600,bgTableOdd:n.base200,bgTableEven:n.base50,textCarbRecommendation:n.white900,iconCarbRecommendation:n.white900,bgGradientTop:n.primary700,bgGradientBottom:n.primary600,bgLogbookTop:n.base400,bgGradientOverlayTop:n.black100,bgGradientOverlayBottom:n.black100,divider:n.black200,iconBrand:n.primary600,iconBrandInactive:n.primary400a,iconSuccess:n.green500,iconWarning:n.yellow900,iconDanger:n.red500,textSuccess:n.green500,textWarning:n.yellow900,textDanger:n.red700,textPdf:n.white900,toggleKnob:n.white900,plusInnerShadow:n.plusInnerShadow,plusOuterShadow:n.plusOuterShadow,gradientQuickGuide:[n.gradientQuickGuideTop,n.gradientQuickGuideBottom],gradientActiveInsulin:[n.graphActiveInsulinSecondary,n.graphActiveInsulin],gradientCarbohydrates:[n.graphCarbohydrateSecondary,n.graphCarbohydrate],gradientPhysicalActivity:[n.graphPhysicalActivitySecondary,n.graphPhysicalActivity],gradientRapid:[n.graphRapidSecondary,n.graphRapid],gradientVeryHigh:[n.graphVeryHighGlucose,n.graphVeryHighGlucoseSecondary],gradientHigh:[n.graphHighGlucose,n.graphHighGlucoseSecondary],gradientTarget:[n.graphTargetGlucose,n.graphTargetGlucoseSecondary],gradientLow:[n.graphLowGlucoseSecondary,n.graphLowGlucose],gradientVeryLow:[n.graphVeryLowGlucose,n.graphVeryLowGlucoseSecondary]}})),Mvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_SCALING=e.FontFamily=e.FONTS=void 0;var t=e.FontFamily=function(e){return e.PoppinsBold=`Poppins-Bold`,e.PoppinsSemiBold=`Poppins-SemiBold`,e.PoppinsMedium=`Poppins-Medium`,e.PoppinsRegular=`Poppins-Regular`,e}({});e.TEXT_SCALING={s0:1,s1:1.118,s2:1.235,s3:1.353},e.FONTS={Poppins:{bold_6XL:{fontFamily:t.PoppinsBold,fontSize:60,lineHeight:72},semiBold_6XL:{fontFamily:t.PoppinsSemiBold,fontSize:60,lineHeight:72},bold_4XL:{fontFamily:t.PoppinsBold,fontSize:36,lineHeight:43},semiBold_4XL:{fontFamily:t.PoppinsSemiBold,fontSize:36,lineHeight:43},bold_2XL:{fontFamily:t.PoppinsBold,fontSize:24,lineHeight:31},semiBold_2XL:{fontFamily:t.PoppinsSemiBold,fontSize:24,lineHeight:31},medium_2XL:{fontFamily:t.PoppinsMedium,fontSize:24,lineHeight:31},bold_Base:{fontFamily:t.PoppinsBold,fontSize:16,lineHeight:24},semiBold_Base:{fontFamily:t.PoppinsSemiBold,fontSize:16,lineHeight:24},medium_Base:{fontFamily:t.PoppinsMedium,fontSize:16,lineHeight:24},regular_Base:{fontFamily:t.PoppinsRegular,fontSize:16,lineHeight:24},bold_SM:{fontFamily:t.PoppinsBold,fontSize:14,lineHeight:21},semiBold_SM:{fontFamily:t.PoppinsSemiBold,fontSize:14,lineHeight:21},medium_SM:{fontFamily:t.PoppinsMedium,fontSize:14,lineHeight:21},regular_SM:{fontFamily:t.PoppinsRegular,fontSize:14,lineHeight:21},bold_XS:{fontFamily:t.PoppinsBold,fontSize:12,lineHeight:18},semiBold_XS:{fontFamily:t.PoppinsSemiBold,fontSize:12,lineHeight:18},medium_XS:{fontFamily:t.PoppinsMedium,fontSize:12,lineHeight:18},regular_XS:{fontFamily:t.PoppinsRegular,fontSize:12,lineHeight:18},bold_XXS:{fontFamily:t.PoppinsBold,fontSize:10,lineHeight:15},semiBold_XXS:{fontFamily:t.PoppinsSemiBold,fontSize:10,lineHeight:15},medium_XXS:{fontFamily:t.PoppinsMedium,fontSize:10,lineHeight:15},regular_XXS:{fontFamily:t.PoppinsRegular,fontSize:10,lineHeight:15}}}})),L7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorScheme=e.COLORS=void 0,Object.defineProperty(e,"FONTS",{enumerable:!0,get:function(){return i.FONTS}}),Object.defineProperty(e,"FontFamily",{enumerable:!0,get:function(){return i.FontFamily}}),Object.defineProperty(e,"TEXT_SCALING",{enumerable:!0,get:function(){return i.TEXT_SCALING}}),e.getColors=o;var t=(V(),d(wm)),n=Avn(),r=jvn(),i=Mvn(),a=e.ColorScheme=function(e){return e.Light=`light`,e.Dark=`dark`,e.System=`system`,e}({});function o(e){let i=t.Appearance.getColorScheme();switch(e){case a.Light:return r.LIGHT_SEMANTIC_COLORS;case a.Dark:return n.DARK_SEMANTIC_COLORS;case a.System:return i===`light`?r.LIGHT_SEMANTIC_COLORS:n.DARK_SEMANTIC_COLORS;default:return n.DARK_SEMANTIC_COLORS}}e.COLORS=o()})),R7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useSemanticColors=e.ColorSchemeProvider=void 0;var t=a(m()),n=L7(),r=Avn(),i=Xq();function a(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(a=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var o=(0,t.createContext)(r.DARK_SEMANTIC_COLORS);e.ColorSchemeProvider=({colorScheme:e,children:r})=>{let a=(0,t.useMemo)(()=>(0,n.getColors)(e),[e]);return(0,i.jsx)(o.Provider,{value:a,children:r})},e.useSemanticColors=()=>(0,t.useContext)(o)})),Nvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,...e,children:(0,r.jsx)(t.Path,{d:`M7.668 13.77h0a1.375 1.375 0 00-.758 1.776c.642 1.638 2.097 3.053 4.194 3.297h0a1.36 1.36 0 001.503-1.207h0a1.368 1.368 0 00-1.193-1.517h0c-.962-.111-1.652-.743-1.98-1.582l-.448.176.447-.175a1.352 1.352 0 00-1.765-.768zM12 21.52c-3.177 0-5.476-1.785-6.648-4.133-1.18-2.361-1.197-5.247.157-7.405 2.079-3.033 5.034-5.346 6.234-6.216a.434.434 0 01.514 0c1.2.87 4.155 3.183 6.234 6.216 1.354 2.158 1.336 5.044.157 7.405-1.172 2.348-3.471 4.133-6.648 4.133z`,fill:i.labelPrimary,stroke:i.labelPrimary,strokeWidth:.96})})}e.default=o})),Pvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsxs)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,r.jsx)(t.Mask,{id:`a`,fill:i.labelPrimary,children:(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z`})}),(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z`,fill:i.labelPrimary}),(0,r.jsx)(t.Path,{d:`M15.364 9.32l-.525.851h.001l.524-.851zm3.824.658l-.03-1h-.014l.044 1zm-4.95-1.565l.672-.742-.671.742zm-.64-.562l-.638.769.002.002.637-.771zm-7.817.353l.693.72h.001l-.694-.72zm-.026 1.414l-.72.693v.002l.72-.695zm1.414.025l-.694-.72h-.002l.696.72zm3.974-.893l.812.582.798-1.112-1.302-.422-.308.952zm-1.013 4.322l.965-.26-.965.26zm1.118 1.99l.791-.61-.002-.003-.79.614zm.008.011l-.792.61.792-.61zm.777 1.469l-.995.098v.002l.995-.1zm-.928 3.249l-.906-.424-.002.004.908.42zm-.253.547l-.908-.42-.004.008.912.412zm.499 1.324l-.413.91.004.002.409-.912zm1.323-.5l-.908-.42-.003.008.91.413zm.243-.524l-.906-.424-.002.004.908.42zm0-.003l-.905-.423.906.424zm1.106-4.292l-.995.1.995-.1zm-1.19-2.5l.79-.611-.79.611zm-.004-.004l.79-.612v-.002l-.79.614zm-.767-1.285l-.966.258.966-.258zm.767-2.718l.672-.74-.825-.75-.656.901.809.589zm.028.024l-.65.761.65-.76zm.039.035l-.69.723.008.009.01.008.672-.74zm1.42 1.129l.524-.852-.523.852zm4.96.952l.042.999h.001l-.043-1zm.955-1.043l-1 .043 1-.043zM7.008 15.17l.123.992h.003l-.126-.992zm1.81-.654l-.477-.88.476.88zm-3.214.7l.012-1h-.008l-.004 1zm-.162-.001l-.005 1 .005-1zm-.704.005l.03 1h.002l-.032-1zm-.97 1.028l1-.028v-.001l-1 .029zm1.029.97v1h.03l-.03-1zm.722-.003l-.008 1h.008v-1zm0 0l.008-1H5.52v1zm.065 0l.012-1h-.004l-.008 1zm1.672-.061l.124.992-.124-.992zm2.515-.88l.478.878-.478-.878zm.402-1.356l-.879.476.001.002.879-.478zm5.199-6.689a3.493 3.493 0 003.49-3.489h-2c0 .82-.67 1.489-1.49 1.489v2zm-3.49-3.489a3.492 3.492 0 003.49 3.489v-2c-.82 0-1.49-.669-1.49-1.489h-2zm3.49-3.491a3.492 3.492 0 00-3.49 3.491h2c0-.822.67-1.491 1.49-1.491v-2zm3.49 3.491a3.493 3.493 0 00-3.49-3.491v2c.82 0 1.49.669 1.49 1.491h2zm-4.022 5.43c1.392.856 3.126.861 4.392.806l-.088-1.998c-1.277.056-2.438-.008-3.257-.511l-1.047 1.704zm-1.273-1.017c.365.33.794.723 1.272 1.017l1.049-1.703c-.292-.18-.581-.437-.978-.797l-1.343 1.483zm-.605-.532c.197.163.392.338.606.532l1.342-1.483c-.208-.188-.436-.395-.675-.591l-1.273 1.542zm-6.487.301c1.78-1.718 4.642-1.833 6.485-.303l1.277-1.539c-2.649-2.2-6.657-2.003-9.15.403l1.388 1.44zm0 .001s-.001-.001 0 0v-.001l-.001.002-1.387-1.442a2 2 0 00-.053 2.828l1.441-1.387zm-.002 0h.002c0-.001 0 0 0 0h-.001v-.002l-1.438 1.391a2 2 0 002.828.048l-1.39-1.437zm4.978-1.126c-1.667-.54-3.64-.164-4.976 1.125l1.388 1.44c.774-.747 1.965-.988 2.971-.662l.617-1.903zm-.356 5.015c-.368-1.376.113-2.439.86-3.48L10.33 8.166c-.89 1.24-1.763 2.937-1.166 5.164l1.931-.518zm.942 1.636c-.426-.548-.775-1.015-.942-1.636l-1.931.517c.283 1.06.882 1.816 1.294 2.346l1.58-1.227zm.01.013l-.008-.01-1.583 1.221.008.01 1.583-1.22zm.98 1.98c-.086-.867-.62-1.514-.98-1.98l-1.583 1.222c.449.582.554.765.573.957l1.99-.198zm-1.017 3.773c.25-.532.534-1.138.737-1.75.204-.614.353-1.307.28-2.024l-1.99.201c.033.324-.028.713-.188 1.192-.16.481-.391.98-.65 1.533l1.811.848zm-.25.542l.252-.547-1.815-.84-.253.548 1.815.84zm.003-.006c.001 0 0 0 0 0v-.002 0l-1.823-.823a2.002 2.002 0 00.998 2.646l.825-1.821zm0 0h.001l-.005-.002-.817 1.825c.262.118.542.177.82.177v-2zm0 0v2a2 2 0 001.822-1.176l-1.822-.825zm.246-.533l-.243.525 1.815.84.243-.525-1.815-.84zm.002-.006v.002l1.812.847v-.002l-1.812-.847zm1.017-3.77c.128 1.272-.404 2.461-1.016 3.77l1.811.847c.574-1.226 1.386-2.911 1.195-4.817l-1.99.2zm-.987-1.987c.514.664.908 1.201.987 1.987l1.99-.2c-.143-1.418-.896-2.365-1.395-3.01l-1.582 1.223zm-.004-.005l.004.005 1.582-1.223-.003-.005-1.583 1.223zm-.941-1.637c.183.682.626 1.231.943 1.639l1.58-1.227c-.378-.486-.533-.71-.592-.93l-1.931.518zm.924-3.566c-.743 1.022-1.31 2.123-.924 3.566l1.931-.518c-.147-.55-.023-1.001.61-1.871L12.02 9.247zm1.486-.147a.403.403 0 00-.005-.004l-1.345 1.48.052.045L13.506 9.1zm.08.071c-.036-.034-.07-.063-.08-.071l-1.298 1.521.007.006.001.001-.01-.01 1.38-1.447zm1.254 1c-.453-.278-.834-.62-1.272-1.017l-1.344 1.481c.423.384.934.85 1.57 1.24l1.046-1.704zm3.619.825c-1.259 0-2.556-.17-3.619-.824l-1.047 1.704c1.533.942 3.276 1.12 4.666 1.12v-2zm.774-.02c-.255.011-.513.02-.774.02v2c.302 0 .592-.01.859-.021l-.085-1.998zm-.001 0l.087 1.999a2 2 0 001.91-2.086l-1.997.087zm-.014.001c-.003 0-.003 0 0 .001a.045.045 0 01.014.008c.004.004.004.006.003.003a.044.044 0 01-.003-.013l1.998-.087c-.05-1.13-1.026-1.942-2.073-1.91l.06 1.998zM7.134 16.163c.88-.111 1.602-.464 2.16-.768l-.954-1.757c-.505.274-.957.478-1.457.54l.25 1.985zm-1.543.053c.482.006 1.017.012 1.54-.053l-.245-1.985c-.369.046-.772.045-1.27.039l-.025 2zm-.153 0h.16l.01-2h-.16l-.01 2zm-.668.004c.213-.006.43-.005.667-.004l.01-2c-.23-.001-.483-.003-.74.005l.063 2zm-.002 0l-.058-1.999a2 2 0 00-1.941 2.057l2-.058zm0 0c-.002 0 0 0 0 0-.001-.001-.001-.001 0 0v.001c0 .001 0 .001 0 0l-2 .055a2 2 0 002 1.944v-2zm.029 0h-.03v2h.03v-2zm.73-.004c-.237-.002-.497-.004-.76.004l.06 2c.219-.008.44-.006.684-.004l.016-2zm-.008 0v2-2zm.073 0h-.065l-.015 2h.065l.015-2zm1.541-.054c-.504.063-.997.06-1.537.055l-.023 2c.532.006 1.151.011 1.807-.07l-.247-1.985zm2.161-.766c-.631.343-1.324.662-2.16.766l.246 1.985c1.207-.15 2.16-.609 2.869-.994l-.955-1.757zm.001 0c0 .002 0 .002 0 0v-.001c0-.001 0-.001 0 0v.001h-.002l.957 1.757a2 2 0 00.802-2.712l-1.757.956zm0 0l1.758-.954a2.001 2.001 0 00-2.712-.805l.953 1.759z`,fill:i.labelPrimary,mask:`url(#a)`})]})}e.default=o})),z7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TIMEOUT_MODAL_TRIGGER=e.TARGET_BGL_MMOL_LIMITS=e.INSULIN_TO_CARBS_RATIO_LIMITS=e.INSULIN_SENSITIVITY_MMOL_LIMITS=e.INSULIN_DOSE_LIMITS=e.CURRENT_BGL_MMOL_LIMITS=e.CARBOHYDRATES_LIMITS=e.BOLUS_SECONDS_PASSED_LIMITS=e.ACTIVITY_TARGET_BGL_MMOL_LIMITS=e.ACTIVITY_SETTINGS_INTERVAL_LIMITS=e.ACTIVITY_POSTPONE_GLUCOSE_MMOLL=e.ACTIVITY_POSTPONE_GLUCOSE_MGDL=e.ACTIVITY_DURATION_MINUTES_LIMITS=void 0;var t=b0();e.ACTIVITY_POSTPONE_GLUCOSE_MMOLL=5,e.ACTIVITY_POSTPONE_GLUCOSE_MGDL=90,e.TIMEOUT_MODAL_TRIGGER=600*1e3,e.CARBOHYDRATES_LIMITS={min:t.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:t.CONSTANTS.CARBOHYDRATES_INPUT_MAX},e.INSULIN_DOSE_LIMITS={min:t.CONSTANTS.INSULIN_DOSE_MIN,max:t.CONSTANTS.INSULIN_DOSE_MAX},e.BOLUS_SECONDS_PASSED_LIMITS={min:t.CONSTANTS.BOLUS_SECONDS_MIN,max:t.CONSTANTS.BOLUS_SECONDS_MAX},e.ACTIVITY_DURATION_MINUTES_LIMITS={min:t.CONSTANTS.ACTIVITY_DURATION_MIN,max:t.CONSTANTS.ACTIVITY_DURATION_MAX},e.INSULIN_SENSITIVITY_MMOL_LIMITS={min:t.CONSTANTS.INSULIN_SENSITIVITY_MIN,max:t.CONSTANTS.INSULIN_SENSITIVITY_MAX},e.INSULIN_TO_CARBS_RATIO_LIMITS={min:t.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,max:t.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX},e.CURRENT_BGL_MMOL_LIMITS={min:t.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,max:t.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL},e.TARGET_BGL_MMOL_LIMITS={min:t.CONSTANTS.TARGET_GLUCOSE_MIN,max:t.CONSTANTS.TARGET_GLUCOSE_MAX},e.ACTIVITY_TARGET_BGL_MMOL_LIMITS={min:t.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,max:t.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX},e.ACTIVITY_SETTINGS_INTERVAL_LIMITS={min:t.CONSTANTS.ACTIVITY_REDUCTION_MIN,max:t.CONSTANTS.ACTIVITY_REDUCTION_MAX}})),B7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useLanguage=e.LanguageProvider=e.LanguageContext=void 0;var t=i(m()),n=Fvt(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var a=e.LanguageContext=(0,t.createContext)(void 0);e.LanguageProvider=({children:e})=>{let{language:i,changeLanguage:o,t:s}=(0,n.useTranslation)(),c=t.default.useMemo(()=>({language:i,changeLanguage:o,t:s}),[i,o,s]);return(0,r.jsx)(a.Provider,{value:c,children:e})},e.useLanguage=()=>{let e=(0,t.useContext)(a);if(!e)throw Error(`useLanguage must be used within a LanguageProvider`);return e}})),V7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertAndFormatBGL=i,e.convertBGL=n,e.createSequentialArrayInteger=e.createSequentialArrayHalf=e.createSequentialArrayDecimal=void 0,e.formatBGL=r,e.formatUnit=void 0;var t=b0();function n(e,n,r){if(n!==t.BloodGlucoseUnit.MG_DL&&n!==t.BloodGlucoseUnit.MMOL_L)throw Error(`Unsupported glucose unit! ${n}`);if(n===r)return e;switch(r){case t.BloodGlucoseUnit.MG_DL:return e*t.CONSTANTS.MGDL_PER_MMOLL_BGL;case t.BloodGlucoseUnit.MMOL_L:return e*t.CONSTANTS.MMOLL_PER_MGDL_BGL;default:throw Error(`Unsupported glucose unit! ${r}`)}}function r(e,n){let r=n===t.BloodGlucoseUnit.MG_DL?0:1;return(Math.round(e*10)/10).toFixed(r)}function i(e,t,i){return r(n(e,t,i),i)}e.formatUnit=e=>`${e.substring(0,e.length-1)}${e.substring(e.length-1,e.length).toUpperCase()}`,e.createSequentialArrayHalf=(e,t)=>Array.from({length:(t-e)/.5+1},(t,n)=>(e+n*.5).toFixed(1)),e.createSequentialArrayInteger=(e,t)=>Array.from({length:t-e+1},(t,n)=>(e+n).toString()),e.createSequentialArrayDecimal=(e,t)=>Array.from({length:(t-e)*10+1},(t,n)=>(e+n/10).toFixed(1))})),Fvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useDebouncedCallback=p,e.useFontScale=f;var t=m(),n=(V(),d(wm)),r=Mvn(),i=()=>{let e=n.PixelRatio.getFontScale();return Math.min(e>0?e:1,r.TEXT_SCALING.s3)},a=i(),o=new Set,s=[],c=()=>{let e=i();e!==a&&(a=e,o.forEach(e=>e()))},l=e=>(o.size===0&&(s=[n.AppState.addEventListener(`change`,e=>{e===`active`&&c()}),n.Dimensions.addEventListener(`change`,c)]),o.add(e),c(),()=>{o.delete(e),o.size===0&&(s.forEach(e=>e.remove()),s=[])}),u=()=>a;function f(){return(0,t.useSyncExternalStore)(l,u)}function p(e,n){let r=(0,t.useRef)(null),i=(0,t.useRef)(e);return(0,t.useEffect)(()=>{i.current=e},[e]),(0,t.useCallback)((...e)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{i.current(...e)},n)},[n])}})),H7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s(m()),n=(V(),d(wm)),r=Fvn(),i=R7(),a=L7(),o=Xq();function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(e){let s=(0,i.useSemanticColors)(),c=(0,r.useFontScale)(),l=(0,t.useMemo)(()=>{let t=n.StyleSheet.flatten([{...a.FONTS.Poppins.regular_Base,color:s.labelPrimary},e.style]);return typeof t.fontSize==`number`&&(t.fontSize*=c),typeof t.lineHeight==`number`&&(t.lineHeight*=c),t},[s,e.style,c]);return(0,o.jsx)(n.Text,{...e,allowFontScaling:!1,style:l,children:e.children})}e.default=c})),Ivn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=g(m()),n=(V(),d(wm)),r=b0(),i=h(Nvn()),a=h(Pvn()),o=z7(),s=R7(),c=B7(),l=L7(),u=V7(),f=h(H7()),p=Xq();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function _({glucoseReading:e,hasActivity:l,bloodGlucoseUnit:d}){let{t:m}=(0,c.useLanguage)(),h=(0,s.useSemanticColors)(),g=(0,t.useMemo)(()=>(0,u.convertBGL)(e.value,e.unit,r.BloodGlucoseUnit.MMOL_L),[e]),_=(0,t.useMemo)(()=>r.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MIN<=g&&g<r.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MAX?m(`recommendation_suggestions_remeasure_very_low`):r.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MIN<=g&&g<r.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MAX?m(`recommendation_suggestions_remeasure_low`):r.CONSTANTS.SEVERE_HYPOGLYCEMIA_MIN<g&&g<=r.CONSTANTS.SEVERE_HYPERGLYCEMIA_MAX?m(`recommendation_suggestions_measure_ketone`):null,[g,m]),y=(0,t.useMemo)(()=>r.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MIN<=g&&g<=r.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MAX?m(`recommendation_suggestions_postpone_activity`,{displayUnit:(0,u.formatUnit)(d),value:d===r.BloodGlucoseUnit.MG_DL?o.ACTIVITY_POSTPONE_GLUCOSE_MGDL.toString():o.ACTIVITY_POSTPONE_GLUCOSE_MMOLL.toString()}):r.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MIN<=g&&g<=r.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MAX?m(`recommendation_suggestions_reduce_intensity`):null,[g,d,m]);return(0,p.jsxs)(n.View,{style:v.container,children:[_&&(0,p.jsxs)(n.View,{style:v.row,children:[(0,p.jsx)(i.default,{style:v.icon,testID:`blood-icon`}),(0,p.jsx)(f.default,{style:[v.text,{color:h.labelPrimary}],testID:`blood-glucose-message`,children:_})]}),l&&y&&(0,p.jsxs)(n.View,{style:v.row,children:[(0,p.jsx)(a.default,{style:v.icon,testID:`run-icon`}),(0,p.jsx)(f.default,{style:[v.text,{color:h.labelPrimary}],testID:`activity-message`,children:y})]})]})}var v=n.StyleSheet.create({container:{gap:16,flexWrap:`wrap`},text:{...l.FONTS.Poppins.regular_SM,flex:1},row:{flexDirection:`row`,gap:8},icon:{alignSelf:`center`}});e.default=_})),Lvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:42,height:42,viewBox:`0 0 42 42`,fill:`none`,...e,children:(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14.075 5.202a1.313 1.313 0 011.539-1.04c2.41.468 4.109 1.686 5.178 3.328.874 1.34 1.283 2.895 1.394 4.422a15.383 15.383 0 002.662-.475c1.134-.306 3.85-.727 6.424.425 2.686 1.202 4.946 3.988 5.289 9.548a.988.988 0 01.002.051c.043 5.242-1.626 9.2-3.54 11.88-.955 1.336-1.972 2.359-2.874 3.067a8.58 8.58 0 01-1.27.842c-.347.183-.72.336-1.074.389-1.64.386-3.142.11-4.34-.222-.369-.102-.751-.222-1.087-.327-.188-.06-.361-.114-.509-.158-.473-.141-.768-.202-.961-.202-.203 0-.504.059-.972.19-.152.043-.336.098-.535.158-.328.097-.7.208-1.049.301-1.194.317-2.684.588-4.327.262-.359-.052-.74-.209-1.097-.398-.39-.206-.82-.49-1.271-.844-.903-.709-1.92-1.73-2.873-3.066-1.911-2.678-3.575-6.63-3.533-11.872 0-.017 0-.034.002-.051.343-5.56 2.603-8.346 5.29-9.548 2.574-1.152 5.29-.731 6.423-.425.863.232 1.725.388 2.586.468-.106-1.119-.415-2.148-.96-2.982-.663-1.02-1.735-1.845-3.478-2.183a1.312 1.312 0 01-1.039-1.538zm.98 12.966a1.313 1.313 0 00-1.126-2.371c-1.911.908-3.296 2.796-3.584 4.894a1.312 1.312 0 102.6.358 3.85 3.85 0 012.11-2.881z`,fill:i.graphCarbohydrateSecondary})})}e.default=o})),Rvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=(O2(),d(D2)),n=R7(),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let i=(0,n.useSemanticColors)();return(0,r.jsxs)(t.Svg,{width:24,height:25,viewBox:`0 0 24 25`,fill:`none`,...e,children:[(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.99312 4.2711C4.97691 3.21491 6.37794 2.62354 8.03206 2.62354H11.6091C12.0233 2.62354 12.3591 2.95933 12.3591 3.37354C12.3591 3.78775 12.0233 4.12354 11.6091 4.12354H8.03206C6.75004 4.12354 5.76199 4.57281 5.09074 5.29347C4.414 6.02002 4.00391 7.08289 4.00391 8.39968V16.3464C4.00391 17.6647 4.4124 18.7277 5.08783 19.4539C5.75756 20.1739 6.74517 20.6235 8.03206 20.6235H16.467C17.7555 20.6235 18.7433 20.1738 19.4128 19.4539C20.088 18.7278 20.4961 17.6649 20.4961 16.3464V12.7654C20.4961 12.3512 20.8319 12.0154 21.2461 12.0154C21.6603 12.0154 21.9961 12.3512 21.9961 12.7654V16.3464C21.9961 17.9738 21.4886 19.4244 20.5112 20.4754C19.5281 21.5326 18.1263 22.1235 16.467 22.1235H8.03206C6.37405 22.1235 4.97259 21.5324 3.98947 20.4754C3.01204 19.4245 2.50391 17.974 2.50391 16.3464V8.39968C2.50391 6.77158 3.01482 5.32139 3.99312 4.2711Z`,fill:e?.color??i.labelPrimary}),(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.4779 4.79025L11.947 10.8273C11.6292 11.1844 11.4306 11.6319 11.3786 12.1085L11.2367 13.4178C11.1888 13.8615 11.5777 14.2282 12.0174 14.1548C12.0173 14.1548 12.0175 14.1547 12.0174 14.1548L13.2872 13.9418C13.8024 13.8552 14.2724 13.5962 14.6197 13.2079L14.6257 13.2012L20.1012 7.2259L20.1038 7.2231C20.4768 6.82017 20.4526 6.1918 20.0494 5.81853L18.8817 4.73742C18.8817 4.73738 18.8818 4.73746 18.8817 4.73742C18.4788 4.36513 17.8501 4.38948 17.4779 4.79025ZM16.376 3.77252C17.311 2.76233 18.8891 2.70159 19.8999 3.63592L21.0684 4.71777C21.0683 4.71776 21.0684 4.71779 21.0684 4.71777C22.0786 5.65306 22.1405 7.22926 21.206 8.24047C21.2055 8.24101 21.205 8.24155 21.2045 8.24209L15.7346 14.2114C15.1602 14.8521 14.3846 15.2784 13.5359 15.4211L12.2655 15.6341C10.8457 15.8717 9.59091 14.6883 9.74532 13.2569L9.88736 11.9465C9.97332 11.1584 10.3028 10.4163 10.8313 9.82475L10.8376 9.81777L16.3734 3.77534L16.376 3.77252Z`,fill:e?.color??i.labelPrimary})]})}})),zvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=(V(),d(wm)),n=R7(),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}var a=()=>{let e=(0,n.useSemanticColors)();return(0,r.jsx)(t.View,{style:[o.container,{backgroundColor:e.bgOverlay}],testID:`backdrop`})},o=t.StyleSheet.create({container:{position:`absolute`,top:0,left:0,right:0,bottom:0}});e.default=a})),Bvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CheckmarkCircleFilledHeight=void 0,i(m());var t=r((O2(),d(D2))),n=Xq();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e){return e&&e.__esModule?e:{default:e}}e.CheckmarkCircleFilledHeight=140;function a(e){return(0,n.jsxs)(t.default,{width:128,height:128,viewBox:`0 0 128 128`,fill:`none`,...e,children:[(0,n.jsx)(t.Circle,{cx:64,cy:64,r:63,fill:`#4A5DEB`,stroke:`#4A73ED`,strokeWidth:2}),(0,n.jsx)(t.Path,{d:`M43 67C43 67 54 78.5 55.5 79C57 79.5 85.5 49 85.5 49`,stroke:`white`,strokeWidth:5.33333,strokeLinecap:`round`})]})}e.default=a})),Vvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,o(m());var t=(V(),d(wm)),n=a(Bvn()),r=R7(),i=Xq();function a(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(a=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function o(e){return e&&e.__esModule?e:{default:e}}var s=()=>{let e=(0,r.useSemanticColors)(),{height:a}=(0,t.useWindowDimensions)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.default,{style:[c.checkmark,{top:(a-n.CheckmarkCircleFilledHeight)/2}],testID:`timeout-modal-checkmark`}),(0,i.jsx)(t.View,{style:[c.container,{backgroundColor:e.bgOverlay}],testID:`backdrop-checkmark`})]})},c=t.StyleSheet.create({checkmark:{alignSelf:`center`,position:`absolute`},container:{position:`absolute`,top:0,left:0,right:0,bottom:0}});e.default=s})),U7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(m()),n=(V(),d(wm)),r=(l0(),d(T2t)),i=R7(),a=c(zvn()),o=c(Vvn()),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var u=300;function f({testID:e,isVisible:c,onModalHide:l,onModalShow:d,onRequestClose:f,containerStyle:m,children:h,checkmark:g}){let{height:_}=(0,n.useWindowDimensions)(),{bottom:v}=(0,r.useSafeAreaInsets)(),y=(0,i.useSemanticColors)(),[b,x]=(0,t.useState)(0),[S,C]=(0,t.useState)(!1),w=(0,t.useRef)(new n.Animated.Value(_)).current;(0,t.useEffect)(()=>{S||w.setValue(_)},[S,_,w]);let T=(0,t.useCallback)(()=>{n.Animated.timing(w,{toValue:0,duration:u,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:n.Platform.OS!==`web`}).start(({finished:e})=>{e&&d&&d()})},[d,w]),E=(0,t.useCallback)(()=>{let e=b>0?b:_;n.Animated.timing(w,{toValue:e,duration:u,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:n.Platform.OS!==`web`}).start(({finished:e})=>{e&&(C(!1),l&&l())})},[b,_,l,w]);(0,t.useEffect)(()=>{S&&!c?E():!S&&c&&(C(!0),T())},[c,S,E,T]);let D=(0,t.useCallback)(e=>{x(e.nativeEvent.layout.height+v)},[v]);return S?(0,s.jsx)(n.Modal,{visible:!0,transparent:!0,statusBarTranslucent:!0,onRequestClose:f,children:(0,s.jsxs)(n.View,{style:[p.overlay,{backgroundColor:y.bgTransparent}],children:[g?(0,s.jsx)(o.default,{}):(0,s.jsx)(a.default,{}),(0,s.jsx)(n.Animated.View,{testID:e,accessibilityRole:`alert`,onLayout:D,style:[p.modal,{backgroundColor:y.bgModal},{transform:[{translateY:w}]},{paddingBottom:v+16},m],children:h})]})}):null}var p=n.StyleSheet.create({modal:{width:`100%`,maxHeight:`85%`,paddingTop:32,paddingBottom:16,paddingHorizontal:16,borderTopRightRadius:36,borderTopLeftRadius:36},backdrop:{position:`absolute`,left:0,right:0,top:0,bottom:0},overlay:{flex:1,justifyContent:`flex-end`}});e.default=t.default.memo(f)})),Hvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HapticFeedbackTypes",{enumerable:!0,get:function(){return n.HapticFeedbackTypes}}),e.triggerHaptic=i;var t=(V(),d(wm)),n=r((edn(),d(Xun)));function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e=t.Platform.OS===`ios`?n.HapticFeedbackTypes.selection:n.HapticFeedbackTypes.effectTick,r){n.default.trigger(e,{...r})}})),Uvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(m()),n=(V(),d(wm)),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}var a=22,o=26;function s({type:e,height:t,option:i,index:s,fontScale:l,onItemPress:u,colors:d}){return(0,r.jsx)(n.Pressable,{onPress:u,testID:`${e}-wheel-picker-item-`+s,children:(0,r.jsx)(n.Animated.View,{style:[c.option,{height:t}],children:(0,r.jsx)(n.Text,{allowFontScaling:!1,style:[c.itemTextStyle,{fontSize:a*l,lineHeight:o*l,color:d.labelPrimary}],children:i})})})}e.default=t.default.memo(s);var c=n.StyleSheet.create({option:{alignItems:`center`,justifyContent:`center`,zIndex:100},itemTextStyle:{fontWeight:`400`}})})),Wvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(m()),n=(V(),d(wm)),r=c(j2()),i=Fvn(),a=Hvn(),o=c(Uvn()),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function u({type:e,initialScrollIndex:c,selectedIndex:l,options:u,onChange:d,visibleRest:p=3,decelerationRate:m=`normal`,colors:h}){let{width:g}=(0,n.useWindowDimensions)(),_=(0,i.useFontScale)(),v=Math.round(35*_),y=v*p,b=(0,t.useRef)(null),x=(0,t.useRef)(null),S=(0,t.useMemo)(()=>new n.Animated.Value(0),[]),C=(1+p*2)*v,w=(0,t.useMemo)(()=>{let e=[...u];for(let t=0;t<p;t++)e.unshift(null),e.push(null);return e},[u,p]),T=(0,t.useMemo)(()=>[...Array(w.length)].map((e,t)=>t*v),[w,v]),E=(0,t.useRef)(v);(0,t.useEffect)(()=>{E.current!==v&&(E.current=v,x.current=l,b.current?.scrollToOffset({offset:l*v,animated:!1}))},[v,l]);let D=(0,t.useCallback)(e=>{let t=Math.min(v*(u.length-1),Math.max(e.nativeEvent.contentOffset.y,0)),n=Math.floor(Math.floor(t)/v);Math.floor(t%v)>v/2&&n++,n!==l&&d(n)},[v,u.length,l,d]),O=(0,t.useCallback)(e=>{n.Platform.OS!==`web`&&x.current!==e&&(x.current=e,(0,a.triggerHaptic)())},[]),k=(0,t.useCallback)(e=>{let t=Math.round(Math.round(e.nativeEvent.contentOffset.y)/v),r=Math.min(u.length-1,Math.max(t,0));O(r),r!==l&&d(r),n.Platform.OS===`web`&&b.current?.scrollToIndex({index:r,animated:!0})},[O,d,l,u.length,v]),A=(0,i.useDebouncedCallback)(k,100),ee=(0,t.useCallback)(e=>{d(e),b.current?.scrollToIndex({index:e,animated:!0})},[d]);return(0,s.jsxs)(n.View,{style:[f.containerPicker,{height:C,backgroundColor:h.iosKeyboardPicker}],testID:`${e}-wheel-picker`,children:[(0,s.jsx)(n.View,{style:[f.selectedIndicator,{backgroundColor:h.iosSelectorKeyboard,transform:[{translateY:-v/2}],height:v,width:g-32-20}]}),(0,s.jsx)(n.Animated.FlatList,{testID:`${e}-wheel-picker-list`,ref:b,style:f.scrollView,showsVerticalScrollIndicator:!1,onScroll:n.Animated.event([{nativeEvent:{contentOffset:{y:S}}}],{useNativeDriver:n.Platform.OS!==`web`,listener:n.Platform.OS===`web`?A:k}),onMomentumScrollEnd:D,snapToInterval:v,snapToOffsets:T,decelerationRate:m,initialScrollIndex:c,getItemLayout:(e,t)=>({length:v,offset:v*t,index:t}),data:w,keyExtractor:(e,t)=>t.toString(),renderItem:({item:t,index:n})=>(0,s.jsx)(o.default,{type:e,index:n,option:t,height:v,fontScale:_,onItemPress:()=>ee(Math.max(0,Math.min(n-p,u.length-1))),colors:h})}),(0,s.jsx)(r.default,{colors:[h.iosKeyboardPicker+`FF`,h.iosKeyboardPicker+`4D`],style:[f.mask,{top:0,height:y}]}),(0,s.jsx)(r.default,{colors:[h.iosKeyboardPicker+`4D`,h.iosKeyboardPicker+`FF`],style:[f.mask,{bottom:0,height:y}]})]})}e.default=t.default.memo(u);var f=n.StyleSheet.create({containerPicker:{borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},selectedIndicator:{position:`absolute`,borderRadius:7,top:`50%`,alignSelf:`center`},scrollView:{overflow:`hidden`,flex:1},mask:{position:`absolute`,left:0,right:0,pointerEvents:`none`}})})),Gvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=u(m()),n=(V(),d(wm)),r=R7(),i=B7(),a=l(U7()),o=l(H7()),s=l(Wvn()),c=Xq();function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(u=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}e.default=(0,t.memo)(e=>{let{isVisible:l,items:u,initialScrollIndex:d,type:p,onCancel:m,onConfirm:h,onDismiss:g}=e,{t:_}=(0,i.useLanguage)(),v=(0,r.useSemanticColors)(),[y,b]=(0,t.useState)(d),x=(0,t.useCallback)(e=>{b(e)},[]),S=(0,t.useCallback)(()=>{h(parseFloat(u[y]))},[u,y,h]),C=(0,t.useCallback)(()=>{b(d),m()},[d,m]);return(0,c.jsx)(a.default,{isVisible:l,onModalHide:g,containerStyle:{backgroundColor:v.bgTransparent},children:(0,c.jsxs)(n.View,{testID:`${p}-wheelpicker-modal`,children:[(0,c.jsx)(s.default,{type:p,selectedIndex:y,initialScrollIndex:d,options:u,onChange:x,colors:v}),(0,c.jsxs)(n.View,{style:f.buttonContainer,children:[(0,c.jsx)(n.Pressable,{testID:`${p}-wheel-picker-modal-confirm-button`,accessibilityRole:`button`,onPress:S,style:({pressed:e})=>[f.confirmButton,{backgroundColor:e?v.iosButtonHighlight:v.iosKeyboardPicker}],children:(0,c.jsx)(o.default,{style:[f.buttonText,{color:v.textKeyboardButtons}],children:_(`button_confirm`)})}),(0,c.jsx)(n.Pressable,{testID:`${p}-wheel-picker-modal-cancel-button`,accessibilityRole:`button`,onPress:C,style:({pressed:e})=>[f.secondaryButton,{backgroundColor:e?v.iosButtonHighlight:v.iosKeyboardPicker}],children:(0,c.jsx)(o.default,{style:[f.cancelText,{color:v.textKeyboardButtons}],children:_(`button_cancel`)})})]})]})})});var f=n.StyleSheet.create({buttonContainer:{gap:8},buttonText:{fontSize:17,lineHeight:22,fontWeight:`400`,paddingHorizontal:16,paddingVertical:14,textAlign:`center`},secondaryButton:{borderRadius:13},cancelText:{fontSize:17,lineHeight:22,fontWeight:`600`,paddingHorizontal:16,paddingVertical:14,textAlign:`center`},confirmButton:{borderBottomLeftRadius:13,borderBottomRightRadius:13}})})),Kvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=g(m()),n=(V(),d(wm)),r=h(Lvn()),i=h(Rvn()),a=z7(),o=R7(),s=B7(),c=L7(),l=V7(),u=h(H7()),f=h(Gvn()),p=Xq();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var _=(0,l.createSequentialArrayInteger)(a.CARBOHYDRATES_LIMITS.min,a.CARBOHYDRATES_LIMITS.max);function v({carbsRecommendation:e,editedCarbsRecommendation:a,onDismiss:c,onConfirm:l}){let{t:d}=(0,s.useLanguage)(),m=(0,o.useSemanticColors)(),[h,g]=(0,t.useState)(!1),v=(0,t.useCallback)(()=>{g(!1)},[]),b=(0,t.useCallback)(()=>{g(!0)},[]),x=(0,t.useCallback)(e=>{g(!1),l(e)},[l]),S=(0,t.useCallback)(()=>{if(a!==null)return _.findIndex(e=>e===a.toString());let t=Math.round(e);return _.findIndex(e=>e===t.toString())},[a,e]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.View,{style:[y.card,{backgroundColor:m.bgSecondary}],testID:`carbs-recommendation-display`,children:(0,p.jsxs)(n.View,{style:y.row,children:[(0,p.jsx)(r.default,{}),(0,p.jsxs)(n.View,{style:y.body,children:[(0,p.jsxs)(n.View,{style:y.valueRow,children:[(0,p.jsx)(u.default,{style:[y.label,{color:m.labelPrimary}],children:d(`recommendation_carb_eat`)+` `}),a===null?(0,p.jsx)(u.default,{style:[y.valueBold,{color:m.labelPrimary}],children:`${e} g`}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.default,{style:[y.valueEdited,{color:m.labelSecondary}],children:`${e} g`}),(0,p.jsx)(u.default,{style:[y.valueBold,{color:m.labelPrimary}],children:` ${a} g`})]})]}),(0,p.jsx)(u.default,{style:[y.subtitle,{color:m.labelPrimary}],children:d(`recommendation_carb_title`)})]}),(0,p.jsx)(n.TouchableOpacity,{onPress:b,testID:`carbohydrates-edit-button`,hitSlop:10,style:y.editButton,children:(0,p.jsx)(i.default,{style:y.editIcon})})]})}),(0,p.jsx)(f.default,{type:`carbohydrates`,items:_,isVisible:h,initialScrollIndex:S(),onConfirm:x,onCancel:v,onDismiss:c})]})}e.default=v;var y=n.StyleSheet.create({card:{borderRadius:16,marginBottom:32},row:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`,padding:24,gap:12},body:{flex:1},valueRow:{flexDirection:`row`,alignItems:`center`},label:{...c.FONTS.Poppins.medium_Base},valueBold:{...c.FONTS.Poppins.semiBold_Base},subtitle:{...c.FONTS.Poppins.regular_Base,lineHeight:23},valueEdited:{...c.FONTS.Poppins.regular_Base,textDecorationLine:`line-through`,opacity:.6},editIcon:{marginLeft:4},editButton:{alignSelf:`flex-start`}})})),qvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=(V(),d(wm)),n=R7(),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}function a(){let e=(0,n.useSemanticColors)(),i=Array.from({length:25},(e,t)=>`dot-${t}`);return(0,r.jsx)(t.View,{style:o.container,children:i.map(n=>(0,r.jsx)(t.View,{testID:n,style:[o.line,{backgroundColor:e.divider}]},n))})}var o=t.StyleSheet.create({container:{flexDirection:`row`,justifyContent:`space-between`,alignItems:`center`,width:`100%`},line:{width:8,height:1,borderRadius:4}});e.default=a})),Jvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,r.jsx)(t.Path,{d:`M4.227 8.207a.831.831 0 011.008-.069l.087.069L12 14.295l6.678-6.088a.83.83 0 011.008-.069l.087.069c.275.25.3.643.075.919l-.075.079-7.226 6.588a.831.831 0 01-1.008.069l-.086-.069-7.226-6.588a.663.663 0 010-.998z`,fill:i.labelSecondary})})}e.default=o})),Yvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,r.jsx)(t.Path,{d:`M19.773 15.793a.831.831 0 01-1.008.069l-.087-.069L12 9.704l-6.678 6.09a.831.831 0 01-1.008.068l-.087-.069a.66.66 0 01-.075-.919l.075-.079 7.226-6.588a.83.83 0 011.008-.069l.086.069 7.226 6.588a.663.663 0 010 .998z`,fill:i.labelSecondary})})}e.default=o})),Xvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(m());var t=r((O2(),d(D2))),n=Xq();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e){return(0,n.jsx)(t.default,{width:20,height:20,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(t.Path,{d:`M11.7012 4.125C11.8651 3.95886 12.1261 3.95886 12.29 4.125L18.2441 10.1582C19.2467 11.1743 19.2467 12.8256 18.2441 13.8418L12.29 19.875C12.1261 20.0411 11.8661 20.0411 11.7021 19.875L5.74805 13.8418C4.74547 12.8257 4.74558 11.1744 5.74805 10.1582L11.7012 4.125Z`,fill:`#401782`,stroke:`#9B8BF3`,strokeWidth:2})})}e.default=i})),Zvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.styles=e.default=void 0,o(m());var t=(V(),d(wm)),n=R7(),r=L7(),i=o(H7()),a=Xq();function o(e){return e&&e.__esModule?e:{default:e}}function s({title:e,value:r,unit:o,hasSeparator:s,testID:l,icon:u}){let d=(0,n.useSemanticColors)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.View,{style:c.itemContainer,testID:l,children:[(0,a.jsx)(t.View,{style:c.itemTitleContainer,children:(0,a.jsx)(i.default,{style:[c.title,{color:d.labelPrimary}],testID:l+`-title`,children:e})}),(0,a.jsxs)(t.View,{style:c.row,children:[u&&(0,a.jsx)(t.View,{style:c.icon,testID:l+`-icon`,children:u}),(0,a.jsx)(i.default,{style:[c.itemText,{color:d.labelSecondary}],testID:l+`-value`,children:r}),!!o&&(0,a.jsx)(t.View,{style:c.row,children:(0,a.jsx)(i.default,{style:[c.itemText,{color:d.labelSecondary}],testID:l+`-unit`,children:` `+o})})]})]}),s&&(0,a.jsx)(t.View,{style:[c.divider,{backgroundColor:d.divider}],testID:l+`-divider`})]})}e.default=s;var c=e.styles=t.StyleSheet.create({itemContainer:{flex:1,flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`,paddingVertical:12,gap:8},itemTitleContainer:{alignSelf:`flex-start`},icon:{marginRight:8,alignSelf:`center`},title:{...r.FONTS.Poppins.regular_Base},itemText:{...r.FONTS.Poppins.regular_Base,textAlign:`right`},divider:{height:1},row:{flexDirection:`row`,flexShrink:1,justifyContent:`flex-end`}})})),Qvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.styles=e.default=void 0;var t=g(m()),n=(V(),d(wm)),r=h(Jvn()),i=h(Yvn()),a=h(Xvn()),o=R7(),s=B7(),c=L7(),l=V7(),u=h(H7()),f=h(Zvn()),p=Xq();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function _({carbIntakeValue:e,activeInsulin:c,glucoseReading:d,bloodGlucoseUnit:m,activity:h,trackExpandDetails:g}){let{t:_}=(0,s.useLanguage)(),y=(0,o.useSemanticColors)(),[b,x]=(0,t.useState)(!1),S=(0,t.useMemo)(()=>({light:_(`activity_intensity_1`),moderate:_(`activity_intensity_2`),hard:_(`activity_intensity_3`)}),[_]),C=(0,t.useCallback)(()=>{n.Platform.OS===`ios`&&n.LayoutAnimation.configureNext(n.LayoutAnimation.Presets.easeInEaseOut),x(e=>{let t=!e;return t&&g(),t})},[g]),w=(0,t.useMemo)(()=>{if(!h)return``;let{activityDuration:e,activityIntensity:t,activityReduction:n}=h,r=n?Math.round(n*100):0,i=t?`${S[t]},`:``,a=`${r}% ${_(`recommendation_reduction`)}`;return`${(e=>e<=29?`0-29 min`:e<=45?`30-45 min`:e<=60?`46-60 min`:`61-120 min`)(e)}. ${i} \n ${a}`},[S,h,_]),T=(0,t.useMemo)(()=>[{title:_(`recommendation_summary_active_insulin_title`),value:c,unit:_(c===1?`unit`:`units`),testID:`active-insulin-item`},{title:_(`Glucose`),value:(0,l.convertAndFormatBGL)(d.value,d.unit,m),unit:(0,l.formatUnit)(m),testID:`blood-glucose-item`,icon:d.source===`forecast`?(0,p.jsx)(a.default,{}):void 0},{title:_(`recommendation_carbohydrates_title`),value:e||`-`,unit:e?_(e===1?`gram`:`grams`):void 0,testID:`carbs-item`},h!==void 0&&{title:_(`recommendation_activity_title`),value:w,testID:`activity-item`}].filter(e=>e),[_,c,d,m,e,h,w]);return(0,p.jsxs)(n.View,{style:v.container,children:[(0,p.jsxs)(n.TouchableOpacity,{style:v.clickableContainer,onPress:C,hitSlop:10,children:[(0,p.jsx)(u.default,{style:[v.title,{color:y.labelSecondary}],children:_(`recommendation_card_cal_details_title`)}),(0,p.jsx)(n.View,{style:v.expandButton,testID:`chevron-`+b,children:b?(0,p.jsx)(i.default,{style:v.chevron}):(0,p.jsx)(r.default,{style:v.chevron})})]}),b&&(0,p.jsx)(n.View,{children:T.map(({title:e,unit:t,value:n,testID:r,icon:i},a,o)=>(0,p.jsx)(f.default,{icon:i,testID:r,title:e,value:n,unit:t,hasSeparator:a!==o.length-1},e))})]})}e.default=_;var v=e.styles=n.StyleSheet.create({container:{padding:16,gap:16},clickableContainer:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`},expandButton:{justifyContent:`center`,alignItems:`center`},chevron:{alignSelf:`center`,marginLeft:4},title:{...c.FONTS.Poppins.medium_SM,textAlign:`center`}})})),$vn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=L7(),a=s(H7()),o=Xq();function s(e){return e&&e.__esModule?e:{default:e}}function c({prefixTestID:e,onSave:i,onDelete:s,onLayout:c}){let{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,o.jsxs)(t.View,{style:[l.container,{backgroundColor:d.bgNavigationBar,borderTopColor:d.divider}],onLayout:c,testID:e+`-footer`,children:[(0,o.jsx)(t.TouchableOpacity,{style:[l.saveButton,{backgroundColor:d.bgButtonPrimary,borderColor:d.divider}],onPress:i,testID:e+`-footer-save-button`,children:(0,o.jsx)(a.default,{style:[l.saveText,{color:d.textButtonPrimary}],children:u(`button_save`)})}),(0,o.jsx)(t.TouchableOpacity,{style:[l.deleteButton,{backgroundColor:d.bgButtonSecondaryDanger,borderColor:d.buttonBorder}],onPress:s,testID:e+`-footer-delete-button`,children:(0,o.jsx)(a.default,{style:[l.deleteText,{color:d.textButtonSecondaryDanger}],children:u(`button_delete`)})})]})}var l=t.StyleSheet.create({container:{justifyContent:`flex-end`,gap:16,padding:16,borderTopWidth:1},saveButton:{paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:1},deleteButton:{paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:2},saveText:{...i.FONTS.Poppins.semiBold_Base,textAlign:`center`},deleteText:{...i.FONTS.Poppins.semiBold_Base,textAlign:`center`}});e.default=c})),eyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=c(j2()),r=R7(),i=B7(),a=L7(),o=c(H7()),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}function l({isEdited:e}){let{t:a}=(0,i.useLanguage)(),c=(0,r.useSemanticColors)(),{width:l}=(0,t.useWindowDimensions)();return e?(0,s.jsx)(n.default,{colors:[c.bgGradientBottom,c.bgGradientTop],style:[u.gradientContainer],testID:`edited-recommendation-header`,children:(0,s.jsxs)(t.View,{style:u.containerChanges,children:[(0,s.jsx)(o.default,{style:[u.text,{color:c.textCarbRecommendation}],children:a(`recommendation_change_title`).toUpperCase()}),(0,s.jsx)(o.default,{style:[u.text,u.textCrossed,{color:c.textCarbRecommendation}],children:a(`recommendation_card_title`).toUpperCase()})]})}):(0,s.jsx)(n.default,{colors:[c.bgGradientBottom,c.bgGradientTop],style:[u.gradientContainer,{width:l-32}],testID:`initial-recommendation-header`,children:(0,s.jsx)(t.View,{style:u.container,children:(0,s.jsx)(o.default,{style:[u.text,{color:c.textCarbRecommendation}],children:a(`recommendation_card_title`).toUpperCase()})})})}var u=t.StyleSheet.create({gradientContainer:{borderTopLeftRadius:16,borderTopRightRadius:16},container:{flex:1,paddingVertical:20},containerChanges:{flex:1,paddingVertical:8},text:{...a.FONTS.Poppins.medium_Base,textAlign:`center`},textCrossed:{textDecorationLine:`line-through`,opacity:.5}});e.default=l})),tyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=_(m()),n=(V(),d(wm)),r=lin(),i=b0(),a=g(Rvn()),o=z7(),s=R7(),c=B7(),l=L7(),u=V7(),f=g(H7()),p=g(Gvn()),h=Xq();function g(e){return e&&e.__esModule?e:{default:e}}function _(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(_=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function v({initialValue:e,editedValue:l,wasLimited:d,injectionMethod:m,onDismiss:g,onConfirm:_}){let{t:v}=(0,c.useLanguage)(),b=(0,s.useSemanticColors)(),[x,S]=(0,t.useState)(!1),C=(0,t.useCallback)(()=>{S(!0)},[]),w=(0,t.useCallback)(()=>{S(!1)},[]),T=(0,t.useCallback)(e=>{S(!1),_(e)},[_]),E=(0,t.useMemo)(()=>{let{min:t,max:n}=o.INSULIN_DOSE_LIMITS,r=d?e:n;return m===i.InjectionMethod.Pump?(0,u.createSequentialArrayDecimal)(t,r):m===i.InjectionMethod.PenWhole?(0,u.createSequentialArrayInteger)(t,r):(0,u.createSequentialArrayHalf)(t,r)},[m,e,d]),D=(0,t.useMemo)(()=>m===i.InjectionMethod.PenWhole?0:1,[m]),O=(0,t.useCallback)(()=>{if(l!==null)return E.findIndex(e=>e===l.toFixed(D));let t=(0,r.roundInsulinValue)(e,m);return E.findIndex(e=>e===t.toFixed(D))},[l,e,E,m,D]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(n.View,{style:[y.container,{backgroundColor:b.bgSecondary}],children:[(0,h.jsx)(f.default,{style:[y.title,{color:b.labelSecondary}],testID:`insulin-display-title`,children:v(`recommendation_rapid_title`)}),(0,h.jsxs)(n.TouchableOpacity,{style:y.row,testID:`insulin-current-value-container`,onPress:C,children:[(0,h.jsx)(f.default,{style:[y.value,{color:b.labelPrimary}],testID:`insulin-value`,children:`${l??e} `}),(0,h.jsx)(n.TouchableOpacity,{onPress:C,testID:`insulin-edit-button`,hitSlop:10,children:(0,h.jsx)(a.default,{})})]}),l===null?(0,h.jsx)(f.default,{style:[y.unit,{color:b.labelSecondary}],testID:`insulin-current-unit`,children:v(e===1?`unit`:`units`)}):(0,h.jsxs)(f.default,{style:[y.crossedOut,{color:b.labelSecondary}],testID:`insulin-initial-value`,children:[`${e} `,(0,h.jsx)(f.default,{style:[y.unit,{color:b.labelSecondary}],testID:`insulin-initial-unit`,children:v(e===1?`unit`:`units`)})]})]}),(0,h.jsx)(p.default,{type:`insulin`,items:E,isVisible:x,initialScrollIndex:O(),onConfirm:T,onCancel:w,onDismiss:g})]})}var y=n.StyleSheet.create({container:{paddingVertical:32,justifyContent:`center`,alignItems:`center`},title:{...l.FONTS.Poppins.regular_Base,marginBottom:8},row:{flexDirection:`row`,alignItems:`center`,alignContent:`center`},value:{...l.FONTS.Poppins.bold_6XL,lineHeight:n.Platform.select({ios:0,default:l.FONTS.Poppins.bold_6XL.lineHeight}),textAlign:`center`},crossedOut:{...l.FONTS.Poppins.medium_2XL,textDecorationLine:`line-through`},unit:{...l.FONTS.Poppins.medium_2XL}});e.default=v})),W7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.styles=void 0;var t=(V(),d(wm)),n=L7();e.styles=t.StyleSheet.create({containerStyle:{opacity:.5},handleIndicatorStyle:{display:`none`},title:{...n.FONTS.Poppins.semiBold_2XL,marginBottom:4},message:{marginBottom:32},buttonContainer:{gap:16},button:{paddingHorizontal:16,paddingVertical:12,borderRadius:16},buttonText:{...n.FONTS.Poppins.semiBold_Base,textAlign:`center`},secondaryButton:{paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:2},secondaryButtonText:{...n.FONTS.Poppins.semiBold_Base,textAlign:`center`}})})),nyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressClose:l}=e,{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{isVisible:c,children:(0,s.jsxs)(t.View,{testID:`delete-failure-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:d.labelPrimary}],testID:`delete-modal-failure-title`,children:u(`new_activity_modal_no_delete_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:d.labelSecondary}],testID:`delete-modal-failure-message`,children:u(`new_activity_modal_no_delete_body`)}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:d.bgButtonPrimary}],onPress:l,testID:`delete-modal-failure-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:d.textButtonPrimary}],children:u(`button_close`)})})]})})}})),ryn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressDelete:l,onPressCancel:u,onDismiss:d}=e,{t:f}=(0,r.useLanguage)(),p=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{onModalHide:d,isVisible:c,children:(0,s.jsxs)(t.View,{testID:`delete-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:p.labelPrimary}],testID:`delete-modal-title`,children:f(`recommendation_modal_delete_rec_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:p.labelSecondary}],testID:`delete-modal-message`,children:f(`recommendation_modal_delete_rec_body`)}),(0,s.jsxs)(t.View,{style:o.styles.buttonContainer,children:[(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:p.bgButtonPrimaryDanger}],onPress:l,testID:`delete-modal-delete-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:p.textButtonPrimary}],children:f(`recommendation_modal_delete_rec_button_danger_delete`)})}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.secondaryButton,{backgroundColor:p.bgButtonSecondary,borderColor:p.buttonBorder}],onPress:u,testID:`delete-modal-cancel-button`,children:(0,s.jsx)(i.default,{style:[o.styles.secondaryButtonText,{color:p.textButtonSecondary}],children:f(`button_cancel`)})})]})]})})}})),iyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressClose:l}=e,{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{isVisible:c,children:(0,s.jsxs)(t.View,{testID:`edit-failure-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:d.labelPrimary}],testID:`edit-modal-failure-title`,children:u(`glucose_modal_changes_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:d.labelSecondary}],testID:`edit-modal-failure-message`,children:u(`glucose_modal_changes_body`)}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:d.bgButtonPrimary}],onPress:l,testID:`edit-modal-failure-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:d.textButtonPrimary}],children:u(`glucose_modal_changes_button_confirm`)})})]})})}})),ayn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.getLimitedValue=p;var t=f(m()),n=(V(),d(wm)),r=b0(),i=R7(),a=B7(),o=u(H7()),s=u(U7()),c=W7(),l=Xq();function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function p(e){return r.CONSTANTS.INSULIN_DOSE_MAX-r.CONSTANTS.INSULIN_DOSE_MAX*e}e.default=e=>{let{isVisible:u,activityReduction:d,onPress:f}=e,{t:m}=(0,a.useLanguage)(),h=(0,i.useSemanticColors)(),g=(0,t.useMemo)(()=>d===null?m(`recommendation_modal_safety_limitation_body`,{SAFETY_INSULIN_LIMIT:`${r.CONSTANTS.INSULIN_DOSE_MAX}`}):m(`recommendation_modal_safety_limitation2_body`,{0:`${p(d)}`,SAFETY_INSULIN_LIMIT:`${r.CONSTANTS.INSULIN_DOSE_MAX}`,1:`${(d*100).toFixed(0)}`,2:`${p(d)}`}),[d,m]);return(0,l.jsx)(s.default,{isVisible:u,children:(0,l.jsxs)(n.View,{testID:`limitation-modal-visible-`+u,children:[(0,l.jsx)(o.default,{style:[c.styles.title,{color:h.labelPrimary}],children:m(`recommendation_modal_safety_limitation_title`)}),(0,l.jsx)(o.default,{style:[c.styles.message,{color:h.labelSecondary}],testID:`limitation-modal-message`,children:g}),(0,l.jsx)(n.TouchableOpacity,{style:[c.styles.button,{backgroundColor:h.bgButtonPrimary}],onPress:f,testID:`limitation-modal-button`,children:(0,l.jsx)(o.default,{style:[c.styles.buttonText,{color:h.textButtonPrimary}],children:m(`button_understood`)})})]})})}})),oyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressClose:l}=e,{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{isVisible:c,children:(0,s.jsxs)(t.View,{testID:`save-failure-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:d.labelPrimary}],testID:`save-modal-failure-title`,children:u(`no_save_modal_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:d.labelSecondary}],testID:`save-modal-failure-message`,children:u(`no_save_modal_body`)}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:d.bgButtonPrimary}],onPress:l,testID:`save-modal-failure-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:d.textButtonPrimary}],children:u(`button_close`)})})]})})}})),syn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressViewInLogbook:l,onPressCancel:u,onDismiss:d}=e,{t:f}=(0,r.useLanguage)(),p=(0,n.useSemanticColors)(),m=t.Platform.OS===`web`;return(0,s.jsx)(a.default,{checkmark:!0,onModalHide:d,isVisible:c,children:(0,s.jsxs)(t.View,{testID:`timeout-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:p.labelPrimary}],testID:`timeout-modal-title`,children:f(`recommendation_modal_auto_saved_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:p.labelSecondary}],testID:`timeout-modal-message`,children:f(`recommendation_modal_auto_saved_body`)}),(0,s.jsxs)(t.View,{style:o.styles.buttonContainer,children:[!m&&(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:p.bgButtonPrimary}],onPress:l,testID:`timeout-modal-view-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:p.textButtonPrimary}],children:f(`recommendation_modal_auto_saved_button_confirm`)})}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.secondaryButton,{backgroundColor:p.bgButtonSecondary,borderColor:p.buttonBorder}],onPress:u,testID:`timeout-modal-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.secondaryButtonText,{color:p.textButtonSecondary}],children:f(`button_close`)})})]})]})})}})),cyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=r((O2(),d(D2))),n=Xq();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.jsxs)(t.default,{width:29,height:28,viewBox:`0 0 29 28`,fill:`none`,...e,children:[(0,n.jsx)(t.Path,{d:`M14.5 0.5C21.9558 0.5 28 6.54416 28 14C28 21.4558 21.9558 27.5 14.5 27.5C7.04416 27.5 1 21.4558 1 14C1 6.54416 7.04416 0.5 14.5 0.5Z`,fill:`#4A5DEB`}),(0,n.jsx)(t.Path,{d:`M14.5 0.5C21.9558 0.5 28 6.54416 28 14C28 21.4558 21.9558 27.5 14.5 27.5C7.04416 27.5 1 21.4558 1 14C1 6.54416 7.04416 0.5 14.5 0.5Z`,stroke:`#FFFFFF`}),(0,n.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.8158 11.1809C21.0614 11.4221 21.0614 11.8132 20.8158 12.0544L14.9448 17.8191C14.6991 18.0603 14.3009 18.0603 14.0552 17.8191L8.18424 12.0544C7.93859 11.8132 7.93859 11.4221 8.18424 11.1809C8.4299 10.9397 8.82812 10.9397 9.07378 11.1809L14.5 16.5089L19.9262 11.1809C20.1718 10.9397 20.5701 10.9397 20.8158 11.1809Z`,fill:`#FFFFFF`})]})}e.default=a})),lyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=c(m()),n=(V(),d(wm)),r=s(j2()),i=s(cyn()),a=R7(),o=Xq();function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(c=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function l({scrollToEnd:e,isVisibleArrow:s,isVisibleBlur:c}){let l=(0,a.useSemanticColors)(),d=(0,t.useRef)(new n.Animated.Value(155)).current,f=(0,t.useRef)(new n.Animated.Value(+!!c)).current;return(0,t.useEffect)(()=>{n.Animated.timing(f,{toValue:+!!c,duration:400,useNativeDriver:n.Platform.OS!==`web`}).start()},[c,f]),(0,t.useEffect)(()=>{s&&n.Animated.spring(d,{toValue:0,damping:10,stiffness:100,mass:1,useNativeDriver:n.Platform.OS!==`web`}).start()},[s,d]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.Pressable,{style:u.scrollToEndButton,testID:`scroll-hint-arrow`,children:s&&(0,o.jsx)(n.Animated.View,{style:{backgroundColor:l.bgButtonPrimary,borderRadius:24,transform:[{translateY:d}]},children:(0,o.jsx)(n.TouchableOpacity,{testID:`scroll-hint-arrow-button`,onPress:e,children:(0,o.jsx)(i.default,{})})})}),(0,o.jsx)(n.Animated.View,{style:[u.gradient,{opacity:f}],pointerEvents:`none`,testID:`scroll-hint-blur`,children:(0,o.jsx)(r.default,{colors:l.gradientQuickGuide,style:u.linearGradient})})]})}var u=n.StyleSheet.create({scrollToEndButton:{position:`absolute`,bottom:80,alignSelf:`center`},gradient:{position:`absolute`,left:0,right:0,bottom:0,height:145},linearGradient:{flex:1}});e.default=l})),G7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0;var t;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(t||(e.util=t={}));var n;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(n||(e.objectUtil=n={})),e.ZodParsedType=t.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),e.getParsedType=t=>{switch(typeof t){case`undefined`:return e.ZodParsedType.undefined;case`string`:return e.ZodParsedType.string;case`number`:return Number.isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case`boolean`:return e.ZodParsedType.boolean;case`function`:return e.ZodParsedType.function;case`bigint`:return e.ZodParsedType.bigint;case`symbol`:return e.ZodParsedType.symbol;case`object`:return Array.isArray(t)?e.ZodParsedType.array:t===null?e.ZodParsedType.null:t.then&&typeof t.then==`function`&&t.catch&&typeof t.catch==`function`?e.ZodParsedType.promise:typeof Map<`u`&&t instanceof Map?e.ZodParsedType.map:typeof Set<`u`&&t instanceof Set?e.ZodParsedType.set:typeof Date<`u`&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}})),uyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ZodError=e.quotelessJson=e.ZodIssueCode=void 0;var t=G7();e.ZodIssueCode=t.util.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),e.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,`$1:`);var n=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,t.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};e.ZodError=n,n.create=e=>new n(e)})),dyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=uyn(),n=G7();e.default=(e,r)=>{let i;switch(e.code){case t.ZodIssueCode.invalid_type:i=e.received===n.ZodParsedType.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case t.ZodIssueCode.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(e.expected,n.util.jsonStringifyReplacer)}`;break;case t.ZodIssueCode.unrecognized_keys:i=`Unrecognized key(s) in object: ${n.util.joinValues(e.keys,`, `)}`;break;case t.ZodIssueCode.invalid_union:i=`Invalid input`;break;case t.ZodIssueCode.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${n.util.joinValues(e.options)}`;break;case t.ZodIssueCode.invalid_enum_value:i=`Invalid enum value. Expected ${n.util.joinValues(e.options)}, received '${e.received}'`;break;case t.ZodIssueCode.invalid_arguments:i=`Invalid function arguments`;break;case t.ZodIssueCode.invalid_return_type:i=`Invalid function return type`;break;case t.ZodIssueCode.invalid_date:i=`Invalid date`;break;case t.ZodIssueCode.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(i=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(i=`${i} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?i=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?i=`Invalid input: must end with "${e.validation.endsWith}"`:n.util.assertNever(e.validation):i=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case t.ZodIssueCode.too_small:i=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case t.ZodIssueCode.too_big:i=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case t.ZodIssueCode.custom:i=`Invalid input`;break;case t.ZodIssueCode.invalid_intersection_types:i=`Intersection results could not be merged`;break;case t.ZodIssueCode.not_multiple_of:i=`Number must be a multiple of ${e.multipleOf}`;break;case t.ZodIssueCode.not_finite:i=`Number must be finite`;break;default:i=r.defaultError,n.util.assertNever(e)}return{message:i}}})),fyn=s((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultErrorMap=void 0,e.setErrorMap=i,e.getErrorMap=a;var n=t(dyn());e.defaultErrorMap=n.default;var r=n.default;function i(e){r=e}function a(){return r}})),pyn=s((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.EMPTY_PATH=e.makeIssue=void 0,e.addIssueToContext=i;var n=fyn(),r=t(dyn());e.makeIssue=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},e.EMPTY_PATH=[];function i(t,i){let a=(0,n.getErrorMap)(),o=(0,e.makeIssue)({issueData:i,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,a,a===r.default?void 0:r.default].filter(e=>!!e)});t.common.issues.push(o)}e.ParseStatus=class t{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(t,n){let r=[];for(let i of n){if(i.status===`aborted`)return e.INVALID;i.status===`dirty`&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return t.mergeObjectSync(e,r)}static mergeObjectSync(t,n){let r={};for(let i of n){let{key:n,value:a}=i;if(n.status===`aborted`||a.status===`aborted`)return e.INVALID;n.status===`dirty`&&t.dirty(),a.status===`dirty`&&t.dirty(),n.value!==`__proto__`&&(a.value!==void 0||i.alwaysSet)&&(r[n.value]=a.value)}return{status:t.value,value:r}}},e.INVALID=Object.freeze({status:`aborted`}),e.DIRTY=e=>({status:`dirty`,value:e}),e.OK=e=>({status:`valid`,value:e}),e.isAborted=e=>e.status===`aborted`,e.isDirty=e=>e.status===`dirty`,e.isValid=e=>e.status===`valid`,e.isAsync=e=>typeof Promise<`u`&&e instanceof Promise})),myn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),hyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0;var t;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(t||(e.errorUtil=t={}))})),gyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.ZodReadonly=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0,e.datetimeRegex=A,e.custom=Re;var t=uyn(),n=fyn(),r=hyn(),i=pyn(),a=G7(),o=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},s=(e,n)=>{if((0,i.isValid)(n))return{success:!0,data:n.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let n=new t.ZodError(e.common.issues);return this._error=n,this._error}}};function c(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var l=class{get description(){return this._def.description}_getType(e){return(0,a.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,a.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new i.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,a.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if((0,i.isAsync)(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,a.getParsedType)(e)};return s(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,a.getParsedType)(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return(0,i.isValid)(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>(0,i.isValid)(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,a.getParsedType)(e)},r=this._parse({data:e,path:n.path,parent:n});return s(n,await((0,i.isAsync)(r)?r:Promise.resolve(r)))}refine(e,n){let r=e=>typeof n==`string`||n===void 0?{message:n}:typeof n==`function`?n(e):n;return this._refinement((n,i)=>{let a=e(n),o=()=>i.addIssue({code:t.ZodIssueCode.custom,...r(n)});return typeof Promise<`u`&&a instanceof Promise?a.then(e=>e?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new Oe({schema:this,typeName:ze.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return ke.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fe.create(this)}promise(){return De.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return I.create(this,e,this._def)}transform(e){return new Oe({...c(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new je({...c(this._def),innerType:this,defaultValue:t,typeName:ze.ZodDefault})}brand(){return new Pe({typeName:ze.ZodBranded,type:this,...c(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Me({...c(this._def),innerType:this,catchValue:t,typeName:ze.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Fe.create(this,e)}readonly(){return Ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};e.ZodType=l,e.Schema=l,e.ZodSchema=l;var u=/^c[^\s-]{8,}$/i,d=/^[0-9a-z]+$/,f=/^[0-9A-HJKMNP-TV-Z]{26}$/i,p=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,m=/^[a-z0-9_-]{21}$/i,h=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,g=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,v=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,y,b=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,x=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,S=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,C=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,w=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,T=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,E=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,D=RegExp(`^${E}$`);function O(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function k(e){return RegExp(`^${O(e)}$`)}function A(e){let t=`${E}T${O(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function ee(e,t){return!!((t===`v4`||!t)&&b.test(e)||(t===`v6`||!t)&&S.test(e))}function te(e,t){if(!h.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function ne(e,t){return!!((t===`v4`||!t)&&x.test(e)||(t===`v6`||!t)&&C.test(e))}var re=class e extends l{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==a.ZodParsedType.string){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.string,received:n.parsedType}),i.INVALID}let n=new i.ParseStatus,r;for(let o of this._def.checks)if(o.kind===`min`)e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:o.value,type:`string`,inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind===`max`)e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:o.value,type:`string`,inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind===`length`){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(r=this._getOrReturnCtx(e,r),a?(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:o.value,type:`string`,inclusive:!0,exact:!0,message:o.message}):s&&(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:o.value,type:`string`,inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind===`email`)_.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`email`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`emoji`)y||=new RegExp(v,`u`),y.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`emoji`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`uuid`)p.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`uuid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`nanoid`)m.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`nanoid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`cuid`)u.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`cuid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`cuid2`)d.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`cuid2`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`ulid`)f.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`ulid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`url`)try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`url`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()}else o.kind===`regex`?(o.regex.lastIndex=0,o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`regex`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty())):o.kind===`trim`?e.data=e.data.trim():o.kind===`includes`?e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind===`toLowerCase`?e.data=e.data.toLowerCase():o.kind===`toUpperCase`?e.data=e.data.toUpperCase():o.kind===`startsWith`?e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind===`endsWith`?e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind===`datetime`?A(o).test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:`datetime`,message:o.message}),n.dirty()):o.kind===`date`?D.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:`date`,message:o.message}),n.dirty()):o.kind===`time`?k(o).test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:`time`,message:o.message}),n.dirty()):o.kind===`duration`?g.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`duration`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`ip`?ee(e.data,o.version)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`ip`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`jwt`?te(e.data,o.alg)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`jwt`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`cidr`?ne(e.data,o.version)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`cidr`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`base64`?w.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`base64`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`base64url`?T.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`base64url`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):a.util.assertNever(o);return{status:n.value,value:e.data}}_regex(e,n,i){return this.refinement(t=>e.test(t),{validation:n,code:t.ZodIssueCode.invalid_string,...r.errorUtil.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...r.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...r.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...r.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...r.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...r.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...r.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...r.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...r.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...r.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...r.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...r.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...r.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...r.errorUtil.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...r.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...r.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...r.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...r.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...r.errorUtil.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...r.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...r.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...r.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...r.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...r.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,r.errorUtil.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};e.ZodString=re,re.create=e=>new re({checks:[],typeName:ze.ZodString,coerce:e?.coerce??!1,...c(e)});function ie(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var j=class e extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==a.ZodParsedType.number){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.number,received:n.parsedType}),i.INVALID}let n,r=new i.ParseStatus;for(let o of this._def.checks)o.kind===`int`?a.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:`integer`,received:`float`,message:o.message}),r.dirty()):o.kind===`min`?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_small,minimum:o.value,type:`number`,inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind===`max`?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_big,maximum:o.value,type:`number`,inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind===`multipleOf`?ie(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind===`finite`?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.not_finite,message:o.message}),r.dirty()):a.util.assertNever(o);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,r.errorUtil.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,r.errorUtil.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,r.errorUtil.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,r.errorUtil.toString(t))}setLimit(t,n,i,a){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:r.errorUtil.toString(a)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:r.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:r.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:r.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:r.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:r.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:r.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:r.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:r.errorUtil.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:r.errorUtil.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&a.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};e.ZodNumber=j,j.create=e=>new j({checks:[],typeName:ze.ZodNumber,coerce:e?.coerce||!1,...c(e)});var ae=class e extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==a.ZodParsedType.bigint)return this._getInvalidInput(e);let n,r=new i.ParseStatus;for(let o of this._def.checks)o.kind===`min`?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_small,type:`bigint`,minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind===`max`?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_big,type:`bigint`,maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind===`multipleOf`?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):a.util.assertNever(o);return{status:r.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.bigint,received:n.parsedType}),i.INVALID}gte(e,t){return this.setLimit(`min`,e,!0,r.errorUtil.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,r.errorUtil.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,r.errorUtil.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,r.errorUtil.toString(t))}setLimit(t,n,i,a){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:r.errorUtil.toString(a)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:r.errorUtil.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};e.ZodBigInt=ae,ae.create=e=>new ae({checks:[],typeName:ze.ZodBigInt,coerce:e?.coerce??!1,...c(e)});var oe=class extends l{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==a.ZodParsedType.boolean){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.boolean,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodBoolean=oe,oe.create=e=>new oe({typeName:ze.ZodBoolean,coerce:e?.coerce||!1,...c(e)});var se=class e extends l{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==a.ZodParsedType.date){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.date,received:n.parsedType}),i.INVALID}if(Number.isNaN(e.data.getTime())){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_date}),i.INVALID}let n=new i.ParseStatus,r;for(let o of this._def.checks)o.kind===`min`?e.data.getTime()<o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:`date`}),n.dirty()):o.kind===`max`?e.data.getTime()>o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:`date`}),n.dirty()):a.util.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:r.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:r.errorUtil.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};e.ZodDate=se,se.create=e=>new se({checks:[],coerce:e?.coerce||!1,typeName:ze.ZodDate,...c(e)});var ce=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.symbol){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.symbol,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodSymbol=ce,ce.create=e=>new ce({typeName:ze.ZodSymbol,...c(e)});var M=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.undefined,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodUndefined=M,M.create=e=>new M({typeName:ze.ZodUndefined,...c(e)});var N=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.null){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.null,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodNull=N,N.create=e=>new N({typeName:ze.ZodNull,...c(e)});var P=class extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,i.OK)(e.data)}};e.ZodAny=P,P.create=e=>new P({typeName:ze.ZodAny,...c(e)});var le=class extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,i.OK)(e.data)}};e.ZodUnknown=le,le.create=e=>new le({typeName:ze.ZodUnknown,...c(e)});var ue=class extends l{_parse(e){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.never,received:n.parsedType}),i.INVALID}};e.ZodNever=ue,ue.create=e=>new ue({typeName:ze.ZodNever,...c(e)});var de=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.void,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodVoid=de,de.create=e=>new de({typeName:ze.ZodVoid,...c(e)});var fe=class e extends l{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==a.ZodParsedType.array)return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.array,received:n.parsedType}),i.INVALID;if(s.exactLength!==null){let e=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(e||a)&&((0,i.addIssueToContext)(n,{code:e?t.ZodIssueCode.too_big:t.ZodIssueCode.too_small,minimum:a?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&((0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_small,minimum:s.minLength.value,type:`array`,inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&((0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_big,maximum:s.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((e,t)=>s.type._parseAsync(new o(n,e,n.path,t)))).then(e=>i.ParseStatus.mergeArray(r,e));let c=[...n.data].map((e,t)=>s.type._parseSync(new o(n,e,n.path,t)));return i.ParseStatus.mergeArray(r,c)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:r.errorUtil.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:r.errorUtil.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:r.errorUtil.toString(n)}})}nonempty(e){return this.min(1,e)}};e.ZodArray=fe,fe.create=(e,t)=>new fe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...c(t)});function pe(e){if(e instanceof me){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=ke.create(pe(r))}return new me({...e._def,shape:()=>t})}else if(e instanceof fe)return new fe({...e._def,type:pe(e.element)});else if(e instanceof ke)return ke.create(pe(e.unwrap()));else if(e instanceof Ae)return Ae.create(pe(e.unwrap()));else if(e instanceof ve)return ve.create(e.items.map(e=>pe(e)));else return e}var me=class e extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=a.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==a.ZodParsedType.object){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:n.parsedType}),i.INVALID}let{status:n,ctx:r}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),l=[];if(!(this._def.catchall instanceof ue&&this._def.unknownKeys===`strip`))for(let e in r.data)c.includes(e)||l.push(e);let u=[];for(let e of c){let t=s[e],n=r.data[e];u.push({key:{status:`valid`,value:e},value:t._parse(new o(r,n,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ue){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of l)u.push({key:{status:`valid`,value:e},value:{status:`valid`,value:r.data[e]}});else if(e===`strict`)l.length>0&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.unrecognized_keys,keys:l}),n.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of l){let n=r.data[t];u.push({key:{status:`valid`,value:t},value:e._parse(new o(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of u){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>i.ParseStatus.mergeObjectSync(n,e)):i.ParseStatus.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return r.errorUtil.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let i=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:r.errorUtil.errToObj(t).message??i}:{message:i}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of a.util.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of a.util.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return pe(this)}partial(t){let n={};for(let e of a.util.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of a.util.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof ke;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return we(a.util.objectKeys(this.shape))}};e.ZodObject=me,me.create=(e,t)=>new me({shape:()=>e,unknownKeys:`strip`,catchall:ue.create(),typeName:ze.ZodObject,...c(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:`strict`,catchall:ue.create(),typeName:ze.ZodObject,...c(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:`strip`,catchall:ue.create(),typeName:ze.ZodObject,...c(t)});var he=class extends l{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function a(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let t of e)if(t.result.status===`dirty`)return n.common.issues.push(...t.ctx.common.issues),t.result;let r=e.map(e=>new t.ZodError(e.ctx.common.issues));return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_union,unionErrors:r}),i.INVALID}if(n.common.async)return Promise.all(r.map(async e=>{let t={...n,common:{...n.common,issues:[]},parent:null};return{result:await e._parseAsync({data:n.data,path:n.path,parent:t}),ctx:t}})).then(a);{let e,a=[];for(let t of r){let r={...n,common:{...n.common,issues:[]},parent:null},i=t._parseSync({data:n.data,path:n.path,parent:r});if(i.status===`valid`)return i;i.status===`dirty`&&!e&&(e={result:i,ctx:r}),r.common.issues.length&&a.push(r.common.issues)}if(e)return n.common.issues.push(...e.ctx.common.issues),e.result;let o=a.map(e=>new t.ZodError(e));return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_union,unionErrors:o}),i.INVALID}}get options(){return this._def.options}};e.ZodUnion=he,he.create=(e,t)=>new he({options:e,typeName:ze.ZodUnion,...c(t)});var ge=e=>e instanceof Se?ge(e.schema):e instanceof Oe?ge(e.innerType()):e instanceof Ce?[e.value]:e instanceof Te?e.options:e instanceof Ee?a.util.objectValues(e.enum):e instanceof je?ge(e._def.innerType):e instanceof M?[void 0]:e instanceof N?[null]:e instanceof ke?[void 0,...ge(e.unwrap())]:e instanceof Ae?[null,...ge(e.unwrap())]:e instanceof Pe||e instanceof Ie?ge(e.unwrap()):e instanceof Me?ge(e._def.innerType):[],F=class e extends l{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==a.ZodParsedType.object)return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:n.parsedType}),i.INVALID;let r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):((0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=ge(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...c(r)})}};e.ZodDiscriminatedUnion=F;function _e(e,t){let n=(0,a.getParsedType)(e),r=(0,a.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===a.ZodParsedType.object&&r===a.ZodParsedType.object){let n=a.util.objectKeys(t),r=a.util.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=_e(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===a.ZodParsedType.array&&r===a.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=_e(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===a.ZodParsedType.date&&r===a.ZodParsedType.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var I=class extends l{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),a=(e,a)=>{if((0,i.isAborted)(e)||(0,i.isAborted)(a))return i.INVALID;let o=_e(e.value,a.value);return o.valid?(((0,i.isDirty)(e)||(0,i.isDirty)(a))&&n.dirty(),{status:n.value,value:o.data}):((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>a(e,t)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};e.ZodIntersection=I,I.create=(e,t,n)=>new I({left:e,right:t,typeName:ze.ZodIntersection,...c(n)});var ve=class e extends l{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.array)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.array,received:r.parsedType}),i.INVALID;if(r.data.length<this._def.items.length)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),i.INVALID;!this._def.rest&&r.data.length>this._def.items.length&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),n.dirty());let s=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new o(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(s).then(e=>i.ParseStatus.mergeArray(n,e)):i.ParseStatus.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};e.ZodTuple=ve,ve.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ve({items:e,typeName:ze.ZodTuple,rest:null,...c(t)})};var ye=class e extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.object)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:r.parsedType}),i.INVALID;let s=[],c=this._def.keyType,l=this._def.valueType;for(let e in r.data)s.push({key:c._parse(new o(r,e,r.path,e)),value:l._parse(new o(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?i.ParseStatus.mergeObjectAsync(n,s):i.ParseStatus.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof l?new e({keyType:t,valueType:n,typeName:ze.ZodRecord,...c(r)}):new e({keyType:re.create(),valueType:t,typeName:ze.ZodRecord,...c(n)})}};e.ZodRecord=ye;var be=class extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.map)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.map,received:r.parsedType}),i.INVALID;let s=this._def.keyType,c=this._def.valueType,l=[...r.data.entries()].map(([e,t],n)=>({key:s._parse(new o(r,e,r.path,[n,`key`])),value:c._parse(new o(r,t,r.path,[n,`value`]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let t of l){let r=await t.key,a=await t.value;if(r.status===`aborted`||a.status===`aborted`)return i.INVALID;(r.status===`dirty`||a.status===`dirty`)&&n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}})}else{let e=new Map;for(let t of l){let r=t.key,a=t.value;if(r.status===`aborted`||a.status===`aborted`)return i.INVALID;(r.status===`dirty`||a.status===`dirty`)&&n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}}}};e.ZodMap=be,be.create=(e,t,n)=>new be({valueType:t,keyType:e,typeName:ze.ZodMap,...c(n)});var xe=class e extends l{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.set)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.set,received:r.parsedType}),i.INVALID;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:s.minSize.value,type:`set`,inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:s.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());let c=this._def.valueType;function l(e){let t=new Set;for(let r of e){if(r.status===`aborted`)return i.INVALID;r.status===`dirty`&&n.dirty(),t.add(r.value)}return{status:n.value,value:t}}let u=[...r.data.values()].map((e,t)=>c._parse(new o(r,e,r.path,t)));return r.common.async?Promise.all(u).then(e=>l(e)):l(u)}min(t,n){return new e({...this._def,minSize:{value:t,message:r.errorUtil.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:r.errorUtil.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};e.ZodSet=xe,xe.create=(e,t)=>new xe({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...c(t)});var L=class e extends l{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.function)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.function,received:r.parsedType}),i.INVALID;function o(e,a){return(0,i.makeIssue)({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,n.getErrorMap)(),n.defaultErrorMap].filter(e=>!!e),issueData:{code:t.ZodIssueCode.invalid_arguments,argumentsError:a}})}function s(e,a){return(0,i.makeIssue)({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,n.getErrorMap)(),n.defaultErrorMap].filter(e=>!!e),issueData:{code:t.ZodIssueCode.invalid_return_type,returnTypeError:a}})}let c={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof De){let e=this;return(0,i.OK)(async function(...n){let r=new t.ZodError([]),i=await e._def.args.parseAsync(n,c).catch(e=>{throw r.addIssue(o(n,e)),r}),a=await Reflect.apply(l,this,i);return await e._def.returns._def.type.parseAsync(a,c).catch(e=>{throw r.addIssue(s(a,e)),r})})}else{let e=this;return(0,i.OK)(function(...n){let r=e._def.args.safeParse(n,c);if(!r.success)throw new t.ZodError([o(n,r.error)]);let i=Reflect.apply(l,this,r.data),a=e._def.returns.safeParse(i,c);if(!a.success)throw new t.ZodError([s(i,a.error)]);return a.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ve.create(t).rest(le.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||ve.create([]).rest(le.create()),returns:n||le.create(),typeName:ze.ZodFunction,...c(r)})}};e.ZodFunction=L;var Se=class extends l{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};e.ZodLazy=Se,Se.create=(e,t)=>new Se({getter:e,typeName:ze.ZodLazy,...c(t)});var Ce=class extends l{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{received:n.data,code:t.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:`valid`,value:e.data}}get value(){return this._def.value}};e.ZodLiteral=Ce,Ce.create=(e,t)=>new Ce({value:e,typeName:ze.ZodLiteral,...c(t)});function we(e,t){return new Te({values:e,typeName:ze.ZodEnum,...c(t)})}var Te=class e extends l{_parse(e){if(typeof e.data!=`string`){let n=this._getOrReturnCtx(e),r=this._def.values;return(0,i.addIssueToContext)(n,{expected:a.util.joinValues(r),received:n.parsedType,code:t.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return(0,i.addIssueToContext)(n,{received:n.data,code:t.ZodIssueCode.invalid_enum_value,options:r}),i.INVALID}return(0,i.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};e.ZodEnum=Te,Te.create=we;var Ee=class extends l{_parse(e){let n=a.util.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==a.ZodParsedType.string&&r.parsedType!==a.ZodParsedType.number){let e=a.util.objectValues(n);return(0,i.addIssueToContext)(r,{expected:a.util.joinValues(e),received:r.parsedType,code:t.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||=new Set(a.util.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=a.util.objectValues(n);return(0,i.addIssueToContext)(r,{received:r.data,code:t.ZodIssueCode.invalid_enum_value,options:e}),i.INVALID}return(0,i.OK)(e.data)}get enum(){return this._def.values}};e.ZodNativeEnum=Ee,Ee.create=(e,t)=>new Ee({values:e,typeName:ze.ZodNativeEnum,...c(t)});var De=class extends l{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==a.ZodParsedType.promise&&n.common.async===!1)return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.promise,received:n.parsedType}),i.INVALID;let r=n.parsedType===a.ZodParsedType.promise?n.data:Promise.resolve(n.data);return(0,i.OK)(r.then(e=>this._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})))}};e.ZodPromise=De,De.create=(e,t)=>new De({type:e,typeName:ze.ZodPromise,...c(t)});var Oe=class extends l{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,o={addIssue:e=>{(0,i.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),r.type===`preprocess`){let e=r.transform(n.data,o);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return i.INVALID;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?i.INVALID:r.status===`dirty`||t.value===`dirty`?(0,i.DIRTY)(r.value):r});{if(t.value===`aborted`)return i.INVALID;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?i.INVALID:r.status===`dirty`||t.value===`dirty`?(0,i.DIRTY)(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,o);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?i.INVALID:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?i.INVALID:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,i.isValid)(e))return i.INVALID;let a=r.transform(e.value,o);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>(0,i.isValid)(e)?Promise.resolve(r.transform(e.value,o)).then(e=>({status:t.value,value:e})):i.INVALID);a.util.assertNever(r)}};e.ZodEffects=Oe,e.ZodTransformer=Oe,Oe.create=(e,t,n)=>new Oe({schema:e,typeName:ze.ZodEffects,effect:t,...c(n)}),Oe.createWithPreprocess=(e,t,n)=>new Oe({schema:t,effect:{type:`preprocess`,transform:e},typeName:ze.ZodEffects,...c(n)});var ke=class extends l{_parse(e){return this._getType(e)===a.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};e.ZodOptional=ke,ke.create=(e,t)=>new ke({innerType:e,typeName:ze.ZodOptional,...c(t)});var Ae=class extends l{_parse(e){return this._getType(e)===a.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};e.ZodNullable=Ae,Ae.create=(e,t)=>new Ae({innerType:e,typeName:ze.ZodNullable,...c(t)});var je=class extends l{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===a.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};e.ZodDefault=je,je.create=(e,t)=>new je({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...c(t)});var Me=class extends l{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return(0,i.isAsync)(a)?a.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new t.ZodError(r.common.issues)},input:r.data})})):{status:`valid`,value:a.status===`valid`?a.value:this._def.catchValue({get error(){return new t.ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};e.ZodCatch=Me,Me.create=(e,t)=>new Me({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...c(t)});var Ne=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.nan){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.nan,received:n.parsedType}),i.INVALID}return{status:`valid`,value:e.data}}};e.ZodNaN=Ne,Ne.create=e=>new Ne({typeName:ze.ZodNaN,...c(e)}),e.BRAND=Symbol(`zod_brand`);var Pe=class extends l{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}};e.ZodBranded=Pe;var Fe=class e extends l{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?i.INVALID:e.status===`dirty`?(t.dirty(),(0,i.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?i.INVALID:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:ze.ZodPipeline})}};e.ZodPipeline=Fe;var Ie=class extends l{_parse(e){let t=this._def.innerType._parse(e),n=e=>((0,i.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,i.isAsync)(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};e.ZodReadonly=Ie,Ie.create=(e,t)=>new Ie({innerType:e,typeName:ze.ZodReadonly,...c(t)});function Le(e,t){let n=typeof e==`function`?e(t):typeof e==`string`?{message:e}:e;return typeof n==`string`?{message:n}:n}function Re(e,t={},n){return e?P.create().superRefine((r,i)=>{let a=e(r);if(a instanceof Promise)return a.then(e=>{if(!e){let e=Le(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}});if(!a){let e=Le(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}}):P.create()}e.late={object:me.lazycreate};var ze;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(ze||(e.ZodFirstPartyTypeKind=ze={})),e.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>Re(t=>t instanceof e,t);var Be=re.create;e.string=Be;var Ve=j.create;e.number=Ve,e.nan=Ne.create,e.bigint=ae.create;var He=oe.create;e.boolean=He,e.date=se.create,e.symbol=ce.create,e.undefined=M.create,e.null=N.create,e.any=P.create,e.unknown=le.create,e.never=ue.create,e.void=de.create,e.array=fe.create,e.object=me.create,e.strictObject=me.strictCreate,e.union=he.create,e.discriminatedUnion=F.create,e.intersection=I.create,e.tuple=ve.create,e.record=ye.create,e.map=be.create,e.set=xe.create,e.function=L.create,e.lazy=Se.create,e.literal=Ce.create,e.enum=Te.create,e.nativeEnum=Ee.create,e.promise=De.create;var Ue=Oe.create;e.effect=Ue,e.transformer=Ue,e.optional=ke.create,e.nullable=Ae.create,e.preprocess=Oe.createWithPreprocess,e.pipeline=Fe.create,e.ostring=()=>Be().optional(),e.onumber=()=>Ve().optional(),e.oboolean=()=>He().optional(),e.coerce={string:(e=>re.create({...e,coerce:!0})),number:(e=>j.create({...e,coerce:!0})),boolean:(e=>oe.create({...e,coerce:!0})),bigint:(e=>ae.create({...e,coerce:!0})),date:(e=>se.create({...e,coerce:!0}))},e.NEVER=i.INVALID})),_yn=s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(fyn(),e),n(pyn(),e),n(myn(),e),n(G7(),e),n(gyn(),e),n(uyn(),e)})),vyn=s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;var a=r(_yn());e.z=a,i(_yn(),e),e.default=a})),yyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.recommendationPropsSchema=e.calculatorParamsSchema=e.activitySchema=e.activityReductionSchema=void 0;var t=vyn(),n=b0(),r=z7(),i=L7(),a=(e,n)=>t.z.number().refine(t=>t>=e.min&&t<=e.max,{message:n}),o=e.activityReductionSchema=t.z.object({fromZero:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromThirty:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromFortysix:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromSixtyone:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS).nullable()}),s=e.activitySchema=t.z.object({activityDuration:a(r.ACTIVITY_DURATION_MINUTES_LIMITS),activityIntensity:t.z.nativeEnum(n.ActivityIntensity).nullable(),activitySettings:t.z.object({light:o,moderate:o,hard:t.z.object({...o.shape,fromFortysix:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS).nullable()}),post:o,target:a(r.ACTIVITY_TARGET_BGL_MMOL_LIMITS)}),activityDate:t.z.date()}).nullable(),c=e.calculatorParamsSchema=t.z.object({glucoseReading:t.z.object({value:t.z.number(),unit:t.z.nativeEnum(n.BloodGlucoseUnit),source:t.z.enum([`manual`,`forecast`,`device`,`external`,`cgm`]),timestamp:t.z.number(),id:t.z.string().uuid()}),targetBGL:a(r.TARGET_BGL_MMOL_LIMITS),insulinSensitivity:a(r.INSULIN_SENSITIVITY_MMOL_LIMITS),carbohydrates:a(r.CARBOHYDRATES_LIMITS),carbohydrateRatio:a(r.INSULIN_TO_CARBS_RATIO_LIMITS),recentBoluses:t.z.array(t.z.object({secondsPassed:a(r.BOLUS_SECONDS_PASSED_LIMITS),insulinDose:a(r.INSULIN_DOSE_LIMITS),id:t.z.string().uuid()})),activity:s});e.recommendationPropsSchema=t.z.object({bloodGlucoseUnit:t.z.nativeEnum(n.BloodGlucoseUnit),injectionMethod:t.z.nativeEnum(n.InjectionMethod),language:t.z.enum([`da`,`de`,`en`,`es`,`fr`,`it`,`sv`,`pl`]),calculatorParams:c,colorScheme:t.z.nativeEnum(i.ColorScheme)})})),byn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SyncStatus=e.RecommendationScreen=void 0;var t=O(m()),n=(V(),d(wm)),r=(l0(),d(T2t)),i=lin(),a=b0(),o=D(Ivn()),s=D(Kvn()),c=D(qvn()),l=D(Qvn()),u=D($vn()),f=D(eyn()),p=D(tyn()),h=D(nyn()),g=D(ryn()),_=D(iyn()),v=D(ayn()),y=D(oyn()),b=D(syn()),x=D(lyn()),S=z7(),C=R7(),w=B7(),T=yyn(),E=Xq();function D(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(O=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var k=e.SyncStatus=function(e){return e.Idle=`Idle`,e.Success=`Success`,e.Loading=`Loading`,e.Failure=`Failure`,e}({}),A=e=>{let d=(0,r.useSafeAreaInsets)(),{changeLanguage:m}=(0,w.useLanguage)(),D=(0,C.useSemanticColors)(),{height:O}=(0,n.useWindowDimensions)(),A=(0,t.useMemo)(()=>O-d.bottom-d.top,[O,d.bottom,d.top]),ee=(0,t.useRef)(null),{deleteStatus:ne,editStatus:re,saveStatus:ie,calculatorParams:j,bloodGlucoseUnit:ae,injectionMethod:oe,transferEditedRecommendation:se,closeCalculationFooter:ce,closeCalculationTimeoutModal:M,deleteCalculation:N,closeCalculationViewInlogbook:P,trackRecommendationTimeout:le,trackExpandDetails:ue}=e,{glucoseReading:de,carbohydrates:fe,activity:pe}=j,me=(0,t.useRef)((0,i.calculateRecommendation)(j)).current,[he,ge]=(0,t.useState)(null),[F,_e]=(0,t.useState)(null),[I,ve]=(0,t.useState)(null),[ye,be]=(0,t.useState)(null),[xe,L]=(0,t.useState)(0),[Se,Ce]=(0,t.useState)(0),[we,Te]=(0,t.useState)(0),[Ee,De]=(0,t.useState)(!0),[Oe,ke]=(0,t.useState)(!1),[Ae,je]=(0,t.useState)(!1),[Me,Ne]=(0,t.useState)(!0),[Pe,Fe]=(0,t.useState)(!1),[Ie,Le]=(0,t.useState)(!1),[Re,ze]=(0,t.useState)(!1),[Be,Ve]=(0,t.useState)(!1),[He,Ue]=(0,t.useState)(!1),[We,Ge]=(0,t.useState)(!1),[Ke,qe]=(0,t.useState)(!1),[Je,Ye]=(0,t.useState)(!1),[Xe,Ze]=(0,t.useState)(!1),[Qe,$e]=(0,t.useState)(!1);(0,t.useEffect)(()=>{ne===k.Failure&&Ze(!0)},[ne]),(0,t.useEffect)(()=>{ie===k.Failure&&Ye(!0)},[ie]),(0,t.useEffect)(()=>{re===k.Success&&(ge(F),ve(ye))},[ne,re,ye,F,ie]),(0,t.useEffect)(()=>{T.recommendationPropsSchema.parse(e),m(e.language)},[m,e]),(0,t.useEffect)(()=>{me.wasLimited&&qe(!0)},[me.wasLimited]),(0,t.useEffect)(()=>{let e=me.recommendationDate.getTime(),t=setInterval(()=>{new Date().getTime()-e>S.TIMEOUT_MODAL_TRIGGER&&!We&&!Re&&(ze(!0),Ge(!0),le())},a.Milliseconds.Second*1);return()=>clearInterval(t)},[Re,We,me,le]);let et=(0,t.useCallback)(e=>{let t=me.recommendationDate.getTime(),n=new Date().getTime()-t>S.TIMEOUT_MODAL_TRIGGER;e===`active`&&n&&!Be&&(Ge(!0),le())},[me,le,Be]),tt=(0,t.useCallback)(()=>(Ue(!0),!0),[]);(0,t.useEffect)(()=>{let e=n.AppState.addEventListener(`change`,et),t=null;return n.Platform.OS===`android`&&(t=n.BackHandler.addEventListener(`hardwareBackPress`,tt)),()=>{e.remove(),t?.remove()}},[et,tt]);let nt=(0,t.useMemo)(()=>{if(pe)return{activityDuration:pe.activityDuration,activityIntensity:pe.activityIntensity,activityReduction:me.activityReduction}},[pe,me.activityReduction]),rt=(0,t.useCallback)(e=>{n.LayoutAnimation.configureNext(n.LayoutAnimation.Presets.easeInEaseOut);let t=(0,i.roundInsulinValue)(me.bolus,oe),r=Math.round(me.carbRecommendation),a=e===t?null:e;e===t?(ge(null),_e(null)):_e(e),se({modified:I,suggested:r},{modified:a,suggested:t},me.recommendationDate)},[me,oe,I,se]),it=(0,t.useCallback)(e=>{n.LayoutAnimation.configureNext(n.LayoutAnimation.Presets.easeInEaseOut);let t=(0,i.roundInsulinValue)(me.bolus,oe),r=Math.round(me.carbRecommendation),a=e===r?null:e;e===r?(ve(null),be(null)):be(e),se({modified:a,suggested:r},{modified:he,suggested:t},me.recommendationDate)},[me,oe,he,se]),at=(0,t.useCallback)(()=>{Pe&&N()},[N,Pe]),ot=(0,t.useCallback)(()=>{Ve(!0),Ie?P():M()},[Ie,M,P]),st=(0,t.useCallback)(()=>{Le(!0),Ge(!1)},[]),ct=(0,t.useCallback)(()=>{Fe(!0),Ue(!1)},[]),lt=(0,t.useCallback)(()=>{re===k.Failure&&$e(!0)},[re]),ut=(0,t.useCallback)(()=>{$e(!1)},[]),dt=(0,t.useCallback)((e,t)=>{Te(t)},[]),ft=(0,t.useCallback)(()=>{ee?.current?.scrollToEnd(),je(!0),setTimeout(()=>Ne(!1),1)},[]),pt=(0,t.useCallback)(e=>{let{layoutMeasurement:{height:t},contentOffset:{y:n}}=e.nativeEvent,r=Math.round(t+n),i=r>=we-xe,a=r>=Math.round(we);ke(i),Ee&&De(!1),a&&je(!0),a&&setTimeout(()=>Ne(!1),1)},[xe,we,Ee]),mt=(0,t.useMemo)(()=>Math.round(Se+xe),[Se,xe]);return Re?(0,E.jsx)(n.View,{style:[{flex:1,backgroundColor:D.bgPrimary}],children:(0,E.jsx)(n.View,{style:te.timeoutContainer,children:(0,E.jsx)(b.default,{isVisible:We,onPressViewInLogbook:st,onPressCancel:()=>Ge(!1),onDismiss:ot})})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(n.ScrollView,{ref:ee,scrollEventThrottle:16,style:[te.scrollView,{backgroundColor:D.bgPrimary}],contentContainerStyle:Ae&&te.scrollViewContentContainer,testID:`recommendation-screen`,onScroll:pt,onContentSizeChange:dt,children:[(0,E.jsxs)(n.View,{testID:`recommendation-content`,onLayout:({nativeEvent:e})=>Ce(e.layout.height),style:te.content,children:[(0,E.jsxs)(n.View,{style:[te.mainContainer,{backgroundColor:D.bgSecondary}],children:[(0,E.jsx)(f.default,{isEdited:he!==null}),(0,E.jsx)(p.default,{initialValue:(0,i.roundInsulinValue)(me.bolus,oe),editedValue:he,injectionMethod:oe,wasLimited:me.wasLimited,onDismiss:lt,onConfirm:rt}),(0,E.jsx)(c.default,{}),(0,E.jsx)(l.default,{glucoseReading:de,bloodGlucoseUnit:ae,trackExpandDetails:ue,carbIntakeValue:Math.round(fe),activeInsulin:Math.round(me.activeInsulin*10)/10,activity:nt})]}),(0,E.jsxs)(n.View,{style:te.carbsContainer,children:[Math.round(me.carbRecommendation)>0&&(0,E.jsx)(s.default,{carbsRecommendation:Math.round(me.carbRecommendation),editedCarbsRecommendation:I,onDismiss:lt,onConfirm:it}),(0,E.jsx)(o.default,{glucoseReading:de,hasActivity:pe!==null,bloodGlucoseUnit:ae})]})]}),mt>A&&Me&&(0,E.jsx)(u.default,{prefixTestID:`scroll`,onSave:ft,onDelete:ft,onLayout:({nativeEvent:e})=>L(e.layout.height)})]}),(0,E.jsx)(x.default,{scrollToEnd:ft,isVisibleArrow:mt>A&&Ee,isVisibleBlur:mt>A&&!Oe&&!Ae}),(mt<=A||Ae)&&(0,E.jsx)(u.default,{prefixTestID:`fixed`,onSave:ce,onDelete:()=>Ue(!0),onLayout:({nativeEvent:e})=>L(e.layout.height)}),(0,E.jsx)(v.default,{isVisible:Ke,activityReduction:me.activityReduction,onPress:()=>qe(!1)}),(0,E.jsx)(g.default,{isVisible:He,onPressDelete:ct,onDismiss:at,onPressCancel:()=>Ue(!1)}),(0,E.jsx)(h.default,{isVisible:Xe,onPressClose:()=>Ze(!1)}),(0,E.jsx)(y.default,{isVisible:Je,onPressClose:()=>Ye(!1)}),(0,E.jsx)(_.default,{isVisible:Qe,onPressClose:ut})]})};e.RecommendationScreen=A;var ee=e=>(0,E.jsx)(w.LanguageProvider,{children:(0,E.jsx)(C.ColorSchemeProvider,{colorScheme:e.colorScheme,children:(0,E.jsx)(A,{...e})})}),te=n.StyleSheet.create({timeoutContainer:{flex:1,opacity:.5},scrollView:{flex:1},scrollViewContentContainer:{paddingBottom:32},content:{gap:32,paddingVertical:32},mainContainer:{borderRadius:16,marginHorizontal:16},carbsContainer:{paddingHorizontal:16}});e.default=ee})),K7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RecommendationScreenWrapper",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"SyncStatus",{enumerable:!0,get:function(){return t.SyncStatus}}),Object.defineProperty(e,"recommendationPropsSchema",{enumerable:!0,get:function(){return n.recommendationPropsSchema}});var t=r(byn()),n=yyn();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}}))();function q7(e,t){return+H2(e)<+H2(t)}function xyn(e,t){return+H2(e)==+H2(t)}function Syn(e){let{glucoseLevelTargets:t}=H6;if(t===void 0)throw Error(`[ParameterTimeIntervalsUtils::getBGLParameters] glucoseLevelTargets is undefined.`);let n=t.use===Y.Usage.Overall,{overallTargetBGL:r,targetBGLIntervals:i}=t;if(n){if(r===void 0)throw Error(`[ParameterTimeIntervalsUtils::getBGLParameters] overallTargetBGL cannot be undefined`);return r}if(i===void 0)throw Error(`[ParameterTimeIntervalsUtils::getBGLParameters] targetBGLIntervals cannot be undefined`);return wyn(e,i)}function Cyn(e){let t=H6.treatmentParameters?.use===Y.Usage.Overall,{treatmentParameters:n}=H6;if(n===void 0)throw Error(`[ParameterTimeIntervalsUtils::getInsulinParameters] treatmentParameters is undefined.`);return t?n.overallParameters:wyn(e,n.parameterIntervals)}function wyn(e,t){let n=Y6(e,`HH:mm`),r=Tyn(t),i=k7(n,`HH:mm`,new Date);for(let e=0;e<r.length;e++)if(Eyn(r[e],r[(e+1)%r.length],i))return t[e];throw Error(`[ParameterTimeIntervalsUtils::getDailyParameters] The parameter interval has not been found`)}function Tyn(e){let t=[];for(let n of e)t.push(k7(n.startTime,`HH:mm`,new Date));return t}function Eyn(e,t,n){let r=q7(e,t),i=xyn(e,n)||q7(e,n),a=Dyn(e),o=Dyn(t,!r),s=Dyn(n,!i);return a<=s&&s<o}function Dyn(e,t){return e.getMinutes()+(e.getHours()+(t?24:0))*60}V();var Oyn=1600;function kyn({setRemeasurementNotification:e}){let{t,language:n}=RK(),{colorScheme:r}=d0(),i=A5(),{selectedEventUUID:a}=h5(),{manualCarbsInput:o,foodIntakeCarbsAmount:s,saveCarbohydrates:c}=q8(),{noteId:l}=X8(),u=XQ(),d=(0,H.useRef)(!1),[f,p]=H.useState(!1),[m,h]=H.useState(null),[g,_]=H.useState(null),{glucoseUnit:v,injectionMethod:y,activity:b}=H6;if(v===void 0)throw Error(`[LoadingRecommendationScreen::render] glucoseUnit is undefined`);if(y===void 0)throw Error(`[LoadingRecommendationScreen::render] injectionMethod is undefined`);if(b===void 0)throw Error(`[LoadingRecommendationScreen::render] activity is undefined`);if(i===null)throw Error(`[LoadingRecommendationScreen::render] selectedGlucoseReading is undefined`);let x=(0,H.useMemo)(()=>i8.getRecentBoluses(),[]),S=(0,H.useMemo)(()=>a?F6.getByUUID(a):null,[a]),C=(0,H.useMemo)(()=>{if(!S?.startTimestamp)return null;let e={activitySettings:b,activityDate:new Date(S.startTimestamp),activityDuration:S.durationSeconds/60,activityIntensity:S.activityIntensity};try{return(0,N6.getReduction)(e.activityDuration,e.activitySettings,e.activityIntensity,e.activityDate),e}catch(e){return console.error(`Error calculating activity reduction for recommendation`,e),null}},[b,S]),w=(0,H.useMemo)(()=>{let{target:e}=Syn(new Date),{carbohydrateRatio:t,insulinSensitivity:a}=Cyn(new Date);return{bloodGlucoseUnit:v,injectionMethod:y,language:n,colorScheme:r,calculatorParams:{glucoseReading:i,activity:C,carbohydrateRatio:t,insulinSensitivity:a,carbohydrates:o+s,targetBGL:e,recentBoluses:x}}},[v,y,n,r,i,C,o,s,x]),T=(0,H.useCallback)(async()=>{let t=K7.recommendationPropsSchema.safeParse(w);if(!t.success){C6(S6.RecommendationInvalid),console.error(t.error),_(zK.Validation);return}try{let{activeInsulin:t,carbRecommendation:n,bolus:r,activityReduction:a,recentBolusesIds:u,recommendationDate:d}=(0,N6.calculateRecommendation)(w.calculatorParams),f=o+s,p=Q6(w.calculatorParams.glucoseReading.value,w.calculatorParams.glucoseReading.unit,Y.BloodGlucoseUnit.MMOL_L),m=(0,N6.roundInsulinValue)(r,w.injectionMethod),g=Math.round(n),v=i.source===`external`||i.source===`forecast`,y=null,b=null;try{let e=await c(d);y=e?.sampleId??null,b=e?.foodIntakeId??null}catch(e){console.error(`[LoadingRecommendationScreen::saveRecommendation] saveCarbohydrates failed:`,e)}let x=await i8.addLogbook(Van({blood_glucose_millimolar:p,blood_glucose_millimolar_sample_id:v?i.sampleId:null,glucose_sample_source_id:v?i.sourceId:null,entry_timestamp:d,event_uuid:S?S.uuid:null,is_bolus_calculation:!0,carbohydrates_suggested_grams:g,carbohydrates_entered_grams:f+g,carbohydrates_input_grams:f,carbohydrates_sample_id:y,carbohydrates_manual_grams:o||null,carbohydrates_food_grams:s||null,food_intake_id:b,insulin_entered_units:m,insulin_suggested_units:m,active_insulin:t,activity_reduction:a,active_insulin_source_logbook_ids:u,note_id:l}));if(x===null){_(zK.Sync);return}if(x.blood_glucose_millimolar!==null&&e!==void 0)try{await e(x.blood_glucose_millimolar)}catch(e){console.error(`[LoadingRecommendationScreen::saveRecommendation] Remeasurement reminder failed:`,e)}h(x),C6(S6.RecommendationSuccess)}catch(e){console.error(`[LoadingRecommendationScreen::saveRecommendation] Unexpected error:`,e),_(zK.System)}},[w,S,i,o,e,s,c,l]);return d.current||(d.current=!0,T().catch(console.error)),(0,H.useEffect)(()=>{setTimeout(()=>{p(!0)},Oyn)},[]),(0,H.useEffect)(()=>(u.setOptions({gestureEnabled:!1}),u.addListener(`beforeRemove`,({preventDefault:e})=>{f||e()})),[f,u]),(0,H.useEffect)(()=>{f&&m!==null&&g===null&&u.replace(Q.Recommendation,{...w,logbookEntry:zan(m)}),f&&g!==null&&u.navigate(Q.Calculation,{errorType:g})},[g,f,m,w,u]),(0,W.jsxs)(B,{style:J7.animationContainer,children:[(0,W.jsx)(S4,{autoPlay:!0,source:C4.LOADING_RECOMMENDATION,style:J7.animation,webStyle:J7.animation,resizeMode:`cover`,loop:!0}),(0,W.jsx)(X,{style:J7.text,children:t(`recommendation_loading_title`)})]})}var J7=R.create({animationContainer:{flex:1,justifyContent:`center`,alignItems:`center`},text:{...q.Poppins.bold_Base,marginTop:32},animation:{width:128,height:128}}),Ayn=S5(kyn),jyn=async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),5e3);try{return(await fetch(`${NK.HEDIA_API_URL}/ping`,{headers:UK,signal:e.signal})).ok}catch{return!1}finally{clearTimeout(t)}};V(),l0();function Myn(){let{COLORS:e}=J(),t=XQ(),n=QQ(),{manualCarbsInput:r,foodIntakeCarbsAmount:i}=q8(),{colorScheme:a}=d0(),[o,s]=(0,H.useState)(K7.SyncStatus.Idle),[c,l]=(0,H.useState)(K7.SyncStatus.Idle),[u,d]=(0,H.useState)(K7.SyncStatus.Idle),{bloodGlucoseUnit:f,calculatorParams:p,injectionMethod:m,language:h,logbookEntry:g}=n.params,[_,v]=(0,H.useState)(()=>Ban(g));uyt(),(0,H.useEffect)(()=>{t.setOptions({gestureEnabled:!1})},[t]);let y=(0,H.useCallback)(async(e,t)=>{d(K7.SyncStatus.Loading);let n=r+i,a=Van({..._,insulin_entered_units:t.modified??t.suggested,carbohydrates_overwritten_suggested_grams:e.modified,carbohydrates_entered_grams:n+(e.modified??e.suggested)}),o=await i8.addLogbook(a,_.uuid);o?(v(o),d(K7.SyncStatus.Success)):d(K7.SyncStatus.Failure)},[r,_,i]),b=(0,H.useCallback)(()=>{if(VK)throw Error(`Recommendation::handleOnCloseCalculationViewInLogbook] Cannot view-in-logbook on web`);t.popTo(Q.MainBottomTabs,{screen:Q.LogbooksTab,params:{logbookEntry:zan(_)}}),y5()},[t,_]),x=(0,H.useCallback)(()=>{VK?(window.location.href=`/redirect?status=success`,PK.clearAll()):t.popTo(Q.MainBottomTabs,{screen:Q.DashboardTab,params:{screen:Q.Dashboard}}),y5()},[t]),S=(0,H.useCallback)(async()=>{s(K7.SyncStatus.Loading);let e=await i8.deleteLogbook(_.uuid);VK?e?(window.location.href=`/redirect?status=success`,y5(),PK.clearAll()):s(K7.SyncStatus.Failure):(y5(),t.popTo(Q.MainBottomTabs,{screen:Q.DashboardTab,params:{screen:Q.Dashboard,params:{action:nyt.Deleted}}}))},[_.uuid,t]),C=(0,H.useCallback)(async()=>{l(K7.SyncStatus.Loading);let e=()=>{l(K7.SyncStatus.Success),y5(),t.replace(Q.LeavingRecommendation,{logbookEntry:zan(_)})};VK?await jyn()?e():l(K7.SyncStatus.Failure):e()},[t,_]);return(0,W.jsx)(c0,{style:[Nyn.container,{backgroundColor:e.bgPrimary}],children:(0,W.jsx)(K7.RecommendationScreenWrapper,{deleteStatus:o,saveStatus:c,editStatus:u,bloodGlucoseUnit:f,injectionMethod:m,language:h,colorScheme:a,calculatorParams:p,closeCalculationViewInlogbook:b,closeCalculationFooter:C,closeCalculationTimeoutModal:x,transferEditedRecommendation:y,deleteCalculation:S,trackExpandDetails:()=>{C6(S6.RecommendationViewDetailsPress)},trackRecommendationTimeout:()=>{C6(S6.RecommendationExpired)}})})}var Nyn=R.create({container:{flex:1}}),Pyn=e=>[`foods`,`curated`,e],Fyn=e=>{let{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:Pyn(e),queryFn:()=>hin(e),staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{curatedFoods:t,isCuratedFoodsLoading:n,isCuratedFoodsError:r,refetchCuratedFoods:i}},Iyn=e=>[`foods`,`categories`,e],Y7=()=>{let{language:e}=IK(),{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:Iyn(e),queryFn:()=>Sin(e),staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{foodCategories:t,isFoodCategoriesLoading:n,isFoodCategoriesError:r,refetchFoodCategories:i}},Lyn=()=>{let e=XQ().getParent(Q.NewCalculationStack),t=(0,H.useCallback)(()=>{e?.goBack()},[e]);return{isInCalculationFlow:e!==void 0,dismissFoodLibrary:t}},X7=e=>{let t=XQ(),{isInCalculationFlow:n,dismissFoodLibrary:r}=Lyn(),{addFoodIntakeItem:i}=q8(),{addExtraFoodItem:a}=v5();return{canAddToCalculation:n||!!e,addToCalculation:(0,H.useCallback)((o,s)=>{if(e){a({foodItem:o,amount:s}),n?r():t.popTo(Q.VisualSearch);return}i({foodItem:o,amount:s}),r()},[e,a,n,t,i,r])}},Ryn={tabBarHeight:0,paddingBottomScreenWithTabBar:0},Z7=kK()(jK(e=>({...Ryn,setTabBarHeight:t=>{e({tabBarHeight:t,paddingBottomScreenWithTabBar:t+24})},clear:()=>{e(Ryn)}}),{name:`DIMENSIONS_STORE`,storage:AK(FK)}));V();function zyn({icon:e,message:t}){let{COLORS:n}=J();return(0,W.jsxs)(B,{style:Byn.container,children:[e,(0,W.jsx)(X,{style:[Byn.message,{color:n.labelSecondary}],children:t})]})}var Byn=R.create({container:{flex:1,alignItems:`center`,justifyContent:`center`},message:{...q.Poppins.regular_SM,marginTop:13,textAlign:`center`}}),Q7=(0,H.memo)(zyn),Vyn=({item:e,expandable:t,isExpanded:n,onExpand:r,onPress:i,onAddToCalculation:a,testID:o})=>{let{t:s}=RK(),[c,l]=(0,H.useState)(``),u=l5(e.source===`personal`?e.imageId:null);(0,H.useEffect)(()=>{n||l(``)},[n]);let d=(0,H.useMemo)(()=>I6(Number(c||0),e.measures[0].gramsPerUnit,e.nutritionPer100g.carbohydrates.value),[c,e]),f=(0,H.useCallback)(()=>{a(e,Number(c)||0)},[a,e,c]);return(0,W.jsx)(I5t,{onPress:i,title:e.title,carbsPer100:e.nutritionPer100g.carbohydrates.value,unit:e.measures[0].unit,carbs:d,expandable:t,isExpanded:n,amount:c,imageUri:u,onAddPress:r,onChangeAmount:l,testID:o,children:n&&(0,W.jsx)(I2,{title:s(`foodAmount_button_addToCalculation`),disabled:!c,onPress:f,style:{marginTop:10}})})};V();var Hyn=()=>{let{COLORS:e,isDark:t}=J(),{t:n}=RK(),r=XQ(),{categoryId:i,subcategoryId:a,cameFromVisualSearch:o}=QQ().params,{canAddToCalculation:s,addToCalculation:c}=X7(o),l=U8(s&&HK),{bottomWithScroll:u}=B2(),{paddingBottomScreenWithTabBar:d}=Z7(),{foodCategories:f}=Y7(),p=f.find(e=>e.id===i),m=p?.subcategories.find(e=>e.id===a),{curatedFoods:h,isCuratedFoodsLoading:g}=Fyn(a||i),_=t?p?.color.dark:p?.color.light,v=(t?m?.color.dark:m?.color.light)||_;(0,H.useLayoutEffect)(()=>{r.setOptions({header:()=>(0,W.jsx)(G8,{title:m?.title||p?.title,LeftButton:(0,W.jsx)(Q8,{}),color:v,skipTopInset:s&&HK,overlay:!0})})},[r,m,p,v,s]);let[y,b]=(0,H.useState)(null),x=(0,H.useCallback)(({item:e})=>(0,W.jsx)(Vyn,{item:e,expandable:s,isExpanded:y===e.id,onExpand:()=>b(e.id),onPress:()=>{r.navigate(Q.CuratedFoodItem,{foodId:e.id,categoryId:a||i,cameFromVisualSearch:o})},onAddToCalculation:c,testID:`curated-food-item-${e.id}`}),[i,a,o,r,s,c,y]),S=(0,H.useCallback)(e=>(0,W.jsx)(L0t,{...e,bottomOffset:16}),[]);return(0,W.jsxs)(B,{style:[$7.screen,{backgroundColor:e.bgPrimary}],children:[v&&(0,W.jsx)(M2.default,{colors:[v,X2(v,0)],style:$7.gradient,pointerEvents:`none`}),g?(0,W.jsx)(w4,{}):(0,W.jsx)(nl,{style:$7.list,data:h,keyExtractor:e=>e.id,renderItem:x,contentContainerStyle:[$7.contentContainer,{paddingTop:l+8,paddingBottom:s?u:d}],scrollEventThrottle:16,keyboardShouldPersistTaps:`handled`,renderScrollComponent:S,ListEmptyComponent:(0,W.jsx)(Q7,{icon:(0,W.jsx)(z8t,{}),message:n(`food_empty_state_no_food`)})})]})},$7=R.create({screen:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},contentContainer:{gap:8,paddingHorizontal:16},list:{flex:1}}),Uyn=[Q.CuratedFoodItem,Q.PersonalFoodItem],Wyn=(e,t)=>{if(e.name!==t.name)return!1;let n=e.params,r=t.params;return n?.categoryId===r?.categoryId&&n?.subcategoryId===r?.subcategoryId},Gyn=(e,t)=>{let n=e.routes.filter(e=>!Uyn.includes(e.name)).map(e=>({name:e.name,params:e.params})),r=t[t.length-1],i=n.findIndex(e=>Wyn(e,r));if(i>=0)return n.slice(0,i+1);let a=t.filter(e=>!n.some(t=>Wyn(t,e)));return[...n,...a]},Kyn=()=>{let e=XQ();return(0,H.useCallback)(t=>{e.dispatch(e=>{let n=Gyn(e,t);return RQ({...e,routes:n,index:n.length-1})})},[e])};V(),O2();var qyn={ringSize:120,strokeWidth:10,gap:14},Jyn={ringSize:36,strokeWidth:4.5,gap:6},Yyn=({totalAmount:e=100,carbsValue:t,carbsUnit:n,size:r=`large`})=>{let{COLORS:i}=J(),{ringSize:a,strokeWidth:o,gap:s}=r===`large`?qyn:Jyn,c=(a-o)/2,l=2*Math.PI*c,u=a/2,d=Math.min(Math.max(t/e,0),1),f=Math.round(t*10)/10,p=d?s:s/2,m=l*d,h=(m+p)/l*360;return(0,W.jsxs)(B,{style:[e9.ringContainer,{width:a,height:a}],children:[(0,W.jsxs)(y2,{width:a,height:a,style:e9.ringSvg,children:[(0,W.jsx)(m2,{cx:u,cy:u,r:c,transform:`rotate(${h}, ${u}, ${u})`,stroke:i.border,strokeWidth:o,fill:`none`,strokeDasharray:[Math.max(l-m-p*2,0),l],strokeLinecap:`round`}),d>0&&(0,W.jsx)(m2,{cx:u,cy:u,r:c,stroke:i.bgFoodCarbsRing,strokeWidth:o,fill:`none`,strokeDasharray:[m,l-m],strokeLinecap:`round`})]}),r===`large`&&(0,W.jsx)(B,{style:e9.ringCenter,children:(0,W.jsxs)(X,{style:[e9.carbsNumber,{color:i.labelPrimary}],maxFontSizeMultiplier:g0.s0,children:[f,(0,W.jsx)(X,{style:[e9.carbsUnit,{color:i.labelPrimary}],children:n})]})})]})},e9=R.create({ringContainer:{alignItems:`center`,justifyContent:`center`},ringSvg:{transform:[{rotate:`-90deg`}],position:`absolute`},ringCenter:{alignItems:`center`,justifyContent:`center`},carbsNumber:{...q.Poppins.semiBold_4XL},carbsUnit:{...q.Poppins.medium_Base}});V();var Xyn=({title:e,color:t,iconUri:n,onPress:r})=>{let{COLORS:i}=J();return(0,W.jsxs)(_p,{style:[Zyn.pill,{borderColor:i.border,backgroundColor:t}],onPress:r,testID:`food-category-pill`,children:[!!n&&(0,W.jsx)(gd,{source:{uri:n},style:Zyn.icon}),(0,W.jsx)(X,{style:[Zyn.label,{color:i.textFoodCategoryPill}],children:e})]})},Zyn=R.create({pill:{flexDirection:`row`,alignItems:`center`,paddingVertical:6,paddingHorizontal:12,borderRadius:32,borderWidth:1},icon:{width:20,height:20,marginRight:4},label:{...q.Poppins.regular_XS}});V();var Qyn=`444`,$yn=({amount:e,onChangeAmount:t,unit:n,carbs:r,autoFocus:i=!1,testID:a})=>{let{t:o}=RK(),{COLORS:s}=J(),[c,l]=(0,H.useState)(!1),u=(0,H.useRef)(null),d=(0,H.useCallback)(()=>{c||u.current?.focus()},[c]);return(0,W.jsxs)(B,{style:t9.inputContainer,children:[(0,W.jsx)(X,{style:[t9.amountLabel,{color:s.labelPrimary}],children:o(`foodAmountInputField_weight`)}),(0,W.jsxs)(Kp,{accessible:!1,onPress:d,style:[t9.inputBox,{backgroundColor:s.bgVsInput,borderColor:c?s.borderInputFocus:s.border}],children:[n===`g`?(0,W.jsx)(t5t,{}):(0,W.jsx)(n5t,{}),(0,W.jsxs)(B,{style:t9.inputValue,children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(X,{"aria-hidden":!0,style:t9.inputSizer,children:Qyn}),(0,W.jsx)(k2,{ref:u,value:e,onChangeText:t,onFocusChange:l,autoFocus:i,selectTextOnFocus:!0,style:[t9.input,{color:s.labelPrimary}],testID:`${a}-food-input`})]}),(0,W.jsx)(X,{style:[t9.inputUnit,{color:s.labelSecondary}],children:n})]})]}),(0,W.jsx)(X,{style:[t9.carbsResult,{color:s.labelSecondary}],children:`= ${e?r:`-`} ${o(`my_food_add_unit`)}`})]})},t9=R.create({inputContainer:{alignItems:`center`,gap:8},amountLabel:{...q.Poppins.regular_Base,textAlign:`center`},inputBox:{alignSelf:`center`,flexDirection:`row`,alignItems:`center`,justifyContent:`center`,gap:10,paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:1},inputValue:{flexDirection:`row`,alignItems:`center`,gap:3},inputSizer:{...q.Poppins.medium_2XL,opacity:0},input:{position:`absolute`,top:0,bottom:0,left:0,right:0,...q.Poppins.medium_2XL,lineHeight:z.select({ios:0,default:q.Poppins.medium_2XL.lineHeight}),includeFontPadding:!1,textAlign:`right`,padding:0},inputUnit:{...q.Poppins.regular_Base},carbsResult:{...q.Poppins.regular_Base,textAlign:`center`}});V();var ebn=({amount:e,onChangeAmount:t,unit:n,carbs:r,onAdd:i,testID:a})=>{let{t:o}=RK(),{COLORS:s}=J();return(0,W.jsxs)(B,{style:[tbn.container,{borderColor:s.border,backgroundColor:s.bgInputLayer}],children:[(0,W.jsx)($yn,{amount:e,onChangeAmount:t,unit:n,carbs:r,autoFocus:!0,testID:a}),(0,W.jsx)(I2,{title:o(`foodAmount_button_addToCalculation`),onPress:i,disabled:!e,style:tbn.addButton})]})},tbn=R.create({container:{alignSelf:`stretch`,padding:16,gap:16,borderWidth:1,borderRadius:24},addButton:{alignSelf:`center`}});V();var nbn=56,rbn=20,ibn=100,n9=(e,t)=>{if(!e)return`-`;let n=e.value*t/100;return`${Math.round(n*10)/10} ${e.unit}`},abn=(e,t)=>{if(t)for(let n of e){if(n.id===t)return{...n,browseCategoryId:n.id};let e=n.subcategories.find(e=>e.id===t);if(e)return{...e,browseCategoryId:n.id}}},obn=()=>{let{t:e}=RK(),{params:t}=QQ(),{COLORS:n,isDark:r}=J(),{bottomWithScroll:i,topInsideModal:a}=B2(),o=XQ(),{canAddToCalculation:s,addToCalculation:c}=X7(t.cameFromVisualSearch),l=Kyn(),u=[r9.headerRow,{paddingTop:a}],d={paddingTop:a+nbn+rbn,paddingBottom:i},{food:f,isFoodLoading:p,isFoodError:m}=Run(t.foodId),{foodCategories:h}=Y7(),{foodIntakeItems:g}=q8(),[_,v]=(0,H.useState)(()=>{let e=g.find(e=>e.foodItem.id===t.foodId);return e?e.amount.toString():v5.getState().extraFoodItems.find(e=>e.foodItem.id===t.foodId)?.amount.toString()??null}),y=f?.source===`curated`?f:null;(0,H.useEffect)(()=>{y||p||m||o.goBack()},[y,p,m,o]);let b=(0,H.useMemo)(()=>y?I6(Number(_||0),y.measures[0].gramsPerUnit,y.nutritionPer100g.carbohydrates.value):0,[y,_]),x=abn(h,t.categoryId??y?.categoryId),S=r?x?.color.dark:x?.color.light,C=(0,H.useMemo)(()=>{if(!x)return;let e={name:Q.FoodSubcategories,params:{categoryId:x.browseCategoryId}};return x.id===x.browseCategoryId?[e]:[e,{name:Q.CuratedFood,params:{categoryId:x.browseCategoryId,subcategoryId:x.id}}]},[x]),w=(0,H.useCallback)(()=>{C&&l(C)},[C,l]),T=(0,H.useCallback)(()=>{y&&c(y,Number(_)||0)},[y,_,c]),E=s&&Number(_)>0?Number(_):ibn,D=(0,H.useMemo)(()=>{if(!y)return[];let t=E*y.measures[0].gramsPerUnit;return[{id:`1`,title:e(`food_library_item_carbohydrates`),value:n9(y.nutritionPer100g.carbohydrates,t)},{id:`2`,title:e(`food_library_item_energy`),value:n9(y.nutritionPer100g.energy,t)},{id:`3`,title:e(`food_library_item_protein`),value:n9(y.nutritionPer100g.protein,t)},{id:`4`,title:e(`food_library_item_sugar`),value:n9(y.nutritionPer100g.sugar,t)},{id:`5`,title:e(`food_library_item_fibers`),value:n9(y.nutritionPer100g.fibers,t)},{id:`6`,title:e(`food_library_item_fat`),value:n9(y.nutritionPer100g.fat,t)},{id:`7`,title:e(`food_library_item_sfat`),value:n9(y.nutritionPer100g.saturatedFat,t)}]},[e,y,E]);return y?(0,W.jsxs)(B,{style:r9.screen,children:[!!S&&(0,W.jsx)(M2.default,{colors:[S,X2(S,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsxs)(ys,{style:r9.scrollableContent,contentContainerStyle:d,keyboardDismissMode:`on-drag`,keyboardShouldPersistTaps:`handled`,children:[(0,W.jsxs)(B,{style:r9.topSection,children:[(0,W.jsx)(X,{style:[r9.title,{color:n.labelPrimary}],numberOfLines:2,children:y.title}),s?(0,W.jsx)(ebn,{amount:_||``,onChangeAmount:v,unit:y.measures[0].unit,carbs:b,onAdd:T,testID:`curated-food-item-input`}):(0,W.jsxs)(B,{style:r9.carbsContainer,children:[(0,W.jsx)(Yyn,{totalAmount:100,carbsValue:y.nutritionPer100g.carbohydrates.value,carbsUnit:y.nutritionPer100g.carbohydrates.unit}),(0,W.jsx)(X,{style:[r9.carbsLabel,{color:n.labelPrimary}],children:`${Math.round(y.nutritionPer100g.carbohydrates.value*10)/10} carbs / 100${y.nutritionPer100g.carbohydrates.unit}`})]})]}),(0,W.jsxs)(B,{style:r9.section,children:[!!x&&(0,W.jsxs)(B,{style:r9.categorySection,children:[(0,W.jsx)(X,{style:[r9.categorySectionTitle,{color:n.labelSecondary}],children:e(`food_library_info_category`)}),(0,W.jsx)(Xyn,{title:x.title,color:S,iconUri:x.icon,onPress:w})]}),(0,W.jsx)(X,{style:[r9.contentsTitle,{color:n.labelPrimary}],children:e(`food_library_carb_body`,{amount:E.toString(),unit:y.measures[0].unit})}),D.map(e=>(0,W.jsxs)(B,{style:[r9.contentsRow,{borderBottomColor:n.border}],children:[(0,W.jsx)(X,{style:[r9.contentsText,{color:n.labelSecondary}],children:e.title}),(0,W.jsx)(X,{style:[r9.contentsText,{color:n.labelSecondary}],children:e.value})]},e.id)),(0,W.jsx)(B,{style:[r9.contentsRow,{borderBottomColor:n.bgTransparent}],children:(0,W.jsx)(X,{style:[r9.contentsText,{color:n.labelSecondary}],children:`${e(`food_library_source`)} ${y.provider.name}`})})]})]}),(0,W.jsx)(B,{style:u,children:(0,W.jsx)($8,{})})]}):(0,W.jsxs)(B,{style:r9.screen,children:[!!S&&(0,W.jsx)(M2.default,{colors:[S,X2(S,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsx)(B,{style:r9.topSection,children:(0,W.jsx)(B,{style:u,children:(0,W.jsx)($8,{})})}),m?(0,W.jsx)(Q7,{icon:(0,W.jsx)(G8t,{}),message:e(`food_offline_state_default`)}):(0,W.jsx)(w4,{})]})},r9=R.create({screen:{flex:1},topSection:{alignItems:`center`,paddingHorizontal:16,marginBottom:32},headerRow:{position:`absolute`,top:0,left:0,right:0,flexDirection:`row`,justifyContent:`space-between`,paddingHorizontal:16,paddingBottom:10},title:{...q.Poppins.medium_2XL,textAlign:`center`,marginBottom:32,paddingHorizontal:16},carbsContainer:{alignItems:`center`},carbsLabel:{...q.Poppins.regular_Base,marginTop:12},scrollableContent:{flex:1},section:{paddingHorizontal:16},categorySection:{flexDirection:`row`,alignItems:`center`,marginBottom:45},categorySectionTitle:{...q.Poppins.regular_SM,marginRight:7},contentsTitle:{...q.Poppins.medium_Base,marginBottom:6},contentsRow:{flexDirection:`row`,justifyContent:`space-between`,paddingVertical:10,borderBottomWidth:1},contentsText:{...q.Poppins.regular_Base}}),sbn=[`foods`,`recent`],cbn=e=>{let{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:sbn,queryFn:gin,enabled:e,networkMode:`offlineFirst`,retry:3});return{recentFoods:t,isRecentFoodsLoading:n,isRecentFoodsError:r,refetchRecentFoods:i}};V();var lbn=({onPress:e,title:t,description:n,imageUrl:r,color:i})=>{let{COLORS:a}=J();return(0,W.jsxs)(_p,{style:[i9.row,{backgroundColor:a.bgSecondary,borderColor:a.buttonBorder}],onPress:e,children:[(0,W.jsx)(B,{style:[i9.imageContainer,{backgroundColor:i}],children:(0,W.jsx)(gd,{source:{uri:r},style:i9.categoryImage,resizeMode:`contain`})}),(0,W.jsxs)(B,{style:i9.textContainer,children:[(0,W.jsx)(X,{style:[i9.title,{color:a.labelPrimary}],numberOfLines:1,ellipsizeMode:`tail`,children:t}),!!n&&(0,W.jsx)(X,{style:[i9.description,{color:a.labelSecondary}],numberOfLines:2,ellipsizeMode:`tail`,children:n})]}),(0,W.jsx)(z2,{width:18,height:18,color:a.labelTertiary})]})},i9=R.create({row:{flexDirection:`row`,alignItems:`center`,borderRadius:16,borderWidth:1,paddingRight:12,paddingVertical:4,paddingLeft:4},imageContainer:{width:80,height:80,borderRadius:12,overflow:`hidden`,alignItems:`center`,justifyContent:`center`,flexShrink:0},categoryImage:{width:68,height:68},textContainer:{flex:1,paddingHorizontal:12,justifyContent:`center`},title:{...q.Poppins.medium_Base},description:{...q.Poppins.regular_SM,marginTop:2}});V();var ubn=VK?{outlineStyle:`none`}:{},dbn=({isSearchActive:e,onSearch:t,onClear:n,onFocus:r,onBlur:i})=>{let{t:a}=RK(),{COLORS:o}=J(),s=(0,H.useRef)(null),[c,l]=(0,H.useState)(``),u=F2t(t,300),d=(0,H.useCallback)(()=>{u.cancel(),l(``),s.current?.blur(),n()},[u,n]),f=(0,H.useCallback)(()=>{c.length>2&&(u.cancel(),t(c))},[u,t,c]),p=(0,H.useCallback)(e=>{if(l(e),e.length>2){u(e);return}u.cancel(),t(e)},[u,t]),m=(0,H.useCallback)(()=>{s.current?.focus()},[]);return(0,W.jsxs)(Kp,{style:[fbn.container,{backgroundColor:o.bgInputActive,borderColor:o.buttonBorder}],onPress:m,accessible:!1,children:[(0,W.jsx)(J8t,{height:24,width:24}),(0,W.jsx)(am,{ref:s,testID:`food-searchbar-input`,autoCapitalize:`none`,placeholder:a(`food_search_title`),placeholderTextColor:o.labelSecondary,cursorColor:o.textSearchText,maxFontSizeMultiplier:g0.s3,style:[fbn.searchInput,{color:o.textSearchText}],multiline:!1,maxLength:64,value:c,onChangeText:p,onSubmitEditing:f,onFocus:r,onBlur:i,autoCorrect:!1,enterKeyHint:`search`}),(e||c.length>0)&&(0,W.jsx)(Kp,{testID:`food-searchbar-clear`,onPress:d,hitSlop:10,children:(0,W.jsx)(F8t,{color:o.labelSecondary,width:16,height:16})})]})},fbn=R.create({container:{flex:1,flexDirection:`row`,alignItems:`center`,height:48,borderRadius:16,borderWidth:1,paddingLeft:16,paddingRight:12,gap:4},searchInput:{...q.Poppins.regular_Base,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),flex:1,includeFontPadding:!1,...ubn}});V();function pbn({showScanButton:e,isSearchActive:t,onSearch:n,onClearSearch:r,onSearchFocus:i,onSearchBlur:a,onScanFoodPress:o}){return(0,W.jsxs)(B,{style:mbn.row,children:[(0,W.jsx)(dbn,{isSearchActive:t,onSearch:n,onClear:r,onFocus:i,onBlur:a}),e&&!VK&&(0,W.jsx)(R7t,{onPress:o,style:{width:48,height:48}})]})}var mbn=R.create({row:{flexDirection:`row`,alignItems:`center`,gap:10,paddingVertical:12}}),hbn=(0,H.memo)(pbn),gbn=`data:image/webp;base64,UklGRqwGAABXRUJQVlA4TJ8GAAAvM8AMEE0oaCNJyfE9jH/DDxYi+j8BcoXDgFIRnRNExMNMfhdsG0lS1PlHeWTxmWMd/8fANpIkJ2O+1hINFvkHR2EybiNJUS3lnyLjMcOr/wl8tTEewt/BAkAPrxMxpqpjHe8PAP1ae4kmWI6hfjMAAFyvxokxwBUa+AHdaPsfScr7/bp79MytRMMUrhaBQCgUCWASgJaW1kQBCeBJT2tYvT37+30WVT1jnkW5tm3VtjLmXHufe7+7G64JkBYhEJJrkQjcE6DkdmWvSce2bdVWNcZauENII3QLnRxCqAq1okSWu/uXI2tKAQSAAJx72zabjZnRthW35PxtzbbtJdu2bdsTAAQAbif1O88Cf/joSeqdl87l3z9OJT++nfn54tsfXwL//+e5T04FvHCx0tubF7Kamv8t/z559pMPr4F/W/ri0Z2ku+6fH/7iu48nPfjWmzbst8q4lkouWvfVB19L7h+HLjz99Ym9wC8AAPAQHfz2C+eHXF1ex55cSF6yxmlqcfH4h8OLB1/EWlcvLx9dCbzcxjuvPGz1mpYFZ3Uy7Z9d2PBWGHHjiTrbkbO0/f98TMHyV0YC7wDN3xX39f2LC/68cqDP6eVFzEU7MZ6aDqwKy/0R81G3upXxwP7h3n3+Yee3D//MOKH1bJA2BbUKiGhYtYfRzW4V9K69m6978fE1Xz5/a8PJDbuc7RfaL9r5r/GIeY3FGAcbjicWuyMuxvEP05MDgL1Dvf/K7cKPfv86u/3vjytwOY/ZDJSRGiayADE94vi3xfmtA/7scxu++f6Wy4f0qct/abeo/UJzMZ2bicdsK4e7sZ5xzyyaR/0xzz4xtgPuDgO8L3fW/Sfi9g67mx59IxsmkkjCQg30Ku2IdcpvTbvv/q3UeVbd1jYarkC7JLJGKQzKmHrcajTT2MSpgGEPr526DMnbX9Gs6BvXZ0FUB27JQGFKb5w3FlVGGv9N+NTKoxTSMCMBGkWkYQeOsWKy0Gt6nv1zvHgQ4MPk4tnLez4UsTpHdXghT0jCkntIUSo2JPXgPxBVptU2QWUUQSIJNJwoiiwDCSPUCJOa+NXVpWEQ4PKPh583JtWmKILqqEZGpUFgVBoV0UrrElXKqLDRyN7RwxIaTliBhSWhUXiEhHPhGygdBNj395xPY6tzNIhWtiBEKSE1FCm4URQwyqAiGGrYsHcCAA80ChdCUAEUlL9mGY+UDgKsOdsffNjNg2ZBC0Sj5cgMjIjoKBcEFirINBE0ymFCSIJKIaAIIUphNEa5nezQbYQPAqz4tf89rt0hE6s1BNQgyh4CMrAcCRhVC3aKEIoIFVFUAEBoQKWQWqBSjtYX/jv4YhBgC/PIoubicd1onVtIplUAMGFLVrgYlARBVA4bShDYzQoUCC5IESoUbGU11QHt6NODAI4vzvUT/fv3siIFqxRRGe5SIKNSkChg4EYlChmgnYEFCBxYKKLECFeRpIEGfq+LncOcfvnmyCQH7riKrXQQODBygw6nEBjQxQlnAMQwAQKgQEWO8MAKS5ZmtLMs4M7FF8+3DwN8n61ePN43j5Ah5ABAg4WKACyQAhBSCoGMQCHIoEYYUnEhQFPhKvM95offcwAD3zuzfEk/bqZiBIVKFLJkBCAFoQRSICwRESGUYCTBJQoEAlXRDt3CR3ddyMyhgBcraN7bDguLCgW5lJIjEkQV4EFQiQoUgKzAIQTNcweQUEMQexN7nemAwZ8596ID2D2bB7UGCbeUFpFaDjhDEQCCiBaEHBKQLAUKASMqZlN75+w++uXntuGA309dOjZxvR18NqlmQIdSKqjIQBksAKRBZAIQDgq4oBBSQTVa457B0/VaJwC2CNxaw5A7L/SnDR2sEsBpRqYkcIIEhBNmCFHhAhYSEo4wjisfV7UOA2z3+VceDdssI7KRoIATMGCjHk44g4DAwCkSABYceMU1RF5QuYBts7bYDQS7EWd5yex0Dp1R3bxEDxIAlqIlFyOWEoP7IgGwdYsAZoWzKsBBKtCOjmRUN7fczZKQJASEUqkuPiUIsIs3iz9F/uFRikSZqNUKpGABgzk0FJSyf6n6B9hJ4H9/5lvhr0pxitemVqsF94AIF4xOWuLPXvUVsKsb+l0DP2jk2rmLD+AICDw6YwGfj7qbAbvr5E0jviaoII/DPVAZzbJHvTw8ZSpwdIcAk215dnPYrrWzEvsT8lhGlOk5h4+3TAKuA3b6E16Evv/m00G/eBuu3oMWbEse+vzVSuAnYNdtAwiA/4DbHgEA`;V();var _bn=({onPress:e})=>{let{COLORS:t}=J(),{t:n}=RK();return(0,W.jsxs)(_p,{style:[a9.container,{backgroundColor:t.bgSecondary,borderColor:t.buttonBorder}],onPress:e,children:[(0,W.jsx)(B,{style:[a9.imageContainer,{backgroundColor:t.bgMyFoodCategory}],children:(0,W.jsx)(gd,{source:gbn,style:a9.heartImage})}),(0,W.jsx)(X,{style:[a9.title,{color:t.labelPrimary}],numberOfLines:1,children:n(`food_segment_button_my_food`)}),(0,W.jsx)(z2,{width:18,height:18,color:t.labelTertiary})]})},a9=R.create({container:{flexDirection:`row`,alignItems:`center`,borderRadius:16,borderWidth:1,paddingLeft:4,paddingRight:12,paddingVertical:4,gap:12},imageContainer:{width:80,height:52,borderRadius:12,alignItems:`center`,justifyContent:`center`,flexShrink:0},heartImage:{width:52,height:52},title:{...q.Poppins.medium_Base,flex:1}});V();var vbn=e=>`measures`in e,ybn=()=>qf.dismiss(),bbn=()=>{let{t:e}=RK(),{COLORS:t,isDark:n}=J(),{paddingBottomScreenWithTabBar:r}=Z7(),{bottomWithScroll:i}=B2(),a=XQ(),o=QQ(),{isInCalculationFlow:s}=Lyn(),{canAddToCalculation:c,addToCalculation:l}=X7(o.params?.cameFromVisualSearch),u=U8(c&&HK),[d,f]=(0,H.useState)(``),[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(null),_=!s&&!o.params?.cameFromVisualSearch,v=d.length>2,y=`categories`;p&&v?y=`searchResults`:p&&(y=`recentFoods`);let{foodCategories:b,isFoodCategoriesError:x}=Y7(),{recentFoods:S,isRecentFoodsLoading:C,isRecentFoodsError:w}=cbn(y===`recentFoods`),{foodSearchResults:T,isFoodSearchLoading:E,isFoodSearchError:D}=Bun(d);(0,H.useLayoutEffect)(()=>{a.setOptions({headerTransparent:!0,header:()=>(0,W.jsx)(G8,{title:e(`food_library_sheet_navigation`),LeftButton:c?(0,W.jsx)($8,{}):void 0,color:t.bgPrimary,skipTopInset:c&&HK,overlay:!0})})},[a,e,c,t]);let O=(0,H.useCallback)(()=>{m(!0)},[]),k=(0,H.useCallback)(()=>{f(``),g(null),m(!1)},[]),A=(0,H.useCallback)(()=>{if(C6(S6.FoodLibraryScanFoodPress),!v5.getState().privacyNoticeAccepted){a.navigate(Q.VisualSearchIntro);return}a.navigate(Q.VisualSearch)},[a]),ee=(0,H.useCallback)(()=>{a.navigate(Q.PersonalFood,{cameFromVisualSearch:o.params?.cameFromVisualSearch})},[a,o.params]),te=(0,H.useCallback)(({item:e})=>{if(vbn(e))return(0,W.jsx)(Vyn,{item:e,expandable:c,isExpanded:h===e.id,onExpand:()=>g(e.id),onPress:()=>{e.source===`curated`?a.navigate(Q.CuratedFoodItem,{foodId:e.id,categoryId:e.categoryId,cameFromVisualSearch:o.params?.cameFromVisualSearch}):a.navigate(Q.PersonalFoodItem,{foodId:e.id,cameFromVisualSearch:o.params?.cameFromVisualSearch})},onAddToCalculation:l,testID:`food-search-item-${e.id}`});let t=()=>{a.navigate(Q.FoodSubcategories,{categoryId:e.id,cameFromVisualSearch:o.params?.cameFromVisualSearch})},r=e.color.light;return n&&(r=e.color.dark),(0,W.jsx)(lbn,{onPress:t,title:e.title,description:e.description,imageUrl:e.icon,color:r})},[c,a,o.params,l,h,n]),ne=T;y===`categories`?ne=b:y===`recentFoods`&&(ne=S);let re=(0,H.useMemo)(()=>{let t=(0,W.jsx)(Q7,{icon:(0,W.jsx)(G8t,{}),message:e(`food_offline_state_default`)});return y===`categories`?x?t:null:y===`recentFoods`?w?t:C?(0,W.jsx)(w4,{}):null:D?t:E?(0,W.jsx)(w4,{}):(0,W.jsx)(Q7,{icon:(0,W.jsx)(z8t,{}),message:e(`food_empty_state_no_food`)})},[y,x,w,C,D,E,e]),ie=(0,H.useCallback)(e=>(0,W.jsx)(L0t,{...e,bottomOffset:16}),[]),j=(0,H.useMemo)(()=>[o9.contentContainer,{paddingTop:u,paddingBottom:c?i:r}],[u,c,i,r]),ae=(0,W.jsxs)(B,{style:o9.listHeader,children:[(0,W.jsx)(hbn,{showScanButton:_,isSearchActive:p,onSearch:f,onClearSearch:k,onSearchFocus:O,onScanFoodPress:A}),y===`categories`&&(0,W.jsx)(_bn,{onPress:ee}),y===`recentFoods`&&S.length>0&&(0,W.jsxs)(B,{style:o9.recentTitleRow,children:[(0,W.jsx)(q8t,{width:16,height:16}),(0,W.jsx)(X,{style:[o9.recentTitle,{color:t.labelPrimary}],children:e(`food_library_frequent_title`)})]})]});return(0,W.jsxs)(B,{style:[o9.screen,{backgroundColor:t.bgPrimary}],children:[(0,W.jsx)(M2.default,{colors:[t.bgPrimary,X2(t.bgPrimary,0)],style:o9.gradient,pointerEvents:`none`}),(0,W.jsx)(nl,{style:o9.list,data:ne,keyExtractor:e=>e.id,renderItem:te,ListHeaderComponent:ae,ListEmptyComponent:re,contentContainerStyle:j,keyboardDismissMode:VK?`none`:`on-drag`,keyboardShouldPersistTaps:`handled`,onScroll:VK?ybn:void 0,renderScrollComponent:ie,scrollEventThrottle:16})]})},o9=R.create({screen:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},contentContainer:{gap:8,flexGrow:1,paddingHorizontal:16},listHeader:{gap:8},recentTitleRow:{flexDirection:`row`,alignItems:`center`,gap:8},recentTitle:{...q.Poppins.medium_SM},list:{flex:1}});V();var xbn=()=>{let e=QQ(),t=XQ(),{categoryId:n,cameFromVisualSearch:r}=e.params,{canAddToCalculation:i}=X7(r),{COLORS:a,isDark:o}=J(),{bottomWithScroll:s}=B2(),{paddingBottomScreenWithTabBar:c}=Z7(),l=U8(i&&HK),{foodCategories:u}=Y7(),d=u.find(e=>e.id===n),f=o?d?.color.dark:d?.color.light;(0,H.useLayoutEffect)(()=>{t.setOptions({header:()=>(0,W.jsx)(G8,{title:d?.title,LeftButton:(0,W.jsx)(Q8,{}),color:f,skipTopInset:i&&HK,overlay:!0})})},[t,d,f,i]);let p=(0,H.useCallback)((e,n)=>{t.navigate(Q.CuratedFood,{categoryId:n,subcategoryId:e,cameFromVisualSearch:r})},[t,r]),m=(0,H.useCallback)(({item:e})=>(0,W.jsx)(lbn,{onPress:()=>p(e.id,d?.id),title:e.title,imageUrl:e.icon,color:f??a.bgPrimary}),[a,d,f,p]);return(0,W.jsxs)(B,{style:[s9.screen,{backgroundColor:a.bgPrimary}],children:[f&&(0,W.jsx)(M2.default,{colors:[f,X2(f,0)],style:s9.gradient,pointerEvents:`none`}),(0,W.jsx)(nl,{data:d?.subcategories??[],keyExtractor:e=>e.id,renderItem:m,style:s9.list,contentContainerStyle:[s9.contentContainer,{paddingTop:l+8,paddingBottom:i?s:c}],scrollEventThrottle:16})]})},s9=R.create({screen:{flex:1},list:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},contentContainer:{gap:8,paddingHorizontal:16,flexGrow:1}});V();var Sbn=()=>{let{COLORS:e}=J(),{t}=RK(),n=XQ(),{params:r}=QQ(),{canAddToCalculation:i,addToCalculation:a}=X7(r?.cameFromVisualSearch),o=U8(i&&HK),{bottomWithScroll:s}=B2(),{paddingBottomScreenWithTabBar:c}=Z7(),{personalFoods:l,isPersonalFoodsLoading:u}=Fun(),d=l.length===0;(0,H.useLayoutEffect)(()=>{n.setOptions({header:()=>(0,W.jsx)(G8,{title:t(`food_myFood_title`),LeftButton:(0,W.jsx)(Q8,{}),color:e.bgMyFoodCategory,skipTopInset:i&&HK,overlay:!0})})},[n,e,i,t]);let f=(0,H.useCallback)(()=>{n.navigate(Q.CreateFood)},[n]),[p,m]=(0,H.useState)(null),h=(0,H.useCallback)(({item:e})=>(0,W.jsx)(Vyn,{item:e,expandable:i,isExpanded:p===e.id,onExpand:()=>m(e.id),onPress:()=>{n.navigate(Q.PersonalFoodItem,{foodId:e.id,cameFromVisualSearch:r?.cameFromVisualSearch})},onAddToCalculation:a,testID:`personal-food-item-${e.id}`}),[i,n,r?.cameFromVisualSearch,a,p]),g=(0,H.useCallback)(e=>(0,W.jsx)(L0t,{...e,bottomOffset:16}),[]);return(0,W.jsxs)(B,{style:[c9.screen,{backgroundColor:e.bgPrimary}],children:[(0,W.jsx)(M2.default,{colors:[e.bgMyFoodCategory,X2(e.bgMyFoodCategory,0)],style:c9.gradient,pointerEvents:`none`}),u?(0,W.jsx)(w4,{}):(0,W.jsx)(nl,{data:l,keyExtractor:e=>e.id,renderItem:h,style:c9.list,contentContainerStyle:[c9.contentContainer,d?{justifyContent:`center`,paddingTop:o+8,paddingBottom:i?o+8:c}:{paddingTop:o+8,paddingBottom:i?s:c}],scrollEventThrottle:16,keyboardShouldPersistTaps:`handled`,renderScrollComponent:g,ListEmptyComponent:(0,W.jsx)(B,{children:(0,W.jsx)(Q7,{icon:(0,W.jsx)(z8t,{}),message:t(`food_myFood_empty_state_default`)})}),ListFooterComponent:(0,W.jsx)(I2,{title:t(`food_button_createFood`),onPress:f,type:F2.Secondary})})]})},c9=R.create({screen:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},list:{flex:1},contentContainer:{flexGrow:1,gap:8,paddingHorizontal:16}});V();var Cbn=()=>{let{t:e}=RK(),t=XQ(),{params:n}=QQ(),{COLORS:r}=J(),{topInsideModal:i}=B2(),{canAddToCalculation:a,addToCalculation:o}=X7(n.cameFromVisualSearch),s=Kyn(),c=(0,H.useCallback)(()=>{s([{name:Q.PersonalFood}])},[s]),l=[l9.headerRow,{paddingTop:i}],{foodIntakeItems:u}=q8(),{food:d,isFoodLoading:f,isFoodError:p}=Run(n.foodId),[m,h]=(0,H.useState)(()=>{let e=u.find(e=>e.foodItem.id===n.foodId);return e?e.amount.toString():v5.getState().extraFoodItems.find(e=>e.foodItem.id===n.foodId)?.amount.toString()??null}),g=d?.source===`personal`?d:null,_=l5(g?g.imageId:null);(0,H.useEffect)(()=>{g||f||p||t.goBack()},[g,f,p,t]);let v=(0,H.useCallback)(()=>{g&&t.navigate(Q.CreateFood,{personalFoodId:g.id})},[t,g]),y=(0,H.useMemo)(()=>g?I6(Number(m||0),g.measures[0].gramsPerUnit,g.nutritionPer100g.carbohydrates.value):0,[g,m]),b=(0,H.useCallback)(()=>{g&&o(g,Number(m)||0)},[g,m,o]);if(!g)return(0,W.jsxs)(B,{style:l9.screen,children:[(0,W.jsxs)(B,{style:l9.gradient,children:[(0,W.jsx)(M2.default,{colors:[r.bgMyFoodCategory,X2(r.bgMyFoodCategory,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsx)(B,{style:l,children:(0,W.jsx)($8,{})})]}),p?(0,W.jsx)(Q7,{icon:(0,W.jsx)(G8t,{}),message:e(`food_offline_state_default`)}):(0,W.jsx)(w4,{})]});let x=`${Math.round(g.nutritionPer100g.carbohydrates.value*10)/10} carbs / 100${g.nutritionPer100g.carbohydrates.unit}`;return(0,W.jsxs)(B,{style:l9.screen,children:[(0,W.jsxs)(B,{style:l9.gradient,children:[(0,W.jsx)(M2.default,{colors:[r.bgMyFoodCategory,X2(r.bgMyFoodCategory,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsxs)(B,{style:l,children:[(0,W.jsx)($8,{}),(0,W.jsx)(Aun,{onPress:v})]}),(0,W.jsx)(X,{style:[l9.title,a&&l9.titleInCalculation,{color:r.labelPrimary}],numberOfLines:2,children:g.title}),a?(0,W.jsx)(B,{style:l9.inputCardSection,children:(0,W.jsx)(ebn,{amount:m||``,onChangeAmount:h,unit:g.measures[0].unit,carbs:y,onAdd:b,testID:`personal-food-item-input`})}):(0,W.jsxs)(B,{style:l9.carbsContainer,children:[(0,W.jsx)(Yyn,{totalAmount:100,carbsValue:g.nutritionPer100g.carbohydrates.value,carbsUnit:g.nutritionPer100g.carbohydrates.unit}),(0,W.jsx)(X,{style:[l9.carbsLabel,{color:r.labelPrimary}],children:x})]})]}),(0,W.jsxs)(B,{style:l9.section,children:[(0,W.jsxs)(B,{style:l9.categoryRow,children:[(0,W.jsx)(X,{style:[l9.categorySectionTitle,{color:r.labelSecondary}],children:e(`food_library_info_category`)}),(0,W.jsx)(Xyn,{title:e(`food_segment_button_my_food`),color:r.bgMyFoodCategory,onPress:c})]}),(0,W.jsx)(B,{style:[l9.divider,{backgroundColor:r.border}]}),a&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:l9.carbsInfoRow,children:[(0,W.jsx)(X,{style:[l9.carbsInfoLabel,{color:r.labelPrimary}],children:x}),(0,W.jsx)(Yyn,{size:`small`,totalAmount:100,carbsValue:g.nutritionPer100g.carbohydrates.value,carbsUnit:g.nutritionPer100g.carbohydrates.unit})]}),(0,W.jsx)(B,{style:[l9.divider,{backgroundColor:r.border}]})]}),(!!g.description||!!_)&&(0,W.jsxs)(B,{style:l9.notesRow,children:[!!g.description&&(0,W.jsx)(X,{style:[l9.description,{color:r.labelSecondary}],children:g.description}),!!_&&(0,W.jsx)(gd,{source:{uri:_},style:l9.foodImage,resizeMode:`cover`})]})]})]})},l9=R.create({screen:{flex:1},gradient:{alignItems:`center`},headerRow:{flexDirection:`row`,justifyContent:`space-between`,alignSelf:`stretch`,paddingHorizontal:16,paddingBottom:10,marginBottom:20},title:{...q.Poppins.medium_2XL,textAlign:`center`,marginBottom:32,paddingHorizontal:16},titleInCalculation:{marginBottom:22},inputCardSection:{alignSelf:`stretch`,paddingHorizontal:16},carbsContainer:{alignItems:`center`},carbsLabel:{...q.Poppins.regular_Base,marginTop:12},notesRow:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:16,gap:8},description:{...q.Poppins.regular_SM,flex:1},foodImage:{width:64,height:64,borderRadius:8},section:{paddingHorizontal:16,marginTop:32,gap:16},categoryRow:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:16},categorySectionTitle:{...q.Poppins.regular_SM,marginRight:7},divider:{height:1},carbsInfoRow:{flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`,paddingHorizontal:16},carbsInfoLabel:{...q.Poppins.regular_Base,flex:1}}),{Group:wbn,Navigator:Tbn,Screen:u9}=V8();function Ebn(){return(0,W.jsxs)(Tbn,{screenOptions:{...n5,header:()=>null,...d8},children:[(0,W.jsx)(u9,{name:Q.FoodAndDrink,component:bbn}),(0,W.jsx)(u9,{name:Q.FoodSubcategories,component:xbn,options:{headerTransparent:!0}}),(0,W.jsx)(u9,{name:Q.PersonalFood,component:Sbn,options:{headerTransparent:!0}}),(0,W.jsx)(u9,{name:Q.CuratedFood,component:Hyn,options:{headerTransparent:!0}}),(0,W.jsxs)(wbn,{screenOptions:{...won,headerShown:!1,gestureEnabled:!1},children:[(0,W.jsx)(u9,{name:Q.PersonalFoodItem,component:Cbn}),(0,W.jsx)(u9,{name:Q.CuratedFoodItem,component:obn})]})]})}var{Navigator:Dbn,Screen:d9}=V8();function Obn(){let{COLORS:e}=J();return(0,W.jsxs)(Dbn,{id:`NewCalculationStack`,screenOptions:{headerShown:!1,...d8},children:[(0,W.jsx)(d9,{name:Q.Calculation,component:Tvn,options:{headerShown:!0,cardStyle:{flex:1}}}),(0,W.jsx)(d9,{name:Q.LoadingRecommendation,component:Ayn}),(0,W.jsx)(d9,{name:Q.Recommendation,component:Myn,options:{...n5,headerStyle:{backgroundColor:e.bgSheet},headerShown:!1}}),(0,W.jsx)(d9,{name:Q.LeavingRecommendation,component:Dvn}),(0,W.jsx)(d9,{name:Q.FoodLibrary,component:Ebn,options:{...Mun,...Mon,headerShown:!1,gestureEnabled:!1}})]})}var kbn=Y.Milliseconds.Minute*20,Abn=()=>{let{pinCode:e,settingsUnlockedTimestamp:t,setSettingsUnlockedTimestamp:n}=z4(),r=(0,H.useMemo)(()=>t===null||Date.now()-t>kbn,[t]);i$((0,H.useCallback)(()=>{if(t===null)return;let e=kbn-(Date.now()-t);if(e<=0)return;let r=setTimeout(()=>n(null),e);return()=>clearTimeout(r)},[t,n]));let i=(0,H.useCallback)(()=>{n(Date.now())},[n]),a=(0,H.useCallback)(()=>{n(null)},[n]);return{areSettingsLocked:r,isPINSet:!!e,unlockSettings:i,lockSettings:a}};V();var jbn=()=>{let{t:e}=RK(),{COLORS:t}=J();return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{style:[f9.header,f9.firstHeaderSpacing],testID:`activity-info-title`,children:e(`physical_activity_modal_activity_insulin_title`)}),(0,W.jsx)(X,{style:[{color:t.labelSecondary},f9.spacing],children:e(`physical_activity_modal_activity_insulin_body`)}),(0,W.jsx)(X,{style:f9.header,children:e(`physical_activity_modal_adjust_insulin_title`)}),(0,W.jsx)(X,{style:[{color:t.labelSecondary},f9.spacing],children:e(`physical_activity_modal_adjust_insulin_body`)})]})},f9=R.create({header:{...q.Poppins.semiBold_2XL,marginBottom:8},firstHeaderSpacing:{marginTop:32},spacing:{marginBottom:32}});V();var p9=({text:e,learnMoreText:t,learnMoreOnPress:n})=>{let{t:r}=RK(),{COLORS:i}=J();return(0,W.jsxs)(B,{style:[m9.card,{backgroundColor:i.bgSecondary}],children:[(0,W.jsx)(e5t,{}),(0,W.jsxs)(B,{style:m9.rightContainer,children:[(0,W.jsx)(X,{style:[m9.contactText,{color:i.labelPrimary}],children:e??r(`warning_HCP`)}),t!==void 0&&n!==void 0&&(0,W.jsx)(_p,{onPress:n,style:m9.learnMoreContainer,children:(0,W.jsx)(X,{style:[m9.learnMoreText,{color:i.textLink}],children:t})})]})]})},m9=R.create({card:{borderRadius:16,paddingHorizontal:16,paddingVertical:12,flexDirection:`row`,gap:8},rightContainer:{flex:1,gap:8},learnMoreContainer:{flexDirection:`row`,alignItems:`center`,gap:4},contactText:{flexShrink:1,...q.Poppins.medium_SM},learnMoreText:{flexShrink:1,...q.Poppins.semiBold_SM}});V();var h9=4,Mbn=({onFinish:e,ref:t})=>{let{COLORS:n}=J(),{colorScheme:r}=d0(),i=(0,H.useRef)(Array.from({length:h9},()=>H.createRef())),[a,o]=(0,H.useState)(()=>Array.from({length:h9},()=>``)),[s,c]=(0,H.useState)(0),[l,u]=(0,H.useState)(null);(0,H.useImperativeHandle)(t,()=>({resetDigits(){o(Array.from({length:h9},()=>``)),c(0),u(null),i.current[0].current?.focus()},displayError(e){u(e)}}),[i]);let d=(0,H.useCallback)((e,t)=>{let n=e.replace(/[^0-9]/g,``),r=[...a];r[t]=n,o(r),u(null),n&&t<i.current.length-1&&i.current[t+1].current?.focus(),!e&&t!==0&&i.current[t-1].current?.focus()},[a,i]),f=(0,H.useCallback)(e=>{a[e]===``&&e!==0&&i.current[e-1].current?.focus()},[a,i]);return(0,H.useEffect)(()=>{let t=a.join(``);t.length===h9&&e(t)},[a,e]),(0,W.jsxs)(B,{children:[(0,W.jsx)(B,{style:Nbn.inputContainer,children:i.current.map((e,t)=>(0,W.jsx)(am,{ref:e,testID:`pin-digit-${t}`,value:a[t],autoFocus:t===0&&HK,keyboardType:`number-pad`,maxLength:1,onChangeText:e=>d(e,t),onKeyPress:e=>{e.nativeEvent.key===`Backspace`&&f(t)},onFocus:()=>c(t),onBlur:()=>c(null),style:[Nbn.input,{borderColor:l===null?s===t?n.borderActivationCodeFocus:r===u0.Light?n.border:n.bgTertiary:n.borderActivationCodeDanger,backgroundColor:n.bgTertiary,color:n.labelPrimary}]},t))}),l!==null&&(0,W.jsx)(X,{style:[Nbn.error,{color:n.textDanger}],children:l})]})},Nbn=R.create({inputContainer:{flexDirection:`row`,gap:8,justifyContent:`center`},input:{...q.Poppins.medium_2XL,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),width:49,height:55,borderRadius:8,padding:0,textAlign:`center`,textAlignVertical:`center`,borderWidth:2},error:{...q.Poppins.regular_SM,textAlign:`center`,marginTop:8}});V();var Pbn=()=>(0,W.jsx)(B,{style:Fbn.animationContainer,children:(0,W.jsx)(S4,{autoPlay:!0,source:C4.LEAVING_RECOMMENDATION,style:Fbn.animation,loop:!0})}),Fbn=R.create({animationContainer:{justifyContent:`center`,alignItems:`center`},animation:{width:75,height:75}});V(),fQ();var Ibn=1600,Lbn=({isVisible:e,onClose:t,onForgotPIN:n,onModalHide:r,onModalHideWithSuccess:i})=>{let{COLORS:a}=J(),{t:o}=(0,Vvt.useTranslation)(),{pinCode:s}=z4(),[c,l]=(0,H.useState)(`enter_pin`),[u,d]=H.useState(!1),f=(0,H.useRef)(null),p=(0,H.useRef)(null),{height:m}=y0t(),h=OZ(!1),g=OZ(0),_=NZ(()=>({paddingBottom:h.value?g.value:-m.value}));(0,H.useEffect)(()=>{e&&(h.value=!1)},[e,h]),(0,H.useEffect)(()=>(p.current&&=(clearTimeout(p.current),null),c===`success`&&(p.current=setTimeout(()=>{d(!0)},Ibn)),()=>{p.current&&=(clearTimeout(p.current),null)}),[c]);let v=(0,H.useCallback)(()=>{g.value=-m.value,h.value=!0,qf.dismiss(),t()},[t,h,g,m]),y=(0,H.useCallback)(()=>{l(`enter_pin`),d(!1),c===`success`?i():r?.()},[i,r,c]);(0,H.useEffect)(()=>{c===`success`&&u&&v()},[u,c,v]);let b=(0,H.useCallback)(e=>{c===`enter_pin`&&(e===s?l(`success`):f.current?.displayError(o(`pin_modal_error_invalid`)))},[c,s,o]),x=(0,H.useCallback)(()=>{g.value=-m.value,h.value=!0,qf.dismiss(),n()},[n,h,g,m]);return(0,W.jsxs)(Q2,{testID:`validate_pin_code_modal`,isVisible:e,onModalHide:y,onModalShow:()=>f.current?.resetDigits(),containerStyle:{backgroundColor:a.bgSheet},children:[(0,W.jsx)(B,{style:Rbn.header,children:(0,W.jsx)($8,{onPress:v})}),(0,W.jsx)(X,{style:Rbn.title,children:o(`pin_modal_header_enter`)}),(0,W.jsxs)(dQ.View,{style:[Rbn.content,_],children:[c===`success`?(0,W.jsx)(Pbn,{}):(0,W.jsx)(Mbn,{onFinish:b,ref:f}),(0,W.jsx)(I2,{title:o(`pin_modal_button_forgot`),onPress:x,type:F2.Plain})]})]})},Rbn=R.create({title:{...q.Poppins.bold_2XL,marginBottom:6,textAlign:`center`},header:{alignItems:`flex-start`,paddingTop:16,marginBottom:10},content:{paddingTop:10}});V(),fQ();var zbn=1600,Bbn=({isVisible:e,onClose:t,onModalHideWithSuccess:n})=>{let{COLORS:r}=J(),{t:i}=RK(),[a,o]=(0,H.useState)(`enter_pin`),[s,c]=(0,H.useState)(``),[l,u]=H.useState(!1),d=(0,H.useRef)(null),f=(0,H.useRef)(null),{height:p}=y0t(),m=OZ(!1),h=OZ(0),g=NZ(()=>({paddingBottom:m.value?h.value:-p.value}));(0,H.useEffect)(()=>{e&&(m.value=!1)},[e,m]),(0,H.useEffect)(()=>(f.current&&=(clearTimeout(f.current),null),a===`success`&&(f.current=setTimeout(()=>{u(!0)},zbn)),()=>{f.current&&=(clearTimeout(f.current),null)}),[a]);let _=(0,H.useCallback)(()=>{h.value=-p.value,m.value=!0,qf.dismiss(),t()},[t,m,h,p]),v=(0,H.useCallback)(()=>{o(`enter_pin`),u(!1),a===`success`&&n(s)},[n,s,a]);(0,H.useEffect)(()=>{a===`success`&&l&&_()},[l,a,_]);let y=(0,H.useCallback)(e=>{a===`enter_pin`?(c(e),d.current?.resetDigits(),o(`repeat_pin`)):a===`repeat_pin`&&(e===s?o(`success`):d.current?.displayError(i(`pin_modal_error_noMatch`)))},[a,s,i]);return(0,W.jsxs)(Q2,{testID:`pin_code_modal`,isVisible:e,onModalHide:v,onModalShow:()=>d.current?.resetDigits(),containerStyle:{backgroundColor:r.bgSheet},children:[(0,W.jsx)(B,{style:g9.header,children:(0,W.jsx)($8,{onPress:_})}),(0,W.jsx)(X,{style:g9.title,children:i(a===`enter_pin`?`pin_modal_header_enter`:`pin_modal_header_repeat`)}),(0,W.jsxs)(dQ.View,{style:[g9.content,g],children:[a===`success`&&(0,W.jsx)(B,{style:g9.animationContainer,children:(0,W.jsx)(S4,{autoPlay:!0,source:C4.LEAVING_RECOMMENDATION,style:g9.animation,loop:!0})}),a!==`success`&&(0,W.jsx)(Mbn,{onFinish:y,ref:d})]})]})},g9=R.create({title:{...q.Poppins.bold_2XL,marginBottom:6,textAlign:`center`},header:{alignItems:`flex-start`,paddingTop:16,marginBottom:10},content:{paddingTop:10},animationContainer:{justifyContent:`center`,alignItems:`center`},animation:{width:75,height:75}}),Vbn=()=>{let{setPINCode:e,isElevatedAuthConfirmed:t,setIsElevatedAuthConfirmed:n}=z4(),[r,i]=(0,H.useState)(!1);return i$((0,H.useCallback)(()=>{t&&(n(!1),i(!0))},[t,n])),(0,W.jsx)(Bbn,{isVisible:r,onClose:()=>i(!1),onModalHideWithSuccess:(0,H.useCallback)(t=>{e(t)},[e])})},Hbn=({isVisible:e,onModalHide:t,onEnterPIN:n,onCancel:r})=>{let{t:i}=RK();return(0,W.jsx)(Q2,{isVisible:e,title:i(`settings_locked_modal_header`),onModalHide:t,icon:()=>(0,W.jsx)(H8t,{width:96,height:96}),buttons:[{title:i(`settings_locked_modal_button_enter`),type:F2.Primary,onPress:n},{title:i(`button_cancel`),type:F2.Secondary,onPress:r}]})};V();function _9({columnDisposition:e,disabled:t=!1,testID:n,children:r,style:i}){let{COLORS:a}=J();return(0,W.jsx)(B,{testID:n,style:[Ubn.row,t&&Ubn.disabledRow,{backgroundColor:a.bgTableOdd},i],children:H.Children.map(r,(n,r)=>H.isValidElement(n)?H.cloneElement(n,{disabled:t,cellRatio:e?e[r]:void 0}):null)})}var Ubn=R.create({row:{flexDirection:`row`,justifyContent:`space-between`},disabledRow:{opacity:.5}});V();function v9({index:e,columnDisposition:t,disabled:n=!1,testID:r,children:i,style:a}){let{COLORS:o}=J(),s=(0,H.useCallback)(e=>e===void 0?o.bgTableEven:e%2?o.bgTableOdd:o.bgTableEven,[o]);return(0,W.jsx)(B,{testID:r,style:[Wbn.row,{backgroundColor:s(e)},a],children:H.Children.map(i,(e,r)=>H.isValidElement(e)?H.cloneElement(e,{disabled:n,cellRatio:t?t[r]:void 0}):null)})}var Wbn=R.create({row:{flexDirection:`row`,justifyContent:`space-between`}});V();function y9({columnDisposition:e,disabled:t=!1,testID:n,children:r,style:i}){let{COLORS:a}=J();return(0,W.jsx)(B,{testID:n,style:[Gbn.table,{backgroundColor:a.bgSecondary,borderWidth:1,borderColor:a.divider},t&&{backgroundColor:a.bgButtonSecondaryDangerDisabled},i],children:(()=>{let n=0;return H.Children.map(r,r=>{if(H.isValidElement(r)){if(r.type===_9){let n=r;return H.cloneElement(n,{disabled:n.props.disabled??t,columnDisposition:e})}if(r.type===v9){let i=r,a=H.cloneElement(i,{disabled:i.props.disabled??t,index:n,columnDisposition:e});return n+=1,a}return H.cloneElement(r)}return null})})()})}var Gbn=R.create({table:{borderRadius:16,overflow:`hidden`}});V();function b9({disabled:e=!1,onPress:t,testID:n,accessibilityLabel:r,accessibilityValue:i,cellRatio:a,children:o,style:s}){let{COLORS:c}=J();return(0,W.jsx)(_p,{disabled:!t||e,onPress:t,style:[Kbn.cell,{flex:a??1,borderColor:c.divider},s],testID:n,accessibilityRole:`button`,accessibilityHint:`Double-tap to set value`,accessibilityState:{disabled:e},accessibilityLabel:r,accessibilityValue:{text:i},children:H.Children.map(o,t=>{if(H.isValidElement(t)){let n=t;if(e){let e=n.props.style,t=Array.isArray(e)?[...e,{color:c.textTableSecondary}]:[e,{color:c.textTableSecondary}];return H.cloneElement(n,{...n.props,style:t})}else return H.cloneElement(n)}return null})})}var Kbn=R.create({cell:{justifyContent:`center`,alignItems:`center`,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}});V();function x9({testID:e,cellRatio:t,children:n,style:r,accessibilityLabel:i,accessibilityValue:a,disabled:o=!1}){let{COLORS:s}=J();return(0,W.jsx)(B,{style:[qbn.cell,{flex:t??1,borderColor:s.divider},r],testID:e,accessible:!0,accessibilityRole:`header`,accessibilityState:{disabled:o},accessibilityLabel:i,accessibilityValue:{text:a},children:n})}var qbn=R.create({cell:{justifyContent:`space-between`,alignItems:`center`,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}});V();var Jbn=[Y.ActivityIntensity.light,Y.ActivityIntensity.moderate,Y.ActivityIntensity.hard],Ybn=[Y.ActivityReductionIntervals.fromZero,Y.ActivityReductionIntervals.fromThirty,Y.ActivityReductionIntervals.fromFortysix,Y.ActivityReductionIntervals.fromSixtyone],Xbn={[Y.ActivityReductionIntervals.fromZero]:`0-29`,[Y.ActivityReductionIntervals.fromThirty]:`30-45`,[Y.ActivityReductionIntervals.fromFortysix]:`46-60`,[Y.ActivityReductionIntervals.fromSixtyone]:`61-120`},Zbn=e=>Math.round((1-e)*100),Qbn=e=>e==null?`-`:`${Zbn(e).toString()} %`,$bn=e=>Math.round((1-e/100)*100)/100;function exn(){let{t:e}=RK(),t=XQ(),{COLORS:n}=J(),{modalStoreActions:r}=Y8(),{bottomWithScroll:i}=B2(),a=U8(),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(null),[m,h]=(0,H.useState)(null),[g,_]=(0,H.useState)(void 0),{glucoseUnit:v,activity:y,created:b}=H6;if(v===void 0)throw Error(`[ActivitySettings::render] glucoseUnit is not defined`);if(y===void 0)throw Error(`[ActivitySettings::render] activity is not defined`);let{target:x,post:S,hard:C,light:w,moderate:T}=y,E=(0,H.useMemo)(()=>$6(x,Y.BloodGlucoseUnit.MMOL_L,v),[v,x]),{text:D}=(0,H.useMemo)(()=>X6(v),[v]),O=(0,H.useMemo)(()=>({light:w,moderate:T,hard:C}),[w,T,C]),k=(0,H.useMemo)(()=>({post:S}),[S]),A=(0,H.useMemo)(()=>[{title:e(`table_activity_duration`),maxFontSizeMultiplier:g0.s1},{title:Z6.light(),maxFontSizeMultiplier:g0.s1},{title:Z6.moderate(),maxFontSizeMultiplier:g0.s1},{title:Z6.hard(),maxFontSizeMultiplier:g0.s1}],[e]),[ee,te]=(0,H.useState)(!1),[ne,re]=(0,H.useState)(!1),{areSettingsLocked:ie,isPINSet:j,lockSettings:ae,unlockSettings:oe}=Abn(),[se,ce]=(0,H.useState)(!1),[M,N]=(0,H.useState)(!1),P=(0,H.useCallback)(()=>{ie?te(!0):ae()},[ie,ae]);(0,H.useEffect)(()=>{t.setOptions({header:()=>(0,W.jsx)(G8,{title:e(`physical_activity_navigation`),LeftButton:(0,W.jsx)(Q8,{}),RightButton:j?(0,W.jsx)(jun,{onPress:P,isLocked:ie}):void 0,overlay:!0})})},[t,ie,j,P,e]);let le=(0,H.useCallback)(async()=>{let e={...L6(),target:x,post:S},{updatedAt:t,...n}=y;Y2(n,e)||_(await H6.postUserSettings({activity:{...e,updatedAt:new Date().toISOString()}}))},[y,S,x]),ue=(0,H.useCallback)(async()=>{let e={hard:C,moderate:T,light:w,target:x,post:L6().post},{updatedAt:t,...n}=y;Y2(n,e)||_(await H6.postUserSettings({activity:{...e,updatedAt:new Date().toISOString()}}))},[y,C,w,T,x]),de=(0,H.useCallback)((e,t)=>{p({interval:t,intensity:e}),s(!0)},[s,p]),fe=(0,H.useCallback)(()=>{p(null),s(!0)},[]),pe=(0,H.useCallback)(async e=>{if(f===null)throw Error(`[ActivitySettings::updateActivity] pressedTableCell is null`);if($bn(e)!==y[f.intensity][f.interval]){let t=JSON.parse(JSON.stringify(y));t[f.intensity][f.interval]=$bn(e),t.updatedAt=new Date().toISOString(),_(await H6.postUserSettings({activity:t}))}},[y,f]),me=(0,H.useCallback)(async e=>{let t=Q6(e,v,Y.BloodGlucoseUnit.MMOL_L);if(t!==y.target){let e=JSON.parse(JSON.stringify(y));e.target=t,e.updatedAt=new Date().toISOString(),_(await H6.postUserSettings({activity:e}))}},[y,v]),he=(0,H.useCallback)(async e=>{f?await pe(e):await me(e),s(!1)},[f,pe,me]),ge=(0,H.useMemo)(()=>f===null?v===Y.BloodGlucoseUnit.MMOL_L?Tin:Ein:q2(0,75),[f,v]),F=(0,H.useMemo)(()=>{if(f===null){let e=$6(x,Y.BloodGlucoseUnit.MMOL_L,v);return ge.findIndex(t=>t===e)}let e=y[f.intensity][f.interval];return e===0?0:e?Zbn(e):75},[f,y,x,v,ge]),_e=async()=>{m===`after`?await ue():await le(),l(!1)},I=()=>{h(`during`),l(!0)},ve=()=>{h(`after`),l(!0)},ye=(0,H.useCallback)(()=>{g===!1&&r.set({showSyncErrorModal:!0}),_(void 0)},[g,r]),be=(0,H.useCallback)(()=>{se&&(re(!0),ce(!1))},[se,re,ce]),xe=(0,H.useCallback)(()=>{ce(!0),te(!1)},[ce,te]),L=(0,H.useCallback)(()=>{oe()},[oe]),Se=(0,H.useCallback)(e=>j&&ie?(...e)=>te(!0):(...t)=>e(...t),[ie,j]),Ce=(0,H.useCallback)(()=>{M&&(N(!1),setTimeout(()=>{t.navigate(Q.ChangePINCode)},500))},[M,t]),we=y.updatedAt??b;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`settings-activity-scroll`,style:S9.scrollView,contentContainerStyle:[S9.scrollViewContent,{paddingBottom:i,paddingTop:a+16}],children:[(0,W.jsx)(X,{style:[S9.updatedAtText,{color:n.labelSecondary}],children:e(`settings_lastEdited`,{date:we?Y6(we,`d MMM yyyy`):``})}),(0,W.jsx)(p9,{text:e(`physical_activity_hcp_card_body`),learnMoreText:e(`physical_activity_hcp_card_button`),learnMoreOnPress:()=>{d(!0)}}),(0,W.jsxs)(y9,{children:[(0,W.jsxs)(B,{style:[S9.tableDescripContainer,{borderBottomColor:n.divider}],children:[(0,W.jsx)(X,{style:[S9.title,{color:n.labelPrimary}],accessibilityRole:`header`,children:e(`physical_activity_target_title`)}),(0,W.jsx)(X,{style:[S9.subtitle,{color:n.labelSecondary}],children:e(`physical_activity_target_body`)})]}),(0,W.jsx)(t4,{title:e(`target_activity_input`),value:`${E} ${D}`,style:{backgroundColor:n.bgSecondary},testID:`activity-target`,onPress:Se(fe),valueStyle:{color:n.labelBrand}})]}),(0,W.jsxs)(y9,{columnDisposition:[1,1,1,1],children:[(0,W.jsxs)(B,{style:[S9.tableDescripContainer,{borderBottomColor:n.divider}],children:[(0,W.jsx)(X,{style:[S9.title,{color:n.labelPrimary}],accessibilityRole:`header`,children:e(`target_activity_reduction_title`)}),(0,W.jsx)(X,{style:[S9.subtitle,{color:n.labelSecondary}],children:e(`target_activity_reduction_body`)})]}),(0,W.jsx)(_9,{children:A.map((e,t)=>(0,W.jsx)(x9,{style:[t===0&&S9.tableFirstCell,S9.noTopBorder],children:(0,W.jsx)(X,{style:[S9.tableHeaderTitle,{color:n.labelPrimary}],maxFontSizeMultiplier:e.maxFontSizeMultiplier,children:e.title})},e.title))}),Ybn.map(t=>(0,W.jsxs)(v9,{children:[(0,W.jsxs)(b9,{style:S9.tableFirstCell,children:[(0,W.jsx)(X,{style:[S9.tableInterval,{color:n.labelPrimary}],children:Xbn[t]}),(0,W.jsx)(X,{style:[S9.minutes,{color:n.textTableSecondary}],children:e(`activity_settings_table_min`)})]}),Jbn.map(e=>(0,W.jsx)(b9,{testID:`settings-activity-${e}-${t}`,onPress:Se(()=>{de(e,t)}),children:(0,W.jsx)(X,{style:[S9.tablePercentage,{color:n.textTableHighlight}],children:Qbn(O[e][t])})},`${t}-${e}`))]},t)),(0,W.jsx)(_p,{style:[S9.resetContainer,{backgroundColor:n.bgButtonSecondaryDanger,borderColor:n.divider}],onPress:Se(I),testID:`restore-default-activity-settings-during`,children:(0,W.jsx)(X,{style:[S9.resetText,{color:n.textButtonSecondaryDanger}],children:e(`button_reset_default`)})})]}),(0,W.jsxs)(y9,{children:[(0,W.jsxs)(B,{style:[S9.tableDescripContainer,{borderBottomWidth:0}],children:[(0,W.jsx)(X,{style:[S9.title,{color:n.labelPrimary}],accessibilityRole:`header`,children:e(`target_activity_reduction_after_title`)}),(0,W.jsx)(X,{style:[S9.subtitle,{color:n.labelSecondary}],children:e(`target_activity_reduction_after_body`)})]}),Ybn.map(t=>(0,W.jsxs)(v9,{children:[(0,W.jsxs)(b9,{style:[S9.tableFirstCell,S9.noLeftBorder],children:[(0,W.jsx)(X,{style:S9.tableInterval,children:Xbn[t]}),(0,W.jsx)(X,{style:[S9.minutes,{color:n.textTableSecondary}],children:e(`activity_settings_table_min`)})]}),(0,W.jsx)(b9,{testID:`settings-activity-post-${t}`,onPress:Se(()=>{de(`post`,t)}),children:(0,W.jsx)(X,{style:[S9.tablePercentage,{color:n.textTableHighlight}],children:Qbn(k.post[t])})})]},`post-${t}`)),(0,W.jsx)(_p,{style:[S9.resetContainer,{backgroundColor:n.bgButtonSecondaryDanger,borderColor:n.divider}],onPress:Se(ve),testID:`restore-default-activity-settings-after`,children:(0,W.jsx)(X,{style:[S9.resetText,{color:n.textButtonSecondaryDanger}],children:e(`button_reset_default`)})})]})]}),(0,W.jsx)(c5,{initialScrollIndex:F,isVisible:o,onCancel:()=>{s(!1)},onConfirm:he,items:ge,onModalHide:ye,testID:`activity-wheel-picker`}),(0,W.jsx)(Q2,{title:e(`physical_activity_modal_reset_title `),isVisible:c,onModalHide:ye,buttons:[{title:e(`button_reset`),type:F2.Error,onPress:_e},{title:e(`button_cancel`),type:F2.Secondary,onPress:()=>{l(!1)}}]}),(0,W.jsx)(Q2,{isVisible:u,enableScroll:!0,buttons:[{title:e(`button_close`),onPress:()=>{d(!1)},style:S9.activityInfoModalButton}],children:(0,W.jsx)(jbn,{})}),(0,W.jsx)(d5,{onModalHide:()=>{_(void 0)}}),(0,W.jsx)(Hbn,{isVisible:ee,onModalHide:be,onEnterPIN:xe,onCancel:()=>te(!1)}),(0,W.jsx)(Lbn,{isVisible:ne,onClose:()=>re(!1),onModalHide:Ce,onForgotPIN:()=>{N(!0),re(!1)},onModalHideWithSuccess:L}),(0,W.jsx)(Vbn,{})]})}var txn=S5(exn),S9=R.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32,paddingTop:32},updatedAtText:{...q.Poppins.regular_SM,textAlign:`center`},tableDescripContainer:{padding:16,borderBottomWidth:1},title:{...q.Poppins.semiBold_Base,marginBottom:8},subtitle:{...q.Poppins.regular_SM},tableFirstCell:{paddingLeft:16,paddingVertical:12,borderLeftWidth:0},resetText:{...q.Poppins.semiBold_Base,textAlign:`center`},resetContainer:{alignItems:`center`,padding:16,borderTopWidth:1},tableHeaderTitle:{...q.Poppins.medium_SM},minutes:{...q.Poppins.regular_XS},tableInterval:{...q.Poppins.medium_Base},tablePercentage:{...q.Poppins.medium_Base},activityInfoModalButton:{marginTop:32},noTopBorder:{borderTopWidth:0,paddingVertical:16},noLeftBorder:{borderLeftWidth:0}});function C9(e,t){return+H2(e)>+H2(t)}function nxn(e,t,n){return O7(e,-t,n)}function rxn(e,t){let n=H2(e,t?.in);return n.setMinutes(0,0,0),n}function ixn(e,t,n){let[r,i]=A6(n?.in,e,t);return+rxn(r)==+rxn(i)}V();var w9=Array.from({length:60},(e,t)=>t.toString().padStart(2,`0`));function axn({isVisible:e,initialValue:t,min:n,max:r,onCancel:i,onConfirm:a,onModalHide:o}){let{COLORS:s}=J(),{width:c}=Cm(),l=(0,H.useRef)(null),u=(0,H.useRef)(null),d=(0,H.useMemo)(()=>{let e=[],t=r?k7(`59`,`mm`,new Date(r)):k7(`23:59`,`HH:mm`,new Date),i=n?k7(`00`,`mm`,new Date(n)):k7(`00:00`,`HH:mm`,new Date);for(;q7(i,t)||ixn(i,t);)e.push(i),i=Tan(i,1);return e},[r,n]),f=(0,H.useMemo)(()=>d.map(e=>e.getHours().toString().padStart(2,`0`),[]),[d]),[p,m]=(0,H.useState)(t),h=I2t(e);(0,H.useEffect)(()=>{!h&&e&&m(t)},[h,e,t]);let g=(0,H.useMemo)(()=>d.findIndex(e=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()&&e.getHours()===t.getHours()),[d,t]),_=(0,H.useMemo)(()=>{let[,e]=Y6(t,`HH:mm`).split(`:`);return w9.indexOf(e)},[t]),v=(0,H.useMemo)(()=>d.findIndex(e=>e.getFullYear()===p.getFullYear()&&e.getMonth()===p.getMonth()&&e.getDate()===p.getDate()&&e.getHours()===p.getHours()),[d,p]),y=(0,H.useMemo)(()=>{let[,e]=Y6(p,`HH:mm`).split(`:`);return w9.indexOf(e)},[p]),b=(0,H.useMemo)(()=>n?0:null,[n]),x=(0,H.useMemo)(()=>r?d.length-1:null,[r,d]),S=(0,H.useMemo)(()=>{if(!n)return null;let[,e]=Y6(n,`HH:mm`).split(`:`);return w9.indexOf(e)},[n]),C=(0,H.useMemo)(()=>{if(!r)return null;let[,e]=Y6(r,`HH:mm`).split(`:`);return w9.indexOf(e)},[r]),w=(0,H.useCallback)(()=>{a(p)},[a,p]),T=(0,H.useCallback)(()=>{m(t),i()},[i,t]),E=(0,H.useCallback)((e,i)=>{if(e<0||i<0||e>=d.length||i>=w9.length)return;let a=`${d[e].getHours()}:${w9[i]}`;if(!n||!r){m(k7(a,`HH:mm`,new Date(t)));return}let o=d[e];m(k7(a,`HH:mm`,new Date(o)))},[n,r,d,t]),D=(0,H.useCallback)(e=>{u.current?.scrollToIndex(e)},[]),O=(0,H.useCallback)(e=>{if(x===null||b===null||C===null||S===null){E(e,y);return}e===b&&y<S?(E(e,S),D(S)):e===x&&y>C?(E(e,C),D(C)):E(e,y)},[x,b,C,S,E,y,D]),k=(0,H.useCallback)(e=>{if(x===null||b===null||C===null||S===null){E(v,e);return}v===b&&e<S?(E(v,S),D(S)):v===x&&e>C?(E(v,C),D(C)):E(v,e)},[E,x,C,b,S,D,v]);return(0,W.jsx)(Q2,{isVisible:e,containerStyle:{backgroundColor:s.bgTransparent},onModalHide:o,children:(0,W.jsxs)(B,{children:[(0,W.jsxs)(B,{style:T9.pickersContainer,children:[(0,W.jsx)(s5,{testID:`hours_wheel_picker`,ref:l,initialScrollIndex:g,options:f,onChange:O,containerStyle:[T9.itemContainerLeft,{width:(c-32)/2}],selectedIndicatorStyle:[T9.selectedIndicatorLeft,{width:(c-32)/2-10}],itemStyle:T9.itemLeft},`hours-wheel-picker`),(0,W.jsx)(s5,{testID:`minutes_wheel_picker`,ref:u,initialScrollIndex:_,options:w9,onChange:k,containerStyle:[T9.itemContainerRight,{width:(c-32)/2}],selectedIndicatorStyle:[T9.selectedIndicatorRight,{width:(c-32)/2-10}],itemStyle:T9.itemRight},`minutes-wheel-picker`)]}),(0,W.jsxs)(B,{style:T9.buttonContainer,children:[(0,W.jsx)(o5,{onPress:w}),(0,W.jsx)(a5,{onPress:T})]})]})})}var oxn=H.memo(axn),T9=R.create({buttonContainer:{gap:8},pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:`flex-end`,marginRight:16},itemRight:{alignSelf:`flex-start`,marginLeft:16},selectedIndicatorRight:{alignSelf:`flex-start`,borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:`flex-end`,borderTopRightRadius:0,borderBottomRightRadius:0}});V();var sxn=(e,t)=>({startTime:e.startTime,target:$6(e.target,Y.BloodGlucoseUnit.MMOL_L,t)}),cxn=(e,t)=>e.map(e=>sxn(e,t)),lxn=(e,t)=>{let n=e.startTime,r=parseFloat(e.target);return r=Q6(r,t,Y.BloodGlucoseUnit.MMOL_L),{startTime:n,target:r}},uxn=(e,t)=>e.map(e=>lxn(e,t));function dxn(){let{t:e}=RK(),{COLORS:t}=J(),{modalStoreActions:n}=Y8(),{bottomWithScroll:r}=B2(),i=XQ(),a=U8(),[o,s]=(0,H.useState)(),[c,l]=(0,H.useState)(void 0),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(),[v,y]=(0,H.useState)(!1),[b,x]=(0,H.useState)(!1),S=H6.glucoseUnit;if(S===void 0)throw Error(`[GlucoseSettings::render] glucoseUnit is undefined.`);let{glucoseLevelTargets:C,created:w}=H6;if(C===void 0)throw Error(`[GlucoseSettings::render] parameters from userSettings must be defined and non-null.`);let T=C.targetBGLIntervals;if(!T)throw Error(`[GlucoseSettings::render] parameters from userSettings must be defined and non-null.`);let E=C.overallTargetBGL;if(!E)throw Error(`[GlucoseSettings::render] parameters from userSettings must be defined and non-null.`);let D=C.use===Y.Usage.Overall,O=cxn(T,S),k=sxn(E,S),{areSettingsLocked:A,isPINSet:ee,lockSettings:te,unlockSettings:ne}=Abn(),[re,ie]=(0,H.useState)(!1),[j,ae]=(0,H.useState)(!1),oe=(0,H.useCallback)(()=>{A?y(!0):te()},[A,te]);(0,H.useEffect)(()=>{i.setOptions({header:()=>(0,W.jsx)(G8,{title:e(`glucose_navigation`),LeftButton:(0,W.jsx)(Q8,{}),RightButton:ee?(0,W.jsx)(jun,{onPress:oe,isLocked:A}):void 0,overlay:!0})})},[i,A,ee,oe,e]);let se=(0,H.useCallback)(e=>{p(!0),_(e)},[]),ce=(0,H.useCallback)(async()=>{let e=Min(),t=Nin(),n={...C,targetBGLIntervals:e},r={...C,overallTargetBGL:t},i=D?r:n;if(D?!Y2(C.overallTargetBGL,t):!Y2(C.targetBGLIntervals,e)){let e={glucoseLevelTargets:{...i,updatedAt:new Date().toISOString()}};l(await H6.postUserSettings(e))}h(!1)},[C,D]),M=(0,H.useCallback)(async e=>{if(e!==parseFloat(k.target)){let t={...k};t.target=e.toString();let n=lxn(t,S),r={glucoseLevelTargets:{...C,updatedAt:new Date().toISOString(),overallTargetBGL:n}};l(await H6.postUserSettings(r))}},[S,k,C]),N=(0,H.useCallback)(async e=>{if(g!==void 0&&e!==parseFloat(O[g].target)){let t=[...O],n={...t[g]};n.target=e.toString(),t[g]=n;let r=uxn(t,S),i={glucoseLevelTargets:{...C,updatedAt:new Date().toISOString(),targetBGLIntervals:r}};l(await H6.postUserSettings(i))}},[g,O,S,C]),P=(0,H.useCallback)(async e=>{D?await M(e):await N(e),p(!1)},[D,M,N]),le=(0,H.useCallback)(async()=>{let e=!D,t={glucoseLevelTargets:{...C,use:e?Y.Usage.Overall:Y.Usage.Intervals,updatedAt:new Date().toISOString()}},r=await H6.postUserSettings(t);n.set({showSyncErrorModal:!r})},[D,C,n]),ue=(0,H.useMemo)(()=>X6(S).text,[S]),de=(0,H.useMemo)(()=>{let{min:e,max:t}=S===Y.BloodGlucoseUnit.MMOL_L?Fin():Iin();return S===Y.BloodGlucoseUnit.MG_DL?q2(e,t):J2(e,t)},[S]),fe=(0,H.useMemo)(()=>g===void 0?0:D?de.indexOf(k.target):de.indexOf(O[g].target),[g,D,de,O,k.target]),pe=(0,H.useCallback)(e=>{let t=O[(e-1+O.length)%O.length].startTime,n=O[(e+1+O.length)%O.length].startTime,r=O[e].startTime,i=k7(r,`HH:mm`,new Date),a=k7(t,`HH:mm`,new Date),o=k7(n,`HH:mm`,new Date);q7(i,a)&&q7(i,o)?s({current:i,min:U2(nxn(a,1),1),max:W2(o,1)}):C9(i,a)&&C9(i,o)?s({current:i,min:U2(a,1),max:W2(O7(o,1),1)}):s({current:i,min:U2(a,1),max:W2(o,1)}),d(!0),_(e)},[O]),me=(0,H.useCallback)(async e=>{if(g===void 0)return;let t=Y6(e,`HH:mm`);if(t!==O[g].startTime){let e=[...O],n={...e[g]};n.startTime=t,e[g]=n;let r=uxn(e,S),i={glucoseLevelTargets:{...C,targetBGLIntervals:r,updatedAt:new Date().toISOString()}};l(await H6.postUserSettings(i))}d(!1)},[g,O,S,C]),he=(0,H.useCallback)(()=>{d(!1)},[]),ge=(0,H.useCallback)(()=>{p(!1)},[]),F=(0,H.useCallback)(()=>{c===!1&&n.set({showSyncErrorModal:!0}),l(void 0)},[n,c]),_e=(0,H.useCallback)(()=>{re&&(x(!0),ie(!1))},[re,x,ie]),I=(0,H.useCallback)(()=>{ie(!0),y(!1)},[ie,y]),ve=(0,H.useCallback)(()=>{i.navigate(Q.GlucoseUnit)},[i]),ye=(0,H.useCallback)(()=>{ne()},[ne]),be=(0,H.useCallback)(e=>ee&&A?(...e)=>y(!0):(...t)=>e(...t),[A,ee]),xe=(0,H.useCallback)(()=>{j&&(ae(!1),setTimeout(()=>{i.navigate(Q.ChangePINCode)},500))},[j,i]),L=C.updatedAt??w;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`settings-glucose-scrollview`,style:E9.scrollView,contentContainerStyle:[E9.scrollViewContent,{paddingBottom:r,paddingTop:a+16}],children:[(0,W.jsx)(X,{style:[E9.updatedAtText,{color:t.labelSecondary}],children:e(`settings_lastEdited`,{date:L?Y6(L,`d MMM yyyy`):``})}),(0,W.jsx)(p9,{}),(0,W.jsx)(t4,{title:e(`glucose_input`),value:ue,testID:`glucose-change`,onPress:be(ve),renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsxs)(y9,{columnDisposition:[1,2],children:[(0,W.jsx)(E4,{title:e(`fixed_input_title`),message:e(`fixed_input_body`),value:D,testID:`settings-glucose-overall-switch`,onValueChange:be(le),style:E9.switchContainer}),(0,W.jsxs)(_9,{disabled:!D,testID:`settings-glucose-overall-header`,children:[(0,W.jsx)(x9,{style:E9.tableFirstCell,testID:`settings-glucose-overall-header-time`,children:(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_fixed_time`)})}),(0,W.jsxs)(x9,{testID:`settings-glucose-overall-header-target`,children:[(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_fixed_target`)}),(0,W.jsx)(X,{style:[E9.headerSubtitle,{color:t.textTableSecondary}],children:ue})]})]}),(0,W.jsxs)(v9,{disabled:!D,children:[(0,W.jsx)(b9,{style:E9.tableFirstCell,children:(0,W.jsx)(X,{style:[E9.subtitle,{color:t.textTableActive}],children:e(`table_fixed_all_day `)})}),(0,W.jsx)(b9,{onPress:be(()=>se(0)),children:(0,W.jsx)(X,{style:[E9.fixedValueTitle,{color:t.textTableHighlight}],testID:`settings-glucose-overall-all-day-target`,children:k.target})})]}),(0,W.jsx)(_p,{style:[E9.resetContainer,{borderColor:t.divider}],disabled:!D,onPress:be(()=>h(!0)),children:(0,W.jsx)(X,{style:[E9.resetText,D?{color:t.textButtonSecondaryDanger}:{color:t.textButtonSecondaryDangerDisabled}],children:e(`button_reset_default`)})})]}),(0,W.jsxs)(y9,{columnDisposition:[1,2],children:[(0,W.jsx)(E4,{title:e(`table_variable_title`),message:e(`table_variable_body`),value:!D,testID:`daily-interval-switch`,onValueChange:be(le),style:E9.switchContainer}),(0,W.jsxs)(_9,{disabled:D,testID:`settings-glucose-variable-header`,children:[(0,W.jsxs)(x9,{style:E9.tableFirstCell,testID:`settings-glucose-variable-header-time`,children:[(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_variable_time`)}),(0,W.jsx)(X,{style:[E9.headerSubtitle,{color:t.textTableSecondary}],children:e(`table_variable_time_unit`)})]}),(0,W.jsxs)(x9,{testID:`settings-glucose-variable-header-target`,children:[(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_fixed_target`)}),(0,W.jsx)(X,{style:[E9.headerSubtitle,{color:t.textTableSecondary}],children:ue})]})]}),O.map((e,n)=>(0,W.jsxs)(v9,{disabled:D,children:[(0,W.jsxs)(b9,{style:E9.tableFirstCell,onPress:be(()=>{pe(n)}),children:[(0,W.jsx)(X,{style:[E9.title,{color:t.textTableHighlight}],children:e.startTime}),(0,W.jsx)(X,{style:[E9.subtitle,{color:t.textTableSecondary}],children:iyt[Object.keys(BK)[n]]()})]}),(0,W.jsx)(b9,{onPress:be(()=>{se(n)}),children:(0,W.jsx)(X,{style:[E9.title,{color:t.textTableHighlight}],testID:`settings-glucose-variable-target-${Object.keys(BK)[n].toLowerCase()}`,children:e.target})})]},e.startTime)),(0,W.jsx)(_p,{style:[E9.resetContainer,{borderColor:t.divider}],disabled:D,onPress:be(()=>{h(!0)}),children:(0,W.jsx)(X,{style:[E9.resetText,D?{color:t.textButtonSecondaryDangerDisabled}:{color:t.textButtonSecondaryDanger}],children:e(`button_reset_default`)})})]})]}),(0,W.jsx)(c5,{isVisible:f,items:de,onConfirm:P,onCancel:ge,initialScrollIndex:fe,onModalHide:F,testID:`settings-glucose-target-wheel-picker`}),(0,W.jsx)(oxn,{isVisible:u,initialValue:o?.current??new Date,min:o?.min,max:o?.max,onConfirm:me,onCancel:he,onModalHide:F}),(0,W.jsx)(Q2,{isVisible:m,title:e(`physical_activity_modal_reset_title `),onModalHide:F,buttons:[{title:e(`button_reset`),type:F2.Error,onPress:ce},{title:e(`button_cancel`),type:F2.Secondary,onPress:()=>{h(!1)}}]}),(0,W.jsx)(d5,{onModalHide:()=>{l(void 0)}}),(0,W.jsx)(Hbn,{isVisible:v,onModalHide:_e,onEnterPIN:I,onCancel:()=>y(!1)}),(0,W.jsx)(Lbn,{isVisible:b,onClose:()=>x(!1),onModalHide:xe,onForgotPIN:()=>{ae(!0),x(!1)},onModalHideWithSuccess:ye}),(0,W.jsx)(Vbn,{})]})}var fxn=S5(dxn),E9=R.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32},updatedAtText:{...q.Poppins.regular_SM,textAlign:`center`},tableFirstCell:{alignItems:`flex-start`,paddingLeft:16,borderLeftWidth:0},resetContainer:{alignItems:`center`,padding:16,borderTopWidth:1},resetText:{...q.Poppins.semiBold_Base,textAlign:`center`},headerTitle:{...q.Poppins.medium_SM},headerSubtitle:{...q.Poppins.medium_XS},title:{...q.Poppins.medium_Base},fixedValueTitle:{...q.Poppins.medium_Base,paddingVertical:8},subtitle:{...q.Poppins.regular_XS},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}});V();var pxn=e=>{let{t}=RK(),{COLORS:n}=J(),{glucoseUnit:r,isError:i,onPressMGDL:a,onPressMMOLL:o}=e,s=r===Y.BloodGlucoseUnit.MMOL_L,c=r===Y.BloodGlucoseUnit.MG_DL;return(0,W.jsxs)(B,{style:D9.unitsContainer,children:[(0,W.jsxs)(Kp,{testID:`mmoll-button-${s}`,onPress:o,style:({pressed:e})=>[D9.unitButton,{backgroundColor:s?n.bgSegmentPrimary:n.bgSegmentContainer,borderColor:s?n.bgSegmentPrimary:n.buttonBorder,opacity:e?.5:1},i&&{borderColor:n.borderInputDanger}],accessibilityRole:`button`,accessibilityState:{selected:s},children:[(0,W.jsx)(X,{style:[D9.unitText,{color:s?n.textLabelActive:n.textLabelInactive}],children:t(`glucose_unit_mmol/l`)}),(0,W.jsx)(X,{style:[D9.exampleText,{color:s?n.textLabelActive:n.textLabelInactive}],children:t(`example`)}),(0,W.jsx)(X,{style:[D9.unitExampleText,{color:s?n.textLabelActive:n.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:t(`glucose_unit_example_mmol/L`)})]}),(0,W.jsxs)(Kp,{testID:`mgdl-button-${c}`,onPress:a,style:({pressed:e})=>[D9.unitButton,{backgroundColor:c?n.bgSegmentPrimary:n.bgSegmentContainer,borderColor:c?n.bgSegmentPrimary:n.buttonBorder,opacity:e?.5:1},i&&{borderColor:n.borderInputDanger}],accessibilityRole:`button`,accessibilityState:{selected:c},children:[(0,W.jsx)(X,{style:[D9.unitText,{color:c?n.textLabelActive:n.textLabelInactive}],children:t(`glucose_unit_mg/dl`)}),(0,W.jsx)(X,{style:[D9.exampleText,{color:c?n.textLabelActive:n.textLabelInactive}],children:t(`example`)}),(0,W.jsx)(X,{style:[D9.unitExampleText,{color:c?n.textLabelActive:n.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:t(`glucose_unit_example_mg/dl`)})]})]})},D9=R.create({unitsContainer:{flexDirection:`row`,justifyContent:`space-between`,gap:12},unitButton:{flex:1,paddingHorizontal:14,paddingVertical:10,borderRadius:16,borderWidth:2},unitText:{...q.Poppins.medium_Base,marginBottom:8},exampleText:{...q.Poppins.medium_XS,marginBottom:4},unitExampleText:{...q.Poppins.regular_XS}});V();var mxn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),n=(0,H.useCallback)(async t=>{if(t===H6.glucoseUnit)return;let n=H6.glucoseLevelTargets,r=await H6.postUserSettings({bloodGlucoseUnits:t,...n&&{glucoseLevelTargets:{...n,updatedAt:new Date().toISOString()}}});e.set({showSyncErrorModal:!r})},[e]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(B,{style:[hxn.container,{paddingTop:t+16}],children:(0,W.jsx)(pxn,{onPressMMOLL:()=>n(Y.BloodGlucoseUnit.MMOL_L),onPressMGDL:()=>n(Y.BloodGlucoseUnit.MG_DL),glucoseUnit:H6.glucoseUnit})}),(0,W.jsx)(d5,{})]})},hxn=R.create({container:{paddingHorizontal:16}}),gxn=S5(mxn);V();var _xn=()=>{let{t:e}=RK(),{COLORS:t}=J(),n=XQ(),{bottomWithScroll:r}=B2(),i=U8();return(0,W.jsxs)(ys,{contentContainerStyle:[O9.scrollView,{paddingBottom:r,paddingTop:i+16}],testID:`legal-page-scrollview`,children:[(0,W.jsx)(X,{style:O9.title,children:e(`legal_title`)}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(W8t,{testID:`manufacturer-symbol`,color:t.bgPrimary}),(0,W.jsx)(X,{style:[O9.textContainer,{color:t.labelSecondary}],children:Rnn})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(U8t,{testID:`manual-icon`}),(0,W.jsx)(X,{testID:`manual-button`,style:[O9.manualText,{color:t.textLink}],onPress:()=>{C6(S6.SettingsIFU),n.navigate(Q.IFU)},children:e(`legal_IFU`)})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(Y8t,{testID:`SN-symbol`}),(0,W.jsx)(X,{style:[O9.textContainer,{color:t.labelSecondary}],children:x6})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(j8t,{testID:`ce-logo`}),(0,W.jsx)(X,{style:[O9.alignTop,{color:t.labelSecondary}],children:e(`legal_ce_mark_text`)})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(W8t,{color:t.labelPrimary}),(0,W.jsxs)(B,{style:O9.textContainer,children:[(0,W.jsx)(X,{style:[O9.sectionTitle,{color:t.labelSecondary}],children:e(`legal_company_name`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_adress`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_country`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_email`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_cvr_vat`)})]})]}),(0,W.jsxs)(B,{style:[O9.section,O9.udiSection],children:[(0,W.jsx)(X8t,{testID:`udi-logo`,style:O9.udiLogo}),(0,W.jsxs)(X,{style:[O9.textContainer,O9.udiText,{color:t.labelSecondary}],children:[(0,W.jsx)(X,{style:{color:t.labelSecondary},children:`(01)${Bnn}(10)`}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:`${x6}(8012)${x6}`})]})]}),(0,W.jsxs)(B,{style:O9.sectionColumn,children:[(0,W.jsx)(Z8t,{testID:`uk-rep-logo`,style:O9.repIcon}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_ukrep`)})]}),VK?null:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{style:[O9.sectionTitle,{color:t.labelSecondary}],children:e(`more_legal_novo_nordisk_disclaimer_title`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`more_legal_novo_nordisk_disclaimer_text`)})]})]})},O9=R.create({scrollView:{paddingTop:32,paddingHorizontal:16},title:{...q.Poppins.regular_SM,textAlign:`center`,marginBottom:32},section:{flexDirection:`row`,marginBottom:32},sectionTitle:{...q.Poppins.medium_Base},textContainer:{flex:1,marginLeft:20,alignSelf:`center`},alignTop:{flex:1,marginLeft:20,alignSelf:`flex-start`},sectionColumn:{marginBottom:32},repIcon:{marginBottom:12},manualText:{...q.Poppins.medium_Base,marginLeft:20,alignSelf:`center`},udiSection:{flexWrap:`wrap`,marginBottom:20},udiLogo:{marginRight:20,marginBottom:12},udiText:{marginLeft:0,marginBottom:12,display:`flex`,flexWrap:`wrap`}});V();var vxn=()=>{let e=new Date().getFullYear();return[...Array(12).keys()].map(t=>Y6(new Date(e,t),`MMM`))},yxn=()=>{let e=1900,t=new Date().getFullYear()-e+1;return Array.from({length:t},(t,n)=>(n+e).toString())},bxn=(e,t)=>Gdn(new Date(e,t)),xxn=vxn(),Sxn=Array.from({length:31},(e,t)=>(t+1).toString().padStart(2,`0`)),Cxn=yxn();function wxn({isVisible:e,initialValue:t,onCancel:n,onConfirm:r,onModalHide:i}){let{COLORS:a}=J(),{width:o}=Cm(),s=(0,H.useRef)(null),c=(0,H.useRef)(null),l=(0,H.useRef)(null),[u,d]=(0,H.useState)(t);(0,H.useEffect)(()=>{e&&d(e=>e.getTime()===t.getTime()?e:new Date(t))},[t,e]);let f=(0,H.useMemo)(()=>t.getDate()-1,[t]),p=(0,H.useMemo)(()=>t.getMonth(),[t]),m=(0,H.useMemo)(()=>{let e=t.getFullYear();return Cxn.indexOf(e.toString())},[t]),h=(0,H.useMemo)(()=>u.getDate()-1,[u]),g=(0,H.useMemo)(()=>u.getMonth(),[u]),_=(0,H.useMemo)(()=>u.getFullYear(),[u]),v=(0,H.useCallback)(()=>{r(u)},[r,u]),y=(0,H.useCallback)(()=>{d(t),n()},[n,t]),b=(0,H.useCallback)(e=>{let t=bxn(_,e)-1;d(new Date(_,e,Math.min(h,t)+1)),h>t&&s.current?.scrollToIndex(t)},[h,_]),x=(0,H.useCallback)(e=>{let t=bxn(_,g)-1;d(new Date(_,g,Math.min(e,t)+1)),e>t&&s.current?.scrollToIndex(t)},[g,_]),S=(0,H.useCallback)(e=>{let t=parseInt(Cxn[e],10),n=bxn(t,g)-1;d(new Date(t,g,Math.min(h,n)+1)),h>n&&s.current?.scrollToIndex(n)},[h,g]);return(0,W.jsx)(Q2,{isVisible:e,containerStyle:{backgroundColor:a.bgTransparent},onModalHide:i,children:(0,W.jsxs)(B,{children:[(0,W.jsxs)(B,{style:k9.pickersContainer,children:[(0,W.jsx)(s5,{ref:c,initialScrollIndex:p,options:xxn,onChange:b,containerStyle:[k9.itemContainerLeft,{width:(o-32)/3}],selectedIndicatorStyle:[k9.selectedIndicatorLeft,{width:(o-32)/3-10}],itemStyle:k9.itemLeft,testID:`months-wheel-picker`},`months-wheel-picker`),(0,W.jsx)(s5,{ref:s,initialScrollIndex:f,options:Sxn,onChange:x,containerStyle:[k9.itemContainerCenter,{width:(o-32)/3}],selectedIndicatorStyle:[k9.selectedIndicatorCenter,{width:(o-32)/3}],itemStyle:k9.itemCenter,testID:`days-wheel-picker`},`days-wheel-picker`),(0,W.jsx)(s5,{ref:l,initialScrollIndex:m,options:Cxn,onChange:S,containerStyle:[k9.itemContainerRight,{width:(o-32)/3}],selectedIndicatorStyle:[k9.selectedIndicatorRight,{width:(o-32)/3-10}],itemStyle:k9.itemRight,testID:`years-wheel-picker`},`years-wheel-picker`)]}),(0,W.jsxs)(B,{style:k9.buttonContainer,children:[(0,W.jsx)(o5,{onPress:v}),(0,W.jsx)(a5,{onPress:y})]})]})})}var Txn=H.memo(wxn),k9=R.create({buttonContainer:{gap:8},pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:8},itemContainerCenter:{borderTopLeftRadius:0,borderTopRightRadius:0},itemContainerRight:{borderTopLeftRadius:0,paddingRight:8},itemLeft:{alignSelf:`flex-end`},itemCenter:{alignSelf:`center`},itemRight:{alignSelf:`flex-start`},selectedIndicatorRight:{alignSelf:`flex-start`,borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorCenter:{alignSelf:`center`,borderRadius:0},selectedIndicatorLeft:{alignSelf:`flex-end`,borderTopRightRadius:0,borderBottomRightRadius:0}}),Exn=q2(0,220),Dxn=q2(0,300),Oxn=S5(({isVisible:e,onCancel:t,onModalHide:n})=>{let{t:r}=RK(),{isOnboardingFinished:i}=z4(),{biologicalSex:a}=_5(),{setSetupCalculatorStoreValues:o}=g5(),{modalStoreActions:s}=Y8(),c=i?H6.biologicalSex:a,[l,u]=(0,H.useState)(void 0),d=!H6.biologicalSex,f=+!!d,p=(0,H.useMemo)(()=>{switch(c){case Y.BiologicalSex.Male:return 0;case Y.BiologicalSex.Female:return 1;case Y.BiologicalSex.Unspecified:return 2;default:return 0}},[c]),m=(0,H.useCallback)(async(e,n)=>{if(d&&n===0){o({biologicalSex:void 0}),t();return}let r=n-f,a=Y.BiologicalSex.Male;if(r===1&&(a=Y.BiologicalSex.Female),r===2&&(a=Y.BiologicalSex.Unspecified),c===a){t();return}i?u(await H6.postUserSettings({biologicalSex:a})):o({biologicalSex:a}),t()},[c,i,d,f,t,o]),h=(0,H.useCallback)(()=>{l===!1?s.set({showSyncErrorModal:!0}):n&&n(),u(void 0)},[s,l,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(c5,{isVisible:e,items:d?[`-`,r(`biological_sex_male`),r(`biological_sex_female`),r(`biological_sex_no_answer`)]:[r(`biological_sex_male`),r(`biological_sex_female`),r(`biological_sex_no_answer`)],onConfirm:m,onCancel:t,initialScrollIndex:p,onModalHide:h,testID:`biological_sex_wheel_picker`}),(0,W.jsx)(d5,{})]})}),kxn=S5(({isVisible:e,onCancel:t,onModalHide:n})=>{let{t:r}=RK(),{modalStoreActions:i}=Y8(),a=H6.diabetesType,[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(void 0),u=(0,H.useMemo)(()=>a===Y.DiabetesType.Type1?0:1,[a]),d=(0,H.useCallback)(async(e,n)=>{let r=n===0?Y.DiabetesType.Type1:Y.DiabetesType.Type2;if(a===r){t();return}l(await H6.postUserSettings({diabetesType:r})),t()},[a,t]),f=(0,H.useCallback)(()=>{s(!1)},[]),p=(0,H.useCallback)(()=>{c===!1?i.set({showSyncErrorModal:!0}):c&&a===Y.DiabetesType.Type2?s(!0):n&&n(),l(void 0)},[i,c,a,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(c5,{isVisible:e,items:[r(`type_of_diabetes_type1`),r(`type_of_diabetes_type2`)],onConfirm:d,onCancel:t,initialScrollIndex:u,onModalHide:p,testID:`diabetes_type_wheel_picker`}),(0,W.jsx)(Q2,{title:r(`modal_diabetes2_title`),isVisible:o,message:r(`modal_diabetes2_body`),onModalHide:n,buttons:[{title:r(`button_close`),onPress:f}]}),(0,W.jsx)(d5,{})]})});V(),l0();function Axn(){let{t:e}=RK(),{COLORS:t}=J(),{bottom:n}=n0(),{modalStoreActions:r}=Y8(),{colorScheme:i}=d0(),a=_0(i),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(void 0),{birthDate:v,diabetesType:y,biologicalSex:b,weightKg:x,heightCm:S}=H6;if(y===void 0)throw Error(`[AboutSection::render] diatbetesType must be defined.`);let C=(0,H.useMemo)(()=>v?new Date(v):void 0,[v]),w=(0,H.useMemo)(()=>y===Y.DiabetesType.Type1?`type_of_diabetes_type1`:`type_of_diabetes_type2`,[y]),T=(0,H.useCallback)(async e=>{e!==S&&_(await H6.postUserSettings({height:e})),d(!1)},[S]),E=(0,H.useCallback)(async e=>{e!==x&&_(await H6.postUserSettings({weight:e})),p(!1)},[x]),D=(0,H.useMemo)(()=>{if(S===void 0)return 0;let e=Math.round(S*10)/10;return Exn.indexOf(e.toString())},[S]),O=(0,H.useMemo)(()=>{if(x===void 0)return 0;let e=Math.round(x*10)/10;return Dxn.indexOf(e.toString())},[x]),k=async e=>{e.toISOString()!==v&&_(await H6.postUserSettings({birthday:e.toISOString()})),h(!1)},A=(0,H.useCallback)(()=>{g===!1&&r.set({showSyncErrorModal:!0}),_(void 0)},[r,g]),ee=(0,H.useCallback)(()=>{A()},[A]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(B,{children:(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`my_profile_birth`),value:C?C.toLocaleDateString():`-`,testID:`date-of-birth`,onPress:()=>{h(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_diabetes_type`),value:e(w),testID:`diabetes-type`,onPress:()=>{s(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_sex`),testID:`biologicalSex`,value:b?ayt[b]():`-`,onPress:()=>{l(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_height`),value:`${S??`-`} cm`,testID:`height`,onPress:()=>{d(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_weight`),value:`${x??`-`} kg`,testID:`weight`,onPress:()=>{p(!0)}})]})}),HK?(0,W.jsx)(vfn,{testID:`birthday-date-picker`,display:`spinner`,minimumDate:new Date(1900,0,1),maximumDate:new Date,date:C,isVisible:m,onConfirm:k,onCancel:()=>{h(!1)},customConfirmButtonIOS:xfn,customCancelButtonIOS:Sfn,pickerContainerStyleIOS:{backgroundColor:t.iosKeyboardPicker},modalStyleIOS:{paddingBottom:n},themeVariant:a,isDarkModeEnabled:a===`dark`,onHide:ee,pickerStyleIOS:{alignSelf:`center`}}):(0,W.jsx)(Txn,{isVisible:m,initialValue:C??new Date,onConfirm:k,onCancel:()=>{h(!1)},onModalHide:ee}),(0,W.jsx)(kxn,{isVisible:o,onCancel:()=>{s(!1)},onModalHide:A}),(0,W.jsx)(Oxn,{isVisible:c,onCancel:()=>{l(!1)},onModalHide:A}),(0,W.jsx)(c5,{isVisible:u,items:Exn,onConfirm:T,onCancel:()=>{d(!1)},initialScrollIndex:D,onModalHide:A,testID:`height_wheel_picker`}),(0,W.jsx)(c5,{isVisible:f,items:Dxn,onConfirm:E,onCancel:()=>{p(!1)},initialScrollIndex:O,onModalHide:A,testID:`weight_wheel_picker`}),(0,W.jsx)(d5,{onModalHide:()=>{_(void 0)}})]})}var jxn=S5(Axn);V();function Mxn(){let{t:e}=RK();return(0,W.jsxs)(ys,{testID:`profile-screen-scroll`,style:Nxn.scrollView,contentContainerStyle:Nxn.contentContainer,children:[(0,W.jsx)(t4,{title:e(`my_profile_account`),testID:`first-name`,renderRightSlot:()=>(0,W.jsx)(z2,{}),onPress:()=>{window.location.href=`/account`}}),(0,W.jsx)(jxn,{})]})}var Nxn=R.create({scrollView:{paddingHorizontal:16},contentContainer:{paddingVertical:32,flexGrow:1,gap:24}});V(),new Xf(Oi.RNDeviceInfo);var Pxn=c({getBaseOs:()=>tSn,getBatteryLevel:()=>Zxn,getBatteryLevelSync:()=>Qxn,getFreeDiskStorage:()=>iSn,getFreeDiskStorageSync:()=>aSn,getInstallReferrer:()=>Gxn,getInstallReferrerSync:()=>Lxn,getMaxMemory:()=>oSn,getMaxMemorySync:()=>Ixn,getPowerState:()=>lSn,getPowerStateSync:()=>uSn,getTotalDiskCapacity:()=>nSn,getTotalDiskCapacitySync:()=>rSn,getTotalMemory:()=>cSn,getTotalMemorySync:()=>Vxn,getUsedMemory:()=>sSn,getUsedMemorySync:()=>Hxn,getUserAgent:()=>Kxn,getUserAgentSync:()=>zxn,isAirplaneMode:()=>eSn,isAirplaneModeSync:()=>Rxn,isBatteryCharging:()=>qxn,isBatteryChargingSync:()=>Jxn,isCameraPresent:()=>Yxn,isCameraPresentSync:()=>Xxn,isLocationEnabled:()=>$xn,isLocationEnabledSync:()=>Bxn}),A9,j9,Fxn,M9,N9,Ixn,Lxn,Rxn,zxn,Bxn,Vxn,Hxn,Uxn,Wxn,Gxn,Kxn,qxn,Jxn,Yxn,Xxn,Zxn,Qxn,$xn,eSn,tSn,nSn,rSn,iSn,aSn,oSn,sSn,cSn,lSn,uSn,dSn=o((()=>{V(),A9=new Xf(Oi.RNDeviceInfo),j9=!1,Fxn=-1,M9={},N9=e=>{let{level:t,charging:n,chargingtime:r,dischargingtime:i}=e;return{batteryLevel:t,lowPowerMode:!1,batteryState:t===1?`full`:n?`charging`:`unplugged`,chargingtime:r,dischargingtime:i}},Ixn=()=>window.performance&&window.performance.memory?window.performance.memory.jsHeapSizeLimit:-1,Lxn=()=>document.referrer,Rxn=()=>!!navigator.onLine,zxn=()=>window.navigator.userAgent,Bxn=()=>!!navigator.geolocation,Vxn=()=>navigator.deviceMemory?navigator.deviceMemory*1e9:-1,Hxn=()=>window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:-1,Uxn=()=>{typeof navigator>`u`||!navigator.getBattery||navigator.getBattery().then(e=>{j9=e.charging,e.addEventListener(`chargingchange`,()=>{let{charging:t}=e;j9=t,M9=N9(e),A9.emit(`RNDeviceInfo_powerStateDidChange`,M9)}),e.addEventListener(`levelchange`,()=>{let{level:t}=e;Fxn=t,M9=N9(e),A9.emit(`RNDeviceInfo_batteryLevelDidChange`,t),t<.2&&A9.emit(`RNDeviceInfo_batteryLevelIsLow`,t)})})},Wxn=()=>{let e=window.navigator.userAgent,t=window.navigator.platform,n=[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`],r=[`Win32`,`Win64`,`Windows`,`WinCE`],i=[`iPhone`,`iPad`,`iPod`],a=t;return n.indexOf(t)===-1?i.indexOf(t)===-1?r.indexOf(t)===-1?/Android/.test(e)?a=`Android`:!a&&/Linux/.test(t)&&(a=`Linux`):a=`Windows`:a=`iOS`:a=`Mac OS`,a},Uxn(),Gxn=async()=>Lxn(),Kxn=async()=>zxn(),qxn=async()=>navigator.getBattery?navigator.getBattery().then(e=>e.charging):!1,Jxn=()=>j9,Yxn=async()=>navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?navigator.mediaDevices.enumerateDevices().then(e=>!!e.find(e=>e.kind===`videoinput`)):!1,Xxn=()=>(console.log(`[react-native-device-info] isCameraPresentSync not supported - please use isCameraPresent`),!1),Zxn=async()=>navigator.getBattery?navigator.getBattery().then(e=>e.level):-1,Qxn=()=>Fxn,$xn=async()=>Bxn(),eSn=async()=>Rxn(),tSn=async()=>Wxn(),nSn=async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e})=>e):-1,rSn=()=>(console.log(`[react-native-device-info] getTotalDiskCapacitySync not supported - please use getTotalDiskCapacity`),-1),iSn=async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e,usage:t})=>e-t):-1,aSn=()=>(console.log(`[react-native-device-info] getFreeDiskStorageSync not supported - please use getFreeDiskStorage`),-1),oSn=async()=>Ixn(),sSn=async()=>Hxn(),cSn=async()=>Vxn(),lSn=async()=>navigator.getBattery?navigator.getBattery().then(e=>N9(e)):{},uSn=()=>M9}));V();var fSn=Oi.RNDeviceInfo;if((z.OS===`web`||z.OS===`dom`)&&(fSn=(dSn(),d(Pxn))),!fSn&&(z.OS===`android`||z.OS===`ios`||z.OS===`web`||z.OS===`dom`))throw Error("react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:\n • For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.\n • Rebuild and re-run the app.\n • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-device-info/react-native-device-info");var $=fSn;V();var P9={};function pSn(e,t,n){let r={};return e.filter(e=>z.OS==e).forEach(e=>r[e]=t),z.select({...r,default:n})}function mSn({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:r}){if(r&&P9[r]!=null)return P9[r];{let i=pSn(t,e,()=>n)();return r&&(P9[r]=i),i}}async function hSn({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:r}){if(r&&P9[r]!=null)return P9[r];{let i=await pSn(t,e,()=>Promise.resolve(n))();return r&&(P9[r]=i),i}}function F9({syncGetter:e,...t}){return[(...e)=>hSn({...t,getter:()=>t.getter(...e)}),(...n)=>mSn({...t,getter:()=>e(...n)})]}V();var[gSn,_Sn]=F9({memoKey:`uniqueId`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getUniqueId(),syncGetter:()=>$.getUniqueIdSync(),defaultValue:`unknown`}),[vSn,ySn]=F9({memoKey:`instanceId`,supportedPlatforms:[`android`],getter:()=>$.getInstanceId(),syncGetter:()=>$.getInstanceIdSync(),defaultValue:`unknown`}),[bSn,xSn]=F9({memoKey:`serialNumber`,supportedPlatforms:[`android`,`windows`],getter:()=>$.getSerialNumber(),syncGetter:()=>$.getSerialNumberSync(),defaultValue:`unknown`}),[SSn,CSn]=F9({memoKey:`androidId`,supportedPlatforms:[`android`],getter:()=>$.getAndroidId(),syncGetter:()=>$.getAndroidIdSync(),defaultValue:`unknown`}),[wSn,TSn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getIpAddress(),syncGetter:()=>$.getIpAddressSync(),defaultValue:`unknown`}),[ESn,DSn]=F9({supportedPlatforms:[`android`,`windows`,`web`],getter:()=>$.isCameraPresent(),syncGetter:()=>$.isCameraPresentSync(),defaultValue:!1}),[OSn,kSn]=F9({memoKey:`manufacturer`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>z.OS==`ios`?Promise.resolve(`Apple`):$.getSystemManufacturer(),syncGetter:()=>z.OS==`ios`?`Apple`:$.getSystemManufacturerSync(),defaultValue:`unknown`}),ASn=()=>mSn({defaultValue:`unknown`,supportedPlatforms:[`ios`,`android`,`windows`],memoKey:`systemName`,getter:()=>z.select({ios:$.systemName,android:`Android`,windows:`Windows`,default:`unknown`})}),jSn=()=>mSn({defaultValue:`unknown`,getter:()=>$.systemVersion,supportedPlatforms:[`android`,`ios`,`windows`],memoKey:`systemVersion`}),[MSn,NSn]=F9({memoKey:`buildId`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getBuildId(),syncGetter:()=>$.getBuildIdSync(),defaultValue:`unknown`}),[PSn,FSn]=F9({memoKey:`apiLevel`,supportedPlatforms:[`android`],getter:()=>$.getApiLevel(),syncGetter:()=>$.getApiLevelSync(),defaultValue:-1}),[ISn,LSn]=F9({memoKey:`installerPackageName`,supportedPlatforms:[`android`,`windows`,`ios`],getter:()=>$.getInstallerPackageName(),syncGetter:()=>$.getInstallerPackageNameSync(),defaultValue:`unknown`}),[RSn,zSn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getDeviceName(),syncGetter:()=>$.getDeviceNameSync(),defaultValue:`unknown`}),[BSn,VSn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getUsedMemory(),syncGetter:()=>$.getUsedMemorySync(),defaultValue:-1}),[HSn,USn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getFontScale(),syncGetter:()=>$.getFontScaleSync(),defaultValue:-1}),[WSn,GSn]=F9({memoKey:`bootloader`,supportedPlatforms:[`android`],getter:()=>$.getBootloader(),syncGetter:()=>$.getBootloaderSync(),defaultValue:`unknown`}),[KSn,qSn]=F9({getter:()=>$.getDevice(),syncGetter:()=>$.getDeviceSync(),defaultValue:`unknown`,memoKey:`device`,supportedPlatforms:[`android`]}),[JSn,YSn]=F9({memoKey:`display`,supportedPlatforms:[`android`],getter:()=>$.getDisplay(),syncGetter:()=>$.getDisplaySync(),defaultValue:`unknown`}),[XSn,ZSn]=F9({memoKey:`fingerprint`,supportedPlatforms:[`android`],getter:()=>$.getFingerprint(),syncGetter:()=>$.getFingerprintSync(),defaultValue:`unknown`}),[QSn,$Sn]=F9({memoKey:`hardware`,supportedPlatforms:[`android`],getter:()=>$.getHardware(),syncGetter:()=>$.getHardwareSync(),defaultValue:`unknown`}),[eCn,tCn]=F9({memoKey:`host`,supportedPlatforms:[`android`,`windows`],getter:()=>$.getHost(),syncGetter:()=>$.getHostSync(),defaultValue:`unknown`}),[nCn,rCn]=F9({memoKey:`hostNames`,supportedPlatforms:[`windows`],getter:()=>$.getHostNames(),syncGetter:()=>$.getHostNamesSync(),defaultValue:[]}),[iCn,aCn]=F9({memoKey:`product`,supportedPlatforms:[`android`],getter:()=>$.getProduct(),syncGetter:()=>$.getProductSync(),defaultValue:`unknown`}),[oCn,sCn]=F9({memoKey:`tags`,supportedPlatforms:[`android`],getter:()=>$.getTags(),syncGetter:()=>$.getTagsSync(),defaultValue:`unknown`}),[cCn,lCn]=F9({memoKey:`type`,supportedPlatforms:[`android`],getter:()=>$.getType(),syncGetter:()=>$.getTypeSync(),defaultValue:`unknown`}),[uCn,dCn]=F9({memoKey:`baseOs`,supportedPlatforms:[`android`,`web`,`windows`],getter:()=>$.getBaseOs(),syncGetter:()=>$.getBaseOsSync(),defaultValue:`unknown`}),[fCn,pCn]=F9({memoKey:`previewSdkInt`,supportedPlatforms:[`android`],getter:()=>$.getPreviewSdkInt(),syncGetter:()=>$.getPreviewSdkIntSync(),defaultValue:-1}),[mCn,hCn]=F9({memoKey:`securityPatch`,supportedPlatforms:[`android`],getter:()=>$.getSecurityPatch(),syncGetter:()=>$.getSecurityPatchSync(),defaultValue:`unknown`}),[gCn,_Cn]=F9({memoKey:`codeName`,supportedPlatforms:[`android`],getter:()=>$.getCodename(),syncGetter:()=>$.getCodenameSync(),defaultValue:`unknown`}),[vCn,yCn]=F9({memoKey:`incremental`,supportedPlatforms:[`android`],getter:()=>$.getIncremental(),syncGetter:()=>$.getIncrementalSync(),defaultValue:`unknown`}),[bCn,xCn]=F9({memoKey:`emulator`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.isEmulator(),syncGetter:()=>$.isEmulatorSync(),defaultValue:!1}),[SCn,CCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.isPinOrFingerprintSet(),syncGetter:()=>$.isPinOrFingerprintSetSync(),defaultValue:!1}),[wCn,TCn]=F9({supportedPlatforms:[`android`],getter:()=>$.hasGms(),syncGetter:()=>$.hasGmsSync(),defaultValue:!1}),[ECn,DCn]=F9({supportedPlatforms:[`android`],getter:()=>$.hasHms(),syncGetter:()=>$.hasHmsSync(),defaultValue:!1}),[OCn,kCn]=F9({memoKey:`firstInstallTime`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getFirstInstallTime(),syncGetter:()=>$.getFirstInstallTimeSync(),defaultValue:-1}),[ACn,jCn]=F9({memoKey:`installReferrer`,supportedPlatforms:[`android`,`windows`,`web`],getter:()=>$.getInstallReferrer(),syncGetter:()=>$.getInstallReferrerSync(),defaultValue:`unknown`}),[MCn,NCn]=F9({memoKey:`lastUpdateTime`,supportedPlatforms:[`android`],getter:()=>$.getLastUpdateTime(),syncGetter:()=>$.getLastUpdateTimeSync(),defaultValue:-1}),[PCn,FCn]=F9({memoKey:`startupTime`,supportedPlatforms:[`android`,`ios`],getter:()=>$.getStartupTime(),syncGetter:()=>$.getStartupTimeSync(),defaultValue:-1}),[ICn,LCn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.getCarrier(),syncGetter:()=>$.getCarrierSync(),defaultValue:`unknown`}),[RCn,zCn]=F9({memoKey:`totalMemory`,supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getTotalMemory(),syncGetter:()=>$.getTotalMemorySync(),defaultValue:-1}),[BCn,VCn]=F9({memoKey:`maxMemory`,supportedPlatforms:[`android`,`windows`,`web`],getter:()=>$.getMaxMemory(),syncGetter:()=>$.getMaxMemorySync(),defaultValue:-1}),[HCn,UCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getTotalDiskCapacity(),syncGetter:()=>$.getTotalDiskCapacitySync(),defaultValue:-1}),[WCn,GCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:(e=`total`)=>z.OS===`ios`?$.getFreeDiskStorage(e):$.getFreeDiskStorage(),syncGetter:(e=`total`)=>z.OS===`ios`?$.getFreeDiskStorageSync(e):$.getFreeDiskStorageSync(),defaultValue:-1}),[KCn,qCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getBatteryLevel(),syncGetter:()=>$.getBatteryLevelSync(),defaultValue:-1}),[JCn,YCn]=F9({supportedPlatforms:[`ios`,`android`,`windows`,`web`],getter:()=>$.getPowerState(),syncGetter:()=>$.getPowerStateSync(),defaultValue:{}}),[XCn,ZCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.isBatteryCharging(),syncGetter:()=>$.isBatteryChargingSync(),defaultValue:!1}),[QCn,$Cn]=F9({supportedPlatforms:[`android`,`web`],getter:()=>$.isAirplaneMode(),syncGetter:()=>$.isAirplaneModeSync(),defaultValue:!1}),[ewn,twn]=F9({memoKey:`_supportedAbis`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getSupportedAbis(),syncGetter:()=>$.getSupportedAbisSync(),defaultValue:[]}),[nwn,rwn]=F9({memoKey:`_supported32BitAbis`,supportedPlatforms:[`android`],getter:()=>$.getSupported32BitAbis(),syncGetter:()=>$.getSupported32BitAbisSync(),defaultValue:[]}),[iwn,awn]=F9({memoKey:`_supported64BitAbis`,supportedPlatforms:[`android`],getter:()=>$.getSupported64BitAbis(),syncGetter:()=>$.getSupported64BitAbisSync(),defaultValue:[]}),[own,swn]=F9({supportedPlatforms:[`android`],getter:()=>$.getSystemAvailableFeatures(),syncGetter:()=>$.getSystemAvailableFeaturesSync(),defaultValue:[]}),[cwn,lwn]=F9({supportedPlatforms:[`android`,`ios`,`web`],getter:()=>$.isLocationEnabled(),syncGetter:()=>$.isLocationEnabledSync(),defaultValue:!1}),[uwn,dwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.isHeadphonesConnected(),syncGetter:()=>$.isHeadphonesConnectedSync(),defaultValue:!1}),[fwn,pwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.isWiredHeadphonesConnected(),syncGetter:()=>$.isWiredHeadphonesConnectedSync(),defaultValue:!1}),[mwn,hwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.isBluetoothHeadphonesConnected(),syncGetter:()=>$.isBluetoothHeadphonesConnectedSync(),defaultValue:!1}),[gwn,_wn]=F9({supportedPlatforms:[`windows`],getter:()=>$.isMouseConnected(),syncGetter:()=>$.isMouseConnectedSync(),defaultValue:!1}),[vwn,ywn]=F9({supportedPlatforms:[`windows`],getter:()=>$.isKeyboardConnected(),syncGetter:()=>$.isKeyboardConnectedSync(),defaultValue:!1}),[bwn,xwn]=F9({supportedPlatforms:[`android`],getter:()=>$.getSupportedMediaTypeList(),syncGetter:()=>$.getSupportedMediaTypeListSync(),defaultValue:[]}),[Swn,Cwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.getAvailableLocationProviders(),syncGetter:()=>$.getAvailableLocationProvidersSync(),defaultValue:{}}),[wwn,Twn]=F9({supportedPlatforms:[`ios`],getter:()=>$.getBrightness(),syncGetter:()=>$.getBrightnessSync(),defaultValue:-1});new Xf(Oi.RNDeviceInfo),V();var Ewn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{navigate:n}=XQ(),r=(0,H.useCallback)(async()=>{if(VK)n(Q.SupportContact);else{let e=`App version: ${x6}\n${ASn()} version: ${jSn()}`;await vre.openURL(`mailto:support@hedia.com?subject=Hedia support&body=${e}`)}},[n]);return(0,W.jsxs)(ys,{contentContainerStyle:Dwn.wrapper,children:[(0,W.jsx)(X,{style:[Dwn.title,{color:t.labelPrimary}],children:e(`support_title`)}),(0,W.jsxs)(B,{style:Dwn.buttons,children:[(0,W.jsx)(I2,{title:e(`button_email`),onPress:r,testID:`send_email_button`}),(0,W.jsx)(I2,{title:e(`button_support_page`),onPress:()=>{n(Q.SupportWebView)},testID:`open_support_page_button`,type:F2.Secondary}),(0,W.jsx)(I2,{title:e(`button_instructions`),onPress:()=>{C6(S6.SettingsIFU),n(Q.IFU)},testID:`open_ifu_page_button`,type:F2.Secondary})]})]})},Dwn=R.create({wrapper:{flex:1,justifyContent:`center`,paddingHorizontal:16},title:{...q.Poppins.bold_2XL,marginBottom:48,textAlign:`center`},buttons:{gap:16}});V();var Own=()=>{let{t:e}=RK(),{COLORS:t}=J(),{colorScheme:n,setColorScheme:r}=d0(),i=U8(),{bottomWithScroll:a}=B2(),o=(0,H.useCallback)(e=>{let t=`colorScheme-${e.toLowerCase()}`;return u0[e]===n?`${t}-selected`:t},[n]),s=(0,H.useCallback)(e=>{u0[e]!==n&&r(u0[e])},[n,r]);return(0,W.jsxs)(ys,{contentContainerStyle:[I9.scrollView,{paddingTop:i+16,paddingBottom:a}],children:[(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`theme_system`),renderRightSlot:()=>(0,W.jsx)(B,{style:I9.checkmarkContainer,children:u0.System===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{s(`System`)},testID:o(`System`),displayType:e4.ListItem}),(0,W.jsx)(t4,{title:e(`theme_dark`),renderRightSlot:()=>(0,W.jsx)(B,{style:I9.checkmarkContainer,children:u0.Dark===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{s(`Dark`)},testID:o(`Dark`),displayType:e4.ListItem}),(0,W.jsx)(t4,{title:e(`theme_light`),renderRightSlot:()=>(0,W.jsx)(B,{style:I9.checkmarkContainer,children:u0.Light===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{s(`Light`)},testID:o(`Light`),displayType:e4.ListItem})]}),(0,W.jsx)(X,{style:[I9.description,{color:t.labelSecondary}],testID:`settings-colorScheme-hint`,children:e(`theme_subtitle`)})]})},I9=R.create({scrollView:{paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24},description:{...q.Poppins.regular_SM,margin:16}});V();var kwn=()=>{let{COLORS:e}=J(),{fontScale:t}=Cm(),n=t.toFixed(3);return(0,W.jsxs)(B,{style:{backgroundColor:e.textWarning,borderRadius:16,padding:8},children:[(0,W.jsx)(X,{style:[Awn.text,{color:e.bgPrimary}],children:`Font scale: ${n}`}),(0,W.jsx)(X,{style:[Awn.textBold,{color:e.bgPrimary}],children:NK.HEDIA_API_URL_V2})]})},Awn=R.create({text:{...q.Poppins.regular_Base,textAlign:`center`},textBold:{...q.Poppins.semiBold_Base,textAlign:`center`}});V();function jwn(){let{t:e}=RK(),{COLORS:t}=J(),n=XQ(),[r,i]=(0,H.useState)(!0),a=(0,H.useCallback)(()=>{C6(S6.SettingsProfile),n.navigate(Q.Profile)},[n]),o=(0,H.useCallback)(()=>{C6(S6.SettingsGlucose),n.navigate(Q.GlucoseSettings)},[n]),s=(0,H.useCallback)(()=>{C6(S6.SettingsInsulin),n.navigate(Q.InsulinSettingsStack,{screen:Q.InsulinSettings})},[n]),c=(0,H.useCallback)(()=>{C6(S6.SettingsActivity),n.navigate(Q.ActivitySettings)},[n]),l=(0,H.useCallback)(()=>{C6(S6.SettingsSupport),n.navigate(Q.Support)},[n]),u=(0,H.useCallback)(()=>{C6(S6.SettingsLegal),n.navigate(Q.Legal)},[n]);return(0,W.jsxs)(ys,{testID:`scroll-settings`,style:L9.scrollView,contentContainerStyle:L9.scrollViewContentContainer,contentInsetAdjustmentBehavior:`automatic`,children:[(0,W.jsx)(t4,{title:e(`settings_card_my_profile`),testID:`edit-profile-button`,renderRightSlot:()=>(0,W.jsx)(z2,{}),onPress:a}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`settings_card_glucose`),testID:`settings-glucose`,onPress:o,renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:e(`settings_card_insulin_settings`),testID:`settings-insulin`,onPress:s,renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:e(`settings_card_physical_activity`),testID:`settings-activity`,onPress:c,renderRightSlot:()=>(0,W.jsx)(z2,{})})]}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`settings_support`),testID:`settings-support`,onPress:l,renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:e(`settings_card_legal`),testID:`settings-legal`,onPress:u,renderRightSlot:()=>(0,W.jsx)(z2,{})})]}),(0,W.jsx)(_p,{onPress:()=>{i(!r)},style:L9.versionContainer,children:(0,W.jsx)(X,{style:[L9.versionText,{color:t.labelSecondary}],children:r?x6:`(${znn})`})}),NK.IS_PRODUCTION!==`true`&&(0,W.jsx)(B,{children:(0,W.jsx)(kwn,{})})]})}var L9=R.create({scrollView:{flex:1,paddingHorizontal:16},scrollViewContentContainer:{paddingVertical:32,flexGrow:1,gap:24},versionContainer:{alignItems:`center`,marginTop:`auto`},versionText:{...q.Poppins.regular_Base}});V();function Mwn(){let{COLORS:e}=J();return(0,W.jsx)(B,{style:[Nwn.separator,{backgroundColor:e.divider}]})}var Nwn=R.create({separator:{height:1}}),R9=J2(Y.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,Y.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX),z9=function(e){return e.DividendNumber=`109`,e.ExampleInsulinSensitivity=`2.2`,e}({}),Pwn=function(e){return e.DividendNumber=`1960`,e.ExampleInsulinSensitivity=`39.2`,e}({}),Fwn=J2(Y.CONSTANTS.INSULIN_SENSITIVITY_MIN,Y.CONSTANTS.INSULIN_SENSITIVITY_MAX),Iwn=q2(5,393);V();var Lwn=({onPress:e,isVisible:t})=>{let{t:n}=RK(),{COLORS:r}=J();return(0,W.jsxs)(Q2,{isVisible:t,title:n(`insulin_settings_modal_carb_ratio_title`),enableScroll:!0,buttons:[{title:n(`button_close`),onPress:e,testID:`close-button`}],children:[(0,W.jsx)(X,{testID:`insulin_settings_modal_carb_ratio_body`,style:[Rwn.bodyText,{color:r.labelSecondary}],children:n(`insulin_settings_modal_carb_ratio_body`)}),(0,W.jsx)(X,{testID:`insulin_settings_modal_carb_ratio_example`,style:{color:r.labelSecondary},children:n(`insulin_settings_modal_carb_example_body`)})]})},Rwn=R.create({bodyText:{marginTop:12,marginBottom:16}});V();var zwn=({glucoseUnit:e,onPress:t,isVisible:n})=>{let{t:r}=RK(),{COLORS:i}=J(),{text:a}=X6(e),o=e===Y.BloodGlucoseUnit.MMOL_L?z9.DividendNumber:Pwn.DividendNumber,s=e===Y.BloodGlucoseUnit.MMOL_L?z9.ExampleInsulinSensitivity:Pwn.ExampleInsulinSensitivity;return(0,W.jsxs)(Q2,{title:r(`modal_insulin_seneitivity_title`),isVisible:n,enableScroll:!0,buttons:[{title:r(`button_close`),onPress:t,testID:`close-button`}],children:[(0,W.jsx)(X,{testID:`insulin_sensitivity_modal_body`,style:[Bwn.bodyText,{color:i.labelSecondary}],children:r(`insulin_sensitivity_modal_body`,{dividerNumber:o})}),(0,W.jsx)(X,{testID:`insulin_sensitivity_modal_example`,style:{color:i.labelSecondary},children:r(`insulin_sensitivity_modal_example`,{dividerNumber:o,displayResult:s,displayUnit:a})})]})},Bwn=R.create({bodyText:{marginTop:12,marginBottom:16}});V();var Vwn=()=>{let{t:e}=RK(),{bloodGlucoseUnits:t}=_5(),n=H6.glucoseUnit??t;if(n===void 0)throw Error(`[HelpCalculatingSection::render] glucoseUnit must be defined.`);let[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(!1),s=n===Y.BloodGlucoseUnit.MMOL_L?z9.DividendNumber:Pwn.DividendNumber;return(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:e(`insulin_settings_learn_more_title`)}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{testID:`info-insulin-carbs-ratio`,title:e(`insulin_settings_learn_more_carb_ratio`),onPress:()=>{o(!0)},displayType:e4.ListItem}),(0,W.jsx)(t4,{testID:`info-insulin-sensitivity-${s}`,title:e(`insulin_settings_learn_more_sensitivity`),onPress:()=>{i(!0)},displayType:e4.ListItem})]}),(0,W.jsx)(zwn,{onPress:()=>{i(!1)},glucoseUnit:n,isVisible:r}),(0,W.jsx)(Lwn,{onPress:()=>{o(!1)},isVisible:a})]})};V();var Hwn=({withLockedSettings:e})=>{let{t}=RK(),{COLORS:n}=J(),{modalStoreActions:r}=Y8(),{glucoseUnit:i,treatmentParameters:a}=H6;if(i===void 0)throw Error(`[DailyInsulinTable::render] glucoseUnit is undefined.`);if(a===void 0)throw Error(`[DailyInsulinTable::render] parameters from userSettings must be defined and non-null.`);let o=a.use,[s,c]=(0,H.useState)(!1),[l,u]=(0,H.useState)(!1),[d,f]=(0,H.useState)(void 0),[p,m]=(0,H.useState)(0),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(),y=(0,H.useCallback)(async e=>{let t=Q6(e,i,Y.BloodGlucoseUnit.MMOL_L);if(t!==a.parameterIntervals[p].insulinSensitivity){let e={...a,parameterIntervals:a.parameterIntervals.map((e,n)=>n===p?{...e,insulinSensitivity:t}:e),updatedAt:new Date().toISOString()};f(await H6.postUserSettings({parameters:e}))}c(!1)},[i,a,p]),b=(0,H.useCallback)(async e=>{let t=Number(e.toFixed(1));if(t!==a.parameterIntervals[p].carbohydrateRatio){let e={...a,parameterIntervals:a.parameterIntervals.map((e,n)=>n===p?{...e,carbohydrateRatio:t}:e),updatedAt:new Date().toISOString()};f(await H6.postUserSettings({parameters:e}))}u(!1)},[a,p]),{text:x}=X6(i),S=(0,H.useMemo)(()=>[{title:t(`table_variable_insulin_time`),subtitle:t(`table_variable_time_unit`),scale:g0.s2},{title:t(`table_variable_insulin_sensitivity`),subtitle:t(`table_variable_insulin_sensitivity_unit`,{displayUnit:x}),scale:g0.s2},{title:t(`table_variable_insulin_carb`),subtitle:t(`table_variable_insulin_carb_unit`),scale:g0.s2}],[x,t]),C=(0,H.useMemo)(()=>i===Y.BloodGlucoseUnit.MG_DL?Iwn:Fwn,[i]),w=(0,H.useMemo)(()=>{let e=a.parameterIntervals[p].insulinSensitivity,t=$6(e,Y.BloodGlucoseUnit.MMOL_L,i);return C.findIndex(e=>e===t)},[C,i,a.parameterIntervals,p]),T=(0,H.useMemo)(()=>{let e=a.parameterIntervals[p].carbohydrateRatio.toFixed(1);return R9.findIndex(t=>t===e)},[a.parameterIntervals,p]),E=e=>{let t=a.parameterIntervals[(e-1+a.parameterIntervals.length)%a.parameterIntervals.length].startTime,n=a.parameterIntervals[(e+1+a.parameterIntervals.length)%a.parameterIntervals.length].startTime,r=a.parameterIntervals[e].startTime,i=k7(r,`HH:mm`,new Date),o=k7(t,`HH:mm`,new Date),s=k7(n,`HH:mm`,new Date);q7(i,o)&&q7(i,s)?v({current:i,min:U2(k7(t,`HH:mm`,nxn(new Date,1)),1),max:W2(s,1)}):C9(i,o)&&C9(i,s)?v({current:i,min:U2(o,1),max:W2(k7(n,`HH:mm`,O7(new Date,1)),1)}):v({current:i,min:U2(o,1),max:W2(s,1)}),m(e),g(!0)},D=e=>{m(e),c(!0)},O=e=>{m(e),u(!0)},k=(0,H.useCallback)(async e=>{let t=Y6(e,`HH:mm`);if(t!==a.parameterIntervals[p].startTime){let e=[...a.parameterIntervals],n={...e[p]};n.startTime=t,e[p]=n,f(await H6.postUserSettings({parameters:{...a,parameterIntervals:e,updatedAt:new Date().toISOString()}}))}g(!1)},[a,p]),A=(0,H.useCallback)(()=>{g(!1)},[]),ee=(0,H.useCallback)(async e=>{let t={...a,use:e?Y.Usage.Intervals:Y.Usage.Overall,updatedAt:new Date().toISOString()},n=await H6.postUserSettings({parameters:t});r.set({showSyncErrorModal:!n})},[a,r]),te=(0,H.useCallback)(()=>{d===!1&&r.set({showSyncErrorModal:!0}),f(void 0)},[r,d]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(y9,{columnDisposition:[2,3,3],children:[(0,W.jsx)(E4,{testID:`daily-interval-switch`,title:t(`variable_insulin_settings_title`),message:t(`variable_insulin_settings_body`),value:o===Y.Usage.Intervals,onValueChange:e(ee),style:B9.switchContainer}),(0,W.jsx)(_9,{disabled:o!==Y.Usage.Intervals,children:S.map((e,t)=>(0,W.jsxs)(x9,{style:t===0&&B9.firstTableCell,children:[(0,W.jsx)(X,{maxFontSizeMultiplier:e.scale,style:[B9.tableHeaderTitle,{color:n.labelPrimary},t!==0&&B9.tableHeaderTitleWithMargin],children:e.title}),(0,W.jsx)(X,{style:[B9.tableSubtitle,{color:n.textTableSecondary}],children:e.subtitle})]},e.title))}),Object.keys(BK).map((t,r)=>(0,W.jsxs)(v9,{disabled:o!==Y.Usage.Intervals,children:[(0,W.jsxs)(b9,{onPress:e(()=>{E(r)}),style:B9.firstTableCell,children:[(0,W.jsx)(X,{maxFontSizeMultiplier:g0.s2,style:[B9.tableTitle,{color:n.textTableHighlight}],children:a.parameterIntervals[r].startTime}),(0,W.jsx)(X,{style:[B9.tableSubtitle,{color:n.textTableSecondary}],children:iyt[t]()})]}),(0,W.jsx)(b9,{testID:`${t.toLowerCase()}-insulin`,onPress:e(()=>{D(r)}),children:(0,W.jsx)(X,{maxFontSizeMultiplier:g0.s2,style:[B9.tableText,{color:n.textTableHighlight}],children:$6(a.parameterIntervals[r].insulinSensitivity,Y.BloodGlucoseUnit.MMOL_L,i)})}),(0,W.jsx)(b9,{testID:`${t.toLowerCase()}-carbs`,onPress:e(()=>{O(r)}),children:(0,W.jsx)(X,{maxFontSizeMultiplier:g0.s2,style:[B9.tableText,{color:n.textTableHighlight}],children:a.parameterIntervals[r].carbohydrateRatio.toFixed(1)})})]},t))]}),(0,W.jsx)(oxn,{isVisible:h,initialValue:_?.current??new Date,min:_?.min,max:_?.max,onConfirm:k,onCancel:A,onModalHide:te}),(0,W.jsx)(c5,{isVisible:s,items:C,initialScrollIndex:w,onConfirm:y,onCancel:()=>{c(!1)},onModalHide:te,testID:`insulin_sensitivity_picker`}),(0,W.jsx)(c5,{isVisible:l,items:R9,initialScrollIndex:T,onConfirm:b,onCancel:()=>{u(!1)},onModalHide:te,testID:`insulin_to_carb_ratio_picker`})]})},B9=R.create({switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0},firstTableCell:{paddingLeft:16,alignItems:`flex-start`,justifyContent:`space-between`,borderLeftWidth:0},tableHeaderTitle:{...q.Poppins.medium_SM,textAlign:`center`},tableHeaderTitleWithMargin:{marginHorizontal:8},tableTitle:{...q.Poppins.medium_Base},tableSubtitle:{...q.Poppins.regular_XS},tableText:{...q.Poppins.medium_Base}}),Uwn=S5(Hwn);V();var Wwn={Lantus:()=>LK(`long-acting_insulin_option1`),Basaglar:()=>LK(`long-acting_insulin_option2`),Tuojeo:()=>LK(`long-acting_insulin_option3`),Levemir:()=>LK(`long-acting_insulin_option4`),Tresiba:()=>LK(`long-acting_insulin_option5`),Other:()=>LK(`long-acting_insulin_option6`),None:()=>LK(`long-acting_insulin_option7`)},Gwn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),{longActingInsulin:n,treatmentParameters:r}=H6,i=(0,H.useCallback)(async t=>{t!==n&&(await H6.postUserSettings({longActingInsulin:Y.LongActingInsulin[t],parameters:r?{...r,updatedAt:new Date().toISOString()}:void 0})||e.set({showSyncErrorModal:!0}))},[n,r,e]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[Kwn.scrollView,{paddingTop:t+16}],children:[(0,W.jsx)(t4.Container,{children:Object.keys(Y.LongActingInsulin).map(e=>(0,W.jsx)(t4,{title:Wwn[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:Kwn.checkmarkContainer,children:Y.LongActingInsulin[e]===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>i(e),displayType:e4.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`},e))}),(0,W.jsx)(d5,{})]})},Kwn=R.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),qwn=S5(Gwn);V();var Jwn={Novorapid:()=>LK(`rapid-acting_insulin_option1`),Fiasp:()=>LK(`rapid-acting_insulin_option2`),Humalog:()=>LK(`rapid-acting_insulin_option3`),Apidra:()=>LK(`rapid-acting_insulin_option4`),Other:()=>LK(`rapid-acting_insulin_option5`),None:()=>LK(`rapid-acting_insulin_option6`)},Ywn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),{fastActingInsulin:n,treatmentParameters:r}=H6,i=(0,H.useCallback)(async t=>{t!==n&&(await H6.postUserSettings({fastActingInsulin:Y.FastActingInsulin[t],parameters:r?{...r,updatedAt:new Date().toISOString()}:void 0})||e.set({showSyncErrorModal:!0}))},[n,r,e]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[Xwn.scrollView,{paddingTop:t+16}],children:[(0,W.jsx)(t4.Container,{children:Object.keys(Y.FastActingInsulin).map(e=>(0,W.jsx)(t4,{title:Jwn[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:Xwn.checkmarkContainer,children:Y.FastActingInsulin[e]===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>i(e),displayType:e4.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`},e))}),(0,W.jsx)(d5,{})]})},Xwn=R.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),Zwn=S5(Ywn);V();var V9={PenHalf:()=>LK(`treatment_type_option1`),PenWhole:()=>LK(`treatment_type_option2`),Pump:()=>LK(`treatment_type_option3`)},Qwn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),{injectionMethod:n,treatmentParameters:r}=H6,i=(0,H.useCallback)(async t=>{t!==n&&(await H6.postUserSettings({treatmentType:Y.InjectionMethod[t],parameters:r?{...r,updatedAt:new Date().toISOString()}:void 0})||e.set({showSyncErrorModal:!0}))},[n,r,e]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[{...$wn.scrollView,paddingTop:t+16}],children:[(0,W.jsx)(t4.Container,{children:Object.keys(Y.InjectionMethod).map(e=>(0,W.jsx)(t4,{title:V9[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:$wn.checkmarkContainer,children:Y.InjectionMethod[e]===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>i(e),testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`,displayType:e4.ListItem},e))}),(0,W.jsx)(d5,{})]})},$wn=R.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),eTn=S5(Qwn);V();function tTn({withLockedSettings:e}){let{t}=RK(),n=XQ(),{injectionMethod:r,fastActingInsulin:i,longActingInsulin:a}=H6;if(r===void 0)throw Error(`[TreatmentSection::render] injectionMethod must be defined and non-null.`);let o=(0,H.useMemo)(()=>V9[C5t(Y.InjectionMethod,r)](),[r]),s=(0,H.useMemo)(()=>i?Jwn[i]():`-`,[i]),c=(0,H.useMemo)(()=>a?Wwn[a]():`-`,[a]);return(0,W.jsxs)(B,{children:[(0,W.jsx)(t4,{title:t(`my_profile_treatment_type`),value:o,testID:`treatment-type`,onPress:e(()=>{n.navigate(Q.TreatmentType)}),renderRightSlot:()=>(0,W.jsx)(z2,{}),style:{marginBottom:24}}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:t(`my_profile_rapid-acting_insulin`),value:s,testID:`fast-acting-insulin`,onPress:e(()=>{n.navigate(Q.RapidActingInsulin)}),renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:t(`my_profile_long-acting_insulin`),value:c,testID:`long-acting-insulin`,onPress:e(()=>{n.navigate(Q.LongActingInsulin)}),renderRightSlot:()=>(0,W.jsx)(z2,{})})]})]})}var nTn=S5(tTn);V();var{MMOL_L:H9}=Y.BloodGlucoseUnit,rTn=()=>{let e=XQ(),{t}=RK(),{COLORS:n}=J(),{modalStoreActions:r}=Y8(),{bottomWithScroll:i}=B2(),a=U8(),{glucoseUnit:o,treatmentParameters:s,created:c}=H6;if(o===void 0)throw Error(`[InsulinSettings::render] glucoseUnit is undefined.`);if(s===void 0)throw Error(`[InsulinSettings::render] parameters from userSettings must be defined and non-null.`);let l=s.use===Y.Usage.Overall,{text:u}=X6(o),{carbohydrateRatio:d,insulinSensitivity:f}=s.overallParameters,[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(void 0),[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(!1),{areSettingsLocked:C,isPINSet:w,lockSettings:T,unlockSettings:E}=Abn(),[D,O]=(0,H.useState)(!1),[k,A]=(0,H.useState)(!1),ee=(0,H.useCallback)(()=>{C?b(!0):T()},[C,T]);(0,H.useEffect)(()=>{e.setOptions({header:()=>(0,W.jsx)(G8,{title:t(`insulin_settings_navigation`),LeftButton:(0,W.jsx)(Q8,{}),RightButton:w?(0,W.jsx)(jun,{onPress:ee,isLocked:C}):void 0,overlay:!0})})},[e,C,w,ee,t]);let te=(0,H.useMemo)(()=>o===H9?Fwn:Iwn,[o]),ne=()=>{m(!0)},re=()=>{g(!0)},ie=(0,H.useCallback)(async e=>{let t=Q6(e,o,H9);if(t!==s.overallParameters.insulinSensitivity){let e={...s,overallParameters:{...s.overallParameters,insulinSensitivity:t},updatedAt:new Date().toISOString()};v(await H6.postUserSettings({parameters:e}))}m(!1)},[o,s]),j=(0,H.useCallback)(async e=>{let t=Number(e.toFixed(1));if(t!==s.overallParameters.carbohydrateRatio){let e={...s,overallParameters:{...s.overallParameters,carbohydrateRatio:t},updatedAt:new Date().toISOString()};v(await H6.postUserSettings({parameters:e}))}g(!1)},[s]),ae=(0,H.useMemo)(()=>{let e=$6(f,H9,o);return te.findIndex(t=>t===e)},[te,o,f]),oe=(0,H.useMemo)(()=>R9.findIndex(e=>e===d.toFixed(1)),[d]),se=(0,H.useCallback)(()=>{_===!1&&r.set({showSyncErrorModal:!0}),v(void 0)},[r,_]),ce=(0,H.useCallback)(async e=>{let t={...s,use:e?Y.Usage.Overall:Y.Usage.Intervals,updatedAt:new Date().toISOString()},n=await H6.postUserSettings({parameters:t});r.set({showSyncErrorModal:!n})},[s,r]),M=(0,H.useCallback)(()=>{D&&(S(!0),O(!1))},[D,S,O]),N=(0,H.useCallback)(()=>{O(!0),b(!1)},[O,b]),P=(0,H.useCallback)(()=>{E()},[E]),le=(0,H.useCallback)(e=>w&&C?(...e)=>b(!0):(...t)=>e(...t),[C,w]),ue=(0,H.useCallback)(()=>{k&&(A(!1),setTimeout(()=>{e.navigate(Q.ChangePINCode)},500))},[k,e]),de=s.updatedAt??c;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[U9.scrollView,{paddingBottom:i,paddingTop:a+16}],children:[(0,W.jsx)(X,{style:[U9.updatedAtText,{color:n.labelSecondary}],children:t(`settings_lastEdited`,{date:de?Y6(de,`d MMM yyyy`):``})}),(0,W.jsx)(nTn,{withLockedSettings:le}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsx)(p9,{}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsxs)(t4.Container,{containerStyle:{backgroundColor:n.bgSecondary,borderColor:n.divider,borderWidth:1},children:[(0,W.jsx)(E4,{testID:`insulin-settings-overall-switch`,title:t(`fixed_insulin_settings_title`),message:t(`fixed_insulin_settings_body`),value:l,onValueChange:le(ce),style:U9.switchContainer}),(0,W.jsx)(Mwn,{}),(0,W.jsx)(t4,{title:t(`fixed_insulin_settings_carb_ratio_title`),value:`${d.toFixed(1)} ${t(`fixed_insulin_settings_carb_ratio_unit`)}`,testID:`carbohydrate-ratio`,onPress:le(()=>l?re():void 0),containerStyle:l?U9.active:U9.inactive,valueStyle:l?{color:n.textTableHighlight}:{color:n.labelSecondary}}),(0,W.jsx)(t4,{title:t(`fixed_insulin_settings_sensitivity_title`),value:`${$6(f,H9,o)} ${t(`fixed_insulin_settings_sensitivity_unit`,{displayUnit:u})}`,testID:`insulin-sensitivity`,onPress:le(()=>l?ne():void 0),containerStyle:l?U9.active:U9.inactive,valueStyle:l?{color:n.textTableHighlight}:{color:n.labelSecondary}})]}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsx)(Uwn,{withLockedSettings:le}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsx)(Vwn,{})]}),(0,W.jsx)(c5,{isVisible:p,items:te,initialScrollIndex:ae,onConfirm:ie,onCancel:()=>{m(!1)},onModalHide:se,testID:`insulin_sensitivity_picker`}),(0,W.jsx)(c5,{isVisible:h,items:R9,initialScrollIndex:oe,onConfirm:j,onCancel:()=>{g(!1)},onModalHide:se,testID:`insulin_to_carb_ratio_picker`}),(0,W.jsx)(d5,{onModalHide:()=>{v(void 0)}}),(0,W.jsx)(Hbn,{isVisible:y,onModalHide:M,onEnterPIN:N,onCancel:()=>b(!1)}),(0,W.jsx)(Lbn,{isVisible:x,onClose:()=>S(!1),onModalHide:ue,onForgotPIN:()=>{A(!0),S(!1)},onModalHideWithSuccess:P}),(0,W.jsx)(Vbn,{})]})},U9=R.create({scrollView:{paddingTop:32,paddingHorizontal:16,flexGrow:1},spacing:{height:32},updatedAtText:{...q.Poppins.regular_SM,textAlign:`center`,marginBottom:24},active:{opacity:1},inactive:{opacity:.5},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}),iTn=S5(rTn),{Navigator:aTn,Screen:W9}=V8(),oTn=()=>{let{t:e}=RK();return(0,W.jsxs)(aTn,{screenOptions:{...n5,...d8},children:[(0,W.jsx)(W9,{name:Q.InsulinSettings,component:iTn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`insulin_settings_navigation`),overlay:!0})}}),(0,W.jsx)(W9,{name:Q.TreatmentType,component:eTn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`treatment_type_navigation`),overlay:!0})}}),(0,W.jsx)(W9,{name:Q.RapidActingInsulin,component:Zwn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`rapid-acting_insulin_navigation`),overlay:!0})}}),(0,W.jsx)(W9,{name:Q.LongActingInsulin,component:qwn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`long-acting_insulin_navigation`),overlay:!0})}})]})},{Navigator:sTn,Screen:G9}=V8(),cTn=()=>{let{t:e}=RK(),{COLORS:t}=J();return(0,W.jsxs)(sTn,{screenOptions:{...n5,...d8,headerStyle:{backgroundColor:t.bgNavigationBar}},children:[(0,W.jsx)(G9,{name:Q.Settings,component:jwn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`settings_navigation`)})}}),(0,W.jsx)(G9,{name:Q.Profile,component:Mxn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`my_profile_navigation`)})}}),(0,W.jsx)(G9,{name:Q.GlucoseSettings,component:fxn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`glucose_navigation`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.GlucoseUnit,component:gxn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`glucose_unit_navigation`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.ActivitySettings,component:txn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`physical_activity_navigation`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.InsulinSettingsStack,component:oTn,options:{headerShown:!1}}),(0,W.jsx)(G9,{name:Q.Theme,component:Own,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`navigation_title_theme`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.Support,component:Ewn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`support_navigation`)})}}),(0,W.jsx)(G9,{name:Q.Legal,component:_xn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`legal_navigation`),overlay:!0})}})]})},lTn=e=>!(!e||e.authenticationContextClassReference!==`urn:hedia:acr:elevated`||(Date.now()-Date.parse(e.authenticationTime))/6e4>60),uTn=()=>{let e=XQ();return(0,H.useEffect)(()=>{(async()=>{try{lTn(await f9t())?e.replace(Q.SettingsStack,{screen:Q.Settings}):window.location.href=`/reauthenticate`}catch{e.goBack()}})()},[e]),(0,W.jsx)(w4,{})};V();function dTn(){return(0,W.jsx)(ydn,{style:fTn.iframe,uri:`https://www.hedia.com/contact#contactsupport`})}var fTn=R.create({iframe:{flex:1}}),{Navigator:pTn,Screen:K9,Group:mTn}=V8(),hTn=()=>{let{t:e}=RK();return(0,W.jsxs)(pTn,{children:[(0,W.jsxs)(mTn,{screenOptions:{headerShown:!1},children:[(0,W.jsx)(K9,{name:Q.NewCalculationStack,component:Obn}),(0,W.jsx)(K9,{name:Q.SettingsStack,component:cTn})]}),(0,W.jsxs)(mTn,{screenOptions:{...Mun},children:[(0,W.jsx)(K9,{name:Q.CreateFood,component:vdn}),(0,W.jsx)(K9,{name:Q.IFU,component:xdn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`IFU_navigation`)})}}),(0,W.jsx)(K9,{name:Q.SupportWebView,component:Ddn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`support_navigation`)})}}),(0,W.jsx)(K9,{name:Q.SupportContact,component:dTn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`support_navigation`)})}}),(0,W.jsx)(K9,{name:Q.ConfirmPINCode,component:uTn,options:{headerShown:!1}})]})]})};V();var gTn=({title:e,subtitle:t,stepChecked:n,onAnimationFinished:r})=>{let{t:i}=RK(),{COLORS:a}=J();return(0,H.useEffect)(()=>{r?.()},[r]),(0,W.jsxs)(ys,{contentContainerStyle:q9.container,style:{backgroundColor:a.bgPrimary},children:[(0,W.jsx)(X,{style:q9.title,children:e}),(0,W.jsx)(X,{style:[q9.subtitle,{color:a.labelSecondary}],children:t}),(0,W.jsxs)(B,{style:q9.stepsWrapper,children:[(0,W.jsxs)(B,{style:q9.stepContainer,children:[(0,W.jsx)(X,{style:[q9.text,n===1||n===2||n===3?{color:a.labelPrimary}:{color:a.labelSecondary}],children:` 1. `+i(`overview1`)}),(n===1||n===2||n===3)&&(0,W.jsx)(R2,{width:24,height:24,color:a.labelPrimary})]}),(0,W.jsxs)(B,{style:q9.stepContainer,children:[(0,W.jsx)(X,{style:[q9.text,n===2||n===3?{color:a.labelPrimary}:{color:a.labelSecondary}],children:`2. `+i(`overview2`)}),(n===2||n===3)&&(0,W.jsx)(R2,{width:24,height:24,color:a.labelPrimary})]}),(0,W.jsxs)(B,{style:q9.stepContainer,children:[(0,W.jsx)(X,{style:[q9.text,n===3?{color:a.labelPrimary}:{color:a.labelSecondary}],children:`3. `+i(`overview3`)}),n===3&&(0,W.jsx)(R2,{width:24,height:24,color:a.labelPrimary})]})]})]})},q9=R.create({container:{flex:1,justifyContent:`center`,paddingHorizontal:16},title:{...q.Poppins.bold_4XL,paddingHorizontal:16,marginBottom:2},subtitle:{...q.Poppins.regular_Base,paddingHorizontal:16,marginBottom:32},stepsWrapper:{padding:16,gap:8},stepContainer:{flexDirection:`row`,alignItems:`center`,gap:8},text:{marginBottom:8}}),_Tn=()=>{let{t:e}=RK(),{setIsOnboardingFinished:t}=z4(),n=(0,H.useCallback)(()=>{setTimeout(()=>{t(!0)},1e3)},[t]);return(0,W.jsx)(gTn,{title:e(`guide_end_title`),subtitle:e(`guide_end_body`),stepChecked:3,onAnimationFinished:n})};V();var J9=({currentStep:e,text:t,onPress:n,inactive:r,isBackVisible:i=!0,onBackPress:a})=>{let{t:o}=RK(),{COLORS:s}=J(),{goBack:c}=XQ();return(0,W.jsx)(Mdn,{children:(0,W.jsxs)(B,{style:[vTn.buttonsWrapper,{borderColor:s.bgTransparent}],children:[i&&(0,W.jsx)(I2,{title:o(`button_back`),onPress:a||c,testID:`back${e}`,style:vTn.button,type:F2.Secondary}),(0,W.jsx)(I2,{title:t??o(`button_next`),onPress:n,inactive:r,testID:`next${e}`,style:vTn.button})]})})},vTn=R.create({buttonsWrapper:{flexDirection:`row`,paddingTop:16,gap:8,borderWidth:1},button:{flex:1}});V();var yTn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{top:n}=B2(),{navigate:r}=XQ(),i=(0,H.useCallback)(()=>{r(K8.QuickGuideStack,{screen:K8.QuickGuide}),C6(S6.QuickGuideStartPress)},[r]);return(0,W.jsxs)(B,{style:{flex:1,backgroundColor:t.bgSecondary,paddingTop:n},children:[(0,W.jsx)(gTn,{title:e(`guide_quick_guide_title`),subtitle:e(`guide_quick_guide_body`),stepChecked:2}),(0,W.jsx)(J9,{currentStep:1,isBackVisible:!1,onPress:i,text:e(`button_start`)})]})},bTn=`/assets/webp/1_EN.webp`,xTn=`/assets/webp/2_EN2.webp`,STn=`/assets/webp/3_EN.webp`,CTn=`/assets/webp/4_EN.webp`,wTn=`/assets/webp/1_EN2.webp`,TTn=`/assets/webp/2_EN.webp`,ETn=`/assets/webp/3_EN2.webp`,DTn=`/assets/webp/4_EN2.webp`;V();var OTn=()=>{let{t:e}=RK(),t=XQ(),{COLORS:n}=J(),r=(0,H.useRef)(null),[i,a]=(0,H.useState)(2),[o,s]=(0,H.useState)(0),{colorScheme:c}=d0(),l=_0(c),{width:u}=Cm(),d=(0,H.useMemo)(()=>[{title:e(`guide_recent_insulin_title`),body:e(`guide_recent_insulin_body`),image:l===`dark`?bTn:wTn},{title:e(`web_guide_no_import_title`),body:e(`web_guide_no_import_body`),image:l===`dark`?xTn:TTn},{title:e(`guide_glucose_title`),body:e(`guide_glucose_body`),image:l===`dark`?STn:ETn},{title:e(`guide_recommendation_title`),body:e(`guide_recommendation_body`),image:l===`dark`?CTn:DTn}],[l,e]),f=(0,H.useCallback)(e=>{switch(e-1){case 1:return S6.QuickGuideBackPressStep1;case 2:return S6.QuickGuideBackPressStep2;case 3:return S6.QuickGuideBackPressStep3;case 4:return S6.QuickGuideBackPressStep4;default:throw Error(`[QuickGuide::getTrackingEventBackPress] Invalid step`)}},[]),p=(0,H.useCallback)(e=>{switch(e-1){case 1:return S6.QuickGuideNextPressStep1;case 2:return S6.QuickGuideNextPressStep2;case 3:return S6.QuickGuideNextPressStep3;default:throw Error(`[QuickGuide::getTrackingEventNextPress] Invalid step`)}},[]),m=(0,H.useCallback)(()=>{if(o===d.length-1)C6(S6.QuickGuideFinishPress),t.navigate(K8.QuickGuideAllSet);else{let e=o+1;r.current?.scrollToIndex({index:e,animated:!0}),a(i+1),s(e),C6(p(i))}},[o,i,p,t,d.length]),h=(0,H.useCallback)(()=>{if(o===0)t.navigate(K8.QuickGuideStart);else{let e=o-1;r.current?.scrollToIndex({index:e,animated:!0}),a(i-1),s(e)}C6(f(i))},[o,i,f,t]);return(0,W.jsxs)(B,{style:{flex:1,backgroundColor:n.bgSecondary},children:[(0,W.jsx)(nl,{ref:r,data:d,initialNumToRender:1,scrollEnabled:!1,horizontal:!0,showsHorizontalScrollIndicator:!1,renderItem:({item:e,index:t})=>(0,W.jsxs)(B,{style:[Y9.container,{width:u,backgroundColor:n.bgPrimary}],children:[(0,W.jsx)(gd,{source:e.image,style:[Y9.image,{bottom:t===0?64:0,width:t===1?`55%`:`100%`,height:t===1?`55%`:`60%`}],resizeMode:`contain`}),(0,W.jsxs)(B,{style:Y9.contentContainer,children:[(0,W.jsx)(X,{style:Y9.title,maxFontSizeMultiplier:g0.s2,children:e.title}),(0,W.jsx)(X,{style:[Y9.body,{color:n.labelSecondary}],maxFontSizeMultiplier:g0.s2,children:e.body})]})]})}),(0,W.jsx)(J9,{currentStep:i,onPress:m,onBackPress:h,text:o===d.length-1?e(`button_complete`):e(`button_next`)})]})},Y9=R.create({container:{alignItems:`center`,justifyContent:`flex-end`},image:{width:`100%`,height:`60%`,marginTop:64},contentContainer:{minHeight:`25%`,paddingTop:12,marginBottom:84},title:{...q.Poppins.semiBold_2XL,marginBottom:2,paddingHorizontal:16,textAlign:`center`},body:{...q.Poppins.regular_Base,paddingHorizontal:rd.getFontScale()>g0.s0?16:32,textAlign:`center`}}),{Navigator:kTn,Screen:ATn}=V8(),jTn=()=>(0,W.jsxs)(kTn,{screenOptions:{...n5,headerShown:!1},children:[(0,W.jsx)(ATn,{name:K8.QuickGuideStart,component:yTn}),(0,W.jsx)(ATn,{name:K8.QuickGuide,component:OTn}),(0,W.jsx)(ATn,{name:K8.QuickGuideAllSet,component:_Tn})]});V();function MTn({onOptionSelect:e,setNextEnabled:t,ref:n}){let{t:r}=RK(),{COLORS:i}=J(),{width:a}=Cm(),o=U8(),[s,c]=(0,H.useState)(null),l=(0,H.useCallback)(n=>{c(n),e(n),t(!0)},[e,t]);return(0,H.useImperativeHandle)(n,()=>({onBackPress(){C6(S6.SetupOptionsBackPress)},onNextPressed:()=>s===null?(t(!1),{transitionAllowed:!1}):(C6(S6.SetupOptionsNextPress),t(!0),{transitionAllowed:!0}),validateData(){return{isValid:s!==null}}}),[s,t]),(0,W.jsxs)(ys,{contentContainerStyle:[X9.container,{width:a,paddingTop:o+16}],style:{backgroundColor:i.bgPrimary},children:[(0,W.jsx)(X,{style:[X9.header,{color:i.labelPrimary}],children:r(`insulin_settings_title`)}),(0,W.jsxs)(B,{style:X9.buttonsContainer,children:[(0,W.jsx)(I2,{title:r(`insulin_settings_button_yes`),testID:`insulin_settings_yes`,onPress:()=>{l(`yes`)},type:s===`yes`?F2.Primary:F2.Secondary,style:X9.button}),(0,W.jsx)(I2,{title:r(`insulin_settings_button_no`),testID:`insulin_settings_no`,onPress:()=>{l(`no`)},type:s===`no`?F2.Primary:F2.Secondary,style:X9.button})]})]})}var X9=R.create({container:{flex:1,paddingHorizontal:16,paddingTop:32},header:{...q.Poppins.bold_2XL,paddingHorizontal:16,marginBottom:24},buttonsContainer:{flexDirection:`row`,marginBottom:24,gap:12},button:{flex:1}});function NTn(e,t){let n=H2(e)-+H2(t);return n<0?-1:n>0?1:n}function PTn(e,t,n){let[r,i]=A6(n?.in,e,t);return r.getFullYear()-i.getFullYear()}function FTn(e,t,n){let[r,i]=A6(n?.in,e,t),a=NTn(r,i),o=Math.abs(PTn(r,i));r.setFullYear(1584),i.setFullYear(1584);let s=a*(o-+(NTn(r,i)===-a));return s===0?0:s}V(),l0();function ITn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),{bottom:a}=n0(),{bottomWithFooterButton:o}=B2(),s=U8(),{birthday:c,biologicalSex:l,diabetesType:u,bloodGlucoseUnits:d}=_5(),{setSetupCalculatorStoreValues:f}=g5(),{colorScheme:p}=d0(),m=_0(p),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(!1),[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(``),[C,w]=(0,H.useState)(``),[T,E]=(0,H.useState)(!1),D=(0,H.useCallback)(e=>{let t=new Date(e);t.setHours(0,0,0,0);let r=new Date;r.setHours(0,0,0,0);let i=FTn(r,t)>=18;f({birthday:t.toISOString()}),S(``),w(i?``:n(`setup_birthday_hint_under18`))},[f,n]),O=(0,H.useCallback)(e=>{D(e),g(!1)},[D]),k=(0,H.useCallback)(()=>{f({diabetesType:Y.DiabetesType.Type2}),v(!0)},[f]),A=(0,H.useCallback)(()=>!!(c&&l&&u&&d),[c,d,u,l]);return(0,H.useEffect)(()=>{e(A())},[e,A]),(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupGeneralBackPress)},onNextPressed:()=>(E(!0),!c&&S(n(`birthday_error`)),A()?(e(!0),C6(S6.SetupGeneralNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})),validateData(){return{isValid:A()}}}),[c,n,A,e]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`step_2`,contentContainerStyle:[Z9.container,{width:i,paddingTop:s+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsx)(t4,{testID:`birthday`,title:n(`general_input_birthday`),renderRightSlot:()=>(0,W.jsx)(B,{style:[Z9.pillButton,{backgroundColor:r.bgPill}],children:(0,W.jsx)(X,{style:[Z9.pillText,{color:h?r.textLink:r.labelPrimary}],children:c?Y6(new Date(c),`dd-MM-yyyy`):`DD-MM-YYYY`})}),errorMessage:x,warningMessage:C,containerStyle:Z9.wrapper,style:Z9.customRow,onPress:()=>{g(!0)}}),(0,W.jsx)(B,{style:Z9.wrapper,children:(0,W.jsx)(N2,{isAnimated:T&&!l,children:(0,W.jsx)(t4,{title:n(`my_profile_sex`),testID:`biological-sex`,value:l?ayt[l]():`-`,onPress:()=>{b(!0)},errorMessage:T&&!l?n(`diabetes_error`):void 0})})}),(0,W.jsxs)(B,{style:Z9.wrapper,children:[(0,W.jsx)(T4,{title:n(`type_of_diabetes_title`)}),(0,W.jsx)(N2,{isAnimated:T&&!u,message:n(`diabetes_error`),children:(0,W.jsxs)(B,{style:[Z9.row,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(z5t,{title:n(`type_of_diabetes_type1`),isActive:u===Y.DiabetesType.Type1,testID:`type-1`,onPress:()=>{f({diabetesType:Y.DiabetesType.Type1})},isError:T&&!u}),!u&&(0,W.jsx)(B,{style:[Z9.separator,{backgroundColor:r.divider}]}),(0,W.jsx)(z5t,{title:n(`type_of_diabetes_type2`),isActive:u===Y.DiabetesType.Type2,testID:`type-2`,onPress:k,isError:T&&!u})]})})]}),(0,W.jsxs)(B,{style:Z9.wrapper,children:[(0,W.jsx)(T4,{title:n(`glucose_unit_title`)}),(0,W.jsx)(N2,{isAnimated:T&&!d,message:n(`glucose_unit_error`),children:(0,W.jsx)(pxn,{glucoseUnit:d,onPressMMOLL:()=>{f({bloodGlucoseUnits:Y.BloodGlucoseUnit.MMOL_L})},onPressMGDL:()=>{f({bloodGlucoseUnits:Y.BloodGlucoseUnit.MG_DL})},isError:T&&!d})})]})]}),HK?(0,W.jsx)(vfn,{testID:`birthday-date-picker`,display:`spinner`,date:c?new Date(c):new Date,isVisible:h,onConfirm:O,onCancel:()=>{g(!1)},customConfirmButtonIOS:xfn,customCancelButtonIOS:Sfn,pickerContainerStyleIOS:{backgroundColor:r.iosKeyboardPicker},modalStyleIOS:{paddingBottom:a},themeVariant:m,isDarkModeEnabled:m===`dark`,pickerStyleIOS:Z9.alignCenter,minimumDate:new Date(1900,0,1),maximumDate:new Date(2100,0,1)}):(0,W.jsx)(Txn,{isVisible:h,initialValue:c?new Date(c):new Date,onConfirm:O,onCancel:()=>{g(!1)}}),(0,W.jsx)(Q2,{isVisible:_,title:n(`modal_diabetes2_title`),message:n(`modal_diabetes2_body`),buttons:[{title:n(`button_close`),testID:`type2-modal-understood-button`,onPress:()=>{v(!1)}}]}),(0,W.jsx)(Oxn,{isVisible:y,onCancel:()=>{b(!1)}})]})}var Z9=R.create({container:{paddingHorizontal:16},wrapper:{marginBottom:24},row:{flexDirection:`row`,padding:2,borderRadius:16,borderWidth:1},alignCenter:{alignSelf:`center`},separator:{width:1,height:24,alignSelf:`center`},customRow:{paddingVertical:8},pillButton:{borderRadius:16},pillText:{...q.Poppins.regular_SM,paddingHorizontal:8,paddingVertical:6}});V();function LTn({setNextEnabled:e,ref:t}){let{COLORS:n}=J(),{t:r}=RK(),{width:i}=Cm(),a=U8(),{parameters:o,treatmentType:s}=_5(),{setSetupCalculatorStoreValues:c}=g5(),[l,u]=(0,H.useState)(!1);(0,H.useEffect)(()=>{o||c({parameters:V6(0,0,Y.Usage.Overall)})},[o,c]),(0,H.useEffect)(()=>{e(!!s)},[e,s]);let d=(0,H.useCallback)(e=>{c({treatmentType:Y.InjectionMethod[e]})},[c]);return(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupTreatmentBackPress)},onNextPressed:()=>(u(!0),s?(e(!0),C6(S6.SetupTreatmentNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})),validateData(){return{isValid:!!s}}}),[e,s]),(0,W.jsxs)(B,{testID:`step_3`,style:[RTn.container,{width:i,backgroundColor:n.bgPrimary,paddingTop:a+16}],children:[(0,W.jsx)(T4,{title:r(`treatment_units_title`)}),(0,W.jsx)(N2,{isAnimated:l&&!s,message:r(`treatment_type_input_error`),children:(0,W.jsx)(t4.Container,{children:Object.keys(Y.InjectionMethod).map(e=>(0,W.jsx)(t4,{title:V9[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:RTn.checkmarkContainer,children:Y.InjectionMethod[e]===s?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{d(e)},testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`,displayType:e4.ListItem},e))})})]})}var RTn=R.create({container:{paddingHorizontal:16,paddingVertical:32},checkmarkContainer:{width:24,height:24}}),zTn=q2(5,350);V();function BTn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),a=U8(),{bottomWithFooterButton:o}=B2(),{bloodGlucoseUnits:s,parameters:c}=_5();if(!s||!c)throw Error(`[Step4::render] are not defined`);let l=Hdn(),{setSetupCalculatorStoreValues:u,setTotalDailyDosage:d}=g5(),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(void 0),g=(0,H.useMemo)(()=>l?{carbohydrateRatio:parseFloat((500/l).toFixed(1)),insulinSensitivityMMOLL:Number(z9.DividendNumber)/l}:{carbohydrateRatio:0,insulinSensitivityMMOLL:0},[l]);(0,H.useEffect)(()=>{let{carbohydrateRatio:e,insulinSensitivityMMOLL:t}=g;u({parameters:V6(t,e,Y.Usage.Overall)})},[s,g,u]);let _=(0,H.useMemo)(()=>l?zTn.findIndex(e=>e===l.toString()):zTn.findIndex(e=>e===`50`),[l]);(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupTDDBackPress)},onNextPressed:()=>l?(C6(S6.SetupTDDNextPress),e(!0),{transitionAllowed:!0}):(h(n(`insulin_settings_input_error`,{inputTypeTranslated:n(`daily_insulin_dosage_input`)})),e(!1),{transitionAllowed:!1}),validateData(){return{isValid:!!l}}}),[e,l,n]);let v=(0,H.useCallback)(t=>{d(t),p(!1),h(void 0),e(!0)},[e,d]),{text:y}=(0,H.useMemo)(()=>X6(s),[s]),b=(0,H.useMemo)(()=>`${$6(c.overallParameters.insulinSensitivity,Y.BloodGlucoseUnit.MMOL_L,s)} ${n(`fixed_insulin_settings_sensitivity_unit`,{displayUnit:y})}`,[c,y,n,s]),x=(0,H.useMemo)(()=>c.overallParameters.carbohydrateRatio+` `+n(`insulin_helper_carb_ratio_unit`),[c,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{contentContainerStyle:[Q9.container,{width:i,paddingTop:a+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:n(`daily_insulin_dosage_title`)}),(0,W.jsx)(X,{style:[Q9.subheader,{color:r.labelSecondary}],children:n(`daily_insulin_dosage_body`)}),(0,W.jsx)(N2,{isAnimated:!!m,children:(0,W.jsx)(t4,{testID:`daily_insulin_dosage`,title:n(`daily_insulin_dosage_input`),value:`${l??`-`} ${n(l===1?`unit`:`units`)}`,valueStyle:{color:r.labelBrand},onPress:()=>{p(!0)},errorMessage:m})})]}),!!l&&(0,W.jsxs)(B,{style:[Q9.explanation,{backgroundColor:r.bgSecondary}],children:[(0,W.jsx)(X,{style:[Q9.description,{color:r.labelPrimary,borderBottomColor:r.divider}],children:n(`insulin_helper_body`)}),(0,W.jsxs)(B,{style:Q9.row,children:[(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelPrimary}],children:n(`insulin_helper_carb_ratio_input`)}),(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelSecondary}],children:x})]}),(0,W.jsx)(Mwn,{}),(0,W.jsxs)(B,{style:Q9.row,children:[(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelPrimary}],children:n(`insulin_helper_insulin_sensitivity_input`)}),(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelSecondary}],children:b})]})]}),(0,W.jsx)(p9,{}),(0,W.jsx)(B,{children:(0,W.jsx)(Vwn,{})})]}),(0,W.jsx)(c5,{testID:`daily_insulin_dosage_picker`,onCancel:()=>{p(!1)},onConfirm:v,initialScrollIndex:_,isVisible:f,items:zTn})]})}var Q9=R.create({container:{paddingVertical:32,paddingHorizontal:16,gap:24},subheader:{...q.Poppins.regular_SM,marginBottom:8},explanation:{borderRadius:8,paddingBottom:0},row:{flexDirection:`row`,justifyContent:`space-between`},description:{...q.Poppins.regular_SM,padding:16,borderBottomWidth:1},textSemiBold:{...q.Poppins.medium_SM,padding:16}});V();function VTn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),a=U8(),{bottomWithFooterButton:o}=B2(),{bloodGlucoseUnits:s,parameters:c}=_5();if(!c||!s)throw Error(`[Step5::render] setupCalculatorStoreValues are not defined`);let{setSetupCalculatorStoreValues:l,setTotalDailyDosage:u}=g5(),[d,f]=(0,H.useState)(void 0),[p,m]=(0,H.useState)(void 0),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(!1),{text:y}=(0,H.useMemo)(()=>X6(s),[s]),{carbohydrateRatio:b,insulinSensitivity:x}=(0,H.useMemo)(()=>c.overallParameters,[c]),S=(0,H.useCallback)(e=>n(`insulin_settings_input_error`,{inputTypeTranslated:n(e===`IS`?`insulin_sensitivity_input`:`insulin-to-carb_ratio_input`)}),[n]);(0,H.useEffect)(()=>{e(!!(x&&b))},[b,x,e]),(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupInsulinBackPress)},onNextPressed:()=>!b&&!x?(m(S(`ICR`)),f(S(`IS`)),e(!1),{transitionAllowed:!1}):b?x?(m(void 0),f(void 0),u(null),e(!0),C6(S6.SetupInsulinNextPress),{transitionAllowed:!0}):(e(!1),f(S(`IS`)),{transitionAllowed:!1}):(m(S(`ICR`)),e(!1),{transitionAllowed:!1}),validateData(){return{isValid:!!(b&&x)}}}),[b,x,u,e,S]);let C=(0,H.useCallback)(e=>{let t=Q6(e,s,Y.BloodGlucoseUnit.MMOL_L);l({parameters:{...c,overallParameters:{...c.overallParameters,insulinSensitivity:t}}}),u(null),f(void 0),g(!1)},[s,c,l,u]),w=(0,H.useCallback)(e=>{let t=Number(e.toFixed(1));c.overallParameters.carbohydrateRatio=t,l({parameters:{...c,overallParameters:{...c.overallParameters,carbohydrateRatio:t}}}),u(null),m(void 0),v(!1)},[c,l,u]),T=(0,H.useMemo)(()=>s===Y.BloodGlucoseUnit.MMOL_L?Fwn:Iwn,[s]),E=(0,H.useMemo)(()=>{let e=s===Y.BloodGlucoseUnit.MMOL_L?2 .toFixed(1):`36`;if(x===0)return T.findIndex(t=>t===e);let t=$6(x,Y.BloodGlucoseUnit.MMOL_L,s);return T.findIndex(e=>e===t)},[T,s,x]),D=(0,H.useMemo)(()=>b===0?R9.findIndex(e=>e===10 .toFixed(1)):R9.findIndex(e=>e===b.toFixed(1)),[b]),O=(0,H.useMemo)(()=>{let e=$6(x,Y.BloodGlucoseUnit.MMOL_L,s);return`${x?e:`-`} ${n(`fixed_insulin_settings_sensitivity_unit`,{displayUnit:y})}`},[x,s,y,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{contentContainerStyle:[HTn.contentContainer,{width:i,paddingTop:a+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:n(`insulin-to-carb_ratio_title`)}),(0,W.jsx)(N2,{isAnimated:!!p,children:(0,W.jsx)(t4,{title:n(`insulin-to-carb_ratio_input`),value:`${b||`-`} ${n(`fixed_insulin_settings_carb_ratio_unit`)}`,valueStyle:{color:r.labelBrand},testID:`carb_ratio`,onPress:()=>{v(!0)},errorMessage:p})})]}),(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:n(`insulin_sensitivity_title`)}),(0,W.jsx)(N2,{isAnimated:!!d,children:(0,W.jsx)(t4,{title:n(`insulin_sensitivity_input`),value:O,valueStyle:{color:r.labelBrand},testID:`insulin_sensitivity`,onPress:()=>{g(!0)},errorMessage:d})})]}),(0,W.jsx)(p9,{}),(0,W.jsx)(Vwn,{})]}),(0,W.jsx)(c5,{testID:`insulin_sensitivity_picker`,isVisible:h,items:T,initialScrollIndex:E,onConfirm:C,onCancel:()=>{g(!1)}}),(0,W.jsx)(c5,{testID:`insulin_to_carb_ratio_picker`,isVisible:_,items:R9,initialScrollIndex:D,onConfirm:w,onCancel:()=>{v(!1)}})]})}var HTn=R.create({contentContainer:{paddingTop:32,paddingHorizontal:16,gap:24}});V();function UTn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),a=U8(),{bottomWithFooterButton:o}=B2(),{bloodGlucoseUnits:s,parameters:c,treatmentType:l,diabetesType:u,birthday:d,biologicalSex:f}=_5(),p=Hdn(),{modalStoreActions:m}=Y8(),h=(0,H.useCallback)(async()=>{if(s===void 0)throw Error(`[Step6::setUserSettings] bloodGlucoseUnits from userSettingsManager is undefined.`);if(u===void 0)throw Error(`[Step6::setUserSettings] diabetesType from userSettingsManager is undefined.`);if(c===void 0)throw Error(`[Step6::setUserSettings] parameters from newUserSettingsManager is undefined.`);if(d===void 0)throw Error(`[Step6::setUserSettings] birthday from newUserSettingsManager is undefined.`);if(f===void 0)throw Error(`[Step6::setUserSettings] biologicalSex from newUserSettingsManager is undefined.`);let{carbohydrateRatio:e,insulinSensitivity:t}=c.overallParameters,n=V6(t,e,Y.Usage.Overall);return H6.postUserSettings({parameters:n,activity:L6(),notifications:zin(),glucoseLevelTargets:Pin(),bloodGlucoseUnits:s,treatmentType:l,diabetesType:u,birthday:d,biologicalSex:f})},[d,s,u,f,c,l]);(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupSummaryBackPress)},onNextPressed:async()=>{C6(S6.SetupSummaryFinishPress);let t=await h();return t?e(!0):m.set({showSyncErrorModal:!0}),{transitionAllowed:t}},validateData(){return{isValid:!0}}}),[e,m,h]);let g=(0,H.useMemo)(()=>{if(s===void 0)throw Error(`[Step6::generalTreatmentItems] bloodGlucoseUnits is undefined`);if(l===void 0)throw Error(`[Step6::generalTreatmentItems] treatmentType is undefined`);if(u===void 0)throw Error(`[Step6::generalTreatmentItems] diabetesType is undefined`);let{text:e}=X6(s),t=C5t(Y.InjectionMethod,l),r=u===Y.DiabetesType.Type1?`type_of_diabetes_type1`:`type_of_diabetes_type2`;return[{label:n(`summary_setup_input_diabetes_type`),value:n(r),testID:`diabetes-type-result`},{label:n(`summary_setup_input_treatment_type`),value:V9[t](),testID:`treatment-type-result`},{label:n(`summary_setup_input_glucose_unit`),value:e,testID:`glucose-result`}]},[s,u,l,n]),_=(0,H.useMemo)(()=>{if(s===void 0)throw Error(`[Step6::insulinFactorsItems] bloodGlucoseUnits is undefined`);let{text:e}=X6(s),{carbohydrateRatio:t,insulinSensitivity:r}=c?.overallParameters??{};if(t===void 0||r===void 0)throw Error(`[Step6::insulinFactorsItems] carbohydrateRatio or insulinSensitivity is undefined`);return[p?{label:n(`summary_setup_input_daily_dose_input`),value:p.toFixed(0),unit:n(`units`),testID:`total-daily-insulin-result`}:null,{label:n(`summary_setup_input_insulin-to-carb_input`),value:`${t}`,unit:n(`summary_setup_insulin-to-carb_unit`),testID:`carb-ratio-result`},{label:n(`summary_setup_input_insulin_sensitivity_input`),value:$6(r,Y.BloodGlucoseUnit.MMOL_L,s),unit:n(`summary_setup_insulin_sensitivity_unit`,{displayUnit:e}),testID:`insulin-sensitivity-result`}].filter(e=>e!==null)},[s,c?.overallParameters,n,p]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[WTn.scrollContent,{width:i,paddingTop:a+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsx)(p9,{}),(0,W.jsx)(B,{style:WTn.spacer}),(0,W.jsx)(T4,{title:n(`summary_setup_general_title`)}),(0,W.jsx)(t4.Container,{children:g.map(({testID:e,label:t,value:n,unit:i})=>(0,W.jsx)(t4,{testID:e,title:t,displayStyle:L5t.List,displayType:e4.ListItem,titleStyle:{color:r.labelPrimary},valueStyle:{color:r.labelSecondary},value:`${n} ${i??``}`},e))}),(0,W.jsx)(B,{style:WTn.spacer}),(0,W.jsx)(T4,{title:n(`summary_setup_insuling_settings_title`)}),(0,W.jsx)(t4.Container,{children:_.map(({testID:e,label:t,value:n,unit:i})=>(0,W.jsx)(t4,{testID:e,title:t,displayStyle:L5t.List,displayType:e4.ListItem,titleStyle:{color:r.labelPrimary},valueStyle:{color:r.labelSecondary},value:`${n} ${i??``}`},e))}),(0,W.jsx)(d5,{})]})}var WTn=R.create({scrollContent:{paddingHorizontal:16},spacer:{height:24}});V();var GTn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{width:n}=Cm(),{clear:r}=g5(),{setHasCompletedSetupFlow:i,setIsPinSetupShouldBeShown:a}=z4(),o=XQ(),[s,c]=(0,H.useState)(2),[l,u]=(0,H.useState)(0),[d,f]=(0,H.useState)(0),[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(!1),_=(0,H.useRef)(null),v=(0,H.useRef)(null);(0,H.useEffect)(()=>{r()},[r]);let y=(0,H.useCallback)(e=>{m(e)},[]),b=(0,H.useCallback)(e=>{g(e===`yes`)},[]),x=(0,H.useMemo)(()=>[{title:e(`general_navigation`),stepNumber:2,renderComponent:e=>(0,W.jsx)(ITn,{ref:e,setNextEnabled:y})},{title:e(`treatment_navigation`),stepNumber:3,renderComponent:e=>(0,W.jsx)(LTn,{ref:e,setNextEnabled:y})},{title:e(`insulin_settings_navigation`),stepNumber:4,renderComponent:e=>(0,W.jsx)(MTn,{ref:e,onOptionSelect:b,setNextEnabled:y})},{title:e(`insulin_settings_navigation`),stepNumber:4,renderComponent:e=>h?(0,W.jsx)(VTn,{ref:e,setNextEnabled:y}):(0,W.jsx)(BTn,{ref:e,setNextEnabled:y})},{title:e(`summary_setup_navigation`),stepNumber:5,renderComponent:e=>(0,W.jsx)(UTn,{ref:e,setNextEnabled:y})}],[b,y,h,e]);(0,H.useEffect)(()=>{o.setOptions({headerTransparent:!0,header:()=>(0,W.jsx)(G8,{title:x[l].title,overlay:!0})})},[l,o,x]),(0,H.useEffect)(()=>{if(!v.current)return;let{isValid:e}=v.current.validateData();m(e)},[l,x]);let S=(0,H.useCallback)(async()=>{if(!v.current)return;let{transitionAllowed:e}=await v.current.onNextPressed();if(e)if(l===x.length-1){VK||a(!0),i(!0);let e=VK?{name:K8.QuickGuideStack}:{name:K8.PINCodeSetup,params:{comingFrom:K8.Setup}};o.dispatch(RQ({index:0,routes:[e]}))}else{let e=l+1;_.current?.scrollToIndex({index:e,animated:!0}),c(x[e].stepNumber),u(e),f(t=>Math.max(t,e))}},[l,x,o,i,a]),C=(0,H.useCallback)(()=>{if(v.current?.onBackPress(),l===0)o.goBack();else{let e=l-1;_.current?.scrollToIndex({index:e,animated:!0}),c(x[e].stepNumber),u(e),f(t=>Math.max(t,e))}},[l,o,x]);return i$((0,H.useCallback)(()=>{let e=Gf.addEventListener(`hardwareBackPress`,()=>(C(),!0));return()=>{e.remove()}},[C])),(0,W.jsxs)(B,{style:[KTn.container,{backgroundColor:t.bgSecondary}],children:[(0,W.jsx)(nl,{ref:_,data:x,renderItem:({item:e,index:t})=>t<=d?e.renderComponent(t===l?v:null):(0,W.jsx)(B,{style:{width:n}}),scrollEnabled:!1,horizontal:!0,initialNumToRender:1,showsHorizontalScrollIndicator:!1}),(0,W.jsx)(J9,{currentStep:s,onPress:S,onBackPress:C,inactive:!p,text:l===x.length-1?e(`button_complete`):e(`button_next`)})]})},KTn=R.create({container:{flex:1}});V();var qTn=({isVisible:e,onCancelPress:t,onContinuePress:n,onModalHide:r})=>{let{t:i}=RK(),{COLORS:a}=J(),[o,s]=(0,H.useState)([!1,!1]),[c,l]=(0,H.useState)(!1),u=(0,H.useMemo)(()=>o.every(Boolean),[o]);(0,H.useEffect)(()=>{e&&(s([!1,!1]),l(!1))},[e]);let d=(0,H.useCallback)(e=>{s(t=>t.map((t,n)=>n===e?!t:t))},[]),f=(0,H.useCallback)(()=>{c&&u&&r()},[u,c,r]),p=(0,H.useCallback)(()=>{l(!0),n()},[n]);return(0,W.jsxs)(Q2,{testID:`restrictions_modal`,isVisible:e,enableScroll:!0,onModalHide:f,containerStyle:{backgroundColor:a.bgModal},buttons:[{testID:`restrictions_continue_button`,title:i(`welcome_modal_button_confirm`),onPress:p,disabled:!u},{testID:`restrictions_cancel_button`,title:i(`button_cancel`),type:F2.Secondary,onPress:t}],children:[(0,W.jsx)(X,{style:$9.title,children:i(`welcome_modal_title`)}),(0,W.jsx)(X,{style:[$9.subtitle,{color:a.labelSecondary}],children:i(`welcome_modal_body`)}),(0,W.jsxs)(Kp,{testID:`restrictions_checkmark_1`,onPress:()=>{d(0)},style:({pressed:e})=>[{opacity:e?.5:1},$9.checkmarkContainer],children:[o[0]?(0,W.jsx)(N8t,{}):(0,W.jsx)(M8t,{}),(0,W.jsxs)(B,{style:$9.checkmarkTextContainer,children:[(0,W.jsx)(X,{style:$9.checkmarkTitle,children:i(`welcome_modal_pregnancy_title`)}),(0,W.jsx)(X,{style:[$9.checkmarkSubtitle,{color:a.labelSecondary}],children:i(`welcome_modal_pregnancy_body`)})]})]}),(0,W.jsx)(B,{style:[$9.separatorLine,{backgroundColor:a.divider}]}),(0,W.jsxs)(Kp,{testID:`restrictions_checkmark_2`,onPress:()=>{d(1)},style:({pressed:e})=>[{opacity:e?.5:1},$9.checkmarkContainer],children:[o[1]?(0,W.jsx)(N8t,{}):(0,W.jsx)(M8t,{}),(0,W.jsxs)(B,{style:$9.checkmarkTextContainer,children:[(0,W.jsx)(X,{style:$9.checkmarkTitle,children:i(`welcome_modal_gestational_title`)}),(0,W.jsx)(X,{style:[$9.checkmarkSubtitle,{color:a.labelSecondary}],children:i(`welcome_modal_gestational_body`)})]})]})]})},$9=R.create({title:{...q.Poppins.bold_2XL,marginTop:32,marginBottom:8},subtitle:{...q.Poppins.regular_Base,marginBottom:16},checkmarkContainer:{paddingVertical:16,flexDirection:`row`,justifyContent:`space-between`},checkmarkTextContainer:{flex:1,marginLeft:8},checkmarkTitle:{...q.Poppins.semiBold_Base,marginBottom:2},checkmarkSubtitle:{...q.Poppins.regular_SM},separatorLine:{width:`100%`,height:1}});V();var JTn=()=>{let{t:e}=RK(),{navigate:t}=XQ(),{clear:n}=g5(),{COLORS:r}=J(),[i,a]=(0,H.useState)(!1);(0,H.useEffect)(()=>{n()},[n]);let o=(0,H.useCallback)(()=>{a(!0),C6(S6.SetupIntroStartPress)},[]);return(0,W.jsxs)(B,{style:[YTn.container,{backgroundColor:r.bgSecondary}],children:[(0,W.jsx)(gTn,{title:e(`setup_account_title`),subtitle:e(`setup_account_body`),stepChecked:1}),(0,W.jsx)(J9,{currentStep:1,isBackVisible:!1,onPress:o,text:e(`button_start`)}),(0,W.jsx)(qTn,{isVisible:i,onCancelPress:()=>{a(!1)},onContinuePress:()=>{a(!1)},onModalHide:()=>{t(K8.Setup)}})]})},YTn=R.create({container:{flex:1}}),{Navigator:XTn,Screen:ZTn}=V8(),QTn=()=>{let{t:e}=RK();return(0,W.jsxs)(XTn,{screenOptions:{...n5},children:[(0,W.jsx)(ZTn,{name:K8.SetupStart,component:JTn,options:{header:()=>(0,W.jsx)(G8,{title:e(`setup_account_navigation`),overlay:!0})}}),(0,W.jsx)(ZTn,{name:K8.Setup,component:GTn,options:{header:()=>(0,W.jsx)(G8,{title:e(`general_navigation`),overlay:!0})}})]})},{Navigator:$Tn,Screen:eEn}=V8(),tEn=()=>{let{hasCompletedSetupFlow:e}=z4(),t=H.useMemo(()=>e?K8.QuickGuideStack:K8.SetupBolusCalculator,[e]);return(0,W.jsxs)($Tn,{initialRouteName:t,screenOptions:{...n5,headerShown:!1},children:[(0,W.jsx)(eEn,{name:K8.SetupBolusCalculator,component:QTn}),(0,W.jsx)(eEn,{name:K8.QuickGuideStack,component:jTn})]},t)},nEn=()=>{let{isOnboardingFinished:e,setIsOnboardingFinished:t}=z4(),[n,r]=H.useState(!1),i=(0,H.useCallback)(async()=>{if(await a8.syncAll(),!H6.uuid){if(NK.IS_PRODUCTION===`true`)throw window.location.href=`/redirect?status=error`,Error(`[App::syncData] User settings not found`);H6.updateMockUserSettings()}t(U4t(Y.BloodGlucoseUnit).safeParse(H6.glucoseUnit).success)},[t]);return(0,H.useEffect)(()=>{i().catch(console.error).finally(()=>{r(!0)})},[i]),!n||e===void 0?(0,W.jsx)(w4,{}):e?(0,W.jsx)(hTn,{}):(0,W.jsx)(tEn,{})},rEn={prefixes:[],config:{screens:{SetupBolusCalculator:{path:`setup-bolus-calculator`,screens:{SetupStart:`setup-start`,Setup:`setup`}},QuickGuideStack:{path:`quick-guide`,screens:{QuickGuideStart:`quick-guide-start`,QuickGuide:`quick-guide`,QuickGuideAllSet:`quick-guide-all-set`}},NewCalculationStack:{path:`new-calculation`,screens:{Calculation:``,LoadingRecommendation:{path:`loading`},Recommendation:{path:`recommendation`},LeavingRecommendation:{path:`leaving`}}},IFU:`ifu`,SettingsStack:{path:`settings`,screens:{Settings:``,ProfileStack:`profile`,GlucoseSettings:`glucose`,ActivitySettings:`activity`,InsulinSettingsStack:{path:`insulin-settings`,screens:{InsulinSettings:``,TreatmentType:`treatment-type`,RapidActingInsulin:`rapid-acting-insulin`,LongActingInsulin:`long-acting-insulin`}},IFU:`ifu`,Legal:`legal`,GlucoseUnit:`glucose-unit`}}}}};l0();var iEn=XUt();NK.SENTRY_ENABLED===`true`&&j$t({dsn:NK.SENTRY_DSN,environment:NK.SENTRY_ENVIRONMENT,beforeSend:(e,t)=>{let n=e.exception?.values?.[0],r=[n?.type,n?.value].filter(Boolean).join(`: `);if(r.includes(ryt.NetworkErrorFailure)||r.includes(ryt.NetworkErrorTimeout)||NK.IS_PRODUCTION===`false`&&r.includes(ryt.TranslationError))return null;if(t.originalException instanceof M2t){let{statusCode:n,method:r,url:i,responseBody:a}=t.originalException;e.tags={...e.tags,"http.status":String(n),"http.method":r},e.contexts={...e.contexts,response:{status:n,url:i,method:r,body:a}}}return e.user&&(delete e.user.email,delete e.user.ip_address,delete e.user.username,delete e.user.geo),e}});var aEn=()=>{let{colorScheme:e}=d0(),{COLORS:t}=J(),n=e===`light`?fKt:eKt;return(0,W.jsx)(qSt,{children:(0,W.jsx)(c2t,{children:(0,W.jsx)(l0t,{children:(0,W.jsx)(T1t,{client:E2t,children:(0,W.jsx)(dKt,{theme:{...n,colors:{...n.colors,background:t.bgPrimary,border:t.divider,text:t.labelPrimary},fonts:{...n.fonts,regular:{...n.fonts.regular,fontFamily:h0.PoppinsRegular},medium:{...n.fonts.medium,fontFamily:h0.PoppinsMedium},bold:{...n.fonts.bold,fontFamily:h0.PoppinsSemiBold},heavy:{...n.fonts.heavy,fontFamily:h0.PoppinsBold}}},ref:iEn,linking:rEn,children:(0,W.jsx)(mUt,{children:(0,W.jsx)(nEn,{})})})})})})})},oEn=u(b());lyt(),oEn.createRoot(document.getElementById(`root`)).render((0,W.jsx)(aEn,{}));
892
+ `),Dhn={fetchModules(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let e=yield m7.fetchModules();return e?JSON.parse(e):null})},sendEnvelope(e){return p7(this,void 0,void 0,function*(){if(!this.enableNative){F5.warn(`Event was skipped as native SDK is not enabled.`);return}if(!this._isModuleLoaded(m7))throw this._NativeClientError;let[t,n]=e,r=d7(JSON.stringify(t)),i=new Uint8Array(r.length+h7.length);i.set(r),i.set(h7,r.length);let a=!1;for(let e of n){let[t,n]=this._processItem(e),r,o;typeof n==`string`?(r=`text/plain`,o=d7(n)):n instanceof Uint8Array?(r=typeof t.content_type==`string`?t.content_type:`application/octet-stream`,o=n):(r=typeof t.content_type==`string`?t.content_type:`application/json`,o=d7(JSON.stringify(n)),a||=lhn(n)),t.content_type=r,t.length=o.length;let s=d7(JSON.stringify(t)),c=new Uint8Array(i.length+s.length+h7.length+o.length+h7.length);c.set(i),c.set(s,i.length),c.set(h7,i.length+s.length),c.set(o,i.length+s.length+h7.length),c.set(h7,i.length+s.length+h7.length+o.length),i=c}yield m7.captureEnvelope(hhn(i),{hardCrashed:a})})},initNativeSdk(e){return p7(this,void 0,void 0,function*(){let t=Object.assign(Object.assign({enableNative:!0,autoInitializeNativeSdk:!0},e),e.enableLogs===void 0?{}:{enableLogs:e.enableLogs&&e.logsOrigin!==`js`});if(!t.enableNative)return t.enableNativeNagger&&F5.warn(`Note: Native Sentry SDK is disabled.`),this.enableNative=!1,!1;if(!t.autoInitializeNativeSdk)return t.enableNativeNagger&&F5.warn(`Note: Native Sentry SDK was not initialized automatically, you will need to initialize it manually. If you wish to disable the native SDK and get rid of this warning, pass enableNative: false`),this.enableNative=!0,!1;if(!t.dsn)return F5.warn(`Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized.`),this.enableNative=!1,!1;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let n=t.ignoreErrors?.filter(e=>typeof e==`string`),r=t.ignoreErrors?.filter(e=>e instanceof RegExp).map(e=>e.source);n&&n.length>0&&(t.ignoreErrorsStr=n),r&&r.length>0&&(t.ignoreErrorsRegex=r);let{beforeSend:i,beforeBreadcrumb:a,beforeSendTransaction:o,beforeSendMetric:s,integrations:c,ignoreErrors:l,logsOrigin:u}=t,d=Thn(t,[`beforeSend`,`beforeBreadcrumb`,`beforeSendTransaction`,`beforeSendMetric`,`integrations`,`ignoreErrors`,`logsOrigin`]),f=yield m7.initNativeSdk(d);return this.nativeIsReady=f,this.enableNative=!0,f})},fetchNativeLogAttributes(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeLogAttributes()})},fetchNativeRelease(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeRelease()})},fetchNativeSdkInfo(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeSdkInfo()})},fetchNativeDeviceContexts(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeDeviceContexts()})},fetchNativeAppStart(){return p7(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(m7)?m7.fetchNativeAppStart():(F5.error(this._NativeClientError),null):(F5.warn(this._DisabledNativeError),null)})},fetchNativeFrames(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;return m7.fetchNativeFrames()})},nativeCrash(){if(this.enableNative){if(!this._isModuleLoaded(m7))throw this._NativeClientError;m7.crash()}},setUser(e){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let t=null,n=null;if(e){let{id:r,ip_address:i,email:a,username:o,geo:s}=e,c=Thn(e,[`id`,`ip_address`,`email`,`username`,`geo`]),l={id:r,ip_address:i,email:a,username:o,geo:s};t=this._serializeObject(l),n=this._serializeObject(c)}m7.setUser(t,n)},setTag(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let n=typeof t==`string`?t:JSON.stringify(t);m7.setTag(e,n)},setExtra(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;if(typeof t==`string`)return m7.setExtra(e,t);if(t===void 0)return m7.setExtra(e,`undefined`);let n;try{let e=Cmn(t);n=JSON.stringify(e)}catch(e){F5.error("Extra for key ${key} not passed to native SDK, because it contains non-stringifiable values",e)}return typeof n==`string`?m7.setExtra(e,n):m7.setExtra(e,`**non-stringifiable**`)},addBreadcrumb(e){if(this.enableNative){if(!this._isModuleLoaded(m7))throw this._NativeClientError;m7.addBreadcrumb(Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))}},clearBreadcrumbs(){if(this.enableNative){if(!this._isModuleLoaded(m7))throw this._NativeClientError;m7.clearBreadcrumbs()}},setContext(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(m7))throw this._NativeClientError;if(t===null)return m7.setContext(e,null);let n;try{n=whn(t)}catch(e){F5.error("Context for key ${key} not passed to native SDK, because it contains non-serializable values",e)}n?m7.setContext(e,n):m7.setContext(e,{error:`**non-serializable**`})},closeNativeSdk(){return p7(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(m7))return m7.closeNativeSdk().then(()=>{this.enableNative=!1})})},disableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(m7)&&m7.disableNativeFramesTracking()},enableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(m7)&&m7.enableNativeFramesTracking()},isNativeAvailable(){return this._isModuleLoaded(m7)},captureScreenshot(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)return F5.warn(this._DisabledNativeError),null;if(!this._isModuleLoaded(m7))return F5.error(this._NativeClientError),null;let e;try{e=yield m7.captureScreenshot()}catch(e){F5.warn(`Failed to capture screenshot`,e)}return e?e.map(e=>Object.assign(Object.assign({},e),{data:new Uint8Array(e.data)})):null})},fetchViewHierarchy(){return p7(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let e=yield m7.fetchViewHierarchy();return e?new Uint8Array(e):null})},startProfiling(e){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let{started:t,error:n}=m7.startProfiling(e);return t?F5.log(`[NATIVE] Start Profiling`):F5.error(`[NATIVE] Start Profiling Failed`,n),!!t},stopProfiling(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(m7))throw this._NativeClientError;let{profile:e,nativeProfile:t,androidProfile:n,error:r}=m7.stopProfiling();if(!e||r)return F5.error(`[NATIVE] Stop Profiling Failed`,r),null;z.OS===`ios`&&!t&&F5.warn(`[NATIVE] Stop Profiling Failed: No Native Profile`),z.OS===`android`&&!n&&F5.warn(`[NATIVE] Stop Profiling Failed: No Android Profile`);try{return{hermesProfile:JSON.parse(e),nativeProfile:t,androidProfile:n}}catch(e){return F5.error(`[NATIVE] Failed to parse Hermes Profile JSON`,e),null}},fetchNativePackageName(){return!this.enableNative||!this._isModuleLoaded(m7)?null:m7.fetchNativePackageName()||null},fetchNativeStackFramesBy(e){return!this.enableNative||!this._isModuleLoaded(m7)?null:m7.fetchNativeStackFramesBy(e)||null},initNativeReactNavigationNewFrameTracking(){return p7(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(m7))return m7.initNativeReactNavigationNewFrameTracking()})},captureReplay(e){return p7(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(m7)?(yield m7.captureReplay(e))||null:(F5.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is not available.`),Promise.resolve(null)):(F5.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is disabled.`),Promise.resolve(null))})},getCurrentReplayId(){return this.enableNative?this._isModuleLoaded(m7)?m7.getCurrentReplayId()||null:(F5.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is not available.`),null):(F5.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is disabled.`),null)},crashedLastRun(){return p7(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(m7))return null;let e=yield m7.crashedLastRun();return typeof e==`boolean`?e:null})},getNewScreenTimeToDisplay(){return!this.enableNative||!this._isModuleLoaded(m7)?Promise.resolve(null):m7.getNewScreenTimeToDisplay()},getDataFromUri(e){return p7(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(m7))return null;try{let t=yield m7.getDataFromUri(e);return new Uint8Array(t)}catch(e){return F5.error(`Error:`,e),null}})},popTimeToDisplayFor(e){if(!this.enableNative||!this._isModuleLoaded(m7))return Promise.resolve(null);try{return m7.popTimeToDisplayFor(e)}catch(e){return F5.error(`Error:`,e),Promise.resolve(null)}},setActiveSpanId(e){if(!(!this.enableNative||!this._isModuleLoaded(m7)))try{m7.setActiveSpanId(e)}catch(e){F5.error(`Error:`,e);return}},encodeToBase64(e){return p7(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(m7))return Promise.resolve(null);try{let t=Array.from(e);return(yield m7.encodeToBase64(t))||null}catch(e){return F5.error(`Error:`,e),Promise.resolve(null)}})},primitiveProcessor:function(e){return e},_processItem(e){let[t,n]=e;if(t.type==`event`||t.type==`transaction`){let e=this._processLevels(n);return Dhn.platform===`android`&&`message`in e&&(e.message={message:e.message}),[t,e]}return e},_serializeObject(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];t[n]=typeof r==`string`?r:JSON.stringify(r)}),t},_processLevels(e){return Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0,breadcrumbs:e.breadcrumbs?.map(e=>Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))})},_processLevel(e){return e==`log`?`debug`:e},_isModuleLoaded(e){return!!e},_setPrimitiveProcessor:function(e){this.primitiveProcessor=e},_DisabledNativeError:new shn(`Native is disabled`),_NativeClientError:new shn(`Native Client is not available, can't start on native.`),enableNative:!0,nativeIsReady:!1,platform:z.OS};function Ohn(e){return p7(this,void 0,void 0,function*(){return Dhn.getDataFromUri(e)})}function khn(e){return e instanceof c7}function Ahn(e){return e===r7(e)}V(),z.OS===`android`||z.OS;var jhn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Mhn=`MobileFeedback`,Nhn=(e={})=>{let{buttonOptions:t,screenshotButtonOptions:n,colorScheme:r,themeLight:i,themeDark:a}=e;return{name:Mhn,options:jhn(e,[`buttonOptions`,`screenshotButtonOptions`,`colorScheme`,`themeLight`,`themeDark`]),buttonOptions:t||{},screenshotButtonOptions:n||{},colorScheme:r||`system`,themeLight:i||{},themeDark:a||{}}},Phn=()=>Y5()?.getIntegrationByName(Mhn),Fhn=()=>{let e=Phn();return e?.colorScheme?e.colorScheme:`system`},Ihn=()=>{let e=Phn();return e?e.themeLight:{}},Lhn=()=>{let e=Phn();return e?e.themeDark:{}},Rhn=`ui.action.touch`,zhn=`auto.interaction`,Bhn=`manual.interaction`;V();var Vhn=(e,t)=>{if(!Ahn(t)||!khn(t)){F5.warn(`Not sampling childless spans only works for Sentry Transactions (Root Spans).`);return}e.on(`spanEnd`,e=>{e===t&&n7(t).length<=1&&(F5.log(`Not sampling as ${$5(t).op} transaction has no child spans.`),t._sampled=!1)})},Hhn=(e,t)=>{let n=Wf.addEventListener(`change`,e=>{e===`background`&&(F5.log(`Setting ${$5(t).op} transaction to cancelled because the app is in the background.`),t.setStatus({code:2,message:`cancelled`}),t.end())});n&&e.on(`spanEnd`,e=>{var r;e===t&&(F5.log(`Removing AppState listener for ${$5(t).op} transaction.`),(r=n?.remove)==null||r.call(n))})};V();var Uhn=(e,{finalTimeout:t,idleTimeout:n})=>{let r=Y5();if(!r)return F5.warn(`[startIdleSpan] Can't create idle span, missing client.`),new s7;if(Wf.currentState===`background`)return F5.log(`[startIdleSpan] App is already in background, not starting span for ${e.name}`),new s7;q5().setPropagationContext({traceId:V5(),sampleRand:Math.random()});let i=ehn(e,{finalTimeout:t,idleTimeout:n});return Hhn(r,i),i};function Whn(e){return[zhn,Bhn].includes($5(e).origin||``)}var Ghn=`_sentrySpan`;function Khn(e){delete e[Ghn]}var qhn=class{constructor({cleanupInterval:e=5e3,ttl:t=2e3}={}){this._ttl=t,this._map=new Map,this._cleanupIntervalMs=e,this.startCleanup()}set(e,t){if(this._cleanupInterval||this.startCleanup(),typeof t!=`object`||!t||!(`then`in t)){this._map.set(e,{value:t,expiresAt:Date.now()+this._ttl,promise:null});return}let n={value:void 0,expiresAt:null,promise:t};this._map.set(e,n),t.then(e=>{n.value=e,n.expiresAt=Date.now()+this._ttl,n.promise=null},()=>{n.expiresAt=Date.now()+this._ttl,n.promise=null})}pop(e){let t=this.get(e);return this._map.delete(e),t}get(e){let t=this._map.get(e);if(t)return t.promise?t.promise:(t.expiresAt&&t.expiresAt<=Date.now()&&this._map.delete(e),t.value)}has(e){let t=this._map.get(e);return t?t.promise?!0:t.expiresAt&&t.expiresAt<=Date.now()?(this._map.delete(e),!1):!0:!1}ttl(e){let t=this._map.get(e);if(t?.expiresAt){let e=t.expiresAt-Date.now();return e>0?e:0}}cleanup(){let e=Date.now();for(let[t,n]of this._map.entries())n.expiresAt&&n.expiresAt<=e&&this._map.delete(t);this._map.size||this.stopCleanup()}clear(){this._cleanupInterval&&clearInterval(this._cleanupInterval),this._map.clear()}stopCleanup(){this._cleanupInterval&&clearInterval(this._cleanupInterval)}startCleanup(){this._cleanupInterval=setInterval(()=>this.cleanup(),this._cleanupIntervalMs)}},Jhn=`ReactNativeTracing`;f7();function Yhn(){let e=Y5();if(e)return Xhn(e)}function Xhn(e){return e.getIntegrationByName(Jhn)}var g7=`UserInteraction`,Zhn=e=>{let t=Y5();if(!t)return;let n=Yhn();if(!n){F5.log(`[${g7}] Tracing integration is not available. Can not start user interaction span.`);return}let r=t.getOptions(),{elementId:i,op:a}=e;if(!r.enableUserInteractionTracing){F5.log(`[${g7}] User Interaction Tracing is disabled.`);return}if(!i){F5.log(`[${g7}] User Interaction Tracing can not create transaction with undefined elementId.`);return}if(!n.state.currentRoute){F5.log(`[${g7}] User Interaction Tracing can not create transaction without a current route.`);return}let o=gmn(),s=o&&!Whn(o);if(o&&s){F5.warn(`[${g7}] Did not create ${a} transaction because active transaction ${$5(o).description} exists on the scope.`);return}let c=`${n.state.currentRoute}.${i}`;if(o&&$5(o).description===c&&$5(o).op===a){F5.warn(`[${g7}] Did not create ${a} transaction because it the same transaction ${$5(o).description} already exists on the scope.`);return}let l=q5(),u={name:c,op:a,scope:l};Khn(l);let d=Uhn(u,{idleTimeout:n.options.idleTimeoutMs,finalTimeout:n.options.finalTimeoutMs});return d.setAttribute(Z5,Bhn),Vhn(t,d),F5.log(`[${g7}] User Interaction Tracing Created ${a} transaction ${c}.`),d};new qhn({ttl:6e4}),V();function Qhn(){let{major:e,minor:t}=chn.ReactNativeVersion?.version||{};return e&&e>0||t&&t>=69||!1}var $hn=e=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e),egn=e=>{if(typeof atob!=`function`||!f7())throw Error(`atob is not available in this environment.`);let t=atob(e);return new Uint8Array([...t].map(e=>e.charCodeAt(0)))},_7=(e,t)=>{f7()&&l7.alert!==void 0?l7.alert(`${e}\n${t}`):Li.alert(e,t)},tgn={onFormOpen:()=>{},onFormClose:()=>{},onAddScreenshot:e=>{},onSubmitSuccess:()=>{},onSubmitError:()=>{},onFormSubmitted:()=>{},showBranding:!0,isEmailRequired:!1,shouldValidateEmail:!0,isNameRequired:!1,showEmail:!0,showName:!0,enableScreenshot:!1,enableTakeScreenshot:!1,cancelButtonLabel:`Cancel`,emailLabel:`Email`,emailPlaceholder:`your.email@example.org`,formTitle:`Report a Bug`,isRequiredLabel:`(required)`,messageLabel:`Description`,messagePlaceholder:`What's the bug? What did you expect?`,nameLabel:`Name`,namePlaceholder:`Your Name`,submitButtonLabel:`Send Bug Report`,errorTitle:`Error`,formError:`Please fill out all required fields.`,emailError:`Please enter a valid email address.`,captureScreenshotError:`Error capturing screenshot. Please try again.`,successMessageText:`Thank you for your report!`,addScreenshotButtonLabel:`Add a screenshot`,removeScreenshotButtonLabel:`Remove screenshot`,captureScreenshotButtonLabel:`Take a screenshot`,genericError:`Unable to send feedback due to an unexpected error.`},ngn=e=>({container:{flex:1,padding:20,backgroundColor:e.background},title:{fontSize:24,fontWeight:`bold`,marginBottom:20,textAlign:`left`,flex:1,color:e.foreground},label:{marginBottom:4,fontSize:16,color:e.foreground},input:{height:50,borderColor:e.border,borderWidth:1,borderRadius:5,paddingHorizontal:10,marginBottom:15,fontSize:16,color:e.foreground},textArea:{height:100,textAlignVertical:`top`,color:e.foreground},screenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:`center`,flex:1,borderWidth:1,borderColor:e.border},screenshotContainer:{flexDirection:`row`,alignItems:`center`,width:`100%`,marginBottom:20},screenshotThumbnail:{width:50,height:50,borderRadius:5,marginRight:10},screenshotText:{color:e.foreground,fontSize:16},takeScreenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:`center`,borderWidth:1,borderColor:e.border,marginTop:-10,marginBottom:20},takeScreenshotText:{color:e.foreground,fontSize:16},submitButton:{backgroundColor:e.accentBackground,paddingVertical:15,borderRadius:5,alignItems:`center`,marginBottom:10},submitText:{color:e.accentForeground,fontSize:18},cancelButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:`center`,borderWidth:1,borderColor:e.border},cancelText:{color:e.foreground,fontSize:16},titleContainer:{flexDirection:`row`,width:`100%`},sentryLogo:{width:40,height:40,tintColor:e.sentryLogo}});V();function rgn(){let e=Fhn(),t=e===`system`?Pf.getColorScheme():e,n=Object.assign(Object.assign({},ign),Ihn()),r=Object.assign(Object.assign({},agn),Lhn());return t===`dark`?r:n}var ign={accentBackground:`rgba(88, 74, 192, 1)`,accentForeground:`#ffffff`,foreground:`#2b2233`,background:`#ffffff`,border:`rgba(41, 35, 47, 0.13)`,feedbackIcon:`rgba(54, 45, 89, 1)`,sentryLogo:`rgba(54, 45, 89, 1)`},agn={accentBackground:`rgba(88, 74, 192, 1)`,accentForeground:`#ffffff`,foreground:`#ebe6ef`,background:`#29232f`,border:`rgba(235, 230, 239, 0.15)`,feedbackIcon:`#ffffff`,sentryLogo:`#ffffff`};function ogn(){var e;Y5()?.getIntegrationByName(`MobileFeedback`)||(e=Y5())==null||e.addIntegration(Nhn())}function sgn(){var e;Y5()?.getIntegrationByName(`AutoInjectMobileScreenshotButton`)||(e=Y5())==null||e.addIntegration({name:`AutoInjectMobileScreenshotButton`})}var cgn=()=>{},lgn=class{static get _feedbackComponentName(){throw Error(`Subclasses must override feedbackComponentName`)}static initialize(e){this._setVisibility=e}static reset(){this._isVisible=!1,this._setVisibility=cgn}static show(){this._setVisibility===cgn?console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' to be called before 'show${this._feedbackComponentName}()'.`):(this._isVisible=!0,this._setVisibility(!0))}static hide(){this._setVisibility===cgn?console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' before interacting with the widget.`):(this._isVisible=!1,this._setVisibility(!1))}static isFormVisible(){return this._isVisible}};lgn._isVisible=!1;var ugn=class extends lgn{static get _feedbackComponentName(){return`FeedbackButton`}},dgn=class extends lgn{static get _feedbackComponentName(){return`ScreenshotButton`}},fgn=()=>{ugn.hide()},pgn=()=>{if(f7()){F5.warn(`ScreenshotButton is not supported on Web.`);return}sgn(),dgn.show()};V(),H.Component,V();var mgn,hgn=()=>{let e=mgn;return mgn=void 0,e};H.Component,V();var ggn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},_gn=class e extends H.Component{constructor(t){super(t),this._didSubmitForm=!1,this.handleFeedbackSubmit=()=>{let{name:e,email:t,description:n}=this.state,{onSubmitSuccess:r,onSubmitError:i,onFormSubmitted:a}=this.props,o=this.props,s=e?.trim(),c=t?.trim(),l=n?.trim();if(this.props.isNameRequired&&!s||this.props.isEmailRequired&&!c||!l){_7(o.errorTitle,o.formError);return}if(this.props.shouldValidateEmail&&(this.props.isEmailRequired||c.length>0)&&!$hn(c)){_7(o.errorTitle,o.emailError);return}let u=this.state.filename&&this.state.attachment?[{filename:this.state.filename,data:this.state.attachment}]:void 0,d={message:l,name:s,email:c,associatedEventId:rhn()};try{a||this.setState({isVisible:!1}),ohn(d,u?{attachments:u}:void 0),r({name:s,email:c,message:l,attachments:u}),_7(o.successMessageText,``),a(),this._didSubmitForm=!0}catch(e){let t=`Feedback form submission failed: ${e}`;i(Error(t)),_7(o.errorTitle,o.genericError),F5.error(`Feedback form submission failed: ${e}`)}},this.onScreenshotButtonPress=()=>ggn(this,void 0,void 0,function*(){if(this._hasScreenshot())this.setState({filename:void 0,attachment:void 0,attachmentUri:void 0});else{let{imagePicker:e}=this.props;if(e){let t=e.launchImageLibraryAsync?()=>e.launchImageLibraryAsync?.call(e,{mediaTypes:[`images`],base64:f7()}):e.launchImageLibrary?()=>e.launchImageLibrary?.call(e,{mediaType:`photo`,includeBase64:f7()}):null;if(!t){F5.warn(`No compatible image picker library found. Please provide a valid image picker library.`);return}let n=yield t();if(n?.assets&&n.assets.length>0)if(f7()){let e=n.assets[0]?.fileName,t=n.assets[0]?.uri,r=n.assets[0]?.base64,i=r?egn(r):void 0;i?this.setState({filename:e,attachment:i,attachmentUri:t}):F5.error(`Failed to read image data on the web`)}else{let e=n.assets[0]?.fileName,t=n.assets[0]?.uri;t&&Ohn(t).then(n=>{n==null?(this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,t)):this.setState({filename:e,attachment:n,attachmentUri:t})}).catch(e=>{this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,t,`error: `,e)})}}else{let{onAddScreenshot:e}=Object.assign(Object.assign({},tgn),this.props);e(e=>{Ohn(e).then(t=>{t==null?(this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,e)):this.setState({filename:`feedback_screenshot`,attachment:t,attachmentUri:e})}).catch(t=>{this._showImageRetrievalDevelopmentNote(),F5.error(`Failed to read image data from uri:`,e,`error: `,t)})})}}}),this._setCapturedScreenshot=e=>{e.data==null?F5.error(`Failed to read image data from:`,e.filename):(F5.log(`Setting captured screenshot:`,e.filename),Dhn.encodeToBase64(e.data).then(t=>{if(t!=null){let n=`data:${e.contentType};base64,${t}`;this.setState({filename:e.filename,attachment:e.data,attachmentUri:n})}else F5.error(`Failed to read image data from:`,e.filename)}).catch(t=>{F5.error(`Failed to read image data from:`,e.filename,`error: `,t)}))},this._saveFormState=()=>{e._savedState=Object.assign({},this.state)},this._clearFormState=()=>{e._savedState={name:``,email:``,description:``,filename:void 0,attachment:void 0,attachmentUri:void 0}},this._hasScreenshot=()=>this.state.filename!==void 0&&this.state.attachment!==void 0&&this.state.attachmentUri!==void 0,this._getUser=()=>q5().getUser()||J5().getUser()||Fpn().getUser(),this._showImageRetrievalDevelopmentNote=()=>{xhn()&&_7(`Development note`,`The feedback widget cannot retrieve image data in Expo Go. Please build your app to test this functionality.`)};let n={useSentryUser:{email:this.props?.useSentryUser?.email||this._getUser()?.email||``,name:this.props?.useSentryUser?.name||this._getUser()?.name||``}};this.state={isVisible:!0,name:e._savedState.name||n.useSentryUser.name,email:e._savedState.email||n.useSentryUser.email,description:e._savedState.description||``,filename:e._savedState.filename||void 0,attachment:e._savedState.attachment||void 0,attachmentUri:e._savedState.attachmentUri||void 0},ogn()}static reset(){e._savedState={name:``,email:``,description:``,filename:void 0,attachment:void 0,attachmentUri:void 0}}componentDidMount(){this._themeListener=Pf.addChangeListener(()=>{this.forceUpdate()})}componentWillUnmount(){this._didSubmitForm?(this._clearFormState(),this._didSubmitForm=!1):this._saveFormState(),this._themeListener&&this._themeListener.remove()}render(){let e=rgn(),{name:t,email:n,description:r}=this.state,{onFormClose:i}=this.props,a=this.props,o=this.props,s=this.props,c=Object.assign(Object.assign({},ngn(e)),this.props.styles),l=()=>{i?i():this.setState({isVisible:!1})};if(!this.state.isVisible)return null;let u=hgn();return u===`ErrorCapturingScreenshot`?setTimeout(()=>ggn(this,void 0,void 0,function*(){_7(s.errorTitle,s.captureScreenshotError)}),100):u&&this._setCapturedScreenshot(u),H.createElement(xm,{onPress:Shn()?qf.dismiss:void 0,accessible:!1,accessibilityElementsHidden:!1},H.createElement(B,{style:c.container},H.createElement(B,{style:c.titleContainer},H.createElement(Id,{style:c.title,testID:`sentry-feedback-form-title`},s.formTitle),a.showBranding&&H.createElement(gd,{source:{uri:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAC4BAMAAABUVL5sAAAAD1BMVEUAAAA2Llo3LVk4LFg2LVmgcvrUAAAABHRSTlMAgL9ARyeO/QAAA7pJREFUeNrtWltynDAQFBIHIFUcgCQ6AIk5AAjd/0ypxFk3ouUCNJofl/rHy75a09MzI7Q2DQ0NDQ0NDQ0NDQ0N9eF+xPh9MKpwPv6FLss7R9yMImz8j8nowb9IglFDF6N+KCNIdqMFcGjpBbVUXdzHqKsXUhJGNb2g1vz6azRgX8XulUwMtVZjFsWkvFz10s0ooEO+9Vpxj/6rp9eI5VsdE6eJcDCxilqICiZWMHBSMkBVA2vq1SVrVyr6Ea5VMjHqjytTwcAgRVJ0DAy9VoWUTNT3tQysZGIYmGNTKHfK0q6oFkysYWCuHB0DaxX9yHLx5JKrhVC0TGwjWNRMvNAuW6PoR4TCepnqLLuiicEyKJq4g2C6Rc+hsInlgtHCF41OrD65INisObksbKy2/YJg9U08sGBTbRN3YaBQQu2i74/mcQil6vZr5C0dQpGbGKJvdOA1VDVxd5LHooPR5BJPdwql5vaLeq9FQZKJpa1kOoUSKpq45+m+ZK93aUpSwRyuafslUguCIZRZamKoBYQT80QmlqnF38p6bSIDcyg2q5fw/uo8dx0upZMLLdadQ1kgkNDEOOGiYYXjVKGJ8V00rEggcErurxAKCwQTi9RCAW7UFcUm5vPAOFNXFBY9DggQyp76jnIkOyBwaeqtyMScEu7w4JRNLnyQOjyvACcWpR145g6PV1fp9mvE0jMd3tWZXDR3/Ud2cSXZfmHhvNpEoFlgYsjFHX4AJc3kXXSTyEfDTrz94ptE1qvS9ouG1Ud2sQT5PVcHg3FL78FIYUpqxWK1yLzMxNzhHVaLzItMzB0eB/S4CDRHC+AzFTjhAiSSHx9tpgJXqnmhXi7VizM/F5v4V5oVqOIp81PpEW4Xt7PUA0kEe5WZ2PLt7ZopDg8Seue9GpxoU0WrHyFPgYlzmyrKPDxcpFeX3YRS5mGvxybmsC2tPhLJQxPzdsfliwMeLjAx9wcujoFIaEAX/KSYXz0s+9TE/E7LX0yF8lQvitl99sVjSgITl/yk6Lk48JjfGadnanHml8xjMvFTA+eL42CRwDKEZwbm4rBMyAmdH6UEz8HDTPj4d4ie1EJxJCQg56DXaxKOl0iGz0jcdebZluzhbFSA1yEZ2JzbHZKQe3I/EK4CErTHbwn84ZP+8Poxqrd/+I2cXJAw0v9VAkBiI3DhLryZEe6SXNeJk5HcHFu+Aom5wiIn2a7niZiE1WKMUhIOhNFJSQZzh0VG8tPcQufLSQI46sO9vcM0NDQ0NDQ0NDQ0NHxF/AFGJOBYBWrb5gAAAABJRU5ErkJggg==`},style:c.sentryLogo,testID:`sentry-logo`})),a.showName&&H.createElement(H.Fragment,null,H.createElement(Id,{style:c.label},s.nameLabel,a.isNameRequired&&` ${s.isRequiredLabel}`),H.createElement(am,{style:c.input,testID:`sentry-feedback-name-input`,placeholder:s.namePlaceholder,value:t,onChangeText:e=>this.setState({name:e})})),a.showEmail&&H.createElement(H.Fragment,null,H.createElement(Id,{style:c.label},s.emailLabel,a.isEmailRequired&&` ${s.isRequiredLabel}`),H.createElement(am,{style:c.input,testID:`sentry-feedback-email-input`,placeholder:s.emailPlaceholder,keyboardType:`email-address`,value:n,onChangeText:e=>this.setState({email:e})})),H.createElement(Id,{style:c.label},s.messageLabel,` ${s.isRequiredLabel}`),H.createElement(am,{style:[c.input,c.textArea],testID:`sentry-feedback-message-input`,placeholder:s.messagePlaceholder,value:r,onChangeText:e=>this.setState({description:e}),multiline:!0}),(a.enableScreenshot||o.imagePicker||this._hasScreenshot())&&H.createElement(B,{style:c.screenshotContainer},this.state.attachmentUri&&H.createElement(gd,{source:{uri:this.state.attachmentUri},style:c.screenshotThumbnail}),H.createElement(_p,{style:c.screenshotButton,onPress:this.onScreenshotButtonPress},H.createElement(Id,{style:c.screenshotText},this._hasScreenshot()?s.removeScreenshotButtonLabel:s.addScreenshotButtonLabel))),Shn()&&a.enableTakeScreenshot&&!this.state.attachmentUri&&H.createElement(_p,{style:c.takeScreenshotButton,onPress:()=>{fgn(),l(),pgn()}},H.createElement(Id,{style:c.takeScreenshotText,testID:`sentry-feedback-take-screenshot-button`},s.captureScreenshotButtonLabel)),H.createElement(_p,{style:c.submitButton,onPress:this.handleFeedbackSubmit},H.createElement(Id,{style:c.submitText,testID:`sentry-feedback-submit-button`},s.submitButtonLabel)),H.createElement(_p,{style:c.cancelButton,onPress:l},H.createElement(Id,{style:c.cancelText},s.cancelButtonLabel))))}};_gn.defaultProps=tgn,_gn._savedState={name:``,email:``,description:``,filename:void 0,attachment:void 0,attachmentUri:void 0},V(),Qhn(),H.Component;function vgn(e,t=()=>{}){return{name:e,setupOnce:t}}V(),Ei.hasViewManagerConfig&&Ei.hasViewManagerConfig(`RNSentryOnDrawReporter`),H.Component,V();var ygn=R.create({wrapperView:{flex:1}}),bgn=`touch`,xgn=`user`,Sgn=20,Cgn=`sentry-label`,v7=`data-sentry-component`,y7=`data-sentry-element`,b7=`data-sentry-source-file`,wgn=class e extends H.Component{constructor(){super(...arguments),this.name=`TouchEventBoundary`}componentDidMount(){var e;let t=Y5();(e=t?.addIntegration)==null||e.call(t,vgn(this.name))}render(){return H.createElement(B,{style:ygn.wrapperView,onTouchStart:this._onTouchStart.bind(this)},this.props.children)}_logTouchEvent(e,t){let n=e[0];if(!n){F5.warn(`[TouchEvents] No root component found in touch path.`);return}let r=t||`${n.name}${n.file?` (${n.file})`:``}`,i={category:this.props.breadcrumbCategory,data:{path:e},level:`info`,message:`Touch event within element: ${r}`,type:this.props.breadcrumbType};ahn(i),F5.log(`[TouchEvents] ${i.message}`)}_isNameIgnored(e){let t=this.props.ignoreNames||[];return this.props.ignoredDisplayNames&&(t=[...t,...this.props.ignoredDisplayNames]),t.some(t=>typeof t==`string`&&e===t||t instanceof RegExp&&e.match(t))}_onTouchStart(t){if(!t._targetInst)return;let n=t._targetInst,r=[];for(;n&&this.props.maxComponentTreeSize&&r.length<this.props.maxComponentTreeSize&&n.elementType?.displayName!==e.displayName;){let e=Tgn(n,this.props.labelName);this._pushIfNotIgnored(r,e),n=n.return}let i=r.find(e=>e.label)?.label;r.length>0&&this._logTouchEvent(r,i);let a=Zhn({elementId:i,op:Rhn});a&&a.setAttribute(Z5,zhn)}_pushIfNotIgnored(e,t){return!t||!t.name&&!t.label||t.name&&this._isNameIgnored(t.name)||t.label&&this._isNameIgnored(t.label)||e.length>0&&JSON.stringify(e[e.length-1])===JSON.stringify(t)?!1:(e.push(t),!0)}};wgn.displayName=`__Sentry.TouchEventBoundary`,wgn.defaultProps={breadcrumbCategory:bgn,breadcrumbType:xgn,ignoreNames:[],maxComponentTreeSize:Sgn};function Tgn(e,t){let n=e.elementType?.displayName,r=e.memoizedProps;return r?dpn({name:Egn(r)||n,element:Dgn(r),file:Ogn(r),label:kgn(r,t)}):n?{name:n}:void 0}function Egn(e){return typeof e[v7]==`string`&&e[v7].length>0&&e[v7]!==`unknown`&&e[v7]||void 0}function Dgn(e){return typeof e[y7]==`string`&&e[y7].length>0&&e[y7]!==`unknown`&&e[y7]||void 0}function Ogn(e){return typeof e[b7]==`string`&&e[b7].length>0&&e[b7]!==`unknown`&&e[b7]||void 0}function kgn(e,t){return typeof e[Cgn]==`string`&&e[Cgn].length>0?e[Cgn]:typeof t==`string`&&typeof e[t]==`string`&&e[t].length>0?e[t]:void 0}function Agn(){return Object.assign({},j6())}function jgn(e,t){let n=Mgn(t)?new t(0):V2(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Mgn(e){return typeof e==`function`&&e.prototype?.constructor===e}var Ngn=10,Pgn=class{subPriority=0;validate(e,t){return!0}},Fgn=class extends Pgn{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},Ign=class extends Pgn{priority=Ngn;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>V2(t,e))}set(e,t){return t.timestampIsSet?e:V2(e,jgn(e,this.context))}},x7=class{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new Fgn(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},Lgn=class extends x7{priority=140;parse(e,t,n){switch(t){case`G`:case`GG`:case`GGG`:return n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`});case`GGGGG`:return n.era(e,{width:`narrow`});default:return n.era(e,{width:`wide`})||n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`R`,`u`,`t`,`T`]},S7={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},C7={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function w7(e,t){return e&&{value:t(e.value),rest:e.rest}}function T7(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function E7(e,t){let n=t.match(e);if(!n)return null;if(n[0]===`Z`)return{value:0,rest:t.slice(1)};let r=n[1]===`+`?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*d5t+a*u5t+o*f5t),rest:t.slice(n[0].length)}}function Rgn(e){return T7(S7.anyDigitsSigned,e)}function D7(e,t){switch(e){case 1:return T7(S7.singleDigit,t);case 2:return T7(S7.twoDigits,t);case 3:return T7(S7.threeDigits,t);case 4:return T7(S7.fourDigits,t);default:return T7(RegExp(`^\\d{1,`+e+`}`),t)}}function zgn(e,t){switch(e){case 1:return T7(S7.singleDigitSigned,t);case 2:return T7(S7.twoDigitsSigned,t);case 3:return T7(S7.threeDigitsSigned,t);case 4:return T7(S7.fourDigitsSigned,t);default:return T7(RegExp(`^-?\\d{1,`+e+`}`),t)}}function Bgn(e){switch(e){case`morning`:return 4;case`evening`:return 17;case`pm`:case`noon`:case`afternoon`:return 12;default:return 0}}function Vgn(e,t){let n=t>0,r=n?t:1-t,i;if(r<=50)i=e||100;else{let t=r+50,n=Math.trunc(t/100)*100,a=e>=t%100;i=e+n-(a?100:0)}return n?i:1-i}function Hgn(e){return e%400==0||e%4==0&&e%100!=0}var Ugn=class extends x7{priority=130;incompatibleTokens=[`Y`,`R`,`u`,`w`,`I`,`i`,`e`,`c`,`t`,`T`];parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`yy`});switch(t){case`y`:return w7(D7(4,e),r);case`yo`:return w7(n.ordinalNumber(e,{unit:`year`}),r);default:return w7(D7(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=Vgn(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Wgn=class extends x7{priority=130;parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`YY`});switch(t){case`Y`:return w7(D7(4,e),r);case`Yo`:return w7(n.ordinalNumber(e,{unit:`year`}),r);default:return w7(D7(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=Jin(e,r);if(n.isTwoDigitYear){let t=Vgn(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),M6(e,r)}let a=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),M6(e,r)}incompatibleTokens=[`y`,`R`,`u`,`Q`,`q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]},Ggn=class extends x7{priority=130;parse(e,t){return zgn(t===`R`?4:t.length,e)}set(e,t,n){let r=V2(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),W6(r)}incompatibleTokens=[`G`,`y`,`Y`,`u`,`Q`,`q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},Kgn=class extends x7{priority=130;parse(e,t){return zgn(t===`u`?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`G`,`y`,`Y`,`R`,`w`,`I`,`i`,`e`,`c`,`t`,`T`]},qgn=class extends x7{priority=120;parse(e,t,n){switch(t){case`Q`:case`QQ`:return D7(t.length,e);case`Qo`:return n.ordinalNumber(e,{unit:`quarter`});case`QQQ`:return n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`});case`QQQQQ`:return n.quarter(e,{width:`narrow`,context:`formatting`});default:return n.quarter(e,{width:`wide`,context:`formatting`})||n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},Jgn=class extends x7{priority=120;parse(e,t,n){switch(t){case`q`:case`qq`:return D7(t.length,e);case`qo`:return n.ordinalNumber(e,{unit:`quarter`});case`qqq`:return n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`});case`qqqqq`:return n.quarter(e,{width:`narrow`,context:`standalone`});default:return n.quarter(e,{width:`wide`,context:`standalone`})||n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`Q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},Ygn=class extends x7{incompatibleTokens=[`Y`,`R`,`q`,`Q`,`L`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`];priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`M`:return w7(T7(S7.month,e),r);case`MM`:return w7(D7(2,e),r);case`Mo`:return w7(n.ordinalNumber(e,{unit:`month`}),r);case`MMM`:return n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`});case`MMMMM`:return n.month(e,{width:`narrow`,context:`formatting`});default:return n.month(e,{width:`wide`,context:`formatting`})||n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},Xgn=class extends x7{priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`L`:return w7(T7(S7.month,e),r);case`LL`:return w7(D7(2,e),r);case`Lo`:return w7(n.ordinalNumber(e,{unit:`month`}),r);case`LLL`:return n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`});case`LLLLL`:return n.month(e,{width:`narrow`,context:`standalone`});default:return n.month(e,{width:`wide`,context:`standalone`})||n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]};function Zgn(e,t,n){let r=H2(e,n?.in),i=Xin(r,n)-t;return r.setDate(r.getDate()-i*7),H2(r,n?.in)}var Qgn=class extends x7{priority=100;parse(e,t,n){switch(t){case`w`:return T7(S7.week,e);case`wo`:return n.ordinalNumber(e,{unit:`week`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return M6(Zgn(e,n,r),r)}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]};function $gn(e,t,n){let r=H2(e,n?.in),i=qin(r,n)-t;return r.setDate(r.getDate()-i*7),r}var e_n=class extends x7{priority=100;parse(e,t,n){switch(t){case`I`:return T7(S7.week,e);case`Io`:return n.ordinalNumber(e,{unit:`week`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return W6($gn(e,n))}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},t_n=[31,28,31,30,31,30,31,31,30,31,30,31],n_n=[31,29,31,30,31,30,31,31,30,31,30,31],r_n=class extends x7{priority=90;subPriority=1;parse(e,t,n){switch(t){case`d`:return T7(S7.date,e);case`do`:return n.ordinalNumber(e,{unit:`date`});default:return D7(t.length,e)}}validate(e,t){let n=Hgn(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=n_n[r]:t>=1&&t<=t_n[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]},i_n=class extends x7{priority=90;subpriority=1;parse(e,t,n){switch(t){case`D`:case`DD`:return T7(S7.dayOfYear,e);case`Do`:return n.ordinalNumber(e,{unit:`date`});default:return D7(t.length,e)}}validate(e,t){return Hgn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`L`,`w`,`I`,`d`,`E`,`i`,`e`,`c`,`t`,`T`]};function O7(e,t,n){let r=H2(e,n?.in);return isNaN(t)?V2(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function a_n(e,t,n){let r=j6(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=H2(e,n?.in),o=a.getDay(),s=(t%7+7)%7,c=7-i;return O7(a,t<0||t>6?t-(o+c)%7:(s+c)%7-(o+c)%7,n)}var o_n=class extends x7{priority=90;parse(e,t,n){switch(t){case`E`:case`EE`:case`EEE`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`EEEEE`:return n.day(e,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=a_n(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`D`,`i`,`e`,`c`,`t`,`T`]},s_n=class extends x7{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`e`:case`ee`:return w7(D7(t.length,e),i);case`eo`:return w7(n.ordinalNumber(e,{unit:`day`}),i);case`eee`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`eeeee`:return n.day(e,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=a_n(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`c`,`t`,`T`]},c_n=class extends x7{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`c`:case`cc`:return w7(D7(t.length,e),i);case`co`:return w7(n.ordinalNumber(e,{unit:`day`}),i);case`ccc`:return n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});case`ccccc`:return n.day(e,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});default:return n.day(e,{width:`wide`,context:`standalone`})||n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=a_n(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`e`,`t`,`T`]};function l_n(e,t){let n=H2(e,t?.in).getDay();return n===0?7:n}function u_n(e,t,n){let r=H2(e,n?.in);return O7(r,t-l_n(r,n),n)}var d_n=class extends x7{priority=90;parse(e,t,n){let r=e=>e===0?7:e;switch(t){case`i`:case`ii`:return D7(t.length,e);case`io`:return n.ordinalNumber(e,{unit:`day`});case`iii`:return w7(n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiii`:return w7(n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiiii`:return w7(n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);default:return w7(n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=u_n(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`E`,`e`,`c`,`t`,`T`]},f_n=class extends x7{priority=80;parse(e,t,n){switch(t){case`a`:case`aa`:case`aaa`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`aaaaa`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Bgn(n),0,0,0),e}incompatibleTokens=[`b`,`B`,`H`,`k`,`t`,`T`]},p_n=class extends x7{priority=80;parse(e,t,n){switch(t){case`b`:case`bb`:case`bbb`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`bbbbb`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Bgn(n),0,0,0),e}incompatibleTokens=[`a`,`B`,`H`,`k`,`t`,`T`]},m_n=class extends x7{priority=80;parse(e,t,n){switch(t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`BBBBB`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Bgn(n),0,0,0),e}incompatibleTokens=[`a`,`b`,`t`,`T`]},h_n=class extends x7{priority=70;parse(e,t,n){switch(t){case`h`:return T7(S7.hour12h,e);case`ho`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`H`,`K`,`k`,`t`,`T`]},g_n=class extends x7{priority=70;parse(e,t,n){switch(t){case`H`:return T7(S7.hour23h,e);case`Ho`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`K`,`k`,`t`,`T`]},__n=class extends x7{priority=70;parse(e,t,n){switch(t){case`K`:return T7(S7.hour11h,e);case`Ko`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`h`,`H`,`k`,`t`,`T`]},v_n=class extends x7{priority=70;parse(e,t,n){switch(t){case`k`:return T7(S7.hour24h,e);case`ko`:return n.ordinalNumber(e,{unit:`hour`});default:return D7(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){let r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`H`,`K`,`t`,`T`]},y_n=class extends x7{priority=60;parse(e,t,n){switch(t){case`m`:return T7(S7.minute,e);case`mo`:return n.ordinalNumber(e,{unit:`minute`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=[`t`,`T`]},b_n=class extends x7{priority=50;parse(e,t,n){switch(t){case`s`:return T7(S7.second,e);case`so`:return n.ordinalNumber(e,{unit:`second`});default:return D7(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=[`t`,`T`]},x_n=class extends x7{priority=30;parse(e,t){return w7(D7(t.length,e),e=>Math.trunc(e*10**(-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=[`t`,`T`]},S_n=class extends x7{priority=10;parse(e,t){switch(t){case`X`:return E7(C7.basicOptionalMinutes,e);case`XX`:return E7(C7.basic,e);case`XXXX`:return E7(C7.basicOptionalSeconds,e);case`XXXXX`:return E7(C7.extendedOptionalSeconds,e);default:return E7(C7.extended,e)}}set(e,t,n){return t.timestampIsSet?e:V2(e,e.getTime()-U6(e)-n)}incompatibleTokens=[`t`,`T`,`x`]},C_n=class extends x7{priority=10;parse(e,t){switch(t){case`x`:return E7(C7.basicOptionalMinutes,e);case`xx`:return E7(C7.basic,e);case`xxxx`:return E7(C7.basicOptionalSeconds,e);case`xxxxx`:return E7(C7.extendedOptionalSeconds,e);default:return E7(C7.extended,e)}}set(e,t,n){return t.timestampIsSet?e:V2(e,e.getTime()-U6(e)-n)}incompatibleTokens=[`t`,`T`,`X`]},w_n=class extends x7{priority=40;parse(e){return Rgn(e)}set(e,t,n){return[V2(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens=`*`},T_n=class extends x7{priority=20;parse(e){return Rgn(e)}set(e,t,n){return[V2(e,n),{timestampIsSet:!0}]}incompatibleTokens=`*`},E_n={G:new Lgn,y:new Ugn,Y:new Wgn,R:new Ggn,u:new Kgn,Q:new qgn,q:new Jgn,M:new Ygn,L:new Xgn,w:new Qgn,I:new e_n,d:new r_n,D:new i_n,E:new o_n,e:new s_n,c:new c_n,i:new d_n,a:new f_n,b:new p_n,B:new m_n,h:new h_n,H:new g_n,K:new __n,k:new v_n,m:new y_n,s:new b_n,S:new x_n,X:new S_n,x:new C_n,t:new w_n,T:new T_n},D_n=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,O_n=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,k_n=/^'([^]*?)'?$/,A_n=/''/g,j_n=/\S/,M_n=/[a-zA-Z]/;function k7(e,t,n,r){let i=()=>V2(r?.in||n,NaN),a=Agn(),o=r?.locale??a.locale??Bin,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():H2(n,r?.in);let l={firstWeekContainsDate:s,weekStartsOn:c,locale:o},u=[new Ign(r?.in,n)],d=t.match(O_n).map(e=>{let t=e[0];if(t in nan){let n=nan[t];return n(e,o.formatLong)}return e}).join(``).match(D_n),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&san(n)&&can(n,t,e),!r?.useAdditionalDayOfYearTokens&&oan(n)&&can(n,t,e);let a=n[0],s=E_n[a];if(s){let{incompatibleTokens:t}=s;if(Array.isArray(t)){let e=f.find(e=>t.includes(e.token)||e.token===a);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if(s.incompatibleTokens===`*`&&f.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:a,fullToken:n});let r=s.run(e,n,o.match,l);if(!r)return i();u.push(r.setter),e=r.rest}else{if(a.match(M_n))throw RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if(n===`''`?n=`'`:a===`'`&&(n=N_n(n)),e.indexOf(n)===0)e=e.slice(n.length);else return i()}}if(e.length>0&&j_n.test(e))return i();let p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),m=H2(n,r?.in);if(isNaN(+m))return i();let h={};for(let e of p){if(!e.validate(m,l))return i();let t=e.set(m,h,l);Array.isArray(t)?(m=t[0],Object.assign(h,t[1])):m=t}return m}function N_n(e){return e.match(k_n)[1].replace(A_n,`'`)}var P_n=[`M/d/yyyy h:mm:ss a`,`M/d/yyyy H:mm:ss`,`d/M/yyyy H:mm:ss`,`d/M/yyyy h:mm:ss a`,`d.M.yyyy H:mm:ss`,`d.M.yyyy h:mm:ss a`,`yyyy-M-d H:mm:ss`,`yyyy-M-d'T'H:mm:ss`],F_n=!1,I_n=e=>{for(let t of P_n){let n=k7(e,t,new Date);if(dan(n))return n}return F_n||(F_n=!0,nhn(`Libre timestamp unparsable`,{level:`warning`,tags:{integration:`libre`},extra:{timestamp:e}})),null},L_n=(e,t)=>e===null?[]:(e.data?.graphData??[]).reduce((e,n)=>{let r=I_n(n.Timestamp);return r===null||e.push({startDate:r,quantity:{value:Q6(n.ValueInMgPerDl,Y.BloodGlucoseUnit.MG_DL,t),unit:t}}),e},[]),R_n=e=>{if(e===null)return null;let t=e.data?.connection.glucoseMeasurement||e.data?.connection.glucoseItem;if(t===null||!t)return null;let n=I_n(t.Timestamp);return n===null?null:{startDate:n,quantity:{value:t.ValueInMgPerDl,unit:Y.BloodGlucoseUnit.MG_DL}}},z_n=(e,t)=>{let n=new Map;for(let t of e)n.set(new Date(t.startDate).getTime(),t);for(let e of t)n.set(new Date(e.startDate).getTime(),e);return Array.from(n.values())},B_n={credentials:null,patientId:null,cgmData:[],glucoseReading:null},V_n=kK()((e,t)=>({...B_n,setCredentials(t){e({credentials:t})},setPatientId(t){e({patientId:t})},setCgmData(n){let r=t().cgmData;e({cgmData:z_n(r,n)})},setLatestCgmReading(t){e({glucoseReading:t})},clear:()=>{e(B_n)}})),H_n={cgmApps:[],forecastApps:[]};kK()(jK(e=>({...H_n,setCgmApps(t){e({cgmApps:t})},setForecastApps(t){e({forecastApps:t})},clear:()=>{e(H_n)}}),{name:`APPS_STORE`,storage:AK(FK)}));var U_n=s(((e,t)=>{t.exports={}})),W_n=s(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r():typeof define==`function`&&define.amd?define([],r):n.CryptoJS=r()})(e,function(){var e=e||function(e,t){var n;if(typeof window<`u`&&window.crypto&&(n=window.crypto),typeof self<`u`&&self.crypto&&(n=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<`u`&&window.msCrypto&&(n=window.msCrypto),!n&&typeof globalThis<`u`&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof f==`function`)try{n=U_n()}catch{}var r=function(){if(n){if(typeof n.getRandomValues==`function`)try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes==`function`)try{return n.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},o=a.lib={},s=o.Base=function(){return{extend:function(e){var t=i(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=o.WordArray=s.extend({init:function(e,n){e=this.words=e||[],n==t?this.sigBytes=e.length*4:this.sigBytes=n},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new c.init(t,e)}}),l=a.enc={},u=l.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new c.init(n,t)}},p=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},m=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=t?e.ceil(s):e.max((s|0)-this._minBufferSize,0);var l=s*o,u=e.min(l*4,a);if(l){for(var d=0;d<l;d+=o)this._doProcessBlock(i,d);n=i.splice(0,l),r.sigBytes-=u}return new c.init(n,u)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=m.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=a.algo={};return a}(Math);return e})})),G_n=u(s(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(W_n()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[],c=[];(function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return(e-(e|0))*4294967296|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,1/2))),c[i]=n(t.pow(r,1/3)),i++),r++})();var l=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=0;p<64;p++){if(p<16)l[p]=e[t+p]|0;else{var m=l[p-15],h=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=l[p-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[p]=h+l[p-7]+_+l[p-16]}var v=s&u^~s&d,y=r&i^r&a^i&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),S=f+x+v+c[p]+l[p],C=b+y;f=d,d=u,u=s,s=o+S|0,o=a,a=i,i=r,r=S+C|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=n.length*4,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=a._createHelper(u),n.HmacSHA256=a._createHmacHelper(u)})(Math),e.SHA256})}))());function K_n(e){return typeof e==`object`&&!!e&&`redirect`in e}function q_n(e){return typeof e==`object`&&!!e&&`user`in e}function J_n(e){return typeof e==`object`&&!!e&&`code`in e}var Y_n=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`LibreError`}},X_n=class extends Y_n{failures;lockout;constructor(e,t,n,r){super(e,t),this.failures=n,this.lockout=r,this.name=`LibreLoginError`}},Z_n=1e3,Q_n={Authorization:``,product:`llu.android`,version:`4.16.0`,"cache-control":`no-cache`},$_n=class{async login(e,t,n=`eu`){let r={headers:{Accept:`application/json`,"Content-Type":`application/json`,...Q_n},body:JSON.stringify({email:e,password:t}),method:Y.HTTPRequestMethod.POST},i=`https://api-${n}.libreview.io/llu/auth/login`,a=await fetch(i,r);if(a.status!==Y.StatusCode.OK)throw new Y_n(`Libre request failed`,a.status);let o=await a.json();if(`data`in o){let r=o.data;if(K_n(r))return this.login(e,t,r.region);if(q_n(r))return{token:r.authTicket.token,accountId:r.user.id,region:n,tokenExpiry:new Date(r.authTicket.expires*Z_n)};if(J_n(r))throw new X_n(`Login failed: ${r.message} (probably invalid credentials)`,r.code,r.data.failures,r.data.lockout)}throw Error(`Unknown response`)}async getConnections(e){return(await this.makeAuthorizedRequest(e,`/llu/connections`)).data}async getGraphData(e,t){return await this.makeAuthorizedRequest(e,`/llu/connections/${t}/graph`)}async makeAuthorizedRequest(e,t){let n={headers:{...Q_n,Authorization:`Bearer ${e.token}`,"Account-Id":(0,G_n.default)(e.accountId).toString()}},r=`https://api-${e.region}.libreview.io${t}`,i=await fetch(r,n);if(i.status!==Y.StatusCode.OK)throw new Y_n(`Libre request failed`,i.status);return i.json()}},evn=async(e=!1)=>{try{let t=new URL(`${NK.HEDIA_LIBRE_APP_BASE_URL}/credentials`);t.searchParams.append(`forceRefresh`,`${e}`);let n=await w6(t.toString());return await y0(n,Y.StatusCode.OK,t.toString()),await n.json()}catch(e){return console.error(e),null}},tvn=e=>{let{credentials:t,patientId:n,setCredentials:r,setPatientId:i,setCgmData:a,setLatestCgmReading:o}=V_n();return{fetchLibreCgmData:(0,H.useCallback)(async()=>{if(!e||t===null||n===null)return;let s=new $_n;try{let c=await s.getGraphData(t,n);if(!c.data?.graphData){let e=await evn(!0);r(e===null?null:e.libreTokenBundle),i(e===null?null:e.librePatientId);return}a(L_n(c,e)),o(R_n(c))}catch(e){console.error(e)}},[t,n,e,r,i,a,o])}};V();var nvn={top:16,bottom:16,left:16,right:16};function rvn({activity:e,isChecked:t,index:n=0,onEdit:r,toggleActivitySwitch:i}){let{t:a}=RK(),{COLORS:o}=J();if(!H6.activity)throw Error(`[ActivityCard::render] No settings found!`);if(!H6.glucoseUnit)throw Error(`[ActivityCard::render] No glucose unit found!`);let{activityIntensity:s,durationSeconds:c,startTimestamp:l,type:u,uuid:d}=e;if(!l)throw Error(`[ActivityCard::render] No startTimestamp!`);let f=s?Z6[s]():null,p=(0,H.useMemo)(()=>Math.round(c/60),[c]),[m,h]=(0,H.useState)(Aan(l,p)),g=(0,H.useMemo)(()=>{try{let e=H6.activity;if(!e)throw Error(`[ActivityCard::reduction] No settings found!`);return((0,N6.getReduction)(p,e,s,new Date(l))*100).toFixed(0)}catch(e){return console.error(`Error calculating reduction for activity`,e),null}},[s,p,l]),_=t?1:.5,v=`activity-${p}-${s}-${u}-${t}`.toLowerCase(),y=`activity-card-${n}`;return(0,H.useEffect)(()=>{let e=()=>setInterval(()=>{h(Aan(l,p))},Y.Milliseconds.Minute),n=e=>{e&&clearInterval(e)},r=t?e():null;return()=>{n(r)}},[t,l,p]),g===null?null:(0,W.jsxs)(Kp,{testID:v,style:[A7.card,{backgroundColor:o.bgSecondary}],onPress:()=>{r(d)},children:[(0,W.jsxs)(B,{style:A7.headerContainer,children:[(0,W.jsxs)(B,{style:A7.left,children:[(0,W.jsxs)(B,{style:[A7.headerContent,{opacity:_}],children:[(0,W.jsx)(O8t,{height:24,width:24,color:o.iconButtonSecondary}),(0,W.jsxs)(X,{style:A7.header,children:[`${kan(p)} ${a(`activity_card__active_min`)}`,f&&`, `+f]})]}),(0,W.jsxs)(X,{style:[A7.expiresIn,{color:o.labelSecondary,opacity:_}],children:[a(`activity_card_active_time`),` `,m]})]}),(0,W.jsx)(Kp,{onPress:()=>{i(d)},hitSlop:nvn,children:(0,W.jsx)(tm,{testID:`${y}-${t}`,value:t,onValueChange:()=>{i(d)},trackColor:{true:o.bgSliderForeground,false:o.bgSliderBackground},thumbColor:o.toggleKnob,activeThumbColor:o.toggleKnob,activeTrackColor:o.bgSliderForeground})})]}),!!g&&(0,W.jsxs)(B,{style:[A7.reduction,{opacity:_}],children:[(0,W.jsx)(X,{style:A7.reductionText,children:a(`activity_card_insulinReduction`)}),(0,W.jsx)(X,{style:A7.reductionValue,children:` ${g}%`})]})]})}var A7=R.create({card:{marginBottom:12,overflow:`hidden`,borderRadius:16,padding:16},headerContainer:{flexDirection:`row`,justifyContent:`space-between`},left:{flex:1},headerContent:{flexDirection:`row`,alignItems:`center`,gap:4},header:{...q.Poppins.regular_SM},expiresIn:{...q.Poppins.regular_XS,marginBottom:8},reduction:{flexDirection:`row`,alignItems:`baseline`,justifyContent:`space-between`,gap:8},reductionText:{...q.Poppins.regular_SM,flexShrink:1},reductionValue:{...q.Poppins.bold_2XL}});V();var ivn=({selectedActivity:e,onClose:t})=>{let{t:n}=RK(),{COLORS:r}=J(),{navigate:i}=XQ(),{activityStoreActions:a}=h5(),{modalStoreActions:o,isGoToSettingsPressed:s}=Y8(),[c,l]=(0,H.useState)(!1),{activity:u}=H6;if(u===void 0)throw Error(`[CreateActivity::render] activitySettings is undefined`);let d=(0,H.useMemo)(()=>({uuid:K2(),startTimestamp:null,deleted:!1,type:null,activityIntensity:null,durationSeconds:0}),[]),f=(0,H.useMemo)(()=>e??d,[d,e]),p=(0,H.useMemo)(()=>f.startTimestamp===null?null:new Date(f.startTimestamp).getTime()+f.durationSeconds*Y.Milliseconds.Second>Date.now()?0:1,[f]),[m,h]=(0,H.useState)(f),[g,_]=(0,H.useState)(p),v=(0,H.useMemo)(()=>g===null?!1:g===1?m.durationSeconds>0&&!!m.startTimestamp:m.durationSeconds>0&&!!m.activityIntensity&&!!m.startTimestamp,[m,g]),y=(0,H.useMemo)(()=>!Y2(m,f),[m,f]),b=(0,H.useCallback)(async()=>{let n=e?.uuid,r=n?{...m,uuid:K2()}:m;if(await F6.create(r,n)){let e=F6.getEventWithHighestReduction(u);a.set({selectedEventUUID:e?.uuid??r.uuid,activityDurationSeconds:e?.durationSeconds??0}),C6(n?S6.ActivityEditPress:S6.ActivityAddPress),t()}else o.set({showSyncErrorModal:!0})},[m,u,a,o,t,e?.uuid]),x=e=>{h(t=>({...t,...e}))},S=e=>{let t=e*60,n=Date.now()-(g===1?t*Y.Milliseconds.Second:0);x({durationSeconds:t,startTimestamp:new Date(n).toISOString()})},C=e=>{x({activityIntensity:Y.ActivityIntensity[e]})},w=()=>{_(0),m.durationSeconds!==0&&x({startTimestamp:new Date().toISOString()})},T=()=>{_(1),x({activityIntensity:null}),m.durationSeconds!==0&&x({startTimestamp:new Date(Date.now()-m.durationSeconds*Y.Milliseconds.Second).toISOString()})},E=()=>{x({durationSeconds:0,activityIntensity:null})},D=()=>{E(),o.set({isGoToSettingsPressed:!0})},O=()=>{s&&(t(),o.set({showDiscardCalculationModal:!VK}),VK&&(i(Q.SettingsStack,{screen:Q.ActivitySettings}),o.set({isGoToSettingsPressed:!1})))},k=(0,H.useMemo)(()=>Math.round(m.durationSeconds/60),[m.durationSeconds]),A=(0,H.useMemo)(()=>{if(!v)return!1;let{activityIntensity:e}=m,{hard:t,light:n,moderate:r,post:i}=u,a=g===0;if(g===1)return k===120?i.fromSixtyone!==null:!0;if(a){if(k===60&&e===Y.ActivityIntensity.hard)return t.fromFortysix!==null;if(k===120&&e===Y.ActivityIntensity.hard)return t.fromSixtyone!==null;if(k===120&&e===Y.ActivityIntensity.moderate)return r.fromSixtyone!==null;if(k===120&&e===Y.ActivityIntensity.light)return n.fromSixtyone!==null}return!0},[m,u,g,v,k]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(SUt,{testID:`create-activity-scroll-view`,style:[j7.container,{backgroundColor:r.bgSheet}],contentContainerStyle:j7.contentContainer,children:[(0,W.jsxs)(B,{style:j7.header,children:[(0,W.jsx)($8,{onPress:t}),(0,W.jsx)(e5,{onPress:b,disabled:!v||!y})]}),(0,W.jsxs)(B,{style:j7.cardMandatory,children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(X,{style:[j7.headerTitle,{color:r.labelSecondary}],children:n(`new_activity_when_title`)}),(0,W.jsxs)(B,{style:[j7.segmentContainer,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[j7.segment,g===0&&{backgroundColor:r.bgSegmentPrimary}],onPress:w,testID:`starting-now-touchable-${g===0}`,children:(0,W.jsx)(X,{style:[j7.value,{color:g===0?r.textLabelActive:r.textLabelInactive}],children:n(`new_activity_when_option1`)})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,g===1&&{backgroundColor:r.bgSegmentPrimary}],onPress:T,testID:`just-finished-now-touchable-${g===1}`,children:(0,W.jsx)(X,{style:[j7.value,{color:g===1?r.textLabelActive:r.textLabelInactive}],children:n(`new_activity_when_option2`)})})]})]}),(0,W.jsxs)(B,{children:[(0,W.jsx)(X,{style:[j7.headerTitle,{color:r.labelSecondary}],children:n(`new_activity_duration_title`)}),(0,W.jsxs)(B,{style:[j7.segmentContainer,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[j7.segment,k===29&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(29)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===29?r.textLabelActive:r.textLabelInactive}],children:`0-29`})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,k===45&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(45)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===45?r.textLabelActive:r.textLabelInactive}],children:`30-45`})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,k===60&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(60)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===60?r.textLabelActive:r.textLabelInactive}],children:`46-60`})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,k===120&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{S(120)},children:(0,W.jsx)(X,{style:[j7.value,{color:k===120?r.textLabelActive:r.textLabelInactive}],children:`61-120`})})]})]}),(0,W.jsxs)(B,{style:{opacity:g===1?.5:1},children:[(0,W.jsxs)(B,{style:{flexDirection:`row`,justifyContent:`space-between`},children:[(0,W.jsx)(X,{style:[j7.headerTitle,{color:r.labelSecondary}],children:n(`new_activity_intensity_title`)}),(0,W.jsx)(Kp,{onPress:()=>{g!==1&&l(!0)},children:(0,W.jsx)(B8t,{width:24,height:24,color:r.iconBrand})})]}),(0,W.jsxs)(B,{style:[j7.segmentContainer,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(Kp,{style:[j7.segment,m.activityIntensity===Y.ActivityIntensity.light&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{g!==1&&C(Y.ActivityIntensity.light)},testID:`activity-light-touchable-${m.activityIntensity===Y.ActivityIntensity.light}`,children:(0,W.jsx)(X,{style:[j7.value,{color:m.activityIntensity===Y.ActivityIntensity.light?r.textLabelActive:r.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:n(`activity_intensity_1`)})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,m.activityIntensity===Y.ActivityIntensity.moderate&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{g!==1&&C(Y.ActivityIntensity.moderate)},testID:`activity-moderate-touchable-${m.activityIntensity===Y.ActivityIntensity.moderate}`,children:(0,W.jsx)(X,{style:[j7.value,{color:m.activityIntensity===Y.ActivityIntensity.moderate?r.textLabelActive:r.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:n(`activity_intensity_2`)})}),(0,W.jsx)(B,{style:[j7.borderLeft,{backgroundColor:r.divider}]}),(0,W.jsx)(Kp,{style:[j7.segment,m.activityIntensity===Y.ActivityIntensity.hard&&{backgroundColor:r.bgSegmentPrimary}],onPress:()=>{g!==1&&C(Y.ActivityIntensity.hard)},testID:`activity-hard-touchable-${m.activityIntensity===Y.ActivityIntensity.hard}`,children:(0,W.jsx)(X,{style:[j7.value,{color:m.activityIntensity===Y.ActivityIntensity.hard?r.textLabelActive:r.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:n(`activity_intensity_3`)})})]})]})]})]}),(0,W.jsx)(d5,{}),(0,W.jsx)(Q2,{isVisible:!A&&v,title:n(`new_activity_modal_reduction_title`),message:n(`new_activity_modal_reduction_subtitle`),onModalHide:O,buttons:[{title:n(`button_settings`),testID:`settings-button`,onPress:D},{title:n(`button_cancel`),testID:`cancel-button`,onPress:E,type:F2.Secondary}]}),(0,W.jsxs)(Q2,{isVisible:c,title:n(`calcflow_activityInfo_modal_title`),buttons:[{title:n(`button_close`),onPress:()=>{l(!1)}}],children:[(0,W.jsx)(X,{style:j7.intensityDescriptionTitle,children:n(`calcflow_activityInfo_modal_intensity1_title`)}),(0,W.jsx)(X,{style:[j7.intensityDescriptionText,{color:r.labelSecondary}],children:n(`calcflow_activityInfo_modal_intensity1_body`)}),(0,W.jsx)(X,{style:j7.intensityDescriptionTitle,children:n(`calcflow_activityInfo_modal_intensity2_title`)}),(0,W.jsx)(X,{style:[j7.intensityDescriptionText,{color:r.labelSecondary}],children:n(`calcflow_activityInfo_modal_intensity2_body`)}),(0,W.jsx)(X,{style:j7.intensityDescriptionTitle,children:n(`calcflow_activityInfo_modal_intensity3_title`)}),(0,W.jsx)(X,{style:[j7.intensityDescriptionText,{color:r.labelSecondary}],children:n(`calcflow_activityInfo_modal_intensity3_body`)})]})]})},j7=R.create({container:{marginHorizontal:16},contentContainer:{paddingBottom:64},header:{flexDirection:`row`,justifyContent:`space-between`,marginBottom:32},cardMandatory:{gap:24},headerTitle:{...q.Poppins.regular_SM,marginHorizontal:16,marginBottom:8},segmentContainer:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`,borderRadius:16,borderWidth:1,padding:2},segment:{flex:1,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,alignSelf:`stretch`,paddingVertical:4,paddingHorizontal:10,borderRadius:16},borderLeft:{alignSelf:`center`,height:16,width:1},value:{...q.Poppins.regular_Base},intensityDescriptionTitle:{...q.Poppins.semiBold_Base,marginTop:16},intensityDescriptionText:{...q.Poppins.regular_Base}}),avn=S5(ivn);V();var ovn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{addListener:n,removeListener:r}=XQ(),i=(0,H.useRef)(null),a=(0,H.useRef)(!1),{activity:o}=H6,{selectedEventUUID:s,activityStoreActions:c}=h5(),[l,u]=(0,H.useState)(null),[d,f]=(0,H.useState)([]);(0,H.useEffect)(()=>{if(!a.current){let e=F6.getEventWithHighestReduction(o);c.set({selectedEventUUID:e?.uuid??null,activityDurationSeconds:e?.durationSeconds??0}),a.current=!0}},[o,c]);let p=()=>{f(F6.getActiveEvents())};(0,H.useEffect)(()=>{let e=Wf.addEventListener(`change`,e=>{e===`active`&&p()});return n(`focus`,p),()=>{r(`focus`,p),e.remove()}},[r,n]);let m=(0,H.useCallback)(e=>{let t=F6.getByUUID(e);c.set({selectedEventUUID:s===e?null:e,activityDurationSeconds:s===e?0:t.durationSeconds})},[c,s]),h=()=>{C6(S6.CalculationActivityPress),qf.dismiss(),i.current?.present()},g=e=>{u(F6.getByUUID(e)),h()};return(0,W.jsxs)(W.Fragment,{children:[d.map((e,t)=>(0,W.jsx)(rvn,{index:t,toggleActivitySwitch:m,isChecked:s===e.uuid,onEdit:g,activity:e},e.uuid)),(0,W.jsxs)(Kp,{testID:`add-activity-button`,onPress:h,style:({pressed:e})=>[svn.smallButton,{backgroundColor:t.bgButtonSecondary,opacity:e?.5:1}],children:[(0,W.jsx)(O8t,{color:t.iconButtonSecondary}),(0,W.jsx)(X,{style:svn.buttonText,children:e(`calcflow_activity_button_add`)})]}),(0,W.jsx)(B,{style:{height:24,borderTopWidth:1,borderTopColor:t.divider}}),(0,W.jsx)(PQ,{ref:i,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:t.bgSheet,borderRadius:36},enablePanDownToClose:!1,children:(0,W.jsx)(avn,{selectedActivity:l,onClose:()=>{u(null),i.current?.close(),p()}})})]})},svn=R.create({smallButton:{flexDirection:`row`,alignSelf:`flex-start`,alignItems:`center`,borderRadius:16,paddingHorizontal:16,paddingVertical:8,marginBottom:24,gap:8},buttonText:{...q.Poppins.medium_SM,alignSelf:`center`}});V();var cvn=()=>{let{COLORS:e}=J(),{navigate:t}=XQ(),{foodIntakeItems:n,removeFoodIntakeItem:r}=q8(),i=(0,H.useCallback)((e,t)=>{e?r(e,`id`):r(t,`title`)},[r]),a=(0,H.useCallback)(e=>{if(e.source===`curated`){t(Q.FoodLibrary,{screen:Q.CuratedFoodItem,params:{foodId:e.id,categoryId:e.categoryId}});return}t(Q.FoodLibrary,{screen:Q.PersonalFoodItem,params:{foodId:e.id}})},[t]),o=(0,H.useCallback)(({item:t,index:n,itemKey:r})=>{let{measures:o,nutritionPer100g:s,id:c,title:l}=t.foodItem,u=I6(t.amount,o[0].gramsPerUnit,s.carbohydrates.value);return(0,W.jsxs)(B,{style:[M7.pill,{backgroundColor:e.bgPill}],children:[(0,W.jsxs)(Kp,{onPress:()=>{a(t.foodItem)},style:({pressed:e})=>[M7.pillContent,{opacity:e?.5:1}],testID:`carbs-item-${n}`,children:[(0,W.jsx)(X,{numberOfLines:1,ellipsizeMode:`middle`,style:[M7.title,{color:e.labelPrimary}],testID:`carbs-item-${n}-title`,children:l}),(0,W.jsx)(X,{style:[M7.value,{color:e.labelPrimary}],testID:`carbs-item-${n}-amount`,children:`${u} g`})]}),(0,W.jsx)(Kp,{onPress:()=>{i(c,l)},testID:`carbs-item-${n}-remove-icon`,hitSlop:16,children:(0,W.jsx)(F8t,{width:16,height:16})})]},r)},[e.bgPill,e.labelPrimary,a,i]);return(0,W.jsx)(B,{style:M7.container,children:n.map((e,t)=>o({item:e,index:t,itemKey:e.foodItem.id||`${t}-${e.foodItem.title}`}))})},M7=R.create({container:{flexDirection:`row`,flexWrap:`wrap`,padding:16,gap:8},pill:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:8,paddingVertical:6,borderRadius:16,maxWidth:`100%`},pillContent:{flexDirection:`row`,alignItems:`center`,flexShrink:1},title:{...q.Poppins.regular_XS,marginRight:2,flexShrink:1},value:{...q.Poppins.regular_XS,marginRight:2}});V();var lvn=(0,H.forwardRef)(({onFocusChange:e},t)=>{let{t:n}=RK(),{COLORS:r}=J(),{navigate:i}=XQ(),a=(0,H.useRef)(null);(0,H.useImperativeHandle)(t,()=>({blur:()=>a.current?.blur()}));let{foodIntakeItems:o,foodIntakeCarbsAmount:s,manualCarbsInput:c,setManualCarbsInput:l}=q8(),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(``),m=xWt();(0,H.useEffect)(()=>{m&&!u&&p(c===0?``:c.toString())},[m,u,c]);let h=()=>{a.current?.focus(),d(!0),e?.(!0)},g=()=>{C6(S6.CalculationCarbsPress),h()},_=()=>{d(!1),e?.(!1),l(Number(f)),C6(S6.CalculationManualInput)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:[N7.carbsSection,{backgroundColor:r.bgListActive,borderColor:u?r.borderInputFocus:r.bgListActive}],children:[(0,W.jsx)(t4,{testID:`carbs-input`,renderLeftSlot:()=>(0,W.jsxs)(B,{style:N7.inputRow,children:[(0,W.jsx)(k8t,{width:24,height:24,color:r.labelPrimary}),(0,W.jsx)(X,{testID:`carbs-input-unit`,children:n(`calcflow_carbohydrates_title`)})]}),renderRightSlot:()=>(0,W.jsxs)(B,{style:N7.inputRow,children:[(0,W.jsx)(k2,{testID:`carbs-input-field`,ref:a,value:f,onFocus:g,onBlur:_,onChangeText:p,style:[N7.numberInput,{color:r.labelPrimary}],selectTextOnFocus:!!f&&!u}),(0,W.jsx)(X,{style:[N7.unit,{color:r.labelPrimary}],children:`g`})]}),onPress:h,containerStyle:{borderBottomLeftRadius:0,borderBottomRightRadius:0},style:{paddingVertical:12,backgroundColor:r.bgListActive}}),o.length>0&&(0,W.jsxs)(B,{style:{borderTopWidth:1,borderTopColor:r.divider},children:[(0,W.jsx)(cvn,{}),(0,W.jsx)(E8t,{}),(0,W.jsxs)(B,{style:[N7.totalContainer,{backgroundColor:r.bgListActive}],children:[(0,W.jsx)(X,{style:N7.totalTitle,children:n(`calcflow_carbohydrates_total`)}),(0,W.jsxs)(B,{style:N7.totalGramsContainer,children:[(0,W.jsx)(X,{style:N7.totalValue,testID:`total-carbs-value`,children:s+c}),(0,W.jsx)(X,{style:N7.totalUnits,testID:`total-carbs-unit`,children:n(`my_food_add_unit`)})]})]})]})]}),(0,W.jsxs)(B,{style:N7.buttonsContainer,children:[(0,W.jsxs)(Kp,{testID:`add-food-from-library-button`,onPress:()=>{C6(S6.CalculationFoodLibraryPress),i(Q.FoodLibrary)},style:({pressed:e})=>[N7.smallButton,{backgroundColor:r.bgButtonSecondary,opacity:e?.5:1}],children:[(0,W.jsx)(J8t,{color:r.labelPrimary}),(0,W.jsx)(X,{style:[N7.title,{color:r.textButtonSecondary}],children:n(`calcflow_button_foodLibrary`)})]}),!VK&&(0,W.jsx)(R7t,{onPress:()=>{if(C6(S6.CalculationScanFoodPress),!v5.getState().privacyNoticeAccepted){i(Q.VisualSearchIntro);return}i(Q.VisualSearch)},text:n(`calcflow_button_scan`),style:N7.scanFoodButton})]}),(0,W.jsx)(B,{style:{height:24,borderTopWidth:1,borderTopColor:r.divider}})]})});lvn.displayName=`Carbs`;var N7=R.create({inputRow:{flexDirection:`row`,justifyContent:`flex-start`,alignItems:`center`,marginRight:8,gap:4},carbsSection:{borderWidth:2,borderRadius:16,marginBottom:12},numberInput:{...q.Poppins.regular_Base,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),textAlign:`right`,maxWidth:40},totalContainer:{flexDirection:`row`,justifyContent:`space-between`,alignItems:`baseline`,padding:16,paddingTop:8,borderRadius:16},totalTitle:{...q.Poppins.medium_Base},totalGramsContainer:{flexDirection:`row`,alignItems:`baseline`},totalValue:{...q.Poppins.bold_2XL},totalUnits:{...q.Poppins.medium_Base,marginLeft:8},unit:{...q.Poppins.regular_Base},buttonsContainer:{flexDirection:`row`,justifyContent:`flex-start`,gap:12},smallButton:{flexDirection:`row`,alignItems:`center`,alignSelf:`flex-start`,borderRadius:16,paddingHorizontal:16,paddingVertical:8,marginBottom:24,gap:8},scanFoodButton:{alignSelf:`flex-start`,marginBottom:24},title:{...q.Poppins.medium_SM,alignSelf:`center`}}),uvn=`hda`,dvn=e=>e.device_name.toLowerCase()===uvn||e.source_name.toLowerCase()===uvn,fvn=e=>({id:e.id,object_id:e.id,user_id:e.userId,type:e.type,quantity:{unit:e.quantity.unit.toLowerCase(),value:e.quantity.value},timestamp:new Date(e.startDate),source_id:e.source.id,device_name:e.device.name,source_name:e.source.name}),pvn=(e,t=Date.now())=>e.map(fvn).filter(e=>!dvn(e)&&e.timestamp.getTime()<=t).sort((e,t)=>t.timestamp.getTime()-e.timestamp.getTime())[0]??null,mvn=(e,t)=>{let{inputMax:n,inputMin:r}=X6(t);return!isNaN(e)&&e>=r&&e<=n};V();var hvn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{glucoseStoreActions:n}=J8(),r=jfn(`external`),i=A5()?.source===`external`,{glucoseUnit:a}=H6;if(a===void 0)throw Error(`[Glucose::render] glucoseUnit must be non-undefined.`);let[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1);P2t(()=>{r&&s(Date.now()-r.timestamp>Y.Milliseconds.Minute*10)},1e3),(0,H.useEffect)(()=>{(async()=>{try{let e=`${NK.HEDIA_API_URL_V2}/samples`,t=await w6(e);await y0(t,Y.StatusCode.OK,e);let r=await t.json();if(r.length===0)return;let i=pvn(r);if(!i)return;let{unit:a,value:o}=i.quantity;if(!mvn(o,a)){n.setSelectedReadingId(null);return}let s={id:K2(),source:`external`,value:o,unit:a,sampleId:i.id,sourceId:i.source_id,sourceName:i.source_name,deviceName:i.device_name,timestamp:i.timestamp.getTime()};n.addAvailableGlucoseReading(s),n.setSelectedReadingId(s.id),Hnn(i)}catch(e){console.error(`[DevicesSection.web::getSamples]`,e)}})()},[n]);let u=(0,H.useCallback)(()=>{if(NK.IS_PRODUCTION===`true`)return;let e={id:`TEST`,object_id:`TEST`,user_id:`TEST`,type:`blood_glucose`,timestamp:new Date(Date.now()-(Math.random()*4+5)*Y.Milliseconds.Minute),source_id:`TEST`,quantity:{unit:Y.BloodGlucoseUnit.MMOL_L,value:Math.random()*32.199999999999996+1.1},source_name:`HDA Test Name`,device_name:`HDA Test Device`},t={id:K2(),source:`external`,value:e.quantity.value,unit:e.quantity.unit,timestamp:e.timestamp.getTime(),sampleId:e.id,sourceId:e.source_id,sourceName:e.source_name,deviceName:e.device_name};n.addAvailableGlucoseReading(t),n.setSelectedReadingId(t.id)},[n]);return(0,W.jsxs)(B,{style:P7.container,children:[r?.source===`external`?(0,W.jsx)(Kp,{style:[P7.button,{backgroundColor:i?t.bgButtonPrimary:t.bgButtonSecondary}],onPress:()=>{!o&&n.setSelectedReadingId(r.id)},children:(0,W.jsx)(X,{style:[P7.title,{color:i?t.textButtonPrimary:t.textButtonSecondary}],children:r.deviceName})}):(0,W.jsx)(Kp,{style:[P7.button,{backgroundColor:t.bgButtonSecondary}],onPress:()=>{l(!0)},onLongPress:()=>{u()},children:(0,W.jsx)(X,{style:[P7.title,{color:t.labelPrimary}],children:e(`import_modal_reading_title`)})}),(0,W.jsx)(Q2,{isVisible:c,title:e(`import_modal_reading_title`),message:e(`import_modal_reading_body`),buttons:[{testID:`close-button`,title:e(`button_close`),onPress:()=>{l(!1)}}]})]})},P7=R.create({container:{marginTop:12},button:{alignSelf:`flex-start`,paddingVertical:8,paddingHorizontal:16,borderRadius:16},title:{...q.Poppins.medium_SM}});V();var gvn=e=>e.replace(`,`,`.`),_vn=300,vvn=(0,H.forwardRef)(({onFocusChange:e},t)=>{let{t:n}=RK(),{COLORS:r}=J(),i=(0,H.useRef)(null);(0,H.useImperativeHandle)(t,()=>({blur:()=>i.current?.blur()}));let{glucoseUnit:a}=H6;if(a===void 0)throw Error(`[Glucose::render] glucoseUnit must be non-undefined.`);let{decimalPlaces:o,inputMax:s,inputMin:c,text:l}=(0,H.useMemo)(()=>X6(a),[a]),[u,d]=(0,H.useState)(``),[f,p]=(0,H.useState)(!1),m=A5(),{glucoseStoreActions:h,availableGlucoseReadings:g}=J8(),{isNoBGModalVisible:_,modalStoreActions:v}=Y8(),[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(!1),[C,w]=(0,H.useState)(`hidden`),[T,E]=(0,H.useState)(`hidden`);i$((0,H.useCallback)(()=>{let e=setInterval(()=>{let e=m?.timestamp;T===`open`||!e||m.source===`cgm`||Date.now()-e>Y.Milliseconds.Minute*10&&(E(`open`),d(``))},1e3);return()=>{clearInterval(e)}},[T,m])),(0,H.useEffect)(()=>{d(m===null?``:$6(m.value,m.unit,a))},[m,a]);let D=()=>{u===``||m===null||m.source===`manual`?A():w(`open`)},O=(0,H.useCallback)(e=>{d(gvn(e))},[]),k=(0,H.useCallback)(()=>{C6(S6.CalculationGlucosePress),p(!0),e?.(!0)},[e]),A=(0,H.useCallback)(()=>{i.current?.focus()},[]),ee=(0,H.useCallback)(()=>{if(VK){A();return}setTimeout(A,_vn)},[A]),te=(0,H.useCallback)(()=>{d(m&&$6(m.value,m.unit,a)||``)},[a,m]),ne=(0,H.useCallback)(()=>g.find(e=>{let t=$6(e.value,e.unit,a),n=Date.now()-e.timestamp>Y.Milliseconds.Minute*10;return t===u&&e.source!==`manual`&&!n}),[g,a,u]),re=(0,H.useCallback)(e=>!isNaN(e)&&e>=c&&e<=s,[s,c]),ie=(0,H.useCallback)(e=>({id:K2(),source:`manual`,value:e,unit:a,timestamp:Date.now()}),[a]),j=(0,H.useCallback)(()=>{if(p(!1),e?.(!1),u===``){h.setSelectedReadingId(null);return}let t=ne();if(t){h.setSelectedReadingId(t.id);return}let n=parseFloat(u);if(!re(n)){S(!0);return}d(n.toFixed(o));let r=ie(n);h.addAvailableGlucoseReading(r),h.setSelectedReadingId(r.id)},[ie,ne,o,h,u,re,e]),ae=()=>{(0,x5.flushSync)(()=>{w(`hidden`),h.setSelectedReadingId(null)}),ee()},oe=()=>{w(`closing`)},se=()=>{w(`hidden`)},ce=()=>{C6(S6.ExpiredGlucose),h.setSelectedReadingId(null)},M=()=>{(0,x5.flushSync)(()=>{E(`hidden`)}),ee()},N=()=>{E(`closing`)},P=()=>{E(`hidden`)},le=()=>{(0,x5.flushSync)(()=>{v.set({isNoBGModalVisible:!1})}),ee()},ue=()=>{b(!0),v.set({isNoBGModalVisible:!1})},de=()=>{b(!1)},fe=m===null||m.source===`manual`;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(t4,{testID:`glucose-input`,renderLeftSlot:()=>{let e=ne(),t;switch(e?.source){case`cgm`:t=n(`from_source`,{source:e.sourceName});break;case`device`:t=n(`from_source`,{source:e.deviceName});break;default:t=n(`calcflow_glucose_title`);break}return(0,W.jsxs)(B,{style:F7.inputRow,children:[(0,W.jsx)(L8t,{height:24,width:24,color:r.labelPrimary}),(0,W.jsx)(X,{testID:`glucose-input-unit`,ellipsizeMode:`tail`,numberOfLines:1,style:F7.sourceText,children:t})]})},renderRightSlot:()=>(0,W.jsxs)(B,{style:F7.rightSlot,children:[(0,W.jsx)(k2,{testID:`glucose-input-field`,ref:i,value:u,inputMode:a===Y.BloodGlucoseUnit.MMOL_L?`decimal`:`numeric`,maxLength:a===Y.BloodGlucoseUnit.MMOL_L?4:3,editable:fe||f,onChangeText:O,onFocus:k,onBlur:j,style:[F7.numberInput,{color:fe?r.labelPrimary:r.labelBrand,width:a===Y.BloodGlucoseUnit.MMOL_L?48:36}],selectTextOnFocus:!!u&&!f}),(0,W.jsx)(X,{style:[F7.unit,{color:fe?r.labelPrimary:r.labelBrand}],children:l})]}),onPress:D,style:{...F7.groupedRow,...f&&{borderColor:r.borderInputFocus}}}),(0,W.jsx)(hvn,{glucoseUnit:a,inputRef:i}),(0,W.jsx)(B,{style:[F7.divider,{borderTopColor:r.divider}]}),T!==`hidden`&&(0,W.jsx)(Q2,{isVisible:T===`open`,title:n(`calcflow_modal_expired_title`),message:n(`calcflow_modal_expired_body`),icon:()=>(0,W.jsx)(L8t,{width:96,height:96,color:r.labelPrimary}),onModalShow:ce,onModalHide:P,buttons:[{title:n(`calcflow_modal_expire_button_add`),onPress:M},{title:n(`button_cancel`),type:F2.Secondary,onPress:N}]}),(0,W.jsx)(Q2,{isVisible:x,title:n(`calcflow_modal_glucose_invalid_title`,{min:Ian(c,a),max:Ian(s,a)}),buttons:[{testID:`close-button`,title:n(`button_close`),onPress:()=>{S(!1),te()}}]}),C!==`hidden`&&(0,W.jsx)(Q2,{isVisible:C===`open`,title:n(`calcflow_modal_change_synced_value_title`),onModalHide:se,buttons:[{testID:`change-button`,type:F2.Error,title:n(`calcflow_modal_button_changeValue`),onPress:ae},{testID:`keep-button`,type:F2.Secondary,title:n(`calcflow_modal_button_keepValue`),onPress:oe}]}),(_||y)&&(0,W.jsx)(Q2,{isVisible:_,title:n(`calcflow_modal_enter_glucose_title`),message:n(`calcflow_modal_enter_glucose_body`),icon:()=>(0,W.jsx)(L8t,{width:96,height:96,color:r.labelPrimary}),onModalHide:de,buttons:[{title:n(`calcflow_modal_enter_glucose_button_add`),onPress:le},{title:n(`button_cancel`),type:F2.Secondary,onPress:ue}]})]})});vvn.displayName=`Glucose`;var F7=R.create({groupedRow:{paddingVertical:12},inputRow:{flexDirection:`row`,justifyContent:`flex-start`,alignItems:`center`,marginRight:8,gap:4},rightSlot:{flexDirection:`row`,alignItems:`center`,marginRight:8,gap:4},sourceText:{flexShrink:1},numberInput:{...q.Poppins.regular_Base,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),textAlign:`right`,textAlignVertical:`center`},unit:{...q.Poppins.regular_Base},divider:{marginTop:24,height:24,borderTopWidth:1}});V();function yvn({description:e,assetId:t,imageUri:n,onPress:r,testID:i}){let{COLORS:a}=J(),{t:o}=RK(),s=l5(n?void 0:t),c=n??s,l=e||o(`notes_placeholder`),u=l===o(`notes_placeholder`);return u&&!c?null:(0,W.jsxs)(Kp,{style:({pressed:e})=>[bvn.container,{backgroundColor:a.bgSecondary},e&&r&&{opacity:.9}],onPress:r,disabled:!r,testID:`${i}-button`,children:[(0,W.jsx)(X,{style:[bvn.text,{color:u?a.labelTertiary:a.labelPrimary}],children:l}),!!c&&(0,W.jsx)(gd,{source:{uri:c},style:bvn.thumbnail,resizeMode:`cover`,testID:`${i}-thumbnail`})]})}var bvn=R.create({container:{flexDirection:`row`,borderRadius:16,padding:16,gap:12,alignItems:`flex-start`},text:{...q.Poppins.regular_Base,flex:1},thumbnail:{width:64,height:64,borderRadius:8}});V();var xvn=({onClose:e,onConfirm:t})=>{let{COLORS:n}=J(),{t:r}=RK(),{noteId:i}=X8(),{noteStoreActions:a}=X8(),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1),{noteBody:u,setNoteBody:d,loadNote:f,saveNote:p,isLoading:m,hasNoteContent:h}=Rdn();(0,H.useEffect)(()=>{i&&f(i).catch(console.error)},[i,f]);let g=(0,H.useCallback)(async()=>{s(!0);try{let e=await p();a.set({noteId:e,noteBody:u}),t()}catch{l(!0)}finally{s(!1)}},[p,a,u,t]),_=(0,H.useCallback)(()=>{e()},[e]),v=!h||o;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:Svn.header,children:[(0,W.jsx)($8,{onPress:_}),o?(0,W.jsx)(np,{size:`small`,color:n.iconBrand}):(0,W.jsx)(e5,{onPress:g,disabled:v})]}),m?(0,W.jsx)(B,{style:Svn.loader,children:(0,W.jsx)(np,{size:`large`,color:n.iconBrand})}):(0,W.jsx)(Wun,{value:u,onChangeText:d,testID:`calculation-notes`,autoFocus:!0,containerStyle:Svn.container}),(0,W.jsx)(Q2,{isVisible:c,testID:`note-save-failed-modal`,title:r(`notes_cannotSave_modal_header`),message:r(`notes_cannotSave_modal_body`),buttons:[{title:r(`glucose_modal_changes_button_confirm`),testID:`note-save-failed-confirm-button`,type:F2.Primary,onPress:()=>{l(!1)}}]})]})},Svn=R.create({header:{flexDirection:`row`,justifyContent:`space-between`,alignItems:`center`,paddingHorizontal:16,paddingBottom:12},loader:{flex:1,justifyContent:`center`,alignItems:`center`,minHeight:200},container:{margin:16}});V();var Cvn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{noteBody:n,displayImageUri:r}=X8(),i=(0,H.useRef)(null),a=()=>{C6(S6.CalculationNotesPress),qf.dismiss(),i.current?.present()};return(0,W.jsxs)(W.Fragment,{children:[n.trim()||r?(0,W.jsx)(B,{style:wvn.noteContainer,children:(0,W.jsx)(yvn,{description:n,imageUri:r,onPress:a,testID:`note-display`})}):(0,W.jsxs)(Kp,{testID:`add-notes-button`,onPress:a,style:({pressed:e})=>[wvn.smallButton,{backgroundColor:t.bgButtonSecondary,opacity:e?.5:1}],children:[(0,W.jsx)(K8t,{height:20,width:20,color:t.labelPrimary}),(0,W.jsx)(X,{style:[wvn.title,{color:t.textButtonSecondary}],children:e(`calcflow_notes_button_add`)})]}),(0,W.jsx)(PQ,{ref:i,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:t.bgSheet,borderRadius:36},enablePanDownToClose:!1,enableDynamicSizing:!1,snapPoints:[`85%`],children:(0,W.jsx)(IQ,{children:(0,W.jsx)(xvn,{onClose:()=>{qf.dismiss(),i.current?.dismiss()},onConfirm:()=>{qf.dismiss(),i.current?.dismiss()}})})})]})},wvn=R.create({smallButton:{flexDirection:`row`,alignSelf:`flex-start`,alignItems:`center`,borderRadius:16,paddingHorizontal:16,paddingVertical:8,marginBottom:24,gap:8},noteContainer:{marginBottom:24},title:{...q.Poppins.medium_SM,alignSelf:`center`}});V();var Tvn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{bottomWithFooterButton:n}=B2(),r=U8(),i=(0,H.useRef)(null),a=XQ(),o=QQ(),{modalStoreActions:s}=Y8(),{noteId:c}=X8(),{foodIntakeItems:l,manualCarbsInput:u,foodIntakeCarbsAmount:d}=q8(),[f,p]=(0,H.useState)(!1),m=A5(),h=o.params?.errorType??null,g=h===zK.Sync,_=(0,H.useRef)(!1),v=(0,H.useRef)(!1),y=(0,H.useRef)(null),b=(0,H.useRef)(null),x=(0,H.useCallback)(e=>{_.current=e},[]),S=(0,H.useCallback)(e=>{v.current=e},[]),{fetchLibreCgmData:C}=tvn(),w=(0,H.useCallback)(()=>(C6(S6.AbortCalculationPress),m||u>0||l.length>0||c?s.set({showDiscardCalculationModal:!0}):a.goBack(),!0),[u,a,m,s,l.length,c]);i$((0,H.useCallback)(()=>{if(VK)return;let e=Gf.addEventListener(`hardwareBackPress`,w);return()=>{e.remove()}},[w])),(0,H.useEffect)(()=>{C()},[C]),(0,H.useLayoutEffect)(()=>{a.setOptions({headerTransparent:!0,header:()=>(0,W.jsx)(G8,{title:e(`calcflow_navigation`),LeftButton:VK?void 0:(0,W.jsx)($8,{onPress:w}),RightButton:VK?(0,W.jsxs)(B,{style:[I7.buttonsWrapper,{backgroundColor:t.bgButtonSecondary,borderColor:t.border}],children:[(0,W.jsx)(kun,{style:I7.noBorder}),(0,W.jsx)(Oun,{style:I7.noBorder})]}):(0,W.jsx)(kun,{}),overlay:!0})})},[t.bgButtonSecondary,t.border,w,a,e]);let[T,E]=(0,H.useState)(VK);(0,H.useEffect)(()=>{if(!VK)return a.addListener(`transitionStart`,({data:e})=>{e.closing||!a.isFocused()||E(!0)})},[a]),(0,H.useEffect)(()=>{if(!T)return;let e=setTimeout(()=>{i.current?.present()},100);return()=>{clearTimeout(e)}},[T]);let D=(0,H.useCallback)(()=>{if(_.current||v.current){y.current?.blur(),b.current?.blur();return}if(m===null){C6(S6.SummaryEmptyGlucose),s.set({isNoBGModalVisible:!0});return}if(d+u>kdn().max){p(!0);return}a.navigate(Q.LoadingRecommendation)},[m,a,s,d,u]),O=(0,H.useCallback)(()=>{C6(S6.RecentInsulinContinuePress),i.current?.close()},[]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`calculation-scroll-view`,keyboardShouldPersistTaps:`handled`,contentContainerStyle:[I7.scrollView,{backgroundColor:t.bgPrimary,paddingTop:r+16,paddingBottom:n}],children:[(0,W.jsx)(vvn,{ref:b,onFocusChange:S}),(0,W.jsx)(lvn,{ref:y,onFocusChange:x}),(0,W.jsx)(ovn,{}),(0,W.jsx)(Cvn,{})]}),(0,W.jsx)(Mdn,{children:(0,W.jsx)(I2,{type:F2.Primary,testID:`calculate-button`,title:e(`calcflow_button_calculate`),onPress:D,inactive:m===null})}),(0,W.jsx)(PQ,{ref:i,handleIndicatorStyle:{height:0},backdropComponent:P2,backgroundStyle:{backgroundColor:t.bgSheet,borderRadius:36},enablePanDownToClose:!1,children:(0,W.jsx)(IQ,{children:(0,W.jsx)(Afn,{onNoInsulinPressed:O})})}),(0,W.jsx)(Q2,{isVisible:h!==null,title:e(g?`recommendation_no_save_modal_title`:`rejected_input_modal_title`),message:e(g?`recommendation_no_save_modal_body`:`rejected_input_modal_body`),buttons:[{title:e(`button_close`),onPress:()=>{a.navigate(Q.Calculation)}}]}),(0,W.jsx)(Q2,{isVisible:f,title:e(`calcflow_carbohydrates_invalid_modal_title`),message:e(`calcflow_carbohydrates_invalid_modal_body`),buttons:[{title:e(`button_close`),onPress:()=>{p(!1)}}]}),(0,W.jsx)(Ndn,{}),(0,W.jsx)(Wdn,{})]})},I7=R.create({scrollView:{paddingHorizontal:16},buttonsWrapper:{flexDirection:`row`,padding:0,borderRadius:44,borderWidth:1},noBorder:{borderWidth:0}});V();var Evn=1e3;function Dvn(){let e=XQ(),t=QQ(),[n,r]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{setTimeout(()=>{r(!0)},Evn)},[]),(0,H.useEffect)(()=>{n&&(VK?(window.location.href=`/redirect?status=success`,PK.clearAll()):e.popTo(Q.MainBottomTabs,{screen:Q.DashboardTab,params:{screen:Q.Dashboard,params:{action:nyt.Saved,logbookEntry:t.params.logbookEntry}}}))},[n,e,t.params.logbookEntry]),(0,W.jsx)(B,{style:Ovn.animationContainer,children:(0,W.jsx)(S4,{autoPlay:!0,source:C4.LEAVING_RECOMMENDATION,style:Ovn.animation,webStyle:Ovn.animation,resizeMode:`cover`,loop:!1})})}var Ovn=R.create({animationContainer:{flex:1,justifyContent:`center`,alignItems:`center`},animation:{width:256,height:256}}),kvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SHARED_COLORS=e.LIGHT_COLORS=e.DARK_COLORS=void 0,e.DARK_COLORS={base100:`#616161`,base200:`#555555`,base300:`#4A4A4A`,base350:`#404040`,base400:`#363636`,base500:`#373739`,base600:`#2A2A2C`,base700:`#1C1C1E`,base800:`#141414`,base900:`#000000`,base100a:`#E9E0FF1A`,base600a:`#2A2A2C99`,base700a:`#1C1C1E80`,base800a:`#14141499`,primary100:`#B5D8FF`,primary200:`#9EC6FF`,primary300:`#87B5FF`,primary400:`#73ADFF`,primary500:`#5F99F9`,primary600:`#4A85F0`,primary700:`#4A73ED`,primary800:`#4A5DEB`,primary900:`#3D4AC6`,primary100a:`#B5D8FF99`,primary300a:`#87B5FF4D`,primary400a:`#73ADFF80`,primary900a:`#3D4AC699`,red50:`#F9E6E9`,red100:`#F9C9CE`,red200:`#EA9797`,red300:`#E07171`,red400:`#EA514E`,red500:`#EF4235`,red600:`#E03834`,red700:`#CF2E2E`,red800:`#C22727`,red900:`#B31B1B`,red300a:`#E0717166`,green50:`#E3F0E4`,green100:`#C4E1C5`,green200:`#A2D2A4`,green300:`#7EC381`,green400:`#64B768`,green500:`#4AAC4E`,green600:`#429D46`,green700:`#378B3B`,green800:`#2D7B31`,green900:`#1A5C1F`,yellow50:`#FAF8E2`,yellow100:`#FAF4C0`,yellow200:`#FAF09A`,yellow300:`#FAEC74`,yellow400:`#FAE956`,yellow500:`#FAE63A`,yellow600:`#F8D434`,yellow700:`#F6BC2C`,yellow800:`#F4A524`,yellow900:`#F07C17`,shadow:`#FFFFFF00`,iosKeyboardPicker:`#282828`,iosSelectorKeyboard:`#5858593D`,gradientQuickGuideBottom:`#000000`,gradientQuickGuideTop:`#0000000D`,graphActiveInsulin:`#66D6FF`,graphActiveInsulinSecondary:`#66D6FF1A`,graphCarbohydrate:`#FFB224`,graphCarbohydrateSecondary:`#E88C2B`,graphGlucoseAverage:`#FF8CD8`,graphPhysicalActivity:`#D7EB98`,graphPhysicalActivitySecondary:`#79A762`,graphRapid:`#66D6FF`,graphRapidSecondary:`#00ACEB`,rectangleRangeGraphMyDay:`#5CE59C33`,graphVeryHighGlucose:`#F07C17`,graphVeryHighGlucoseSecondary:`#F4A524`,graphHighGlucose:`#F6BC2C`,graphHighGlucoseSecondary:`#F8D434`,graphTargetGlucose:`#4AAC4E`,graphTargetGlucoseSecondary:`#64B768`,graphLowGlucose:`#EF4235`,graphLowGlucoseSecondary:`#EA514E`,graphVeryLowGlucose:`#B31B1B`,graphVeryLowGlucoseSecondary:`#C22727`},e.LIGHT_COLORS={base50:`#FFFFFF`,base100:`#F7F7FA`,base200:`#F2F2F7`,base300:`#ECECF1`,base400:`#E0E0E6`,base500:`#CFCFD7`,base600:`#B5B5BD`,base700:`#9999A3`,base800:`#6E6E78`,base900:`#3F3F46`,base100a:`#F7F7FA1A`,base600a:`#B5B5BD99`,base700a:`#9999A3B3`,base900a:`#3F3F4699`,primary100:`#EEF0FE`,primary200:`#D7DBFB`,primary300:`#B6BFF8`,primary400:`#8F9EF4`,primary500:`#4A5DEB`,primary600:`#3F4DD5`,primary700:`#3540B8`,primary800:`#2D359B`,primary900:`#242A7C`,primary100a:`#B5D8FF99`,primary300a:`#87B5FF4D`,primary400a:`#73ADFF80`,primary900a:`#3D4AC699`,red50:`#F9E6E9`,red100:`#FCCBCB`,red200:`#F9A6A7`,red300:`#F47475`,red400:`#EB494B`,red500:`#D82E30`,red600:`#B62325`,red700:`#962021`,red800:`#7D2021`,red900:`#440B0D`,red300a:`#E0717166`,green50:`#E3F0E4`,green100:`#BEF6D2`,green200:`#8DEEAF`,green300:`#59DC86`,green400:`#39C365`,green500:`#2BA250`,green600:`#237F42`,green700:`#1F6437`,green800:`#1A522F`,green900:`#092E17`,yellow50:`#FAF8E2`,yellow100:`#FAF5C5`,yellow200:`#F9ED7D`,yellow300:`#FAE84D`,yellow400:`#FAE84D`,yellow500:`#F7C62F`,yellow600:`#F6B82B`,yellow700:`#F3A425`,yellow800:`#F2941F`,yellow900:`#F0831A`,shadow:`#00000029`,iosKeyboardPicker:`#FFFFFF`,iosSelectorKeyboard:`#F4F4F4`,gradientQuickGuideBottom:`#FFFFFF`,gradientQuickGuideTop:`#FFFFFF0D`,graphActiveInsulin:`#008DFF`,graphActiveInsulinSecondary:`#42ABFF1A`,graphCarbohydrate:`#FF9E38`,graphCarbohydrateSecondary:`#EB892F`,graphGlucoseAverage:`#E539AB`,graphPhysicalActivity:`#5BA400`,graphPhysicalActivitySecondary:`#5DA800`,graphRapid:`#008DFF`,graphRapidSecondary:`#42ABFF`,rectangleRangeGraphMyDay:`#5CE59C33`,graphVeryHighGlucose:`#FF9000`,graphVeryHighGlucoseSecondary:`#F07C00`,graphHighGlucose:`#EAB308`,graphHighGlucoseSecondary:`#F8C62B`,graphTargetGlucose:`#008B4F`,graphTargetGlucoseSecondary:`#089B5C`,graphLowGlucose:`#BC0027`,graphLowGlucoseSecondary:`#DC2626`,graphVeryLowGlucose:`#A30022`,graphVeryLowGlucoseSecondary:`#94001F`},e.SHARED_COLORS={white100:`#FFFFFF0D`,white200:`#FFFFFF1A`,white300:`#FFFFFF33`,white400:`#FFFFFF66`,white500:`#FFFFFF99`,white600:`#FFFFFFCC`,white700:`#FFFFFFE6`,white800:`#FFFFFFF2`,white900:`#FFFFFF`,black100:`#0000000D`,black200:`#0000001A`,black300:`#00000033`,black400:`#0000004D`,black500:`#00000080`,black600:`#000000A6`,black700:`#000000D9`,black800:`#000000F2`,black900:`#000000`,noRisk:`#DFB38F`,lowRisk:`#DB988D`,moderateRisk:`#A76762`,highRisk:`#773751`,iosTextStatusBar:`#FFFFFF`,iosAccentBlue:`#0A84FF`,iosButtonHighlight:`#434343`,iosKeyboard:`#383838BF`,transparent:`transparent`,plusInnerShadow:`#8752F2`,plusOuterShadow:`#6422EE`}})),Avn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DARK_SEMANTIC_COLORS=void 0;var t=kvn(),n={...t.DARK_COLORS,...t.SHARED_COLORS};e.DARK_SEMANTIC_COLORS={bgPrimary:n.base900,bgSecondary:n.base700,bgTertiary:n.base600,bgMultiSheet:n.white300,bgSheet:n.base900,bgModal:n.base700,bgOverlay:n.black500,bgBrand:n.primary800,bgToggle:n.base350,bgSpecial:n.base900,bgTransparent:n.transparent,labelPrimary:n.white900,labelSecondary:n.white500,labelTertiary:n.white400,labelBrand:n.primary500,labelBrandInactive:n.primary400a,bgActivationCode:n.base700,borderActivationCodeDanger:n.red500,borderActivationCodeFocus:n.primary500,textActivationCodeDanger:n.red500,textButtonPrimary:n.white900,textButtonPrimaryDisabled:n.white400,bgButtonPrimary:n.primary800,bgButtonPrimaryDisabled:n.primary900,iconButtonPrimary:n.white900,iconButtonPrimaryDisabled:n.white400,textButtonSecondary:n.white900,textButtonSecondaryDisabled:n.white400,bgButtonSecondary:n.base600,bgButtonSecondaryDisabled:n.base100a,iconButtonSecondary:n.white900,iconButtonSecondaryDisabled:n.white400,textButtonPlain:n.white900,textButtonPlainDisabled:n.white400,iconButtonPlain:n.white900,iconButtonPlainDisabled:n.white400,textButtonPrimaryDanger:n.white900,textButtonPrimaryDangerDisabled:n.white400,bgButtonPrimaryDanger:n.red700,bgButtonPrimaryDangerDisabled:n.red300a,iconButtonPrimaryDanger:n.white900,iconButtonPrimaryDangerDisabled:n.white400,textButtonSecondaryDanger:n.red600,textButtonSecondaryDangerDisabled:n.red300a,bgButtonSecondaryDanger:n.base600,bgButtonSecondaryDangerDisabled:n.base100a,iconButtonSecondaryDanger:n.red600,iconButtonSecondaryDangerDisabled:n.red300a,textLink:n.primary500,buttonBorder:n.shadow,borderAvatar:n.white500,paginationActive:n.primary800,paginationInactive:n.white300,graphDivider:n.white300,borderGraphNow:n.white900,overlay:n.black500,nowOverlay:n.white200,veryHighGlucose:n.yellow900,veryHighGlucoseSecondary:n.yellow800,highGlucose:n.yellow700,highGlucoseSecondary:n.yellow600,targetGlucose:n.green500,targetGlucoseSecondary:n.green400,lowGlucose:n.red500,lowGlucoseSecondary:n.red400,veryLowGlucose:n.red900,veryLowGlucoseSecondary:n.red800,graphGlucoseAverage:n.graphGlucoseAverage,graphDotGlucoseAverage:n.green500,graphDotStrokeGlucoseAverage:n.white900,graphActiveInsulin:n.graphActiveInsulin,graphActiveInsulinSecondary:n.graphActiveInsulinSecondary,strokeDotGraphActiveInsulin:n.white900,graphOverlay:n.base700a,graphRapid:n.graphRapid,graphRapidSecondary:n.graphRapidSecondary,graphCarbohydrate:n.graphCarbohydrate,graphCarbohydrateSecondary:n.graphCarbohydrateSecondary,graphPhysicalActivity:n.graphPhysicalActivity,graphPhysicalActivitySecondary:n.graphPhysicalActivitySecondary,rectangleRangeGraphMyDay:n.rectangleRangeGraphMyDay,bgInputActive:n.base600,bgInputInactive:n.base700,bgInputHover:n.white300,borderInputFocus:n.primary500,borderInputDanger:n.red500,textInputDanger:n.red500,bgSecondaryInputInactive:n.base600,bgSecondaryInputActive:n.base600,bgListActive:n.base600,bgListInactive:n.base700,bgListHover:n.white300,bgListPlainHover:n.white200,bgLogbookManual:n.base600,bgLogbookRecommendation:n.base700,borderListFocused:n.primary500,textListHightlight:n.primary500,iosTextStatusBar:n.white900,iosBGNudge:n.white900,iosKeyboardPicker:n.iosKeyboardPicker,iosSelectorKeyboard:n.iosSelectorKeyboard,iosButtonHighlight:n.iosButtonHighlight,iosKeyboard:n.iosKeyboard,textKeyboardButtons:n.iosAccentBlue,textNavigationBar:n.white900,bgNavigationBar:n.base800,textNavigationBarLabel:n.primary500,iconNavigationBarActive:n.primary500,bgCalculatorActive:n.primary900,bgCalculatorInactive:n.base600,iconActive:n.white900,borderCalculator:n.base600,bgIconBolus:n.primary900,bgNumber:n.white600,textNumber:n.black900,bgSegmentContainer:n.base600,bgSegmentCard:n.base600,bgSegmentPrimary:n.primary800,textLabelActive:n.white900,textLabelInactive:n.white900,bgSliderBackground:n.base500,bgSliderForeground:n.primary600,bgSliderKnob:n.white900,bgSliderCalculator:n.base500,textSlider:n.white900,iconSearch:n.white500,textSearchPlaceholder:n.white500,textSearchText:n.white900,bgSearch:n.white300,bgToastDefault:n.base300,textToastDefault:n.white900,iconToastDefault:n.white900,textTableActive:n.white900,textTableSecondary:n.white500,textTableHighlight:n.primary500,bgTableOdd:n.base600,bgTableEven:n.base700,textCarbRecommendation:n.white900,iconCarbRecommendation:n.white900,bgGradientTop:n.primary700,bgGradientBottom:n.primary600,bgLogbookTop:n.base600,bgGradientOverlayTop:n.black100,bgGradientOverlayBottom:n.black900,divider:n.white200,iconBrand:n.primary500,iconBrandInactive:n.primary400a,iconSuccess:n.green500,iconWarning:n.yellow800,iconDanger:n.red500,textSuccess:n.green500,textWarning:n.yellow800,textDanger:n.red700,textPdf:n.black900,toggleKnob:n.white900,plusInnerShadow:n.plusInnerShadow,plusOuterShadow:n.plusOuterShadow,gradientQuickGuide:[n.gradientQuickGuideTop,n.gradientQuickGuideBottom],gradientActiveInsulin:[n.graphActiveInsulinSecondary,n.graphActiveInsulin],gradientCarbohydrates:[n.graphCarbohydrateSecondary,n.graphCarbohydrate],gradientPhysicalActivity:[n.graphPhysicalActivitySecondary,n.graphPhysicalActivity],gradientRapid:[n.graphRapidSecondary,n.graphRapid],gradientVeryHigh:[n.graphVeryHighGlucose,n.graphVeryHighGlucoseSecondary],gradientHigh:[n.graphHighGlucose,n.graphHighGlucoseSecondary],gradientTarget:[n.graphTargetGlucose,n.graphTargetGlucoseSecondary],gradientLow:[n.graphLowGlucoseSecondary,n.graphLowGlucose],gradientVeryLow:[n.graphVeryLowGlucose,n.graphVeryLowGlucoseSecondary]}})),jvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LIGHT_SEMANTIC_COLORS=void 0;var t=kvn(),n={...t.LIGHT_COLORS,...t.SHARED_COLORS};e.LIGHT_SEMANTIC_COLORS={bgPrimary:n.base200,bgSecondary:n.base50,bgTertiary:n.base100,bgMultiSheet:n.black300,bgSheet:n.base200,bgModal:n.base100,bgOverlay:n.black500,bgBrand:n.primary500,bgToggle:n.base500,bgSpecial:n.base50,bgTransparent:n.transparent,labelPrimary:n.black900,labelSecondary:n.black500,labelTertiary:n.black400,labelBrand:n.primary600,labelBrandInactive:n.primary400a,bgActivationCode:n.base700,borderActivationCodeDanger:n.red500,borderActivationCodeFocus:n.primary500,textActivationCodeDanger:n.red500,textButtonPrimary:n.white900,textButtonPrimaryDisabled:n.white400,bgButtonPrimary:n.primary500,bgButtonPrimaryDisabled:n.primary400,iconButtonPrimary:n.white900,iconButtonPrimaryDisabled:n.white400,textButtonSecondary:n.black900,textButtonSecondaryDisabled:n.black400,bgButtonSecondary:n.base50,bgButtonSecondaryDisabled:n.base400,iconButtonSecondary:n.black900,iconButtonSecondaryDisabled:n.black400,textButtonPlain:n.black900,textButtonPlainDisabled:n.black400,iconButtonPlain:n.black900,iconButtonPlainDisabled:n.black400,textButtonPrimaryDanger:n.white900,textButtonPrimaryDangerDisabled:n.white400,bgButtonPrimaryDanger:n.red600,bgButtonPrimaryDangerDisabled:n.red800,iconButtonPrimaryDanger:n.white900,iconButtonPrimaryDangerDisabled:n.white400,textButtonSecondaryDanger:n.red500,textButtonSecondaryDangerDisabled:n.red300a,bgButtonSecondaryDanger:n.base50,bgButtonSecondaryDangerDisabled:n.base400,iconButtonSecondaryDanger:n.red500,iconButtonSecondaryDangerDisabled:n.red300a,textLink:n.primary500,buttonBorder:n.base300,borderAvatar:n.white500,paginationActive:n.primary800,paginationInactive:n.black300,graphDivider:n.white200,borderGraphNow:n.black900,overlay:n.white500,nowOverlay:n.white300,veryHighGlucose:n.yellow900,veryHighGlucoseSecondary:n.yellow800,highGlucose:n.yellow700,highGlucoseSecondary:n.yellow600,targetGlucose:n.green600,targetGlucoseSecondary:n.green500,lowGlucose:n.red500,lowGlucoseSecondary:n.red400,veryLowGlucose:n.red700,veryLowGlucoseSecondary:n.red600,graphGlucoseAverage:n.graphGlucoseAverage,graphDotGlucoseAverage:n.green500,graphDotStrokeGlucoseAverage:n.white900,graphActiveInsulin:n.graphActiveInsulin,graphActiveInsulinSecondary:n.graphActiveInsulinSecondary,strokeDotGraphActiveInsulin:n.white900,graphOverlay:n.white900,graphRapid:n.graphRapid,graphRapidSecondary:n.graphRapidSecondary,graphCarbohydrate:n.graphCarbohydrate,graphCarbohydrateSecondary:n.graphCarbohydrateSecondary,graphPhysicalActivity:n.graphPhysicalActivity,graphPhysicalActivitySecondary:n.graphPhysicalActivitySecondary,rectangleRangeGraphMyDay:n.rectangleRangeGraphMyDay,bgInputActive:n.base50,bgInputInactive:n.base400,bgInputHover:n.black100,borderInputFocus:n.primary500,borderInputDanger:n.red500,textInputDanger:n.red500,bgSecondaryInputInactive:n.base200,bgSecondaryInputActive:n.base50,bgListActive:n.base50,bgListInactive:n.base400,bgListHover:n.black100,bgListPlainHover:n.black100,bgLogbookManual:n.primary300a,bgLogbookRecommendation:n.base50,borderListFocused:n.primary500,textListHightlight:n.primary500,iosTextStatusBar:n.black900,iosBGNudge:n.black900,iosKeyboardPicker:n.iosKeyboardPicker,iosSelectorKeyboard:n.iosSelectorKeyboard,iosButtonHighlight:n.white700,iosKeyboard:n.iosKeyboard,textKeyboardButtons:n.iosAccentBlue,textNavigationBar:n.black900,bgNavigationBar:n.base100,textNavigationBarLabel:n.primary500,iconNavigationBarActive:n.primary500,bgCalculatorActive:n.primary500,bgCalculatorInactive:n.white900,iconActive:n.white900,borderCalculator:n.base300,bgIconBolus:n.primary500,bgNumber:n.black500,textNumber:n.white900,bgSegmentContainer:n.base50,bgSegmentCard:n.base100,bgSegmentPrimary:n.primary500,textLabelActive:n.white900,textLabelInactive:n.base900,bgSliderBackground:n.black200,bgSliderForeground:n.primary600,bgSliderKnob:n.primary600,bgSliderCalculator:n.white900,textSlider:n.black900,iconSearch:n.black500,textSearchPlaceholder:n.black500,textSearchText:n.black900,bgSearch:n.base50,bgToastDefault:n.base50,textToastDefault:n.black900,iconToastDefault:n.black900,textTableActive:n.black900,textTableSecondary:n.black500,textTableHighlight:n.primary600,bgTableOdd:n.base200,bgTableEven:n.base50,textCarbRecommendation:n.white900,iconCarbRecommendation:n.white900,bgGradientTop:n.primary700,bgGradientBottom:n.primary600,bgLogbookTop:n.base400,bgGradientOverlayTop:n.black100,bgGradientOverlayBottom:n.black100,divider:n.black200,iconBrand:n.primary600,iconBrandInactive:n.primary400a,iconSuccess:n.green500,iconWarning:n.yellow900,iconDanger:n.red500,textSuccess:n.green500,textWarning:n.yellow900,textDanger:n.red700,textPdf:n.white900,toggleKnob:n.white900,plusInnerShadow:n.plusInnerShadow,plusOuterShadow:n.plusOuterShadow,gradientQuickGuide:[n.gradientQuickGuideTop,n.gradientQuickGuideBottom],gradientActiveInsulin:[n.graphActiveInsulinSecondary,n.graphActiveInsulin],gradientCarbohydrates:[n.graphCarbohydrateSecondary,n.graphCarbohydrate],gradientPhysicalActivity:[n.graphPhysicalActivitySecondary,n.graphPhysicalActivity],gradientRapid:[n.graphRapidSecondary,n.graphRapid],gradientVeryHigh:[n.graphVeryHighGlucose,n.graphVeryHighGlucoseSecondary],gradientHigh:[n.graphHighGlucose,n.graphHighGlucoseSecondary],gradientTarget:[n.graphTargetGlucose,n.graphTargetGlucoseSecondary],gradientLow:[n.graphLowGlucoseSecondary,n.graphLowGlucose],gradientVeryLow:[n.graphVeryLowGlucose,n.graphVeryLowGlucoseSecondary]}})),Mvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_SCALING=e.FontFamily=e.FONTS=void 0;var t=e.FontFamily=function(e){return e.PoppinsBold=`Poppins-Bold`,e.PoppinsSemiBold=`Poppins-SemiBold`,e.PoppinsMedium=`Poppins-Medium`,e.PoppinsRegular=`Poppins-Regular`,e}({});e.TEXT_SCALING={s0:1,s1:1.118,s2:1.235,s3:1.353},e.FONTS={Poppins:{bold_6XL:{fontFamily:t.PoppinsBold,fontSize:60,lineHeight:72},semiBold_6XL:{fontFamily:t.PoppinsSemiBold,fontSize:60,lineHeight:72},bold_4XL:{fontFamily:t.PoppinsBold,fontSize:36,lineHeight:43},semiBold_4XL:{fontFamily:t.PoppinsSemiBold,fontSize:36,lineHeight:43},bold_2XL:{fontFamily:t.PoppinsBold,fontSize:24,lineHeight:31},semiBold_2XL:{fontFamily:t.PoppinsSemiBold,fontSize:24,lineHeight:31},medium_2XL:{fontFamily:t.PoppinsMedium,fontSize:24,lineHeight:31},bold_Base:{fontFamily:t.PoppinsBold,fontSize:16,lineHeight:24},semiBold_Base:{fontFamily:t.PoppinsSemiBold,fontSize:16,lineHeight:24},medium_Base:{fontFamily:t.PoppinsMedium,fontSize:16,lineHeight:24},regular_Base:{fontFamily:t.PoppinsRegular,fontSize:16,lineHeight:24},bold_SM:{fontFamily:t.PoppinsBold,fontSize:14,lineHeight:21},semiBold_SM:{fontFamily:t.PoppinsSemiBold,fontSize:14,lineHeight:21},medium_SM:{fontFamily:t.PoppinsMedium,fontSize:14,lineHeight:21},regular_SM:{fontFamily:t.PoppinsRegular,fontSize:14,lineHeight:21},bold_XS:{fontFamily:t.PoppinsBold,fontSize:12,lineHeight:18},semiBold_XS:{fontFamily:t.PoppinsSemiBold,fontSize:12,lineHeight:18},medium_XS:{fontFamily:t.PoppinsMedium,fontSize:12,lineHeight:18},regular_XS:{fontFamily:t.PoppinsRegular,fontSize:12,lineHeight:18},bold_XXS:{fontFamily:t.PoppinsBold,fontSize:10,lineHeight:15},semiBold_XXS:{fontFamily:t.PoppinsSemiBold,fontSize:10,lineHeight:15},medium_XXS:{fontFamily:t.PoppinsMedium,fontSize:10,lineHeight:15},regular_XXS:{fontFamily:t.PoppinsRegular,fontSize:10,lineHeight:15}}}})),L7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorScheme=e.COLORS=void 0,Object.defineProperty(e,"FONTS",{enumerable:!0,get:function(){return i.FONTS}}),Object.defineProperty(e,"FontFamily",{enumerable:!0,get:function(){return i.FontFamily}}),Object.defineProperty(e,"TEXT_SCALING",{enumerable:!0,get:function(){return i.TEXT_SCALING}}),e.getColors=o;var t=(V(),d(wm)),n=Avn(),r=jvn(),i=Mvn(),a=e.ColorScheme=function(e){return e.Light=`light`,e.Dark=`dark`,e.System=`system`,e}({});function o(e){let i=t.Appearance.getColorScheme();switch(e){case a.Light:return r.LIGHT_SEMANTIC_COLORS;case a.Dark:return n.DARK_SEMANTIC_COLORS;case a.System:return i===`light`?r.LIGHT_SEMANTIC_COLORS:n.DARK_SEMANTIC_COLORS;default:return n.DARK_SEMANTIC_COLORS}}e.COLORS=o()})),R7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useSemanticColors=e.ColorSchemeProvider=void 0;var t=a(m()),n=L7(),r=Avn(),i=Xq();function a(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(a=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var o=(0,t.createContext)(r.DARK_SEMANTIC_COLORS);e.ColorSchemeProvider=({colorScheme:e,children:r})=>{let a=(0,t.useMemo)(()=>(0,n.getColors)(e),[e]);return(0,i.jsx)(o.Provider,{value:a,children:r})},e.useSemanticColors=()=>(0,t.useContext)(o)})),Nvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,...e,children:(0,r.jsx)(t.Path,{d:`M7.668 13.77h0a1.375 1.375 0 00-.758 1.776c.642 1.638 2.097 3.053 4.194 3.297h0a1.36 1.36 0 001.503-1.207h0a1.368 1.368 0 00-1.193-1.517h0c-.962-.111-1.652-.743-1.98-1.582l-.448.176.447-.175a1.352 1.352 0 00-1.765-.768zM12 21.52c-3.177 0-5.476-1.785-6.648-4.133-1.18-2.361-1.197-5.247.157-7.405 2.079-3.033 5.034-5.346 6.234-6.216a.434.434 0 01.514 0c1.2.87 4.155 3.183 6.234 6.216 1.354 2.158 1.336 5.044.157 7.405-1.172 2.348-3.471 4.133-6.648 4.133z`,fill:i.labelPrimary,stroke:i.labelPrimary,strokeWidth:.96})})}e.default=o})),Pvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsxs)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,r.jsx)(t.Mask,{id:`a`,fill:i.labelPrimary,children:(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z`})}),(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z`,fill:i.labelPrimary}),(0,r.jsx)(t.Path,{d:`M15.364 9.32l-.525.851h.001l.524-.851zm3.824.658l-.03-1h-.014l.044 1zm-4.95-1.565l.672-.742-.671.742zm-.64-.562l-.638.769.002.002.637-.771zm-7.817.353l.693.72h.001l-.694-.72zm-.026 1.414l-.72.693v.002l.72-.695zm1.414.025l-.694-.72h-.002l.696.72zm3.974-.893l.812.582.798-1.112-1.302-.422-.308.952zm-1.013 4.322l.965-.26-.965.26zm1.118 1.99l.791-.61-.002-.003-.79.614zm.008.011l-.792.61.792-.61zm.777 1.469l-.995.098v.002l.995-.1zm-.928 3.249l-.906-.424-.002.004.908.42zm-.253.547l-.908-.42-.004.008.912.412zm.499 1.324l-.413.91.004.002.409-.912zm1.323-.5l-.908-.42-.003.008.91.413zm.243-.524l-.906-.424-.002.004.908.42zm0-.003l-.905-.423.906.424zm1.106-4.292l-.995.1.995-.1zm-1.19-2.5l.79-.611-.79.611zm-.004-.004l.79-.612v-.002l-.79.614zm-.767-1.285l-.966.258.966-.258zm.767-2.718l.672-.74-.825-.75-.656.901.809.589zm.028.024l-.65.761.65-.76zm.039.035l-.69.723.008.009.01.008.672-.74zm1.42 1.129l.524-.852-.523.852zm4.96.952l.042.999h.001l-.043-1zm.955-1.043l-1 .043 1-.043zM7.008 15.17l.123.992h.003l-.126-.992zm1.81-.654l-.477-.88.476.88zm-3.214.7l.012-1h-.008l-.004 1zm-.162-.001l-.005 1 .005-1zm-.704.005l.03 1h.002l-.032-1zm-.97 1.028l1-.028v-.001l-1 .029zm1.029.97v1h.03l-.03-1zm.722-.003l-.008 1h.008v-1zm0 0l.008-1H5.52v1zm.065 0l.012-1h-.004l-.008 1zm1.672-.061l.124.992-.124-.992zm2.515-.88l.478.878-.478-.878zm.402-1.356l-.879.476.001.002.879-.478zm5.199-6.689a3.493 3.493 0 003.49-3.489h-2c0 .82-.67 1.489-1.49 1.489v2zm-3.49-3.489a3.492 3.492 0 003.49 3.489v-2c-.82 0-1.49-.669-1.49-1.489h-2zm3.49-3.491a3.492 3.492 0 00-3.49 3.491h2c0-.822.67-1.491 1.49-1.491v-2zm3.49 3.491a3.493 3.493 0 00-3.49-3.491v2c.82 0 1.49.669 1.49 1.491h2zm-4.022 5.43c1.392.856 3.126.861 4.392.806l-.088-1.998c-1.277.056-2.438-.008-3.257-.511l-1.047 1.704zm-1.273-1.017c.365.33.794.723 1.272 1.017l1.049-1.703c-.292-.18-.581-.437-.978-.797l-1.343 1.483zm-.605-.532c.197.163.392.338.606.532l1.342-1.483c-.208-.188-.436-.395-.675-.591l-1.273 1.542zm-6.487.301c1.78-1.718 4.642-1.833 6.485-.303l1.277-1.539c-2.649-2.2-6.657-2.003-9.15.403l1.388 1.44zm0 .001s-.001-.001 0 0v-.001l-.001.002-1.387-1.442a2 2 0 00-.053 2.828l1.441-1.387zm-.002 0h.002c0-.001 0 0 0 0h-.001v-.002l-1.438 1.391a2 2 0 002.828.048l-1.39-1.437zm4.978-1.126c-1.667-.54-3.64-.164-4.976 1.125l1.388 1.44c.774-.747 1.965-.988 2.971-.662l.617-1.903zm-.356 5.015c-.368-1.376.113-2.439.86-3.48L10.33 8.166c-.89 1.24-1.763 2.937-1.166 5.164l1.931-.518zm.942 1.636c-.426-.548-.775-1.015-.942-1.636l-1.931.517c.283 1.06.882 1.816 1.294 2.346l1.58-1.227zm.01.013l-.008-.01-1.583 1.221.008.01 1.583-1.22zm.98 1.98c-.086-.867-.62-1.514-.98-1.98l-1.583 1.222c.449.582.554.765.573.957l1.99-.198zm-1.017 3.773c.25-.532.534-1.138.737-1.75.204-.614.353-1.307.28-2.024l-1.99.201c.033.324-.028.713-.188 1.192-.16.481-.391.98-.65 1.533l1.811.848zm-.25.542l.252-.547-1.815-.84-.253.548 1.815.84zm.003-.006c.001 0 0 0 0 0v-.002 0l-1.823-.823a2.002 2.002 0 00.998 2.646l.825-1.821zm0 0h.001l-.005-.002-.817 1.825c.262.118.542.177.82.177v-2zm0 0v2a2 2 0 001.822-1.176l-1.822-.825zm.246-.533l-.243.525 1.815.84.243-.525-1.815-.84zm.002-.006v.002l1.812.847v-.002l-1.812-.847zm1.017-3.77c.128 1.272-.404 2.461-1.016 3.77l1.811.847c.574-1.226 1.386-2.911 1.195-4.817l-1.99.2zm-.987-1.987c.514.664.908 1.201.987 1.987l1.99-.2c-.143-1.418-.896-2.365-1.395-3.01l-1.582 1.223zm-.004-.005l.004.005 1.582-1.223-.003-.005-1.583 1.223zm-.941-1.637c.183.682.626 1.231.943 1.639l1.58-1.227c-.378-.486-.533-.71-.592-.93l-1.931.518zm.924-3.566c-.743 1.022-1.31 2.123-.924 3.566l1.931-.518c-.147-.55-.023-1.001.61-1.871L12.02 9.247zm1.486-.147a.403.403 0 00-.005-.004l-1.345 1.48.052.045L13.506 9.1zm.08.071c-.036-.034-.07-.063-.08-.071l-1.298 1.521.007.006.001.001-.01-.01 1.38-1.447zm1.254 1c-.453-.278-.834-.62-1.272-1.017l-1.344 1.481c.423.384.934.85 1.57 1.24l1.046-1.704zm3.619.825c-1.259 0-2.556-.17-3.619-.824l-1.047 1.704c1.533.942 3.276 1.12 4.666 1.12v-2zm.774-.02c-.255.011-.513.02-.774.02v2c.302 0 .592-.01.859-.021l-.085-1.998zm-.001 0l.087 1.999a2 2 0 001.91-2.086l-1.997.087zm-.014.001c-.003 0-.003 0 0 .001a.045.045 0 01.014.008c.004.004.004.006.003.003a.044.044 0 01-.003-.013l1.998-.087c-.05-1.13-1.026-1.942-2.073-1.91l.06 1.998zM7.134 16.163c.88-.111 1.602-.464 2.16-.768l-.954-1.757c-.505.274-.957.478-1.457.54l.25 1.985zm-1.543.053c.482.006 1.017.012 1.54-.053l-.245-1.985c-.369.046-.772.045-1.27.039l-.025 2zm-.153 0h.16l.01-2h-.16l-.01 2zm-.668.004c.213-.006.43-.005.667-.004l.01-2c-.23-.001-.483-.003-.74.005l.063 2zm-.002 0l-.058-1.999a2 2 0 00-1.941 2.057l2-.058zm0 0c-.002 0 0 0 0 0-.001-.001-.001-.001 0 0v.001c0 .001 0 .001 0 0l-2 .055a2 2 0 002 1.944v-2zm.029 0h-.03v2h.03v-2zm.73-.004c-.237-.002-.497-.004-.76.004l.06 2c.219-.008.44-.006.684-.004l.016-2zm-.008 0v2-2zm.073 0h-.065l-.015 2h.065l.015-2zm1.541-.054c-.504.063-.997.06-1.537.055l-.023 2c.532.006 1.151.011 1.807-.07l-.247-1.985zm2.161-.766c-.631.343-1.324.662-2.16.766l.246 1.985c1.207-.15 2.16-.609 2.869-.994l-.955-1.757zm.001 0c0 .002 0 .002 0 0v-.001c0-.001 0-.001 0 0v.001h-.002l.957 1.757a2 2 0 00.802-2.712l-1.757.956zm0 0l1.758-.954a2.001 2.001 0 00-2.712-.805l.953 1.759z`,fill:i.labelPrimary,mask:`url(#a)`})]})}e.default=o})),z7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TIMEOUT_MODAL_TRIGGER=e.TARGET_BGL_MMOL_LIMITS=e.INSULIN_TO_CARBS_RATIO_LIMITS=e.INSULIN_SENSITIVITY_MMOL_LIMITS=e.INSULIN_DOSE_LIMITS=e.CURRENT_BGL_MMOL_LIMITS=e.CARBOHYDRATES_LIMITS=e.BOLUS_SECONDS_PASSED_LIMITS=e.ACTIVITY_TARGET_BGL_MMOL_LIMITS=e.ACTIVITY_SETTINGS_INTERVAL_LIMITS=e.ACTIVITY_POSTPONE_GLUCOSE_MMOLL=e.ACTIVITY_POSTPONE_GLUCOSE_MGDL=e.ACTIVITY_DURATION_MINUTES_LIMITS=void 0;var t=b0();e.ACTIVITY_POSTPONE_GLUCOSE_MMOLL=5,e.ACTIVITY_POSTPONE_GLUCOSE_MGDL=90,e.TIMEOUT_MODAL_TRIGGER=600*1e3,e.CARBOHYDRATES_LIMITS={min:t.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:t.CONSTANTS.CARBOHYDRATES_INPUT_MAX},e.INSULIN_DOSE_LIMITS={min:t.CONSTANTS.INSULIN_DOSE_MIN,max:t.CONSTANTS.INSULIN_DOSE_MAX},e.BOLUS_SECONDS_PASSED_LIMITS={min:t.CONSTANTS.BOLUS_SECONDS_MIN,max:t.CONSTANTS.BOLUS_SECONDS_MAX},e.ACTIVITY_DURATION_MINUTES_LIMITS={min:t.CONSTANTS.ACTIVITY_DURATION_MIN,max:t.CONSTANTS.ACTIVITY_DURATION_MAX},e.INSULIN_SENSITIVITY_MMOL_LIMITS={min:t.CONSTANTS.INSULIN_SENSITIVITY_MIN,max:t.CONSTANTS.INSULIN_SENSITIVITY_MAX},e.INSULIN_TO_CARBS_RATIO_LIMITS={min:t.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,max:t.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX},e.CURRENT_BGL_MMOL_LIMITS={min:t.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,max:t.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL},e.TARGET_BGL_MMOL_LIMITS={min:t.CONSTANTS.TARGET_GLUCOSE_MIN,max:t.CONSTANTS.TARGET_GLUCOSE_MAX},e.ACTIVITY_TARGET_BGL_MMOL_LIMITS={min:t.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,max:t.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX},e.ACTIVITY_SETTINGS_INTERVAL_LIMITS={min:t.CONSTANTS.ACTIVITY_REDUCTION_MIN,max:t.CONSTANTS.ACTIVITY_REDUCTION_MAX}})),B7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useLanguage=e.LanguageProvider=e.LanguageContext=void 0;var t=i(m()),n=Fvt(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var a=e.LanguageContext=(0,t.createContext)(void 0);e.LanguageProvider=({children:e})=>{let{language:i,changeLanguage:o,t:s}=(0,n.useTranslation)(),c=t.default.useMemo(()=>({language:i,changeLanguage:o,t:s}),[i,o,s]);return(0,r.jsx)(a.Provider,{value:c,children:e})},e.useLanguage=()=>{let e=(0,t.useContext)(a);if(!e)throw Error(`useLanguage must be used within a LanguageProvider`);return e}})),V7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertAndFormatBGL=i,e.convertBGL=n,e.createSequentialArrayInteger=e.createSequentialArrayHalf=e.createSequentialArrayDecimal=void 0,e.formatBGL=r,e.formatUnit=void 0;var t=b0();function n(e,n,r){if(n!==t.BloodGlucoseUnit.MG_DL&&n!==t.BloodGlucoseUnit.MMOL_L)throw Error(`Unsupported glucose unit! ${n}`);if(n===r)return e;switch(r){case t.BloodGlucoseUnit.MG_DL:return e*t.CONSTANTS.MGDL_PER_MMOLL_BGL;case t.BloodGlucoseUnit.MMOL_L:return e*t.CONSTANTS.MMOLL_PER_MGDL_BGL;default:throw Error(`Unsupported glucose unit! ${r}`)}}function r(e,n){let r=n===t.BloodGlucoseUnit.MG_DL?0:1;return(Math.round(e*10)/10).toFixed(r)}function i(e,t,i){return r(n(e,t,i),i)}e.formatUnit=e=>`${e.substring(0,e.length-1)}${e.substring(e.length-1,e.length).toUpperCase()}`,e.createSequentialArrayHalf=(e,t)=>Array.from({length:(t-e)/.5+1},(t,n)=>(e+n*.5).toFixed(1)),e.createSequentialArrayInteger=(e,t)=>Array.from({length:t-e+1},(t,n)=>(e+n).toString()),e.createSequentialArrayDecimal=(e,t)=>Array.from({length:(t-e)*10+1},(t,n)=>(e+n/10).toFixed(1))})),Fvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useDebouncedCallback=p,e.useFontScale=f;var t=m(),n=(V(),d(wm)),r=Mvn(),i=()=>{let e=n.PixelRatio.getFontScale();return Math.min(e>0?e:1,r.TEXT_SCALING.s3)},a=i(),o=new Set,s=[],c=()=>{let e=i();e!==a&&(a=e,o.forEach(e=>e()))},l=e=>(o.size===0&&(s=[n.AppState.addEventListener(`change`,e=>{e===`active`&&c()}),n.Dimensions.addEventListener(`change`,c)]),o.add(e),c(),()=>{o.delete(e),o.size===0&&(s.forEach(e=>e.remove()),s=[])}),u=()=>a;function f(){return(0,t.useSyncExternalStore)(l,u)}function p(e,n){let r=(0,t.useRef)(null),i=(0,t.useRef)(e);return(0,t.useEffect)(()=>{i.current=e},[e]),(0,t.useCallback)((...e)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{i.current(...e)},n)},[n])}})),H7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s(m()),n=(V(),d(wm)),r=Fvn(),i=R7(),a=L7(),o=Xq();function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(e){let s=(0,i.useSemanticColors)(),c=(0,r.useFontScale)(),l=(0,t.useMemo)(()=>{let t=n.StyleSheet.flatten([{...a.FONTS.Poppins.regular_Base,color:s.labelPrimary},e.style]);return typeof t.fontSize==`number`&&(t.fontSize*=c),typeof t.lineHeight==`number`&&(t.lineHeight*=c),t},[s,e.style,c]);return(0,o.jsx)(n.Text,{...e,allowFontScaling:!1,style:l,children:e.children})}e.default=c})),Ivn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=g(m()),n=(V(),d(wm)),r=b0(),i=h(Nvn()),a=h(Pvn()),o=z7(),s=R7(),c=B7(),l=L7(),u=V7(),f=h(H7()),p=Xq();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function _({glucoseReading:e,hasActivity:l,bloodGlucoseUnit:d}){let{t:m}=(0,c.useLanguage)(),h=(0,s.useSemanticColors)(),g=(0,t.useMemo)(()=>(0,u.convertBGL)(e.value,e.unit,r.BloodGlucoseUnit.MMOL_L),[e]),_=(0,t.useMemo)(()=>r.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MIN<=g&&g<r.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MAX?m(`recommendation_suggestions_remeasure_very_low`):r.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MIN<=g&&g<r.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MAX?m(`recommendation_suggestions_remeasure_low`):r.CONSTANTS.SEVERE_HYPOGLYCEMIA_MIN<g&&g<=r.CONSTANTS.SEVERE_HYPERGLYCEMIA_MAX?m(`recommendation_suggestions_measure_ketone`):null,[g,m]),y=(0,t.useMemo)(()=>r.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MIN<=g&&g<=r.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MAX?m(`recommendation_suggestions_postpone_activity`,{displayUnit:(0,u.formatUnit)(d),value:d===r.BloodGlucoseUnit.MG_DL?o.ACTIVITY_POSTPONE_GLUCOSE_MGDL.toString():o.ACTIVITY_POSTPONE_GLUCOSE_MMOLL.toString()}):r.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MIN<=g&&g<=r.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MAX?m(`recommendation_suggestions_reduce_intensity`):null,[g,d,m]);return(0,p.jsxs)(n.View,{style:v.container,children:[_&&(0,p.jsxs)(n.View,{style:v.row,children:[(0,p.jsx)(i.default,{style:v.icon,testID:`blood-icon`}),(0,p.jsx)(f.default,{style:[v.text,{color:h.labelPrimary}],testID:`blood-glucose-message`,children:_})]}),l&&y&&(0,p.jsxs)(n.View,{style:v.row,children:[(0,p.jsx)(a.default,{style:v.icon,testID:`run-icon`}),(0,p.jsx)(f.default,{style:[v.text,{color:h.labelPrimary}],testID:`activity-message`,children:y})]})]})}var v=n.StyleSheet.create({container:{gap:16,flexWrap:`wrap`},text:{...l.FONTS.Poppins.regular_SM,flex:1},row:{flexDirection:`row`,gap:8},icon:{alignSelf:`center`}});e.default=_})),Lvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:42,height:42,viewBox:`0 0 42 42`,fill:`none`,...e,children:(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14.075 5.202a1.313 1.313 0 011.539-1.04c2.41.468 4.109 1.686 5.178 3.328.874 1.34 1.283 2.895 1.394 4.422a15.383 15.383 0 002.662-.475c1.134-.306 3.85-.727 6.424.425 2.686 1.202 4.946 3.988 5.289 9.548a.988.988 0 01.002.051c.043 5.242-1.626 9.2-3.54 11.88-.955 1.336-1.972 2.359-2.874 3.067a8.58 8.58 0 01-1.27.842c-.347.183-.72.336-1.074.389-1.64.386-3.142.11-4.34-.222-.369-.102-.751-.222-1.087-.327-.188-.06-.361-.114-.509-.158-.473-.141-.768-.202-.961-.202-.203 0-.504.059-.972.19-.152.043-.336.098-.535.158-.328.097-.7.208-1.049.301-1.194.317-2.684.588-4.327.262-.359-.052-.74-.209-1.097-.398-.39-.206-.82-.49-1.271-.844-.903-.709-1.92-1.73-2.873-3.066-1.911-2.678-3.575-6.63-3.533-11.872 0-.017 0-.034.002-.051.343-5.56 2.603-8.346 5.29-9.548 2.574-1.152 5.29-.731 6.423-.425.863.232 1.725.388 2.586.468-.106-1.119-.415-2.148-.96-2.982-.663-1.02-1.735-1.845-3.478-2.183a1.312 1.312 0 01-1.039-1.538zm.98 12.966a1.313 1.313 0 00-1.126-2.371c-1.911.908-3.296 2.796-3.584 4.894a1.312 1.312 0 102.6.358 3.85 3.85 0 012.11-2.881z`,fill:i.graphCarbohydrateSecondary})})}e.default=o})),Rvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=(O2(),d(D2)),n=R7(),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let i=(0,n.useSemanticColors)();return(0,r.jsxs)(t.Svg,{width:24,height:25,viewBox:`0 0 24 25`,fill:`none`,...e,children:[(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.99312 4.2711C4.97691 3.21491 6.37794 2.62354 8.03206 2.62354H11.6091C12.0233 2.62354 12.3591 2.95933 12.3591 3.37354C12.3591 3.78775 12.0233 4.12354 11.6091 4.12354H8.03206C6.75004 4.12354 5.76199 4.57281 5.09074 5.29347C4.414 6.02002 4.00391 7.08289 4.00391 8.39968V16.3464C4.00391 17.6647 4.4124 18.7277 5.08783 19.4539C5.75756 20.1739 6.74517 20.6235 8.03206 20.6235H16.467C17.7555 20.6235 18.7433 20.1738 19.4128 19.4539C20.088 18.7278 20.4961 17.6649 20.4961 16.3464V12.7654C20.4961 12.3512 20.8319 12.0154 21.2461 12.0154C21.6603 12.0154 21.9961 12.3512 21.9961 12.7654V16.3464C21.9961 17.9738 21.4886 19.4244 20.5112 20.4754C19.5281 21.5326 18.1263 22.1235 16.467 22.1235H8.03206C6.37405 22.1235 4.97259 21.5324 3.98947 20.4754C3.01204 19.4245 2.50391 17.974 2.50391 16.3464V8.39968C2.50391 6.77158 3.01482 5.32139 3.99312 4.2711Z`,fill:e?.color??i.labelPrimary}),(0,r.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.4779 4.79025L11.947 10.8273C11.6292 11.1844 11.4306 11.6319 11.3786 12.1085L11.2367 13.4178C11.1888 13.8615 11.5777 14.2282 12.0174 14.1548C12.0173 14.1548 12.0175 14.1547 12.0174 14.1548L13.2872 13.9418C13.8024 13.8552 14.2724 13.5962 14.6197 13.2079L14.6257 13.2012L20.1012 7.2259L20.1038 7.2231C20.4768 6.82017 20.4526 6.1918 20.0494 5.81853L18.8817 4.73742C18.8817 4.73738 18.8818 4.73746 18.8817 4.73742C18.4788 4.36513 17.8501 4.38948 17.4779 4.79025ZM16.376 3.77252C17.311 2.76233 18.8891 2.70159 19.8999 3.63592L21.0684 4.71777C21.0683 4.71776 21.0684 4.71779 21.0684 4.71777C22.0786 5.65306 22.1405 7.22926 21.206 8.24047C21.2055 8.24101 21.205 8.24155 21.2045 8.24209L15.7346 14.2114C15.1602 14.8521 14.3846 15.2784 13.5359 15.4211L12.2655 15.6341C10.8457 15.8717 9.59091 14.6883 9.74532 13.2569L9.88736 11.9465C9.97332 11.1584 10.3028 10.4163 10.8313 9.82475L10.8376 9.81777L16.3734 3.77534L16.376 3.77252Z`,fill:e?.color??i.labelPrimary})]})}})),zvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=(V(),d(wm)),n=R7(),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}var a=()=>{let e=(0,n.useSemanticColors)();return(0,r.jsx)(t.View,{style:[o.container,{backgroundColor:e.bgOverlay}],testID:`backdrop`})},o=t.StyleSheet.create({container:{position:`absolute`,top:0,left:0,right:0,bottom:0}});e.default=a})),Bvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CheckmarkCircleFilledHeight=void 0,i(m());var t=r((O2(),d(D2))),n=Xq();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e){return e&&e.__esModule?e:{default:e}}e.CheckmarkCircleFilledHeight=140;function a(e){return(0,n.jsxs)(t.default,{width:128,height:128,viewBox:`0 0 128 128`,fill:`none`,...e,children:[(0,n.jsx)(t.Circle,{cx:64,cy:64,r:63,fill:`#4A5DEB`,stroke:`#4A73ED`,strokeWidth:2}),(0,n.jsx)(t.Path,{d:`M43 67C43 67 54 78.5 55.5 79C57 79.5 85.5 49 85.5 49`,stroke:`white`,strokeWidth:5.33333,strokeLinecap:`round`})]})}e.default=a})),Vvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,o(m());var t=(V(),d(wm)),n=a(Bvn()),r=R7(),i=Xq();function a(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(a=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function o(e){return e&&e.__esModule?e:{default:e}}var s=()=>{let e=(0,r.useSemanticColors)(),{height:a}=(0,t.useWindowDimensions)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.default,{style:[c.checkmark,{top:(a-n.CheckmarkCircleFilledHeight)/2}],testID:`timeout-modal-checkmark`}),(0,i.jsx)(t.View,{style:[c.container,{backgroundColor:e.bgOverlay}],testID:`backdrop-checkmark`})]})},c=t.StyleSheet.create({checkmark:{alignSelf:`center`,position:`absolute`},container:{position:`absolute`,top:0,left:0,right:0,bottom:0}});e.default=s})),U7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(m()),n=(V(),d(wm)),r=(l0(),d(T2t)),i=R7(),a=c(zvn()),o=c(Vvn()),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var u=300;function f({testID:e,isVisible:c,onModalHide:l,onModalShow:d,onRequestClose:f,containerStyle:m,children:h,checkmark:g}){let{height:_}=(0,n.useWindowDimensions)(),{bottom:v}=(0,r.useSafeAreaInsets)(),y=(0,i.useSemanticColors)(),[b,x]=(0,t.useState)(0),[S,C]=(0,t.useState)(!1),w=(0,t.useRef)(new n.Animated.Value(_)).current;(0,t.useEffect)(()=>{S||w.setValue(_)},[S,_,w]);let T=(0,t.useCallback)(()=>{n.Animated.timing(w,{toValue:0,duration:u,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:n.Platform.OS!==`web`}).start(({finished:e})=>{e&&d&&d()})},[d,w]),E=(0,t.useCallback)(()=>{let e=b>0?b:_;n.Animated.timing(w,{toValue:e,duration:u,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:n.Platform.OS!==`web`}).start(({finished:e})=>{e&&(C(!1),l&&l())})},[b,_,l,w]);(0,t.useEffect)(()=>{S&&!c?E():!S&&c&&(C(!0),T())},[c,S,E,T]);let D=(0,t.useCallback)(e=>{x(e.nativeEvent.layout.height+v)},[v]);return S?(0,s.jsx)(n.Modal,{visible:!0,transparent:!0,statusBarTranslucent:!0,onRequestClose:f,children:(0,s.jsxs)(n.View,{style:[p.overlay,{backgroundColor:y.bgTransparent}],children:[g?(0,s.jsx)(o.default,{}):(0,s.jsx)(a.default,{}),(0,s.jsx)(n.Animated.View,{testID:e,accessibilityRole:`alert`,onLayout:D,style:[p.modal,{backgroundColor:y.bgModal},{transform:[{translateY:w}]},{paddingBottom:v+16},m],children:h})]})}):null}var p=n.StyleSheet.create({modal:{width:`100%`,maxHeight:`85%`,paddingTop:32,paddingBottom:16,paddingHorizontal:16,borderTopRightRadius:36,borderTopLeftRadius:36},backdrop:{position:`absolute`,left:0,right:0,top:0,bottom:0},overlay:{flex:1,justifyContent:`flex-end`}});e.default=t.default.memo(f)})),Hvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HapticFeedbackTypes",{enumerable:!0,get:function(){return n.HapticFeedbackTypes}}),e.triggerHaptic=i;var t=(V(),d(wm)),n=r((edn(),d(Xun)));function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e=t.Platform.OS===`ios`?n.HapticFeedbackTypes.selection:n.HapticFeedbackTypes.effectTick,r){n.default.trigger(e,{...r})}})),Uvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(m()),n=(V(),d(wm)),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}var a=22,o=26;function s({type:e,height:t,option:i,index:s,fontScale:l,onItemPress:u,colors:d}){return(0,r.jsx)(n.Pressable,{onPress:u,testID:`${e}-wheel-picker-item-`+s,children:(0,r.jsx)(n.Animated.View,{style:[c.option,{height:t}],children:(0,r.jsx)(n.Text,{allowFontScaling:!1,style:[c.itemTextStyle,{fontSize:a*l,lineHeight:o*l,color:d.labelPrimary}],children:i})})})}e.default=t.default.memo(s);var c=n.StyleSheet.create({option:{alignItems:`center`,justifyContent:`center`,zIndex:100},itemTextStyle:{fontWeight:`400`}})})),Wvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(m()),n=(V(),d(wm)),r=c(j2()),i=Fvn(),a=Hvn(),o=c(Uvn()),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function u({type:e,initialScrollIndex:c,selectedIndex:l,options:u,onChange:d,visibleRest:p=3,decelerationRate:m=`normal`,colors:h}){let{width:g}=(0,n.useWindowDimensions)(),_=(0,i.useFontScale)(),v=Math.round(35*_),y=v*p,b=(0,t.useRef)(null),x=(0,t.useRef)(null),S=(0,t.useMemo)(()=>new n.Animated.Value(0),[]),C=(1+p*2)*v,w=(0,t.useMemo)(()=>{let e=[...u];for(let t=0;t<p;t++)e.unshift(null),e.push(null);return e},[u,p]),T=(0,t.useMemo)(()=>[...Array(w.length)].map((e,t)=>t*v),[w,v]),E=(0,t.useRef)(v);(0,t.useEffect)(()=>{E.current!==v&&(E.current=v,x.current=l,b.current?.scrollToOffset({offset:l*v,animated:!1}))},[v,l]);let D=(0,t.useCallback)(e=>{let t=Math.min(v*(u.length-1),Math.max(e.nativeEvent.contentOffset.y,0)),n=Math.floor(Math.floor(t)/v);Math.floor(t%v)>v/2&&n++,n!==l&&d(n)},[v,u.length,l,d]),O=(0,t.useCallback)(e=>{n.Platform.OS!==`web`&&x.current!==e&&(x.current=e,(0,a.triggerHaptic)())},[]),k=(0,t.useCallback)(e=>{let t=Math.round(Math.round(e.nativeEvent.contentOffset.y)/v),r=Math.min(u.length-1,Math.max(t,0));O(r),r!==l&&d(r),n.Platform.OS===`web`&&b.current?.scrollToIndex({index:r,animated:!0})},[O,d,l,u.length,v]),A=(0,i.useDebouncedCallback)(k,100),ee=(0,t.useCallback)(e=>{d(e),b.current?.scrollToIndex({index:e,animated:!0})},[d]);return(0,s.jsxs)(n.View,{style:[f.containerPicker,{height:C,backgroundColor:h.iosKeyboardPicker}],testID:`${e}-wheel-picker`,children:[(0,s.jsx)(n.View,{style:[f.selectedIndicator,{backgroundColor:h.iosSelectorKeyboard,transform:[{translateY:-v/2}],height:v,width:g-32-20}]}),(0,s.jsx)(n.Animated.FlatList,{testID:`${e}-wheel-picker-list`,ref:b,style:f.scrollView,showsVerticalScrollIndicator:!1,onScroll:n.Animated.event([{nativeEvent:{contentOffset:{y:S}}}],{useNativeDriver:n.Platform.OS!==`web`,listener:n.Platform.OS===`web`?A:k}),onMomentumScrollEnd:D,snapToInterval:v,snapToOffsets:T,decelerationRate:m,initialScrollIndex:c,getItemLayout:(e,t)=>({length:v,offset:v*t,index:t}),data:w,keyExtractor:(e,t)=>t.toString(),renderItem:({item:t,index:n})=>(0,s.jsx)(o.default,{type:e,index:n,option:t,height:v,fontScale:_,onItemPress:()=>ee(Math.max(0,Math.min(n-p,u.length-1))),colors:h})}),(0,s.jsx)(r.default,{colors:[h.iosKeyboardPicker+`FF`,h.iosKeyboardPicker+`4D`],style:[f.mask,{top:0,height:y}]}),(0,s.jsx)(r.default,{colors:[h.iosKeyboardPicker+`4D`,h.iosKeyboardPicker+`FF`],style:[f.mask,{bottom:0,height:y}]})]})}e.default=t.default.memo(u);var f=n.StyleSheet.create({containerPicker:{borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},selectedIndicator:{position:`absolute`,borderRadius:7,top:`50%`,alignSelf:`center`},scrollView:{overflow:`hidden`,flex:1},mask:{position:`absolute`,left:0,right:0,pointerEvents:`none`}})})),Gvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=u(m()),n=(V(),d(wm)),r=R7(),i=B7(),a=l(U7()),o=l(H7()),s=l(Wvn()),c=Xq();function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(u=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}e.default=(0,t.memo)(e=>{let{isVisible:l,items:u,initialScrollIndex:d,type:p,onCancel:m,onConfirm:h,onDismiss:g}=e,{t:_}=(0,i.useLanguage)(),v=(0,r.useSemanticColors)(),[y,b]=(0,t.useState)(d),x=(0,t.useCallback)(e=>{b(e)},[]),S=(0,t.useCallback)(()=>{h(parseFloat(u[y]))},[u,y,h]),C=(0,t.useCallback)(()=>{b(d),m()},[d,m]);return(0,c.jsx)(a.default,{isVisible:l,onModalHide:g,containerStyle:{backgroundColor:v.bgTransparent},children:(0,c.jsxs)(n.View,{testID:`${p}-wheelpicker-modal`,children:[(0,c.jsx)(s.default,{type:p,selectedIndex:y,initialScrollIndex:d,options:u,onChange:x,colors:v}),(0,c.jsxs)(n.View,{style:f.buttonContainer,children:[(0,c.jsx)(n.Pressable,{testID:`${p}-wheel-picker-modal-confirm-button`,accessibilityRole:`button`,onPress:S,style:({pressed:e})=>[f.confirmButton,{backgroundColor:e?v.iosButtonHighlight:v.iosKeyboardPicker}],children:(0,c.jsx)(o.default,{style:[f.buttonText,{color:v.textKeyboardButtons}],children:_(`button_confirm`)})}),(0,c.jsx)(n.Pressable,{testID:`${p}-wheel-picker-modal-cancel-button`,accessibilityRole:`button`,onPress:C,style:({pressed:e})=>[f.secondaryButton,{backgroundColor:e?v.iosButtonHighlight:v.iosKeyboardPicker}],children:(0,c.jsx)(o.default,{style:[f.cancelText,{color:v.textKeyboardButtons}],children:_(`button_cancel`)})})]})]})})});var f=n.StyleSheet.create({buttonContainer:{gap:8},buttonText:{fontSize:17,lineHeight:22,fontWeight:`400`,paddingHorizontal:16,paddingVertical:14,textAlign:`center`},secondaryButton:{borderRadius:13},cancelText:{fontSize:17,lineHeight:22,fontWeight:`600`,paddingHorizontal:16,paddingVertical:14,textAlign:`center`},confirmButton:{borderBottomLeftRadius:13,borderBottomRightRadius:13}})})),Kvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=g(m()),n=(V(),d(wm)),r=h(Lvn()),i=h(Rvn()),a=z7(),o=R7(),s=B7(),c=L7(),l=V7(),u=h(H7()),f=h(Gvn()),p=Xq();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var _=(0,l.createSequentialArrayInteger)(a.CARBOHYDRATES_LIMITS.min,a.CARBOHYDRATES_LIMITS.max);function v({carbsRecommendation:e,editedCarbsRecommendation:a,onDismiss:c,onConfirm:l}){let{t:d}=(0,s.useLanguage)(),m=(0,o.useSemanticColors)(),[h,g]=(0,t.useState)(!1),v=(0,t.useCallback)(()=>{g(!1)},[]),b=(0,t.useCallback)(()=>{g(!0)},[]),x=(0,t.useCallback)(e=>{g(!1),l(e)},[l]),S=(0,t.useCallback)(()=>{if(a!==null)return _.findIndex(e=>e===a.toString());let t=Math.round(e);return _.findIndex(e=>e===t.toString())},[a,e]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.View,{style:[y.card,{backgroundColor:m.bgSecondary}],testID:`carbs-recommendation-display`,children:(0,p.jsxs)(n.View,{style:y.row,children:[(0,p.jsx)(r.default,{}),(0,p.jsxs)(n.View,{style:y.body,children:[(0,p.jsxs)(n.View,{style:y.valueRow,children:[(0,p.jsx)(u.default,{style:[y.label,{color:m.labelPrimary}],children:d(`recommendation_carb_eat`)+` `}),a===null?(0,p.jsx)(u.default,{style:[y.valueBold,{color:m.labelPrimary}],children:`${e} g`}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.default,{style:[y.valueEdited,{color:m.labelSecondary}],children:`${e} g`}),(0,p.jsx)(u.default,{style:[y.valueBold,{color:m.labelPrimary}],children:` ${a} g`})]})]}),(0,p.jsx)(u.default,{style:[y.subtitle,{color:m.labelPrimary}],children:d(`recommendation_carb_title`)})]}),(0,p.jsx)(n.TouchableOpacity,{onPress:b,testID:`carbohydrates-edit-button`,hitSlop:10,style:y.editButton,children:(0,p.jsx)(i.default,{style:y.editIcon})})]})}),(0,p.jsx)(f.default,{type:`carbohydrates`,items:_,isVisible:h,initialScrollIndex:S(),onConfirm:x,onCancel:v,onDismiss:c})]})}e.default=v;var y=n.StyleSheet.create({card:{borderRadius:16,marginBottom:32},row:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`,padding:24,gap:12},body:{flex:1},valueRow:{flexDirection:`row`,alignItems:`center`},label:{...c.FONTS.Poppins.medium_Base},valueBold:{...c.FONTS.Poppins.semiBold_Base},subtitle:{...c.FONTS.Poppins.regular_Base,lineHeight:23},valueEdited:{...c.FONTS.Poppins.regular_Base,textDecorationLine:`line-through`,opacity:.6},editIcon:{marginLeft:4},editButton:{alignSelf:`flex-start`}})})),qvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=(V(),d(wm)),n=R7(),r=Xq();function i(e){return e&&e.__esModule?e:{default:e}}function a(){let e=(0,n.useSemanticColors)(),i=Array.from({length:25},(e,t)=>`dot-${t}`);return(0,r.jsx)(t.View,{style:o.container,children:i.map(n=>(0,r.jsx)(t.View,{testID:n,style:[o.line,{backgroundColor:e.divider}]},n))})}var o=t.StyleSheet.create({container:{flexDirection:`row`,justifyContent:`space-between`,alignItems:`center`,width:`100%`},line:{width:8,height:1,borderRadius:4}});e.default=a})),Jvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,r.jsx)(t.Path,{d:`M4.227 8.207a.831.831 0 011.008-.069l.087.069L12 14.295l6.678-6.088a.83.83 0 011.008-.069l.087.069c.275.25.3.643.075.919l-.075.079-7.226 6.588a.831.831 0 01-1.008.069l-.086-.069-7.226-6.588a.663.663 0 010-.998z`,fill:i.labelSecondary})})}e.default=o})),Yvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a(m());var t=i((O2(),d(D2))),n=R7(),r=Xq();function i(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(i=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function a(e){return e&&e.__esModule?e:{default:e}}function o(e){let i=(0,n.useSemanticColors)();return(0,r.jsx)(t.default,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,r.jsx)(t.Path,{d:`M19.773 15.793a.831.831 0 01-1.008.069l-.087-.069L12 9.704l-6.678 6.09a.831.831 0 01-1.008.068l-.087-.069a.66.66 0 01-.075-.919l.075-.079 7.226-6.588a.83.83 0 011.008-.069l.086.069 7.226 6.588a.663.663 0 010 .998z`,fill:i.labelSecondary})})}e.default=o})),Xvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(m());var t=r((O2(),d(D2))),n=Xq();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e){return(0,n.jsx)(t.default,{width:20,height:20,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(t.Path,{d:`M11.7012 4.125C11.8651 3.95886 12.1261 3.95886 12.29 4.125L18.2441 10.1582C19.2467 11.1743 19.2467 12.8256 18.2441 13.8418L12.29 19.875C12.1261 20.0411 11.8661 20.0411 11.7021 19.875L5.74805 13.8418C4.74547 12.8257 4.74558 11.1744 5.74805 10.1582L11.7012 4.125Z`,fill:`#401782`,stroke:`#9B8BF3`,strokeWidth:2})})}e.default=i})),Zvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.styles=e.default=void 0,o(m());var t=(V(),d(wm)),n=R7(),r=L7(),i=o(H7()),a=Xq();function o(e){return e&&e.__esModule?e:{default:e}}function s({title:e,value:r,unit:o,hasSeparator:s,testID:l,icon:u}){let d=(0,n.useSemanticColors)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.View,{style:c.itemContainer,testID:l,children:[(0,a.jsx)(t.View,{style:c.itemTitleContainer,children:(0,a.jsx)(i.default,{style:[c.title,{color:d.labelPrimary}],testID:l+`-title`,children:e})}),(0,a.jsxs)(t.View,{style:c.row,children:[u&&(0,a.jsx)(t.View,{style:c.icon,testID:l+`-icon`,children:u}),(0,a.jsx)(i.default,{style:[c.itemText,{color:d.labelSecondary}],testID:l+`-value`,children:r}),!!o&&(0,a.jsx)(t.View,{style:c.row,children:(0,a.jsx)(i.default,{style:[c.itemText,{color:d.labelSecondary}],testID:l+`-unit`,children:` `+o})})]})]}),s&&(0,a.jsx)(t.View,{style:[c.divider,{backgroundColor:d.divider}],testID:l+`-divider`})]})}e.default=s;var c=e.styles=t.StyleSheet.create({itemContainer:{flex:1,flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`,paddingVertical:12,gap:8},itemTitleContainer:{alignSelf:`flex-start`},icon:{marginRight:8,alignSelf:`center`},title:{...r.FONTS.Poppins.regular_Base},itemText:{...r.FONTS.Poppins.regular_Base,textAlign:`right`},divider:{height:1},row:{flexDirection:`row`,flexShrink:1,justifyContent:`flex-end`}})})),Qvn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.styles=e.default=void 0;var t=g(m()),n=(V(),d(wm)),r=h(Jvn()),i=h(Yvn()),a=h(Xvn()),o=R7(),s=B7(),c=L7(),l=V7(),u=h(H7()),f=h(Zvn()),p=Xq();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(g=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function _({carbIntakeValue:e,activeInsulin:c,glucoseReading:d,bloodGlucoseUnit:m,activity:h,trackExpandDetails:g}){let{t:_}=(0,s.useLanguage)(),y=(0,o.useSemanticColors)(),[b,x]=(0,t.useState)(!1),S=(0,t.useMemo)(()=>({light:_(`activity_intensity_1`),moderate:_(`activity_intensity_2`),hard:_(`activity_intensity_3`)}),[_]),C=(0,t.useCallback)(()=>{n.Platform.OS===`ios`&&n.LayoutAnimation.configureNext(n.LayoutAnimation.Presets.easeInEaseOut),x(e=>{let t=!e;return t&&g(),t})},[g]),w=(0,t.useMemo)(()=>{if(!h)return``;let{activityDuration:e,activityIntensity:t,activityReduction:n}=h,r=n?Math.round(n*100):0,i=t?`${S[t]},`:``,a=`${r}% ${_(`recommendation_reduction`)}`;return`${(e=>e<=29?`0-29 min`:e<=45?`30-45 min`:e<=60?`46-60 min`:`61-120 min`)(e)}. ${i} \n ${a}`},[S,h,_]),T=(0,t.useMemo)(()=>[{title:_(`recommendation_summary_active_insulin_title`),value:c,unit:_(c===1?`unit`:`units`),testID:`active-insulin-item`},{title:_(`Glucose`),value:(0,l.convertAndFormatBGL)(d.value,d.unit,m),unit:(0,l.formatUnit)(m),testID:`blood-glucose-item`,icon:d.source===`forecast`?(0,p.jsx)(a.default,{}):void 0},{title:_(`recommendation_carbohydrates_title`),value:e||`-`,unit:e?_(e===1?`gram`:`grams`):void 0,testID:`carbs-item`},h!==void 0&&{title:_(`recommendation_activity_title`),value:w,testID:`activity-item`}].filter(e=>e),[_,c,d,m,e,h,w]);return(0,p.jsxs)(n.View,{style:v.container,children:[(0,p.jsxs)(n.TouchableOpacity,{style:v.clickableContainer,onPress:C,hitSlop:10,children:[(0,p.jsx)(u.default,{style:[v.title,{color:y.labelSecondary}],children:_(`recommendation_card_cal_details_title`)}),(0,p.jsx)(n.View,{style:v.expandButton,testID:`chevron-`+b,children:b?(0,p.jsx)(i.default,{style:v.chevron}):(0,p.jsx)(r.default,{style:v.chevron})})]}),b&&(0,p.jsx)(n.View,{children:T.map(({title:e,unit:t,value:n,testID:r,icon:i},a,o)=>(0,p.jsx)(f.default,{icon:i,testID:r,title:e,value:n,unit:t,hasSeparator:a!==o.length-1},e))})]})}e.default=_;var v=e.styles=n.StyleSheet.create({container:{padding:16,gap:16},clickableContainer:{flexDirection:`row`,justifyContent:`center`,alignItems:`center`},expandButton:{justifyContent:`center`,alignItems:`center`},chevron:{alignSelf:`center`,marginLeft:4},title:{...c.FONTS.Poppins.medium_SM,textAlign:`center`}})})),$vn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=L7(),a=s(H7()),o=Xq();function s(e){return e&&e.__esModule?e:{default:e}}function c({prefixTestID:e,onSave:i,onDelete:s,onLayout:c}){let{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,o.jsxs)(t.View,{style:[l.container,{backgroundColor:d.bgNavigationBar,borderTopColor:d.divider}],onLayout:c,testID:e+`-footer`,children:[(0,o.jsx)(t.TouchableOpacity,{style:[l.saveButton,{backgroundColor:d.bgButtonPrimary,borderColor:d.divider}],onPress:i,testID:e+`-footer-save-button`,children:(0,o.jsx)(a.default,{style:[l.saveText,{color:d.textButtonPrimary}],children:u(`button_save`)})}),(0,o.jsx)(t.TouchableOpacity,{style:[l.deleteButton,{backgroundColor:d.bgButtonSecondaryDanger,borderColor:d.buttonBorder}],onPress:s,testID:e+`-footer-delete-button`,children:(0,o.jsx)(a.default,{style:[l.deleteText,{color:d.textButtonSecondaryDanger}],children:u(`button_delete`)})})]})}var l=t.StyleSheet.create({container:{justifyContent:`flex-end`,gap:16,padding:16,borderTopWidth:1},saveButton:{paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:1},deleteButton:{paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:2},saveText:{...i.FONTS.Poppins.semiBold_Base,textAlign:`center`},deleteText:{...i.FONTS.Poppins.semiBold_Base,textAlign:`center`}});e.default=c})),eyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=c(j2()),r=R7(),i=B7(),a=L7(),o=c(H7()),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}function l({isEdited:e}){let{t:a}=(0,i.useLanguage)(),c=(0,r.useSemanticColors)(),{width:l}=(0,t.useWindowDimensions)();return e?(0,s.jsx)(n.default,{colors:[c.bgGradientBottom,c.bgGradientTop],style:[u.gradientContainer],testID:`edited-recommendation-header`,children:(0,s.jsxs)(t.View,{style:u.containerChanges,children:[(0,s.jsx)(o.default,{style:[u.text,{color:c.textCarbRecommendation}],children:a(`recommendation_change_title`).toUpperCase()}),(0,s.jsx)(o.default,{style:[u.text,u.textCrossed,{color:c.textCarbRecommendation}],children:a(`recommendation_card_title`).toUpperCase()})]})}):(0,s.jsx)(n.default,{colors:[c.bgGradientBottom,c.bgGradientTop],style:[u.gradientContainer,{width:l-32}],testID:`initial-recommendation-header`,children:(0,s.jsx)(t.View,{style:u.container,children:(0,s.jsx)(o.default,{style:[u.text,{color:c.textCarbRecommendation}],children:a(`recommendation_card_title`).toUpperCase()})})})}var u=t.StyleSheet.create({gradientContainer:{borderTopLeftRadius:16,borderTopRightRadius:16},container:{flex:1,paddingVertical:20},containerChanges:{flex:1,paddingVertical:8},text:{...a.FONTS.Poppins.medium_Base,textAlign:`center`},textCrossed:{textDecorationLine:`line-through`,opacity:.5}});e.default=l})),tyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=_(m()),n=(V(),d(wm)),r=lin(),i=b0(),a=g(Rvn()),o=z7(),s=R7(),c=B7(),l=L7(),u=V7(),f=g(H7()),p=g(Gvn()),h=Xq();function g(e){return e&&e.__esModule?e:{default:e}}function _(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(_=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function v({initialValue:e,editedValue:l,wasLimited:d,injectionMethod:m,onDismiss:g,onConfirm:_}){let{t:v}=(0,c.useLanguage)(),b=(0,s.useSemanticColors)(),[x,S]=(0,t.useState)(!1),C=(0,t.useCallback)(()=>{S(!0)},[]),w=(0,t.useCallback)(()=>{S(!1)},[]),T=(0,t.useCallback)(e=>{S(!1),_(e)},[_]),E=(0,t.useMemo)(()=>{let{min:t,max:n}=o.INSULIN_DOSE_LIMITS,r=d?e:n;return m===i.InjectionMethod.Pump?(0,u.createSequentialArrayDecimal)(t,r):m===i.InjectionMethod.PenWhole?(0,u.createSequentialArrayInteger)(t,r):(0,u.createSequentialArrayHalf)(t,r)},[m,e,d]),D=(0,t.useMemo)(()=>m===i.InjectionMethod.PenWhole?0:1,[m]),O=(0,t.useCallback)(()=>{if(l!==null)return E.findIndex(e=>e===l.toFixed(D));let t=(0,r.roundInsulinValue)(e,m);return E.findIndex(e=>e===t.toFixed(D))},[l,e,E,m,D]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(n.View,{style:[y.container,{backgroundColor:b.bgSecondary}],children:[(0,h.jsx)(f.default,{style:[y.title,{color:b.labelSecondary}],testID:`insulin-display-title`,children:v(`recommendation_rapid_title`)}),(0,h.jsxs)(n.TouchableOpacity,{style:y.row,testID:`insulin-current-value-container`,onPress:C,children:[(0,h.jsx)(f.default,{style:[y.value,{color:b.labelPrimary}],testID:`insulin-value`,children:`${l??e} `}),(0,h.jsx)(n.TouchableOpacity,{onPress:C,testID:`insulin-edit-button`,hitSlop:10,children:(0,h.jsx)(a.default,{})})]}),l===null?(0,h.jsx)(f.default,{style:[y.unit,{color:b.labelSecondary}],testID:`insulin-current-unit`,children:v(e===1?`unit`:`units`)}):(0,h.jsxs)(f.default,{style:[y.crossedOut,{color:b.labelSecondary}],testID:`insulin-initial-value`,children:[`${e} `,(0,h.jsx)(f.default,{style:[y.unit,{color:b.labelSecondary}],testID:`insulin-initial-unit`,children:v(e===1?`unit`:`units`)})]})]}),(0,h.jsx)(p.default,{type:`insulin`,items:E,isVisible:x,initialScrollIndex:O(),onConfirm:T,onCancel:w,onDismiss:g})]})}var y=n.StyleSheet.create({container:{paddingVertical:32,justifyContent:`center`,alignItems:`center`},title:{...l.FONTS.Poppins.regular_Base,marginBottom:8},row:{flexDirection:`row`,alignItems:`center`,alignContent:`center`},value:{...l.FONTS.Poppins.bold_6XL,lineHeight:n.Platform.select({ios:0,default:l.FONTS.Poppins.bold_6XL.lineHeight}),textAlign:`center`},crossedOut:{...l.FONTS.Poppins.medium_2XL,textDecorationLine:`line-through`},unit:{...l.FONTS.Poppins.medium_2XL}});e.default=v})),W7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.styles=void 0;var t=(V(),d(wm)),n=L7();e.styles=t.StyleSheet.create({containerStyle:{opacity:.5},handleIndicatorStyle:{display:`none`},title:{...n.FONTS.Poppins.semiBold_2XL,marginBottom:4},message:{marginBottom:32},buttonContainer:{gap:16},button:{paddingHorizontal:16,paddingVertical:12,borderRadius:16},buttonText:{...n.FONTS.Poppins.semiBold_Base,textAlign:`center`},secondaryButton:{paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:2},secondaryButtonText:{...n.FONTS.Poppins.semiBold_Base,textAlign:`center`}})})),nyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressClose:l}=e,{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{isVisible:c,children:(0,s.jsxs)(t.View,{testID:`delete-failure-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:d.labelPrimary}],testID:`delete-modal-failure-title`,children:u(`new_activity_modal_no_delete_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:d.labelSecondary}],testID:`delete-modal-failure-message`,children:u(`new_activity_modal_no_delete_body`)}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:d.bgButtonPrimary}],onPress:l,testID:`delete-modal-failure-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:d.textButtonPrimary}],children:u(`button_close`)})})]})})}})),ryn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressDelete:l,onPressCancel:u,onDismiss:d}=e,{t:f}=(0,r.useLanguage)(),p=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{onModalHide:d,isVisible:c,children:(0,s.jsxs)(t.View,{testID:`delete-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:p.labelPrimary}],testID:`delete-modal-title`,children:f(`recommendation_modal_delete_rec_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:p.labelSecondary}],testID:`delete-modal-message`,children:f(`recommendation_modal_delete_rec_body`)}),(0,s.jsxs)(t.View,{style:o.styles.buttonContainer,children:[(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:p.bgButtonPrimaryDanger}],onPress:l,testID:`delete-modal-delete-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:p.textButtonPrimary}],children:f(`recommendation_modal_delete_rec_button_danger_delete`)})}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.secondaryButton,{backgroundColor:p.bgButtonSecondary,borderColor:p.buttonBorder}],onPress:u,testID:`delete-modal-cancel-button`,children:(0,s.jsx)(i.default,{style:[o.styles.secondaryButtonText,{color:p.textButtonSecondary}],children:f(`button_cancel`)})})]})]})})}})),iyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressClose:l}=e,{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{isVisible:c,children:(0,s.jsxs)(t.View,{testID:`edit-failure-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:d.labelPrimary}],testID:`edit-modal-failure-title`,children:u(`glucose_modal_changes_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:d.labelSecondary}],testID:`edit-modal-failure-message`,children:u(`glucose_modal_changes_body`)}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:d.bgButtonPrimary}],onPress:l,testID:`edit-modal-failure-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:d.textButtonPrimary}],children:u(`glucose_modal_changes_button_confirm`)})})]})})}})),ayn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.getLimitedValue=p;var t=f(m()),n=(V(),d(wm)),r=b0(),i=R7(),a=B7(),o=u(H7()),s=u(U7()),c=W7(),l=Xq();function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function p(e){return r.CONSTANTS.INSULIN_DOSE_MAX-r.CONSTANTS.INSULIN_DOSE_MAX*e}e.default=e=>{let{isVisible:u,activityReduction:d,onPress:f}=e,{t:m}=(0,a.useLanguage)(),h=(0,i.useSemanticColors)(),g=(0,t.useMemo)(()=>d===null?m(`recommendation_modal_safety_limitation_body`,{SAFETY_INSULIN_LIMIT:`${r.CONSTANTS.INSULIN_DOSE_MAX}`}):m(`recommendation_modal_safety_limitation2_body`,{0:`${p(d)}`,SAFETY_INSULIN_LIMIT:`${r.CONSTANTS.INSULIN_DOSE_MAX}`,1:`${(d*100).toFixed(0)}`,2:`${p(d)}`}),[d,m]);return(0,l.jsx)(s.default,{isVisible:u,children:(0,l.jsxs)(n.View,{testID:`limitation-modal-visible-`+u,children:[(0,l.jsx)(o.default,{style:[c.styles.title,{color:h.labelPrimary}],children:m(`recommendation_modal_safety_limitation_title`)}),(0,l.jsx)(o.default,{style:[c.styles.message,{color:h.labelSecondary}],testID:`limitation-modal-message`,children:g}),(0,l.jsx)(n.TouchableOpacity,{style:[c.styles.button,{backgroundColor:h.bgButtonPrimary}],onPress:f,testID:`limitation-modal-button`,children:(0,l.jsx)(o.default,{style:[c.styles.buttonText,{color:h.textButtonPrimary}],children:m(`button_understood`)})})]})})}})),oyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressClose:l}=e,{t:u}=(0,r.useLanguage)(),d=(0,n.useSemanticColors)();return(0,s.jsx)(a.default,{isVisible:c,children:(0,s.jsxs)(t.View,{testID:`save-failure-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:d.labelPrimary}],testID:`save-modal-failure-title`,children:u(`no_save_modal_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:d.labelSecondary}],testID:`save-modal-failure-message`,children:u(`no_save_modal_body`)}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:d.bgButtonPrimary}],onPress:l,testID:`save-modal-failure-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:d.textButtonPrimary}],children:u(`button_close`)})})]})})}})),syn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,c(m());var t=(V(),d(wm)),n=R7(),r=B7(),i=c(H7()),a=c(U7()),o=W7(),s=Xq();function c(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let{isVisible:c,onPressViewInLogbook:l,onPressCancel:u,onDismiss:d}=e,{t:f}=(0,r.useLanguage)(),p=(0,n.useSemanticColors)(),m=t.Platform.OS===`web`;return(0,s.jsx)(a.default,{checkmark:!0,onModalHide:d,isVisible:c,children:(0,s.jsxs)(t.View,{testID:`timeout-modal-visible-`+c,children:[(0,s.jsx)(i.default,{style:[o.styles.title,{color:p.labelPrimary}],testID:`timeout-modal-title`,children:f(`recommendation_modal_auto_saved_title`)}),(0,s.jsx)(i.default,{style:[o.styles.message,{color:p.labelSecondary}],testID:`timeout-modal-message`,children:f(`recommendation_modal_auto_saved_body`)}),(0,s.jsxs)(t.View,{style:o.styles.buttonContainer,children:[!m&&(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.button,{backgroundColor:p.bgButtonPrimary}],onPress:l,testID:`timeout-modal-view-button`,children:(0,s.jsx)(i.default,{style:[o.styles.buttonText,{color:p.textButtonPrimary}],children:f(`recommendation_modal_auto_saved_button_confirm`)})}),(0,s.jsx)(t.TouchableOpacity,{style:[o.styles.secondaryButton,{backgroundColor:p.bgButtonSecondary,borderColor:p.buttonBorder}],onPress:u,testID:`timeout-modal-close-button`,children:(0,s.jsx)(i.default,{style:[o.styles.secondaryButtonText,{color:p.textButtonSecondary}],children:f(`button_close`)})})]})]})})}})),cyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i(m());var t=r((O2(),d(D2))),n=Xq();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.jsxs)(t.default,{width:29,height:28,viewBox:`0 0 29 28`,fill:`none`,...e,children:[(0,n.jsx)(t.Path,{d:`M14.5 0.5C21.9558 0.5 28 6.54416 28 14C28 21.4558 21.9558 27.5 14.5 27.5C7.04416 27.5 1 21.4558 1 14C1 6.54416 7.04416 0.5 14.5 0.5Z`,fill:`#4A5DEB`}),(0,n.jsx)(t.Path,{d:`M14.5 0.5C21.9558 0.5 28 6.54416 28 14C28 21.4558 21.9558 27.5 14.5 27.5C7.04416 27.5 1 21.4558 1 14C1 6.54416 7.04416 0.5 14.5 0.5Z`,stroke:`#FFFFFF`}),(0,n.jsx)(t.Path,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.8158 11.1809C21.0614 11.4221 21.0614 11.8132 20.8158 12.0544L14.9448 17.8191C14.6991 18.0603 14.3009 18.0603 14.0552 17.8191L8.18424 12.0544C7.93859 11.8132 7.93859 11.4221 8.18424 11.1809C8.4299 10.9397 8.82812 10.9397 9.07378 11.1809L14.5 16.5089L19.9262 11.1809C20.1718 10.9397 20.5701 10.9397 20.8158 11.1809Z`,fill:`#FFFFFF`})]})}e.default=a})),lyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=c(m()),n=(V(),d(wm)),r=s(j2()),i=s(cyn()),a=R7(),o=Xq();function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(c=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function l({scrollToEnd:e,isVisibleArrow:s,isVisibleBlur:c}){let l=(0,a.useSemanticColors)(),d=(0,t.useRef)(new n.Animated.Value(155)).current,f=(0,t.useRef)(new n.Animated.Value(+!!c)).current;return(0,t.useEffect)(()=>{n.Animated.timing(f,{toValue:+!!c,duration:400,useNativeDriver:n.Platform.OS!==`web`}).start()},[c,f]),(0,t.useEffect)(()=>{s&&n.Animated.spring(d,{toValue:0,damping:10,stiffness:100,mass:1,useNativeDriver:n.Platform.OS!==`web`}).start()},[s,d]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.Pressable,{style:u.scrollToEndButton,testID:`scroll-hint-arrow`,children:s&&(0,o.jsx)(n.Animated.View,{style:{backgroundColor:l.bgButtonPrimary,borderRadius:24,transform:[{translateY:d}]},children:(0,o.jsx)(n.TouchableOpacity,{testID:`scroll-hint-arrow-button`,onPress:e,children:(0,o.jsx)(i.default,{})})})}),(0,o.jsx)(n.Animated.View,{style:[u.gradient,{opacity:f}],pointerEvents:`none`,testID:`scroll-hint-blur`,children:(0,o.jsx)(r.default,{colors:l.gradientQuickGuide,style:u.linearGradient})})]})}var u=n.StyleSheet.create({scrollToEndButton:{position:`absolute`,bottom:80,alignSelf:`center`},gradient:{position:`absolute`,left:0,right:0,bottom:0,height:145},linearGradient:{flex:1}});e.default=l})),G7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0;var t;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(t||(e.util=t={}));var n;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(n||(e.objectUtil=n={})),e.ZodParsedType=t.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),e.getParsedType=t=>{switch(typeof t){case`undefined`:return e.ZodParsedType.undefined;case`string`:return e.ZodParsedType.string;case`number`:return Number.isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case`boolean`:return e.ZodParsedType.boolean;case`function`:return e.ZodParsedType.function;case`bigint`:return e.ZodParsedType.bigint;case`symbol`:return e.ZodParsedType.symbol;case`object`:return Array.isArray(t)?e.ZodParsedType.array:t===null?e.ZodParsedType.null:t.then&&typeof t.then==`function`&&t.catch&&typeof t.catch==`function`?e.ZodParsedType.promise:typeof Map<`u`&&t instanceof Map?e.ZodParsedType.map:typeof Set<`u`&&t instanceof Set?e.ZodParsedType.set:typeof Date<`u`&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}})),uyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ZodError=e.quotelessJson=e.ZodIssueCode=void 0;var t=G7();e.ZodIssueCode=t.util.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),e.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,`$1:`);var n=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,t.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};e.ZodError=n,n.create=e=>new n(e)})),dyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=uyn(),n=G7();e.default=(e,r)=>{let i;switch(e.code){case t.ZodIssueCode.invalid_type:i=e.received===n.ZodParsedType.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case t.ZodIssueCode.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(e.expected,n.util.jsonStringifyReplacer)}`;break;case t.ZodIssueCode.unrecognized_keys:i=`Unrecognized key(s) in object: ${n.util.joinValues(e.keys,`, `)}`;break;case t.ZodIssueCode.invalid_union:i=`Invalid input`;break;case t.ZodIssueCode.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${n.util.joinValues(e.options)}`;break;case t.ZodIssueCode.invalid_enum_value:i=`Invalid enum value. Expected ${n.util.joinValues(e.options)}, received '${e.received}'`;break;case t.ZodIssueCode.invalid_arguments:i=`Invalid function arguments`;break;case t.ZodIssueCode.invalid_return_type:i=`Invalid function return type`;break;case t.ZodIssueCode.invalid_date:i=`Invalid date`;break;case t.ZodIssueCode.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(i=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(i=`${i} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?i=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?i=`Invalid input: must end with "${e.validation.endsWith}"`:n.util.assertNever(e.validation):i=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case t.ZodIssueCode.too_small:i=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case t.ZodIssueCode.too_big:i=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case t.ZodIssueCode.custom:i=`Invalid input`;break;case t.ZodIssueCode.invalid_intersection_types:i=`Intersection results could not be merged`;break;case t.ZodIssueCode.not_multiple_of:i=`Number must be a multiple of ${e.multipleOf}`;break;case t.ZodIssueCode.not_finite:i=`Number must be finite`;break;default:i=r.defaultError,n.util.assertNever(e)}return{message:i}}})),fyn=s((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultErrorMap=void 0,e.setErrorMap=i,e.getErrorMap=a;var n=t(dyn());e.defaultErrorMap=n.default;var r=n.default;function i(e){r=e}function a(){return r}})),pyn=s((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.EMPTY_PATH=e.makeIssue=void 0,e.addIssueToContext=i;var n=fyn(),r=t(dyn());e.makeIssue=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},e.EMPTY_PATH=[];function i(t,i){let a=(0,n.getErrorMap)(),o=(0,e.makeIssue)({issueData:i,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,a,a===r.default?void 0:r.default].filter(e=>!!e)});t.common.issues.push(o)}e.ParseStatus=class t{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(t,n){let r=[];for(let i of n){if(i.status===`aborted`)return e.INVALID;i.status===`dirty`&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return t.mergeObjectSync(e,r)}static mergeObjectSync(t,n){let r={};for(let i of n){let{key:n,value:a}=i;if(n.status===`aborted`||a.status===`aborted`)return e.INVALID;n.status===`dirty`&&t.dirty(),a.status===`dirty`&&t.dirty(),n.value!==`__proto__`&&(a.value!==void 0||i.alwaysSet)&&(r[n.value]=a.value)}return{status:t.value,value:r}}},e.INVALID=Object.freeze({status:`aborted`}),e.DIRTY=e=>({status:`dirty`,value:e}),e.OK=e=>({status:`valid`,value:e}),e.isAborted=e=>e.status===`aborted`,e.isDirty=e=>e.status===`dirty`,e.isValid=e=>e.status===`valid`,e.isAsync=e=>typeof Promise<`u`&&e instanceof Promise})),myn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),hyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0;var t;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(t||(e.errorUtil=t={}))})),gyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.ZodReadonly=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0,e.datetimeRegex=A,e.custom=Re;var t=uyn(),n=fyn(),r=hyn(),i=pyn(),a=G7(),o=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},s=(e,n)=>{if((0,i.isValid)(n))return{success:!0,data:n.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let n=new t.ZodError(e.common.issues);return this._error=n,this._error}}};function c(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var l=class{get description(){return this._def.description}_getType(e){return(0,a.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,a.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new i.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,a.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if((0,i.isAsync)(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,a.getParsedType)(e)};return s(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,a.getParsedType)(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return(0,i.isValid)(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>(0,i.isValid)(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,a.getParsedType)(e)},r=this._parse({data:e,path:n.path,parent:n});return s(n,await((0,i.isAsync)(r)?r:Promise.resolve(r)))}refine(e,n){let r=e=>typeof n==`string`||n===void 0?{message:n}:typeof n==`function`?n(e):n;return this._refinement((n,i)=>{let a=e(n),o=()=>i.addIssue({code:t.ZodIssueCode.custom,...r(n)});return typeof Promise<`u`&&a instanceof Promise?a.then(e=>e?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new Oe({schema:this,typeName:ze.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return ke.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fe.create(this)}promise(){return De.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return I.create(this,e,this._def)}transform(e){return new Oe({...c(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new je({...c(this._def),innerType:this,defaultValue:t,typeName:ze.ZodDefault})}brand(){return new Pe({typeName:ze.ZodBranded,type:this,...c(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Me({...c(this._def),innerType:this,catchValue:t,typeName:ze.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Fe.create(this,e)}readonly(){return Ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};e.ZodType=l,e.Schema=l,e.ZodSchema=l;var u=/^c[^\s-]{8,}$/i,d=/^[0-9a-z]+$/,f=/^[0-9A-HJKMNP-TV-Z]{26}$/i,p=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,m=/^[a-z0-9_-]{21}$/i,h=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,g=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,v=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,y,b=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,x=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,S=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,C=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,w=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,T=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,E=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,D=RegExp(`^${E}$`);function O(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function k(e){return RegExp(`^${O(e)}$`)}function A(e){let t=`${E}T${O(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function ee(e,t){return!!((t===`v4`||!t)&&b.test(e)||(t===`v6`||!t)&&S.test(e))}function te(e,t){if(!h.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function ne(e,t){return!!((t===`v4`||!t)&&x.test(e)||(t===`v6`||!t)&&C.test(e))}var re=class e extends l{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==a.ZodParsedType.string){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.string,received:n.parsedType}),i.INVALID}let n=new i.ParseStatus,r;for(let o of this._def.checks)if(o.kind===`min`)e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:o.value,type:`string`,inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind===`max`)e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:o.value,type:`string`,inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind===`length`){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(r=this._getOrReturnCtx(e,r),a?(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:o.value,type:`string`,inclusive:!0,exact:!0,message:o.message}):s&&(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:o.value,type:`string`,inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind===`email`)_.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`email`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`emoji`)y||=new RegExp(v,`u`),y.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`emoji`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`uuid`)p.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`uuid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`nanoid`)m.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`nanoid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`cuid`)u.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`cuid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`cuid2`)d.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`cuid2`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`ulid`)f.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`ulid`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind===`url`)try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`url`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()}else o.kind===`regex`?(o.regex.lastIndex=0,o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`regex`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty())):o.kind===`trim`?e.data=e.data.trim():o.kind===`includes`?e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind===`toLowerCase`?e.data=e.data.toLowerCase():o.kind===`toUpperCase`?e.data=e.data.toUpperCase():o.kind===`startsWith`?e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind===`endsWith`?e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind===`datetime`?A(o).test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:`datetime`,message:o.message}),n.dirty()):o.kind===`date`?D.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:`date`,message:o.message}),n.dirty()):o.kind===`time`?k(o).test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_string,validation:`time`,message:o.message}),n.dirty()):o.kind===`duration`?g.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`duration`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`ip`?ee(e.data,o.version)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`ip`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`jwt`?te(e.data,o.alg)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`jwt`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`cidr`?ne(e.data,o.version)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`cidr`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`base64`?w.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`base64`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind===`base64url`?T.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{validation:`base64url`,code:t.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):a.util.assertNever(o);return{status:n.value,value:e.data}}_regex(e,n,i){return this.refinement(t=>e.test(t),{validation:n,code:t.ZodIssueCode.invalid_string,...r.errorUtil.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...r.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...r.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...r.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...r.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...r.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...r.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...r.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...r.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...r.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...r.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...r.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...r.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...r.errorUtil.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...r.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...r.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...r.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...r.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...r.errorUtil.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...r.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...r.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...r.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...r.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...r.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,r.errorUtil.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};e.ZodString=re,re.create=e=>new re({checks:[],typeName:ze.ZodString,coerce:e?.coerce??!1,...c(e)});function ie(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var j=class e extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==a.ZodParsedType.number){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.number,received:n.parsedType}),i.INVALID}let n,r=new i.ParseStatus;for(let o of this._def.checks)o.kind===`int`?a.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:`integer`,received:`float`,message:o.message}),r.dirty()):o.kind===`min`?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_small,minimum:o.value,type:`number`,inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind===`max`?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_big,maximum:o.value,type:`number`,inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind===`multipleOf`?ie(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind===`finite`?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.not_finite,message:o.message}),r.dirty()):a.util.assertNever(o);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,r.errorUtil.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,r.errorUtil.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,r.errorUtil.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,r.errorUtil.toString(t))}setLimit(t,n,i,a){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:r.errorUtil.toString(a)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:r.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:r.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:r.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:r.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:r.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:r.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:r.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:r.errorUtil.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:r.errorUtil.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&a.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};e.ZodNumber=j,j.create=e=>new j({checks:[],typeName:ze.ZodNumber,coerce:e?.coerce||!1,...c(e)});var ae=class e extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==a.ZodParsedType.bigint)return this._getInvalidInput(e);let n,r=new i.ParseStatus;for(let o of this._def.checks)o.kind===`min`?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_small,type:`bigint`,minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind===`max`?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_big,type:`bigint`,maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind===`multipleOf`?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):a.util.assertNever(o);return{status:r.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.bigint,received:n.parsedType}),i.INVALID}gte(e,t){return this.setLimit(`min`,e,!0,r.errorUtil.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,r.errorUtil.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,r.errorUtil.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,r.errorUtil.toString(t))}setLimit(t,n,i,a){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:r.errorUtil.toString(a)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:r.errorUtil.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};e.ZodBigInt=ae,ae.create=e=>new ae({checks:[],typeName:ze.ZodBigInt,coerce:e?.coerce??!1,...c(e)});var oe=class extends l{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==a.ZodParsedType.boolean){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.boolean,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodBoolean=oe,oe.create=e=>new oe({typeName:ze.ZodBoolean,coerce:e?.coerce||!1,...c(e)});var se=class e extends l{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==a.ZodParsedType.date){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.date,received:n.parsedType}),i.INVALID}if(Number.isNaN(e.data.getTime())){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_date}),i.INVALID}let n=new i.ParseStatus,r;for(let o of this._def.checks)o.kind===`min`?e.data.getTime()<o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:`date`}),n.dirty()):o.kind===`max`?e.data.getTime()>o.value&&(r=this._getOrReturnCtx(e,r),(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:`date`}),n.dirty()):a.util.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:r.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:r.errorUtil.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};e.ZodDate=se,se.create=e=>new se({checks:[],coerce:e?.coerce||!1,typeName:ze.ZodDate,...c(e)});var ce=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.symbol){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.symbol,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodSymbol=ce,ce.create=e=>new ce({typeName:ze.ZodSymbol,...c(e)});var M=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.undefined,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodUndefined=M,M.create=e=>new M({typeName:ze.ZodUndefined,...c(e)});var N=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.null){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.null,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodNull=N,N.create=e=>new N({typeName:ze.ZodNull,...c(e)});var P=class extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,i.OK)(e.data)}};e.ZodAny=P,P.create=e=>new P({typeName:ze.ZodAny,...c(e)});var le=class extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,i.OK)(e.data)}};e.ZodUnknown=le,le.create=e=>new le({typeName:ze.ZodUnknown,...c(e)});var ue=class extends l{_parse(e){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.never,received:n.parsedType}),i.INVALID}};e.ZodNever=ue,ue.create=e=>new ue({typeName:ze.ZodNever,...c(e)});var de=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.void,received:n.parsedType}),i.INVALID}return(0,i.OK)(e.data)}};e.ZodVoid=de,de.create=e=>new de({typeName:ze.ZodVoid,...c(e)});var fe=class e extends l{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==a.ZodParsedType.array)return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.array,received:n.parsedType}),i.INVALID;if(s.exactLength!==null){let e=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(e||a)&&((0,i.addIssueToContext)(n,{code:e?t.ZodIssueCode.too_big:t.ZodIssueCode.too_small,minimum:a?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&((0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_small,minimum:s.minLength.value,type:`array`,inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&((0,i.addIssueToContext)(n,{code:t.ZodIssueCode.too_big,maximum:s.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((e,t)=>s.type._parseAsync(new o(n,e,n.path,t)))).then(e=>i.ParseStatus.mergeArray(r,e));let c=[...n.data].map((e,t)=>s.type._parseSync(new o(n,e,n.path,t)));return i.ParseStatus.mergeArray(r,c)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:r.errorUtil.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:r.errorUtil.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:r.errorUtil.toString(n)}})}nonempty(e){return this.min(1,e)}};e.ZodArray=fe,fe.create=(e,t)=>new fe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...c(t)});function pe(e){if(e instanceof me){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=ke.create(pe(r))}return new me({...e._def,shape:()=>t})}else if(e instanceof fe)return new fe({...e._def,type:pe(e.element)});else if(e instanceof ke)return ke.create(pe(e.unwrap()));else if(e instanceof Ae)return Ae.create(pe(e.unwrap()));else if(e instanceof ve)return ve.create(e.items.map(e=>pe(e)));else return e}var me=class e extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=a.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==a.ZodParsedType.object){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:n.parsedType}),i.INVALID}let{status:n,ctx:r}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),l=[];if(!(this._def.catchall instanceof ue&&this._def.unknownKeys===`strip`))for(let e in r.data)c.includes(e)||l.push(e);let u=[];for(let e of c){let t=s[e],n=r.data[e];u.push({key:{status:`valid`,value:e},value:t._parse(new o(r,n,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ue){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of l)u.push({key:{status:`valid`,value:e},value:{status:`valid`,value:r.data[e]}});else if(e===`strict`)l.length>0&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.unrecognized_keys,keys:l}),n.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of l){let n=r.data[t];u.push({key:{status:`valid`,value:t},value:e._parse(new o(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of u){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>i.ParseStatus.mergeObjectSync(n,e)):i.ParseStatus.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return r.errorUtil.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let i=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:r.errorUtil.errToObj(t).message??i}:{message:i}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of a.util.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of a.util.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return pe(this)}partial(t){let n={};for(let e of a.util.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of a.util.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof ke;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return we(a.util.objectKeys(this.shape))}};e.ZodObject=me,me.create=(e,t)=>new me({shape:()=>e,unknownKeys:`strip`,catchall:ue.create(),typeName:ze.ZodObject,...c(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:`strict`,catchall:ue.create(),typeName:ze.ZodObject,...c(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:`strip`,catchall:ue.create(),typeName:ze.ZodObject,...c(t)});var he=class extends l{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function a(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let t of e)if(t.result.status===`dirty`)return n.common.issues.push(...t.ctx.common.issues),t.result;let r=e.map(e=>new t.ZodError(e.ctx.common.issues));return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_union,unionErrors:r}),i.INVALID}if(n.common.async)return Promise.all(r.map(async e=>{let t={...n,common:{...n.common,issues:[]},parent:null};return{result:await e._parseAsync({data:n.data,path:n.path,parent:t}),ctx:t}})).then(a);{let e,a=[];for(let t of r){let r={...n,common:{...n.common,issues:[]},parent:null},i=t._parseSync({data:n.data,path:n.path,parent:r});if(i.status===`valid`)return i;i.status===`dirty`&&!e&&(e={result:i,ctx:r}),r.common.issues.length&&a.push(r.common.issues)}if(e)return n.common.issues.push(...e.ctx.common.issues),e.result;let o=a.map(e=>new t.ZodError(e));return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_union,unionErrors:o}),i.INVALID}}get options(){return this._def.options}};e.ZodUnion=he,he.create=(e,t)=>new he({options:e,typeName:ze.ZodUnion,...c(t)});var ge=e=>e instanceof Se?ge(e.schema):e instanceof Oe?ge(e.innerType()):e instanceof Ce?[e.value]:e instanceof Te?e.options:e instanceof Ee?a.util.objectValues(e.enum):e instanceof je?ge(e._def.innerType):e instanceof M?[void 0]:e instanceof N?[null]:e instanceof ke?[void 0,...ge(e.unwrap())]:e instanceof Ae?[null,...ge(e.unwrap())]:e instanceof Pe||e instanceof Ie?ge(e.unwrap()):e instanceof Me?ge(e._def.innerType):[],F=class e extends l{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==a.ZodParsedType.object)return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:n.parsedType}),i.INVALID;let r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):((0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=ge(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...c(r)})}};e.ZodDiscriminatedUnion=F;function _e(e,t){let n=(0,a.getParsedType)(e),r=(0,a.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===a.ZodParsedType.object&&r===a.ZodParsedType.object){let n=a.util.objectKeys(t),r=a.util.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=_e(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===a.ZodParsedType.array&&r===a.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=_e(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===a.ZodParsedType.date&&r===a.ZodParsedType.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var I=class extends l{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),a=(e,a)=>{if((0,i.isAborted)(e)||(0,i.isAborted)(a))return i.INVALID;let o=_e(e.value,a.value);return o.valid?(((0,i.isDirty)(e)||(0,i.isDirty)(a))&&n.dirty(),{status:n.value,value:o.data}):((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>a(e,t)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};e.ZodIntersection=I,I.create=(e,t,n)=>new I({left:e,right:t,typeName:ze.ZodIntersection,...c(n)});var ve=class e extends l{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.array)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.array,received:r.parsedType}),i.INVALID;if(r.data.length<this._def.items.length)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),i.INVALID;!this._def.rest&&r.data.length>this._def.items.length&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),n.dirty());let s=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new o(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(s).then(e=>i.ParseStatus.mergeArray(n,e)):i.ParseStatus.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};e.ZodTuple=ve,ve.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ve({items:e,typeName:ze.ZodTuple,rest:null,...c(t)})};var ye=class e extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.object)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:r.parsedType}),i.INVALID;let s=[],c=this._def.keyType,l=this._def.valueType;for(let e in r.data)s.push({key:c._parse(new o(r,e,r.path,e)),value:l._parse(new o(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?i.ParseStatus.mergeObjectAsync(n,s):i.ParseStatus.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof l?new e({keyType:t,valueType:n,typeName:ze.ZodRecord,...c(r)}):new e({keyType:re.create(),valueType:t,typeName:ze.ZodRecord,...c(n)})}};e.ZodRecord=ye;var be=class extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.map)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.map,received:r.parsedType}),i.INVALID;let s=this._def.keyType,c=this._def.valueType,l=[...r.data.entries()].map(([e,t],n)=>({key:s._parse(new o(r,e,r.path,[n,`key`])),value:c._parse(new o(r,t,r.path,[n,`value`]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let t of l){let r=await t.key,a=await t.value;if(r.status===`aborted`||a.status===`aborted`)return i.INVALID;(r.status===`dirty`||a.status===`dirty`)&&n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}})}else{let e=new Map;for(let t of l){let r=t.key,a=t.value;if(r.status===`aborted`||a.status===`aborted`)return i.INVALID;(r.status===`dirty`||a.status===`dirty`)&&n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}}}};e.ZodMap=be,be.create=(e,t,n)=>new be({valueType:t,keyType:e,typeName:ze.ZodMap,...c(n)});var xe=class e extends l{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.set)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.set,received:r.parsedType}),i.INVALID;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_small,minimum:s.minSize.value,type:`set`,inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&((0,i.addIssueToContext)(r,{code:t.ZodIssueCode.too_big,maximum:s.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());let c=this._def.valueType;function l(e){let t=new Set;for(let r of e){if(r.status===`aborted`)return i.INVALID;r.status===`dirty`&&n.dirty(),t.add(r.value)}return{status:n.value,value:t}}let u=[...r.data.values()].map((e,t)=>c._parse(new o(r,e,r.path,t)));return r.common.async?Promise.all(u).then(e=>l(e)):l(u)}min(t,n){return new e({...this._def,minSize:{value:t,message:r.errorUtil.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:r.errorUtil.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};e.ZodSet=xe,xe.create=(e,t)=>new xe({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...c(t)});var L=class e extends l{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==a.ZodParsedType.function)return(0,i.addIssueToContext)(r,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.function,received:r.parsedType}),i.INVALID;function o(e,a){return(0,i.makeIssue)({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,n.getErrorMap)(),n.defaultErrorMap].filter(e=>!!e),issueData:{code:t.ZodIssueCode.invalid_arguments,argumentsError:a}})}function s(e,a){return(0,i.makeIssue)({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,n.getErrorMap)(),n.defaultErrorMap].filter(e=>!!e),issueData:{code:t.ZodIssueCode.invalid_return_type,returnTypeError:a}})}let c={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof De){let e=this;return(0,i.OK)(async function(...n){let r=new t.ZodError([]),i=await e._def.args.parseAsync(n,c).catch(e=>{throw r.addIssue(o(n,e)),r}),a=await Reflect.apply(l,this,i);return await e._def.returns._def.type.parseAsync(a,c).catch(e=>{throw r.addIssue(s(a,e)),r})})}else{let e=this;return(0,i.OK)(function(...n){let r=e._def.args.safeParse(n,c);if(!r.success)throw new t.ZodError([o(n,r.error)]);let i=Reflect.apply(l,this,r.data),a=e._def.returns.safeParse(i,c);if(!a.success)throw new t.ZodError([s(i,a.error)]);return a.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ve.create(t).rest(le.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||ve.create([]).rest(le.create()),returns:n||le.create(),typeName:ze.ZodFunction,...c(r)})}};e.ZodFunction=L;var Se=class extends l{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};e.ZodLazy=Se,Se.create=(e,t)=>new Se({getter:e,typeName:ze.ZodLazy,...c(t)});var Ce=class extends l{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{received:n.data,code:t.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:`valid`,value:e.data}}get value(){return this._def.value}};e.ZodLiteral=Ce,Ce.create=(e,t)=>new Ce({value:e,typeName:ze.ZodLiteral,...c(t)});function we(e,t){return new Te({values:e,typeName:ze.ZodEnum,...c(t)})}var Te=class e extends l{_parse(e){if(typeof e.data!=`string`){let n=this._getOrReturnCtx(e),r=this._def.values;return(0,i.addIssueToContext)(n,{expected:a.util.joinValues(r),received:n.parsedType,code:t.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return(0,i.addIssueToContext)(n,{received:n.data,code:t.ZodIssueCode.invalid_enum_value,options:r}),i.INVALID}return(0,i.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};e.ZodEnum=Te,Te.create=we;var Ee=class extends l{_parse(e){let n=a.util.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==a.ZodParsedType.string&&r.parsedType!==a.ZodParsedType.number){let e=a.util.objectValues(n);return(0,i.addIssueToContext)(r,{expected:a.util.joinValues(e),received:r.parsedType,code:t.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||=new Set(a.util.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=a.util.objectValues(n);return(0,i.addIssueToContext)(r,{received:r.data,code:t.ZodIssueCode.invalid_enum_value,options:e}),i.INVALID}return(0,i.OK)(e.data)}get enum(){return this._def.values}};e.ZodNativeEnum=Ee,Ee.create=(e,t)=>new Ee({values:e,typeName:ze.ZodNativeEnum,...c(t)});var De=class extends l{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==a.ZodParsedType.promise&&n.common.async===!1)return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.promise,received:n.parsedType}),i.INVALID;let r=n.parsedType===a.ZodParsedType.promise?n.data:Promise.resolve(n.data);return(0,i.OK)(r.then(e=>this._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})))}};e.ZodPromise=De,De.create=(e,t)=>new De({type:e,typeName:ze.ZodPromise,...c(t)});var Oe=class extends l{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,o={addIssue:e=>{(0,i.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),r.type===`preprocess`){let e=r.transform(n.data,o);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return i.INVALID;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?i.INVALID:r.status===`dirty`||t.value===`dirty`?(0,i.DIRTY)(r.value):r});{if(t.value===`aborted`)return i.INVALID;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?i.INVALID:r.status===`dirty`||t.value===`dirty`?(0,i.DIRTY)(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,o);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?i.INVALID:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?i.INVALID:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,i.isValid)(e))return i.INVALID;let a=r.transform(e.value,o);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>(0,i.isValid)(e)?Promise.resolve(r.transform(e.value,o)).then(e=>({status:t.value,value:e})):i.INVALID);a.util.assertNever(r)}};e.ZodEffects=Oe,e.ZodTransformer=Oe,Oe.create=(e,t,n)=>new Oe({schema:e,typeName:ze.ZodEffects,effect:t,...c(n)}),Oe.createWithPreprocess=(e,t,n)=>new Oe({schema:t,effect:{type:`preprocess`,transform:e},typeName:ze.ZodEffects,...c(n)});var ke=class extends l{_parse(e){return this._getType(e)===a.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};e.ZodOptional=ke,ke.create=(e,t)=>new ke({innerType:e,typeName:ze.ZodOptional,...c(t)});var Ae=class extends l{_parse(e){return this._getType(e)===a.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};e.ZodNullable=Ae,Ae.create=(e,t)=>new Ae({innerType:e,typeName:ze.ZodNullable,...c(t)});var je=class extends l{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===a.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};e.ZodDefault=je,je.create=(e,t)=>new je({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...c(t)});var Me=class extends l{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return(0,i.isAsync)(a)?a.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new t.ZodError(r.common.issues)},input:r.data})})):{status:`valid`,value:a.status===`valid`?a.value:this._def.catchValue({get error(){return new t.ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};e.ZodCatch=Me,Me.create=(e,t)=>new Me({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...c(t)});var Ne=class extends l{_parse(e){if(this._getType(e)!==a.ZodParsedType.nan){let n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:t.ZodIssueCode.invalid_type,expected:a.ZodParsedType.nan,received:n.parsedType}),i.INVALID}return{status:`valid`,value:e.data}}};e.ZodNaN=Ne,Ne.create=e=>new Ne({typeName:ze.ZodNaN,...c(e)}),e.BRAND=Symbol(`zod_brand`);var Pe=class extends l{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}};e.ZodBranded=Pe;var Fe=class e extends l{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?i.INVALID:e.status===`dirty`?(t.dirty(),(0,i.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?i.INVALID:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:ze.ZodPipeline})}};e.ZodPipeline=Fe;var Ie=class extends l{_parse(e){let t=this._def.innerType._parse(e),n=e=>((0,i.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,i.isAsync)(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};e.ZodReadonly=Ie,Ie.create=(e,t)=>new Ie({innerType:e,typeName:ze.ZodReadonly,...c(t)});function Le(e,t){let n=typeof e==`function`?e(t):typeof e==`string`?{message:e}:e;return typeof n==`string`?{message:n}:n}function Re(e,t={},n){return e?P.create().superRefine((r,i)=>{let a=e(r);if(a instanceof Promise)return a.then(e=>{if(!e){let e=Le(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}});if(!a){let e=Le(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}}):P.create()}e.late={object:me.lazycreate};var ze;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(ze||(e.ZodFirstPartyTypeKind=ze={})),e.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>Re(t=>t instanceof e,t);var Be=re.create;e.string=Be;var Ve=j.create;e.number=Ve,e.nan=Ne.create,e.bigint=ae.create;var He=oe.create;e.boolean=He,e.date=se.create,e.symbol=ce.create,e.undefined=M.create,e.null=N.create,e.any=P.create,e.unknown=le.create,e.never=ue.create,e.void=de.create,e.array=fe.create,e.object=me.create,e.strictObject=me.strictCreate,e.union=he.create,e.discriminatedUnion=F.create,e.intersection=I.create,e.tuple=ve.create,e.record=ye.create,e.map=be.create,e.set=xe.create,e.function=L.create,e.lazy=Se.create,e.literal=Ce.create,e.enum=Te.create,e.nativeEnum=Ee.create,e.promise=De.create;var Ue=Oe.create;e.effect=Ue,e.transformer=Ue,e.optional=ke.create,e.nullable=Ae.create,e.preprocess=Oe.createWithPreprocess,e.pipeline=Fe.create,e.ostring=()=>Be().optional(),e.onumber=()=>Ve().optional(),e.oboolean=()=>He().optional(),e.coerce={string:(e=>re.create({...e,coerce:!0})),number:(e=>j.create({...e,coerce:!0})),boolean:(e=>oe.create({...e,coerce:!0})),bigint:(e=>ae.create({...e,coerce:!0})),date:(e=>se.create({...e,coerce:!0}))},e.NEVER=i.INVALID})),_yn=s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(fyn(),e),n(pyn(),e),n(myn(),e),n(G7(),e),n(gyn(),e),n(uyn(),e)})),vyn=s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;var a=r(_yn());e.z=a,i(_yn(),e),e.default=a})),yyn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.recommendationPropsSchema=e.calculatorParamsSchema=e.activitySchema=e.activityReductionSchema=void 0;var t=vyn(),n=b0(),r=z7(),i=L7(),a=(e,n)=>t.z.number().refine(t=>t>=e.min&&t<=e.max,{message:n}),o=e.activityReductionSchema=t.z.object({fromZero:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromThirty:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromFortysix:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromSixtyone:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS).nullable()}),s=e.activitySchema=t.z.object({activityDuration:a(r.ACTIVITY_DURATION_MINUTES_LIMITS),activityIntensity:t.z.nativeEnum(n.ActivityIntensity).nullable(),activitySettings:t.z.object({light:o,moderate:o,hard:t.z.object({...o.shape,fromFortysix:a(r.ACTIVITY_SETTINGS_INTERVAL_LIMITS).nullable()}),post:o,target:a(r.ACTIVITY_TARGET_BGL_MMOL_LIMITS)}),activityDate:t.z.date()}).nullable(),c=e.calculatorParamsSchema=t.z.object({glucoseReading:t.z.object({value:t.z.number(),unit:t.z.nativeEnum(n.BloodGlucoseUnit),source:t.z.enum([`manual`,`forecast`,`device`,`external`,`cgm`]),timestamp:t.z.number(),id:t.z.string().uuid()}),targetBGL:a(r.TARGET_BGL_MMOL_LIMITS),insulinSensitivity:a(r.INSULIN_SENSITIVITY_MMOL_LIMITS),carbohydrates:a(r.CARBOHYDRATES_LIMITS),carbohydrateRatio:a(r.INSULIN_TO_CARBS_RATIO_LIMITS),recentBoluses:t.z.array(t.z.object({secondsPassed:a(r.BOLUS_SECONDS_PASSED_LIMITS),insulinDose:a(r.INSULIN_DOSE_LIMITS),id:t.z.string().uuid()})),activity:s});e.recommendationPropsSchema=t.z.object({bloodGlucoseUnit:t.z.nativeEnum(n.BloodGlucoseUnit),injectionMethod:t.z.nativeEnum(n.InjectionMethod),language:t.z.enum([`da`,`de`,`en`,`es`,`fr`,`it`,`sv`,`pl`]),calculatorParams:c,colorScheme:t.z.nativeEnum(i.ColorScheme)})})),byn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SyncStatus=e.RecommendationScreen=void 0;var t=O(m()),n=(V(),d(wm)),r=(l0(),d(T2t)),i=lin(),a=b0(),o=D(Ivn()),s=D(Kvn()),c=D(qvn()),l=D(Qvn()),u=D($vn()),f=D(eyn()),p=D(tyn()),h=D(nyn()),g=D(ryn()),_=D(iyn()),v=D(ayn()),y=D(oyn()),b=D(syn()),x=D(lyn()),S=z7(),C=R7(),w=B7(),T=yyn(),E=Xq();function D(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(O=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}var k=e.SyncStatus=function(e){return e.Idle=`Idle`,e.Success=`Success`,e.Loading=`Loading`,e.Failure=`Failure`,e}({}),A=e=>{let d=(0,r.useSafeAreaInsets)(),{changeLanguage:m}=(0,w.useLanguage)(),D=(0,C.useSemanticColors)(),{height:O}=(0,n.useWindowDimensions)(),A=(0,t.useMemo)(()=>O-d.bottom-d.top,[O,d.bottom,d.top]),ee=(0,t.useRef)(null),{deleteStatus:ne,editStatus:re,saveStatus:ie,calculatorParams:j,bloodGlucoseUnit:ae,injectionMethod:oe,transferEditedRecommendation:se,closeCalculationFooter:ce,closeCalculationTimeoutModal:M,deleteCalculation:N,closeCalculationViewInlogbook:P,trackRecommendationTimeout:le,trackExpandDetails:ue}=e,{glucoseReading:de,carbohydrates:fe,activity:pe}=j,me=(0,t.useRef)((0,i.calculateRecommendation)(j)).current,[he,ge]=(0,t.useState)(null),[F,_e]=(0,t.useState)(null),[I,ve]=(0,t.useState)(null),[ye,be]=(0,t.useState)(null),[xe,L]=(0,t.useState)(0),[Se,Ce]=(0,t.useState)(0),[we,Te]=(0,t.useState)(0),[Ee,De]=(0,t.useState)(!0),[Oe,ke]=(0,t.useState)(!1),[Ae,je]=(0,t.useState)(!1),[Me,Ne]=(0,t.useState)(!0),[Pe,Fe]=(0,t.useState)(!1),[Ie,Le]=(0,t.useState)(!1),[Re,ze]=(0,t.useState)(!1),[Be,Ve]=(0,t.useState)(!1),[He,Ue]=(0,t.useState)(!1),[We,Ge]=(0,t.useState)(!1),[Ke,qe]=(0,t.useState)(!1),[Je,Ye]=(0,t.useState)(!1),[Xe,Ze]=(0,t.useState)(!1),[Qe,$e]=(0,t.useState)(!1);(0,t.useEffect)(()=>{ne===k.Failure&&Ze(!0)},[ne]),(0,t.useEffect)(()=>{ie===k.Failure&&Ye(!0)},[ie]),(0,t.useEffect)(()=>{re===k.Success&&(ge(F),ve(ye))},[ne,re,ye,F,ie]),(0,t.useEffect)(()=>{T.recommendationPropsSchema.parse(e),m(e.language)},[m,e]),(0,t.useEffect)(()=>{me.wasLimited&&qe(!0)},[me.wasLimited]),(0,t.useEffect)(()=>{let e=me.recommendationDate.getTime(),t=setInterval(()=>{new Date().getTime()-e>S.TIMEOUT_MODAL_TRIGGER&&!We&&!Re&&(ze(!0),Ge(!0),le())},a.Milliseconds.Second*1);return()=>clearInterval(t)},[Re,We,me,le]);let et=(0,t.useCallback)(e=>{let t=me.recommendationDate.getTime(),n=new Date().getTime()-t>S.TIMEOUT_MODAL_TRIGGER;e===`active`&&n&&!Be&&(Ge(!0),le())},[me,le,Be]),tt=(0,t.useCallback)(()=>(Ue(!0),!0),[]);(0,t.useEffect)(()=>{let e=n.AppState.addEventListener(`change`,et),t=null;return n.Platform.OS===`android`&&(t=n.BackHandler.addEventListener(`hardwareBackPress`,tt)),()=>{e.remove(),t?.remove()}},[et,tt]);let nt=(0,t.useMemo)(()=>{if(pe)return{activityDuration:pe.activityDuration,activityIntensity:pe.activityIntensity,activityReduction:me.activityReduction}},[pe,me.activityReduction]),rt=(0,t.useCallback)(e=>{n.LayoutAnimation.configureNext(n.LayoutAnimation.Presets.easeInEaseOut);let t=(0,i.roundInsulinValue)(me.bolus,oe),r=Math.round(me.carbRecommendation),a=e===t?null:e;e===t?(ge(null),_e(null)):_e(e),se({modified:I,suggested:r},{modified:a,suggested:t},me.recommendationDate)},[me,oe,I,se]),it=(0,t.useCallback)(e=>{n.LayoutAnimation.configureNext(n.LayoutAnimation.Presets.easeInEaseOut);let t=(0,i.roundInsulinValue)(me.bolus,oe),r=Math.round(me.carbRecommendation),a=e===r?null:e;e===r?(ve(null),be(null)):be(e),se({modified:a,suggested:r},{modified:he,suggested:t},me.recommendationDate)},[me,oe,he,se]),at=(0,t.useCallback)(()=>{Pe&&N()},[N,Pe]),ot=(0,t.useCallback)(()=>{Ve(!0),Ie?P():M()},[Ie,M,P]),st=(0,t.useCallback)(()=>{Le(!0),Ge(!1)},[]),ct=(0,t.useCallback)(()=>{Fe(!0),Ue(!1)},[]),lt=(0,t.useCallback)(()=>{re===k.Failure&&$e(!0)},[re]),ut=(0,t.useCallback)(()=>{$e(!1)},[]),dt=(0,t.useCallback)((e,t)=>{Te(t)},[]),ft=(0,t.useCallback)(()=>{ee?.current?.scrollToEnd(),je(!0),setTimeout(()=>Ne(!1),1)},[]),pt=(0,t.useCallback)(e=>{let{layoutMeasurement:{height:t},contentOffset:{y:n}}=e.nativeEvent,r=Math.round(t+n),i=r>=we-xe,a=r>=Math.round(we);ke(i),Ee&&De(!1),a&&je(!0),a&&setTimeout(()=>Ne(!1),1)},[xe,we,Ee]),mt=(0,t.useMemo)(()=>Math.round(Se+xe),[Se,xe]);return Re?(0,E.jsx)(n.View,{style:[{flex:1,backgroundColor:D.bgPrimary}],children:(0,E.jsx)(n.View,{style:te.timeoutContainer,children:(0,E.jsx)(b.default,{isVisible:We,onPressViewInLogbook:st,onPressCancel:()=>Ge(!1),onDismiss:ot})})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(n.ScrollView,{ref:ee,scrollEventThrottle:16,style:[te.scrollView,{backgroundColor:D.bgPrimary}],contentContainerStyle:Ae&&te.scrollViewContentContainer,testID:`recommendation-screen`,onScroll:pt,onContentSizeChange:dt,children:[(0,E.jsxs)(n.View,{testID:`recommendation-content`,onLayout:({nativeEvent:e})=>Ce(e.layout.height),style:te.content,children:[(0,E.jsxs)(n.View,{style:[te.mainContainer,{backgroundColor:D.bgSecondary}],children:[(0,E.jsx)(f.default,{isEdited:he!==null}),(0,E.jsx)(p.default,{initialValue:(0,i.roundInsulinValue)(me.bolus,oe),editedValue:he,injectionMethod:oe,wasLimited:me.wasLimited,onDismiss:lt,onConfirm:rt}),(0,E.jsx)(c.default,{}),(0,E.jsx)(l.default,{glucoseReading:de,bloodGlucoseUnit:ae,trackExpandDetails:ue,carbIntakeValue:Math.round(fe),activeInsulin:Math.round(me.activeInsulin*10)/10,activity:nt})]}),(0,E.jsxs)(n.View,{style:te.carbsContainer,children:[Math.round(me.carbRecommendation)>0&&(0,E.jsx)(s.default,{carbsRecommendation:Math.round(me.carbRecommendation),editedCarbsRecommendation:I,onDismiss:lt,onConfirm:it}),(0,E.jsx)(o.default,{glucoseReading:de,hasActivity:pe!==null,bloodGlucoseUnit:ae})]})]}),mt>A&&Me&&(0,E.jsx)(u.default,{prefixTestID:`scroll`,onSave:ft,onDelete:ft,onLayout:({nativeEvent:e})=>L(e.layout.height)})]}),(0,E.jsx)(x.default,{scrollToEnd:ft,isVisibleArrow:mt>A&&Ee,isVisibleBlur:mt>A&&!Oe&&!Ae}),(mt<=A||Ae)&&(0,E.jsx)(u.default,{prefixTestID:`fixed`,onSave:ce,onDelete:()=>Ue(!0),onLayout:({nativeEvent:e})=>L(e.layout.height)}),(0,E.jsx)(v.default,{isVisible:Ke,activityReduction:me.activityReduction,onPress:()=>qe(!1)}),(0,E.jsx)(g.default,{isVisible:He,onPressDelete:ct,onDismiss:at,onPressCancel:()=>Ue(!1)}),(0,E.jsx)(h.default,{isVisible:Xe,onPressClose:()=>Ze(!1)}),(0,E.jsx)(y.default,{isVisible:Je,onPressClose:()=>Ye(!1)}),(0,E.jsx)(_.default,{isVisible:Qe,onPressClose:ut})]})};e.RecommendationScreen=A;var ee=e=>(0,E.jsx)(w.LanguageProvider,{children:(0,E.jsx)(C.ColorSchemeProvider,{colorScheme:e.colorScheme,children:(0,E.jsx)(A,{...e})})}),te=n.StyleSheet.create({timeoutContainer:{flex:1,opacity:.5},scrollView:{flex:1},scrollViewContentContainer:{paddingBottom:32},content:{gap:32,paddingVertical:32},mainContainer:{borderRadius:16,marginHorizontal:16},carbsContainer:{paddingHorizontal:16}});e.default=ee})),K7=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RecommendationScreenWrapper",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"SyncStatus",{enumerable:!0,get:function(){return t.SyncStatus}}),Object.defineProperty(e,"recommendationPropsSchema",{enumerable:!0,get:function(){return n.recommendationPropsSchema}});var t=r(byn()),n=yyn();function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}}))();function q7(e,t){return+H2(e)<+H2(t)}function xyn(e,t){return+H2(e)==+H2(t)}function Syn(e){let{glucoseLevelTargets:t}=H6;if(t===void 0)throw Error(`[ParameterTimeIntervalsUtils::getBGLParameters] glucoseLevelTargets is undefined.`);let n=t.use===Y.Usage.Overall,{overallTargetBGL:r,targetBGLIntervals:i}=t;if(n){if(r===void 0)throw Error(`[ParameterTimeIntervalsUtils::getBGLParameters] overallTargetBGL cannot be undefined`);return r}if(i===void 0)throw Error(`[ParameterTimeIntervalsUtils::getBGLParameters] targetBGLIntervals cannot be undefined`);return wyn(e,i)}function Cyn(e){let t=H6.treatmentParameters?.use===Y.Usage.Overall,{treatmentParameters:n}=H6;if(n===void 0)throw Error(`[ParameterTimeIntervalsUtils::getInsulinParameters] treatmentParameters is undefined.`);return t?n.overallParameters:wyn(e,n.parameterIntervals)}function wyn(e,t){let n=Y6(e,`HH:mm`),r=Tyn(t),i=k7(n,`HH:mm`,new Date);for(let e=0;e<r.length;e++)if(Eyn(r[e],r[(e+1)%r.length],i))return t[e];throw Error(`[ParameterTimeIntervalsUtils::getDailyParameters] The parameter interval has not been found`)}function Tyn(e){let t=[];for(let n of e)t.push(k7(n.startTime,`HH:mm`,new Date));return t}function Eyn(e,t,n){let r=q7(e,t),i=xyn(e,n)||q7(e,n),a=Dyn(e),o=Dyn(t,!r),s=Dyn(n,!i);return a<=s&&s<o}function Dyn(e,t){return e.getMinutes()+(e.getHours()+(t?24:0))*60}V();var Oyn=1600;function kyn({setRemeasurementNotification:e}){let{t,language:n}=RK(),{colorScheme:r}=d0(),i=A5(),{selectedEventUUID:a}=h5(),{manualCarbsInput:o,foodIntakeCarbsAmount:s,saveCarbohydrates:c}=q8(),{noteId:l}=X8(),u=XQ(),d=(0,H.useRef)(!1),[f,p]=H.useState(!1),[m,h]=H.useState(null),[g,_]=H.useState(null),{glucoseUnit:v,injectionMethod:y,activity:b}=H6;if(v===void 0)throw Error(`[LoadingRecommendationScreen::render] glucoseUnit is undefined`);if(y===void 0)throw Error(`[LoadingRecommendationScreen::render] injectionMethod is undefined`);if(b===void 0)throw Error(`[LoadingRecommendationScreen::render] activity is undefined`);if(i===null)throw Error(`[LoadingRecommendationScreen::render] selectedGlucoseReading is undefined`);let x=(0,H.useMemo)(()=>i8.getRecentBoluses(),[]),S=(0,H.useMemo)(()=>a?F6.getByUUID(a):null,[a]),C=(0,H.useMemo)(()=>{if(!S?.startTimestamp)return null;let e={activitySettings:b,activityDate:new Date(S.startTimestamp),activityDuration:S.durationSeconds/60,activityIntensity:S.activityIntensity};try{return(0,N6.getReduction)(e.activityDuration,e.activitySettings,e.activityIntensity,e.activityDate),e}catch(e){return console.error(`Error calculating activity reduction for recommendation`,e),null}},[b,S]),w=(0,H.useMemo)(()=>{let{target:e}=Syn(new Date),{carbohydrateRatio:t,insulinSensitivity:a}=Cyn(new Date);return{bloodGlucoseUnit:v,injectionMethod:y,language:n,colorScheme:r,calculatorParams:{glucoseReading:i,activity:C,carbohydrateRatio:t,insulinSensitivity:a,carbohydrates:o+s,targetBGL:e,recentBoluses:x}}},[v,y,n,r,i,C,o,s,x]),T=(0,H.useCallback)(async()=>{let t=K7.recommendationPropsSchema.safeParse(w);if(!t.success){C6(S6.RecommendationInvalid),console.error(t.error),_(zK.Validation);return}try{let{activeInsulin:t,carbRecommendation:n,bolus:r,activityReduction:a,recentBolusesIds:u,recommendationDate:d}=(0,N6.calculateRecommendation)(w.calculatorParams),f=o+s,p=Q6(w.calculatorParams.glucoseReading.value,w.calculatorParams.glucoseReading.unit,Y.BloodGlucoseUnit.MMOL_L),m=(0,N6.roundInsulinValue)(r,w.injectionMethod),g=Math.round(n),v=i.source===`external`||i.source===`forecast`,y=null,b=null;try{let e=await c(d);y=e?.sampleId??null,b=e?.foodIntakeId??null}catch(e){console.error(`[LoadingRecommendationScreen::saveRecommendation] saveCarbohydrates failed:`,e)}let x=await i8.addLogbook(Van({blood_glucose_millimolar:p,blood_glucose_millimolar_sample_id:v?i.sampleId:null,glucose_sample_source_id:v?i.sourceId:null,entry_timestamp:d,event_uuid:S?S.uuid:null,is_bolus_calculation:!0,carbohydrates_suggested_grams:g,carbohydrates_entered_grams:f+g,carbohydrates_input_grams:f,carbohydrates_sample_id:y,carbohydrates_manual_grams:o||null,carbohydrates_food_grams:s||null,food_intake_id:b,insulin_entered_units:m,insulin_suggested_units:m,active_insulin:t,activity_reduction:a,active_insulin_source_logbook_ids:u,note_id:l}));if(x===null){_(zK.Sync);return}if(x.blood_glucose_millimolar!==null&&e!==void 0)try{await e(x.blood_glucose_millimolar)}catch(e){console.error(`[LoadingRecommendationScreen::saveRecommendation] Remeasurement reminder failed:`,e)}h(x),C6(S6.RecommendationSuccess)}catch(e){console.error(`[LoadingRecommendationScreen::saveRecommendation] Unexpected error:`,e),_(zK.System)}},[w,S,i,o,e,s,c,l]);return d.current||(d.current=!0,T().catch(console.error)),(0,H.useEffect)(()=>{setTimeout(()=>{p(!0)},Oyn)},[]),(0,H.useEffect)(()=>(u.setOptions({gestureEnabled:!1}),u.addListener(`beforeRemove`,({preventDefault:e})=>{f||e()})),[f,u]),(0,H.useEffect)(()=>{f&&m!==null&&g===null&&u.replace(Q.Recommendation,{...w,logbookEntry:zan(m)}),f&&g!==null&&u.navigate(Q.Calculation,{errorType:g})},[g,f,m,w,u]),(0,W.jsxs)(B,{style:J7.animationContainer,children:[(0,W.jsx)(S4,{autoPlay:!0,source:C4.LOADING_RECOMMENDATION,style:J7.animation,webStyle:J7.animation,resizeMode:`cover`,loop:!0}),(0,W.jsx)(X,{style:J7.text,children:t(`recommendation_loading_title`)})]})}var J7=R.create({animationContainer:{flex:1,justifyContent:`center`,alignItems:`center`},text:{...q.Poppins.bold_Base,marginTop:32},animation:{width:128,height:128}}),Ayn=S5(kyn),jyn=async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),5e3);try{return(await fetch(`${NK.HEDIA_API_URL}/ping`,{headers:UK,signal:e.signal})).ok}catch{return!1}finally{clearTimeout(t)}};V(),l0();function Myn(){let{COLORS:e}=J(),t=XQ(),n=QQ(),{manualCarbsInput:r,foodIntakeCarbsAmount:i}=q8(),{colorScheme:a}=d0(),[o,s]=(0,H.useState)(K7.SyncStatus.Idle),[c,l]=(0,H.useState)(K7.SyncStatus.Idle),[u,d]=(0,H.useState)(K7.SyncStatus.Idle),{bloodGlucoseUnit:f,calculatorParams:p,injectionMethod:m,language:h,logbookEntry:g}=n.params,[_,v]=(0,H.useState)(()=>Ban(g));uyt(),(0,H.useEffect)(()=>{t.setOptions({gestureEnabled:!1})},[t]);let y=(0,H.useCallback)(async(e,t)=>{d(K7.SyncStatus.Loading);let n=r+i,a=Van({..._,insulin_entered_units:t.modified??t.suggested,carbohydrates_overwritten_suggested_grams:e.modified,carbohydrates_entered_grams:n+(e.modified??e.suggested)}),o=await i8.addLogbook(a,_.uuid);o?(v(o),d(K7.SyncStatus.Success)):d(K7.SyncStatus.Failure)},[r,_,i]),b=(0,H.useCallback)(()=>{if(VK)throw Error(`Recommendation::handleOnCloseCalculationViewInLogbook] Cannot view-in-logbook on web`);t.popTo(Q.MainBottomTabs,{screen:Q.LogbooksTab,params:{logbookEntry:zan(_)}}),y5()},[t,_]),x=(0,H.useCallback)(()=>{VK?(window.location.href=`/redirect?status=success`,PK.clearAll()):t.popTo(Q.MainBottomTabs,{screen:Q.DashboardTab,params:{screen:Q.Dashboard}}),y5()},[t]),S=(0,H.useCallback)(async()=>{s(K7.SyncStatus.Loading);let e=await i8.deleteLogbook(_.uuid);VK?e?(window.location.href=`/redirect?status=success`,y5(),PK.clearAll()):s(K7.SyncStatus.Failure):(y5(),t.popTo(Q.MainBottomTabs,{screen:Q.DashboardTab,params:{screen:Q.Dashboard,params:{action:nyt.Deleted}}}))},[_.uuid,t]),C=(0,H.useCallback)(async()=>{l(K7.SyncStatus.Loading);let e=()=>{l(K7.SyncStatus.Success),y5(),t.replace(Q.LeavingRecommendation,{logbookEntry:zan(_)})};VK?await jyn()?e():l(K7.SyncStatus.Failure):e()},[t,_]);return(0,W.jsx)(c0,{style:[Nyn.container,{backgroundColor:e.bgPrimary}],children:(0,W.jsx)(K7.RecommendationScreenWrapper,{deleteStatus:o,saveStatus:c,editStatus:u,bloodGlucoseUnit:f,injectionMethod:m,language:h,colorScheme:a,calculatorParams:p,closeCalculationViewInlogbook:b,closeCalculationFooter:C,closeCalculationTimeoutModal:x,transferEditedRecommendation:y,deleteCalculation:S,trackExpandDetails:()=>{C6(S6.RecommendationViewDetailsPress)},trackRecommendationTimeout:()=>{C6(S6.RecommendationExpired)}})})}var Nyn=R.create({container:{flex:1}}),Pyn=e=>[`foods`,`curated`,e],Fyn=e=>{let{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:Pyn(e),queryFn:()=>hin(e),staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{curatedFoods:t,isCuratedFoodsLoading:n,isCuratedFoodsError:r,refetchCuratedFoods:i}},Iyn=e=>[`foods`,`categories`,e],Y7=()=>{let{language:e}=IK(),{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:Iyn(e),queryFn:()=>Sin(e),staleTime:1e3*60*5,networkMode:`offlineFirst`,retry:3});return{foodCategories:t,isFoodCategoriesLoading:n,isFoodCategoriesError:r,refetchFoodCategories:i}},Lyn=()=>{let e=XQ().getParent(Q.NewCalculationStack),t=(0,H.useCallback)(()=>{e?.goBack()},[e]);return{isInCalculationFlow:e!==void 0,dismissFoodLibrary:t}},X7=e=>{let t=XQ(),{isInCalculationFlow:n,dismissFoodLibrary:r}=Lyn(),{addFoodIntakeItem:i}=q8(),{addExtraFoodItem:a}=v5();return{canAddToCalculation:n||!!e,addToCalculation:(0,H.useCallback)((o,s)=>{if(e){a({foodItem:o,amount:s}),n?r():t.popTo(Q.VisualSearch);return}i({foodItem:o,amount:s}),r()},[e,a,n,t,i,r])}},Ryn={tabBarHeight:0,paddingBottomScreenWithTabBar:0},Z7=kK()(jK(e=>({...Ryn,setTabBarHeight:t=>{e({tabBarHeight:t,paddingBottomScreenWithTabBar:t+24})},clear:()=>{e(Ryn)}}),{name:`DIMENSIONS_STORE`,storage:AK(FK)}));V();function zyn({icon:e,message:t}){let{COLORS:n}=J();return(0,W.jsxs)(B,{style:Byn.container,children:[e,(0,W.jsx)(X,{style:[Byn.message,{color:n.labelSecondary}],children:t})]})}var Byn=R.create({container:{flex:1,alignItems:`center`,justifyContent:`center`},message:{...q.Poppins.regular_SM,marginTop:13,textAlign:`center`}}),Q7=(0,H.memo)(zyn),Vyn=({item:e,expandable:t,isExpanded:n,onExpand:r,onPress:i,onAddToCalculation:a,testID:o})=>{let{t:s}=RK(),[c,l]=(0,H.useState)(``),u=l5(e.source===`personal`?e.imageId:null);(0,H.useEffect)(()=>{n||l(``)},[n]);let d=(0,H.useMemo)(()=>I6(Number(c||0),e.measures[0].gramsPerUnit,e.nutritionPer100g.carbohydrates.value),[c,e]),f=(0,H.useCallback)(()=>{a(e,Number(c)||0)},[a,e,c]);return(0,W.jsx)(I5t,{onPress:i,title:e.title,carbsPer100:e.nutritionPer100g.carbohydrates.value,unit:e.measures[0].unit,carbs:d,expandable:t,isExpanded:n,amount:c,imageUri:u,onAddPress:r,onChangeAmount:l,testID:o,children:n&&(0,W.jsx)(I2,{title:s(`foodAmount_button_addToCalculation`),disabled:!c,onPress:f,style:{marginTop:10}})})};V();var Hyn=()=>{let{COLORS:e,isDark:t}=J(),{t:n}=RK(),r=XQ(),{categoryId:i,subcategoryId:a,cameFromVisualSearch:o}=QQ().params,{canAddToCalculation:s,addToCalculation:c}=X7(o),l=U8(s&&HK),{bottomWithScroll:u}=B2(),{paddingBottomScreenWithTabBar:d}=Z7(),{foodCategories:f}=Y7(),p=f.find(e=>e.id===i),m=p?.subcategories.find(e=>e.id===a),{curatedFoods:h,isCuratedFoodsLoading:g}=Fyn(a||i),_=t?p?.color.dark:p?.color.light,v=(t?m?.color.dark:m?.color.light)||_;(0,H.useLayoutEffect)(()=>{r.setOptions({header:()=>(0,W.jsx)(G8,{title:m?.title||p?.title,LeftButton:(0,W.jsx)(Q8,{}),color:v,skipTopInset:s&&HK,overlay:!0})})},[r,m,p,v,s]);let[y,b]=(0,H.useState)(null),x=(0,H.useCallback)(({item:e})=>(0,W.jsx)(Vyn,{item:e,expandable:s,isExpanded:y===e.id,onExpand:()=>b(e.id),onPress:()=>{r.navigate(Q.CuratedFoodItem,{foodId:e.id,categoryId:a||i,cameFromVisualSearch:o})},onAddToCalculation:c,testID:`curated-food-item-${e.id}`}),[i,a,o,r,s,c,y]),S=(0,H.useCallback)(e=>(0,W.jsx)(L0t,{...e,bottomOffset:16}),[]);return(0,W.jsxs)(B,{style:[$7.screen,{backgroundColor:e.bgPrimary}],children:[v&&(0,W.jsx)(M2.default,{colors:[v,X2(v,0)],style:$7.gradient,pointerEvents:`none`}),g?(0,W.jsx)(w4,{}):(0,W.jsx)(nl,{style:$7.list,data:h,keyExtractor:e=>e.id,renderItem:x,contentContainerStyle:[$7.contentContainer,{paddingTop:l+8,paddingBottom:s?u:d}],scrollEventThrottle:16,keyboardShouldPersistTaps:`handled`,renderScrollComponent:S,ListEmptyComponent:(0,W.jsx)(Q7,{icon:(0,W.jsx)(z8t,{}),message:n(`food_empty_state_no_food`)})})]})},$7=R.create({screen:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},contentContainer:{gap:8,paddingHorizontal:16},list:{flex:1}}),Uyn=[Q.CuratedFoodItem,Q.PersonalFoodItem],Wyn=(e,t)=>{if(e.name!==t.name)return!1;let n=e.params,r=t.params;return n?.categoryId===r?.categoryId&&n?.subcategoryId===r?.subcategoryId},Gyn=(e,t)=>{let n=e.routes.filter(e=>!Uyn.includes(e.name)).map(e=>({name:e.name,params:e.params})),r=t[t.length-1],i=n.findIndex(e=>Wyn(e,r));if(i>=0)return n.slice(0,i+1);let a=t.filter(e=>!n.some(t=>Wyn(t,e)));return[...n,...a]},Kyn=()=>{let e=XQ();return(0,H.useCallback)(t=>{e.dispatch(e=>{let n=Gyn(e,t);return RQ({...e,routes:n,index:n.length-1})})},[e])};V(),O2();var qyn={ringSize:120,strokeWidth:10,gap:14},Jyn={ringSize:36,strokeWidth:4.5,gap:6},Yyn=({totalAmount:e=100,carbsValue:t,carbsUnit:n,size:r=`large`})=>{let{COLORS:i}=J(),{ringSize:a,strokeWidth:o,gap:s}=r===`large`?qyn:Jyn,c=(a-o)/2,l=2*Math.PI*c,u=a/2,d=Math.min(Math.max(t/e,0),1),f=Math.round(t*10)/10,p=d?s:s/2,m=l*d,h=(m+p)/l*360;return(0,W.jsxs)(B,{style:[e9.ringContainer,{width:a,height:a}],children:[(0,W.jsxs)(y2,{width:a,height:a,style:e9.ringSvg,children:[(0,W.jsx)(m2,{cx:u,cy:u,r:c,transform:`rotate(${h}, ${u}, ${u})`,stroke:i.border,strokeWidth:o,fill:`none`,strokeDasharray:[Math.max(l-m-p*2,0),l],strokeLinecap:`round`}),d>0&&(0,W.jsx)(m2,{cx:u,cy:u,r:c,stroke:i.bgFoodCarbsRing,strokeWidth:o,fill:`none`,strokeDasharray:[m,l-m],strokeLinecap:`round`})]}),r===`large`&&(0,W.jsx)(B,{style:e9.ringCenter,children:(0,W.jsxs)(X,{style:[e9.carbsNumber,{color:i.labelPrimary}],maxFontSizeMultiplier:g0.s0,children:[f,(0,W.jsx)(X,{style:[e9.carbsUnit,{color:i.labelPrimary}],children:n})]})})]})},e9=R.create({ringContainer:{alignItems:`center`,justifyContent:`center`},ringSvg:{transform:[{rotate:`-90deg`}],position:`absolute`},ringCenter:{alignItems:`center`,justifyContent:`center`},carbsNumber:{...q.Poppins.semiBold_4XL},carbsUnit:{...q.Poppins.medium_Base}});V();var Xyn=({title:e,color:t,iconUri:n,onPress:r})=>{let{COLORS:i}=J();return(0,W.jsxs)(_p,{style:[Zyn.pill,{borderColor:i.border,backgroundColor:t}],onPress:r,testID:`food-category-pill`,children:[!!n&&(0,W.jsx)(gd,{source:{uri:n},style:Zyn.icon}),(0,W.jsx)(X,{style:[Zyn.label,{color:i.textFoodCategoryPill}],children:e})]})},Zyn=R.create({pill:{flexDirection:`row`,alignItems:`center`,paddingVertical:6,paddingHorizontal:12,borderRadius:32,borderWidth:1},icon:{width:20,height:20,marginRight:4},label:{...q.Poppins.regular_XS}});V();var Qyn=`444`,$yn=({amount:e,onChangeAmount:t,unit:n,carbs:r,autoFocus:i=!1,testID:a})=>{let{t:o}=RK(),{COLORS:s}=J(),[c,l]=(0,H.useState)(!1),u=(0,H.useRef)(null),d=(0,H.useCallback)(()=>{c||u.current?.focus()},[c]);return(0,W.jsxs)(B,{style:t9.inputContainer,children:[(0,W.jsx)(X,{style:[t9.amountLabel,{color:s.labelPrimary}],children:o(`foodAmountInputField_weight`)}),(0,W.jsxs)(Kp,{accessible:!1,onPress:d,style:[t9.inputBox,{backgroundColor:s.bgVsInput,borderColor:c?s.borderInputFocus:s.border}],children:[n===`g`?(0,W.jsx)(t5t,{}):(0,W.jsx)(n5t,{}),(0,W.jsxs)(B,{style:t9.inputValue,children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(X,{"aria-hidden":!0,style:t9.inputSizer,children:Qyn}),(0,W.jsx)(k2,{ref:u,value:e,onChangeText:t,onFocusChange:l,autoFocus:i,selectTextOnFocus:!0,style:[t9.input,{color:s.labelPrimary}],testID:`${a}-food-input`})]}),(0,W.jsx)(X,{style:[t9.inputUnit,{color:s.labelSecondary}],children:n})]})]}),(0,W.jsx)(X,{style:[t9.carbsResult,{color:s.labelSecondary}],children:`= ${e?r:`-`} ${o(`my_food_add_unit`)}`})]})},t9=R.create({inputContainer:{alignItems:`center`,gap:8},amountLabel:{...q.Poppins.regular_Base,textAlign:`center`},inputBox:{alignSelf:`center`,flexDirection:`row`,alignItems:`center`,justifyContent:`center`,gap:10,paddingHorizontal:16,paddingVertical:12,borderRadius:16,borderWidth:1},inputValue:{flexDirection:`row`,alignItems:`center`,gap:3},inputSizer:{...q.Poppins.medium_2XL,opacity:0},input:{position:`absolute`,top:0,bottom:0,left:0,right:0,...q.Poppins.medium_2XL,lineHeight:z.select({ios:0,default:q.Poppins.medium_2XL.lineHeight}),includeFontPadding:!1,textAlign:`right`,padding:0},inputUnit:{...q.Poppins.regular_Base},carbsResult:{...q.Poppins.regular_Base,textAlign:`center`}});V();var ebn=({amount:e,onChangeAmount:t,unit:n,carbs:r,onAdd:i,testID:a})=>{let{t:o}=RK(),{COLORS:s}=J();return(0,W.jsxs)(B,{style:[tbn.container,{borderColor:s.border,backgroundColor:s.bgInputLayer}],children:[(0,W.jsx)($yn,{amount:e,onChangeAmount:t,unit:n,carbs:r,autoFocus:!0,testID:a}),(0,W.jsx)(I2,{title:o(`foodAmount_button_addToCalculation`),onPress:i,disabled:!e,style:tbn.addButton})]})},tbn=R.create({container:{alignSelf:`stretch`,padding:16,gap:16,borderWidth:1,borderRadius:24},addButton:{alignSelf:`center`}});V();var nbn=56,rbn=20,ibn=100,n9=(e,t)=>{if(!e)return`-`;let n=e.value*t/100;return`${Math.round(n*10)/10} ${e.unit}`},abn=(e,t)=>{if(t)for(let n of e){if(n.id===t)return{...n,browseCategoryId:n.id};let e=n.subcategories.find(e=>e.id===t);if(e)return{...e,browseCategoryId:n.id}}},obn=()=>{let{t:e}=RK(),{params:t}=QQ(),{COLORS:n,isDark:r}=J(),{bottomWithScroll:i,topInsideModal:a}=B2(),o=XQ(),{canAddToCalculation:s,addToCalculation:c}=X7(t.cameFromVisualSearch),l=Kyn(),u=[r9.headerRow,{paddingTop:a}],d={paddingTop:a+nbn+rbn,paddingBottom:i},{food:f,isFoodLoading:p,isFoodError:m}=Run(t.foodId),{foodCategories:h}=Y7(),{foodIntakeItems:g}=q8(),[_,v]=(0,H.useState)(()=>{let e=g.find(e=>e.foodItem.id===t.foodId);return e?e.amount.toString():v5.getState().extraFoodItems.find(e=>e.foodItem.id===t.foodId)?.amount.toString()??null}),y=f?.source===`curated`?f:null;(0,H.useEffect)(()=>{y||p||m||o.goBack()},[y,p,m,o]);let b=(0,H.useMemo)(()=>y?I6(Number(_||0),y.measures[0].gramsPerUnit,y.nutritionPer100g.carbohydrates.value):0,[y,_]),x=abn(h,t.categoryId??y?.categoryId),S=r?x?.color.dark:x?.color.light,C=(0,H.useMemo)(()=>{if(!x)return;let e={name:Q.FoodSubcategories,params:{categoryId:x.browseCategoryId}};return x.id===x.browseCategoryId?[e]:[e,{name:Q.CuratedFood,params:{categoryId:x.browseCategoryId,subcategoryId:x.id}}]},[x]),w=(0,H.useCallback)(()=>{C&&l(C)},[C,l]),T=(0,H.useCallback)(()=>{y&&c(y,Number(_)||0)},[y,_,c]),E=s&&Number(_)>0?Number(_):ibn,D=(0,H.useMemo)(()=>{if(!y)return[];let t=E*y.measures[0].gramsPerUnit;return[{id:`1`,title:e(`food_library_item_carbohydrates`),value:n9(y.nutritionPer100g.carbohydrates,t)},{id:`2`,title:e(`food_library_item_energy`),value:n9(y.nutritionPer100g.energy,t)},{id:`3`,title:e(`food_library_item_protein`),value:n9(y.nutritionPer100g.protein,t)},{id:`4`,title:e(`food_library_item_sugar`),value:n9(y.nutritionPer100g.sugar,t)},{id:`5`,title:e(`food_library_item_fibers`),value:n9(y.nutritionPer100g.fibers,t)},{id:`6`,title:e(`food_library_item_fat`),value:n9(y.nutritionPer100g.fat,t)},{id:`7`,title:e(`food_library_item_sfat`),value:n9(y.nutritionPer100g.saturatedFat,t)}]},[e,y,E]);return y?(0,W.jsxs)(B,{style:r9.screen,children:[!!S&&(0,W.jsx)(M2.default,{colors:[S,X2(S,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsxs)(ys,{style:r9.scrollableContent,contentContainerStyle:d,keyboardDismissMode:`on-drag`,keyboardShouldPersistTaps:`handled`,children:[(0,W.jsxs)(B,{style:r9.topSection,children:[(0,W.jsx)(X,{style:[r9.title,{color:n.labelPrimary}],numberOfLines:2,children:y.title}),s?(0,W.jsx)(ebn,{amount:_||``,onChangeAmount:v,unit:y.measures[0].unit,carbs:b,onAdd:T,testID:`curated-food-item-input`}):(0,W.jsxs)(B,{style:r9.carbsContainer,children:[(0,W.jsx)(Yyn,{totalAmount:100,carbsValue:y.nutritionPer100g.carbohydrates.value,carbsUnit:y.nutritionPer100g.carbohydrates.unit}),(0,W.jsx)(X,{style:[r9.carbsLabel,{color:n.labelPrimary}],children:`${Math.round(y.nutritionPer100g.carbohydrates.value*10)/10} carbs / 100${y.nutritionPer100g.carbohydrates.unit}`})]})]}),(0,W.jsxs)(B,{style:r9.section,children:[!!x&&(0,W.jsxs)(B,{style:r9.categorySection,children:[(0,W.jsx)(X,{style:[r9.categorySectionTitle,{color:n.labelSecondary}],children:e(`food_library_info_category`)}),(0,W.jsx)(Xyn,{title:x.title,color:S,iconUri:x.icon,onPress:w})]}),(0,W.jsx)(X,{style:[r9.contentsTitle,{color:n.labelPrimary}],children:e(`food_library_carb_body`,{amount:E.toString(),unit:y.measures[0].unit})}),D.map(e=>(0,W.jsxs)(B,{style:[r9.contentsRow,{borderBottomColor:n.border}],children:[(0,W.jsx)(X,{style:[r9.contentsText,{color:n.labelSecondary}],children:e.title}),(0,W.jsx)(X,{style:[r9.contentsText,{color:n.labelSecondary}],children:e.value})]},e.id)),(0,W.jsx)(B,{style:[r9.contentsRow,{borderBottomColor:n.bgTransparent}],children:(0,W.jsx)(X,{style:[r9.contentsText,{color:n.labelSecondary}],children:`${e(`food_library_source`)} ${y.provider.name}`})})]})]}),(0,W.jsx)(B,{style:u,children:(0,W.jsx)($8,{})})]}):(0,W.jsxs)(B,{style:r9.screen,children:[!!S&&(0,W.jsx)(M2.default,{colors:[S,X2(S,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsx)(B,{style:r9.topSection,children:(0,W.jsx)(B,{style:u,children:(0,W.jsx)($8,{})})}),m?(0,W.jsx)(Q7,{icon:(0,W.jsx)(G8t,{}),message:e(`food_offline_state_default`)}):(0,W.jsx)(w4,{})]})},r9=R.create({screen:{flex:1},topSection:{alignItems:`center`,paddingHorizontal:16,marginBottom:32},headerRow:{position:`absolute`,top:0,left:0,right:0,flexDirection:`row`,justifyContent:`space-between`,paddingHorizontal:16,paddingBottom:10},title:{...q.Poppins.medium_2XL,textAlign:`center`,marginBottom:32,paddingHorizontal:16},carbsContainer:{alignItems:`center`},carbsLabel:{...q.Poppins.regular_Base,marginTop:12},scrollableContent:{flex:1},section:{paddingHorizontal:16},categorySection:{flexDirection:`row`,alignItems:`center`,marginBottom:45},categorySectionTitle:{...q.Poppins.regular_SM,marginRight:7},contentsTitle:{...q.Poppins.medium_Base,marginBottom:6},contentsRow:{flexDirection:`row`,justifyContent:`space-between`,paddingVertical:10,borderBottomWidth:1},contentsText:{...q.Poppins.regular_Base}}),sbn=[`foods`,`recent`],cbn=e=>{let{data:t=[],isLoading:n,isError:r,refetch:i}=M1({queryKey:sbn,queryFn:gin,enabled:e,networkMode:`offlineFirst`,retry:3});return{recentFoods:t,isRecentFoodsLoading:n,isRecentFoodsError:r,refetchRecentFoods:i}};V();var lbn=({onPress:e,title:t,description:n,imageUrl:r,color:i})=>{let{COLORS:a}=J();return(0,W.jsxs)(_p,{style:[i9.row,{backgroundColor:a.bgSecondary,borderColor:a.buttonBorder}],onPress:e,children:[(0,W.jsx)(B,{style:[i9.imageContainer,{backgroundColor:i}],children:(0,W.jsx)(gd,{source:{uri:r},style:i9.categoryImage,resizeMode:`contain`})}),(0,W.jsxs)(B,{style:i9.textContainer,children:[(0,W.jsx)(X,{style:[i9.title,{color:a.labelPrimary}],numberOfLines:1,ellipsizeMode:`tail`,children:t}),!!n&&(0,W.jsx)(X,{style:[i9.description,{color:a.labelSecondary}],numberOfLines:2,ellipsizeMode:`tail`,children:n})]}),(0,W.jsx)(z2,{width:18,height:18,color:a.labelTertiary})]})},i9=R.create({row:{flexDirection:`row`,alignItems:`center`,borderRadius:16,borderWidth:1,paddingRight:12,paddingVertical:4,paddingLeft:4},imageContainer:{width:80,height:80,borderRadius:12,overflow:`hidden`,alignItems:`center`,justifyContent:`center`,flexShrink:0},categoryImage:{width:68,height:68},textContainer:{flex:1,paddingHorizontal:12,justifyContent:`center`},title:{...q.Poppins.medium_Base},description:{...q.Poppins.regular_SM,marginTop:2}});V();var ubn=VK?{outlineStyle:`none`}:{},dbn=({isSearchActive:e,onSearch:t,onClear:n,onFocus:r,onBlur:i})=>{let{t:a}=RK(),{COLORS:o}=J(),s=(0,H.useRef)(null),[c,l]=(0,H.useState)(``),u=F2t(t,300),d=(0,H.useCallback)(()=>{u.cancel(),l(``),s.current?.blur(),n()},[u,n]),f=(0,H.useCallback)(()=>{c.length>2&&(u.cancel(),t(c))},[u,t,c]),p=(0,H.useCallback)(e=>{if(l(e),e.length>2){u(e);return}u.cancel(),t(e)},[u,t]),m=(0,H.useCallback)(()=>{s.current?.focus()},[]);return(0,W.jsxs)(Kp,{style:[fbn.container,{backgroundColor:o.bgInputActive,borderColor:o.buttonBorder}],onPress:m,accessible:!1,children:[(0,W.jsx)(J8t,{height:24,width:24}),(0,W.jsx)(am,{ref:s,testID:`food-searchbar-input`,autoCapitalize:`none`,placeholder:a(`food_search_title`),placeholderTextColor:o.labelSecondary,cursorColor:o.textSearchText,maxFontSizeMultiplier:g0.s3,style:[fbn.searchInput,{color:o.textSearchText}],multiline:!1,maxLength:64,value:c,onChangeText:p,onSubmitEditing:f,onFocus:r,onBlur:i,autoCorrect:!1,enterKeyHint:`search`}),(e||c.length>0)&&(0,W.jsx)(Kp,{testID:`food-searchbar-clear`,onPress:d,hitSlop:10,children:(0,W.jsx)(F8t,{color:o.labelSecondary,width:16,height:16})})]})},fbn=R.create({container:{flex:1,flexDirection:`row`,alignItems:`center`,height:48,borderRadius:16,borderWidth:1,paddingLeft:16,paddingRight:12,gap:4},searchInput:{...q.Poppins.regular_Base,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),flex:1,includeFontPadding:!1,...ubn}});V();function pbn({showScanButton:e,isSearchActive:t,onSearch:n,onClearSearch:r,onSearchFocus:i,onSearchBlur:a,onScanFoodPress:o}){return(0,W.jsxs)(B,{style:mbn.row,children:[(0,W.jsx)(dbn,{isSearchActive:t,onSearch:n,onClear:r,onFocus:i,onBlur:a}),e&&!VK&&(0,W.jsx)(R7t,{onPress:o,style:{width:48,height:48}})]})}var mbn=R.create({row:{flexDirection:`row`,alignItems:`center`,gap:10,paddingVertical:12}}),hbn=(0,H.memo)(pbn),gbn=`data:image/webp;base64,UklGRqwGAABXRUJQVlA4TJ8GAAAvM8AMEE0oaCNJyfE9jH/DDxYi+j8BcoXDgFIRnRNExMNMfhdsG0lS1PlHeWTxmWMd/8fANpIkJ2O+1hINFvkHR2EybiNJUS3lnyLjMcOr/wl8tTEewt/BAkAPrxMxpqpjHe8PAP1ae4kmWI6hfjMAAFyvxokxwBUa+AHdaPsfScr7/bp79MytRMMUrhaBQCgUCWASgJaW1kQBCeBJT2tYvT37+30WVT1jnkW5tm3VtjLmXHufe7+7G64JkBYhEJJrkQjcE6DkdmWvSce2bdVWNcZauENII3QLnRxCqAq1okSWu/uXI2tKAQSAAJx72zabjZnRthW35PxtzbbtJdu2bdsTAAQAbif1O88Cf/joSeqdl87l3z9OJT++nfn54tsfXwL//+e5T04FvHCx0tubF7Kamv8t/z559pMPr4F/W/ri0Z2ku+6fH/7iu48nPfjWmzbst8q4lkouWvfVB19L7h+HLjz99Ym9wC8AAPAQHfz2C+eHXF1ex55cSF6yxmlqcfH4h8OLB1/EWlcvLx9dCbzcxjuvPGz1mpYFZ3Uy7Z9d2PBWGHHjiTrbkbO0/f98TMHyV0YC7wDN3xX39f2LC/68cqDP6eVFzEU7MZ6aDqwKy/0R81G3upXxwP7h3n3+Yee3D//MOKH1bJA2BbUKiGhYtYfRzW4V9K69m6978fE1Xz5/a8PJDbuc7RfaL9r5r/GIeY3FGAcbjicWuyMuxvEP05MDgL1Dvf/K7cKPfv86u/3vjytwOY/ZDJSRGiayADE94vi3xfmtA/7scxu++f6Wy4f0qct/abeo/UJzMZ2bicdsK4e7sZ5xzyyaR/0xzz4xtgPuDgO8L3fW/Sfi9g67mx59IxsmkkjCQg30Ku2IdcpvTbvv/q3UeVbd1jYarkC7JLJGKQzKmHrcajTT2MSpgGEPr526DMnbX9Gs6BvXZ0FUB27JQGFKb5w3FlVGGv9N+NTKoxTSMCMBGkWkYQeOsWKy0Gt6nv1zvHgQ4MPk4tnLez4UsTpHdXghT0jCkntIUSo2JPXgPxBVptU2QWUUQSIJNJwoiiwDCSPUCJOa+NXVpWEQ4PKPh583JtWmKILqqEZGpUFgVBoV0UrrElXKqLDRyN7RwxIaTliBhSWhUXiEhHPhGygdBNj395xPY6tzNIhWtiBEKSE1FCm4URQwyqAiGGrYsHcCAA80ChdCUAEUlL9mGY+UDgKsOdsffNjNg2ZBC0Sj5cgMjIjoKBcEFirINBE0ymFCSIJKIaAIIUphNEa5nezQbYQPAqz4tf89rt0hE6s1BNQgyh4CMrAcCRhVC3aKEIoIFVFUAEBoQKWQWqBSjtYX/jv4YhBgC/PIoubicd1onVtIplUAMGFLVrgYlARBVA4bShDYzQoUCC5IESoUbGU11QHt6NODAI4vzvUT/fv3siIFqxRRGe5SIKNSkChg4EYlChmgnYEFCBxYKKLECFeRpIEGfq+LncOcfvnmyCQH7riKrXQQODBygw6nEBjQxQlnAMQwAQKgQEWO8MAKS5ZmtLMs4M7FF8+3DwN8n61ePN43j5Ah5ABAg4WKACyQAhBSCoGMQCHIoEYYUnEhQFPhKvM95offcwAD3zuzfEk/bqZiBIVKFLJkBCAFoQRSICwRESGUYCTBJQoEAlXRDt3CR3ddyMyhgBcraN7bDguLCgW5lJIjEkQV4EFQiQoUgKzAIQTNcweQUEMQexN7nemAwZ8596ID2D2bB7UGCbeUFpFaDjhDEQCCiBaEHBKQLAUKASMqZlN75+w++uXntuGA309dOjZxvR18NqlmQIdSKqjIQBksAKRBZAIQDgq4oBBSQTVa457B0/VaJwC2CNxaw5A7L/SnDR2sEsBpRqYkcIIEhBNmCFHhAhYSEo4wjisfV7UOA2z3+VceDdssI7KRoIATMGCjHk44g4DAwCkSABYceMU1RF5QuYBts7bYDQS7EWd5yex0Dp1R3bxEDxIAlqIlFyOWEoP7IgGwdYsAZoWzKsBBKtCOjmRUN7fczZKQJASEUqkuPiUIsIs3iz9F/uFRikSZqNUKpGABgzk0FJSyf6n6B9hJ4H9/5lvhr0pxitemVqsF94AIF4xOWuLPXvUVsKsb+l0DP2jk2rmLD+AICDw6YwGfj7qbAbvr5E0jviaoII/DPVAZzbJHvTw8ZSpwdIcAk215dnPYrrWzEvsT8lhGlOk5h4+3TAKuA3b6E16Evv/m00G/eBuu3oMWbEse+vzVSuAnYNdtAwiA/4DbHgEA`;V();var _bn=({onPress:e})=>{let{COLORS:t}=J(),{t:n}=RK();return(0,W.jsxs)(_p,{style:[a9.container,{backgroundColor:t.bgSecondary,borderColor:t.buttonBorder}],onPress:e,children:[(0,W.jsx)(B,{style:[a9.imageContainer,{backgroundColor:t.bgMyFoodCategory}],children:(0,W.jsx)(gd,{source:gbn,style:a9.heartImage})}),(0,W.jsx)(X,{style:[a9.title,{color:t.labelPrimary}],numberOfLines:1,children:n(`food_segment_button_my_food`)}),(0,W.jsx)(z2,{width:18,height:18,color:t.labelTertiary})]})},a9=R.create({container:{flexDirection:`row`,alignItems:`center`,borderRadius:16,borderWidth:1,paddingLeft:4,paddingRight:12,paddingVertical:4,gap:12},imageContainer:{width:80,height:52,borderRadius:12,alignItems:`center`,justifyContent:`center`,flexShrink:0},heartImage:{width:52,height:52},title:{...q.Poppins.medium_Base,flex:1}});V();var vbn=e=>`measures`in e,ybn=()=>qf.dismiss(),bbn=()=>{let{t:e}=RK(),{COLORS:t,isDark:n}=J(),{paddingBottomScreenWithTabBar:r}=Z7(),{bottomWithScroll:i}=B2(),a=XQ(),o=QQ(),{isInCalculationFlow:s}=Lyn(),{canAddToCalculation:c,addToCalculation:l}=X7(o.params?.cameFromVisualSearch),u=U8(c&&HK),[d,f]=(0,H.useState)(``),[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(null),_=!s&&!o.params?.cameFromVisualSearch,v=d.length>2,y=`categories`;p&&v?y=`searchResults`:p&&(y=`recentFoods`);let{foodCategories:b,isFoodCategoriesError:x}=Y7(),{recentFoods:S,isRecentFoodsLoading:C,isRecentFoodsError:w}=cbn(y===`recentFoods`),{foodSearchResults:T,isFoodSearchLoading:E,isFoodSearchError:D}=Bun(d);(0,H.useLayoutEffect)(()=>{a.setOptions({headerTransparent:!0,header:()=>(0,W.jsx)(G8,{title:e(`food_library_sheet_navigation`),LeftButton:c?(0,W.jsx)($8,{}):void 0,color:t.bgPrimary,skipTopInset:c&&HK,overlay:!0})})},[a,e,c,t]);let O=(0,H.useCallback)(()=>{m(!0)},[]),k=(0,H.useCallback)(()=>{f(``),g(null),m(!1)},[]),A=(0,H.useCallback)(()=>{if(C6(S6.FoodLibraryScanFoodPress),!v5.getState().privacyNoticeAccepted){a.navigate(Q.VisualSearchIntro);return}a.navigate(Q.VisualSearch)},[a]),ee=(0,H.useCallback)(()=>{a.navigate(Q.PersonalFood,{cameFromVisualSearch:o.params?.cameFromVisualSearch})},[a,o.params]),te=(0,H.useCallback)(({item:e})=>{if(vbn(e))return(0,W.jsx)(Vyn,{item:e,expandable:c,isExpanded:h===e.id,onExpand:()=>g(e.id),onPress:()=>{e.source===`curated`?a.navigate(Q.CuratedFoodItem,{foodId:e.id,categoryId:e.categoryId,cameFromVisualSearch:o.params?.cameFromVisualSearch}):a.navigate(Q.PersonalFoodItem,{foodId:e.id,cameFromVisualSearch:o.params?.cameFromVisualSearch})},onAddToCalculation:l,testID:`food-search-item-${e.id}`});let t=()=>{a.navigate(Q.FoodSubcategories,{categoryId:e.id,cameFromVisualSearch:o.params?.cameFromVisualSearch})},r=e.color.light;return n&&(r=e.color.dark),(0,W.jsx)(lbn,{onPress:t,title:e.title,description:e.description,imageUrl:e.icon,color:r})},[c,a,o.params,l,h,n]),ne=T;y===`categories`?ne=b:y===`recentFoods`&&(ne=S);let re=(0,H.useMemo)(()=>{let t=(0,W.jsx)(Q7,{icon:(0,W.jsx)(G8t,{}),message:e(`food_offline_state_default`)});return y===`categories`?x?t:null:y===`recentFoods`?w?t:C?(0,W.jsx)(w4,{}):null:D?t:E?(0,W.jsx)(w4,{}):(0,W.jsx)(Q7,{icon:(0,W.jsx)(z8t,{}),message:e(`food_empty_state_no_food`)})},[y,x,w,C,D,E,e]),ie=(0,H.useCallback)(e=>(0,W.jsx)(L0t,{...e,bottomOffset:16}),[]),j=(0,H.useMemo)(()=>[o9.contentContainer,{paddingTop:u,paddingBottom:c?i:r}],[u,c,i,r]),ae=(0,W.jsxs)(B,{style:o9.listHeader,children:[(0,W.jsx)(hbn,{showScanButton:_,isSearchActive:p,onSearch:f,onClearSearch:k,onSearchFocus:O,onScanFoodPress:A}),y===`categories`&&(0,W.jsx)(_bn,{onPress:ee}),y===`recentFoods`&&S.length>0&&(0,W.jsxs)(B,{style:o9.recentTitleRow,children:[(0,W.jsx)(q8t,{width:16,height:16}),(0,W.jsx)(X,{style:[o9.recentTitle,{color:t.labelPrimary}],children:e(`food_library_frequent_title`)})]})]});return(0,W.jsxs)(B,{style:[o9.screen,{backgroundColor:t.bgPrimary}],children:[(0,W.jsx)(M2.default,{colors:[t.bgPrimary,X2(t.bgPrimary,0)],style:o9.gradient,pointerEvents:`none`}),(0,W.jsx)(nl,{style:o9.list,data:ne,keyExtractor:e=>e.id,renderItem:te,ListHeaderComponent:ae,ListEmptyComponent:re,contentContainerStyle:j,keyboardDismissMode:VK?`none`:`on-drag`,keyboardShouldPersistTaps:`handled`,onScroll:VK?ybn:void 0,renderScrollComponent:ie,scrollEventThrottle:16})]})},o9=R.create({screen:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},contentContainer:{gap:8,flexGrow:1,paddingHorizontal:16},listHeader:{gap:8},recentTitleRow:{flexDirection:`row`,alignItems:`center`,gap:8},recentTitle:{...q.Poppins.medium_SM},list:{flex:1}});V();var xbn=()=>{let e=QQ(),t=XQ(),{categoryId:n,cameFromVisualSearch:r}=e.params,{canAddToCalculation:i}=X7(r),{COLORS:a,isDark:o}=J(),{bottomWithScroll:s}=B2(),{paddingBottomScreenWithTabBar:c}=Z7(),l=U8(i&&HK),{foodCategories:u}=Y7(),d=u.find(e=>e.id===n),f=o?d?.color.dark:d?.color.light;(0,H.useLayoutEffect)(()=>{t.setOptions({header:()=>(0,W.jsx)(G8,{title:d?.title,LeftButton:(0,W.jsx)(Q8,{}),color:f,skipTopInset:i&&HK,overlay:!0})})},[t,d,f,i]);let p=(0,H.useCallback)((e,n)=>{t.navigate(Q.CuratedFood,{categoryId:n,subcategoryId:e,cameFromVisualSearch:r})},[t,r]),m=(0,H.useCallback)(({item:e})=>(0,W.jsx)(lbn,{onPress:()=>p(e.id,d?.id),title:e.title,imageUrl:e.icon,color:f??a.bgPrimary}),[a,d,f,p]);return(0,W.jsxs)(B,{style:[s9.screen,{backgroundColor:a.bgPrimary}],children:[f&&(0,W.jsx)(M2.default,{colors:[f,X2(f,0)],style:s9.gradient,pointerEvents:`none`}),(0,W.jsx)(nl,{data:d?.subcategories??[],keyExtractor:e=>e.id,renderItem:m,style:s9.list,contentContainerStyle:[s9.contentContainer,{paddingTop:l+8,paddingBottom:i?s:c}],scrollEventThrottle:16})]})},s9=R.create({screen:{flex:1},list:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},contentContainer:{gap:8,paddingHorizontal:16,flexGrow:1}});V();var Sbn=()=>{let{COLORS:e}=J(),{t}=RK(),n=XQ(),{params:r}=QQ(),{canAddToCalculation:i,addToCalculation:a}=X7(r?.cameFromVisualSearch),o=U8(i&&HK),{bottomWithScroll:s}=B2(),{paddingBottomScreenWithTabBar:c}=Z7(),{personalFoods:l,isPersonalFoodsLoading:u}=Fun(),d=l.length===0;(0,H.useLayoutEffect)(()=>{n.setOptions({header:()=>(0,W.jsx)(G8,{title:t(`food_myFood_title`),LeftButton:(0,W.jsx)(Q8,{}),color:e.bgMyFoodCategory,skipTopInset:i&&HK,overlay:!0})})},[n,e,i,t]);let f=(0,H.useCallback)(()=>{n.navigate(Q.CreateFood)},[n]),[p,m]=(0,H.useState)(null),h=(0,H.useCallback)(({item:e})=>(0,W.jsx)(Vyn,{item:e,expandable:i,isExpanded:p===e.id,onExpand:()=>m(e.id),onPress:()=>{n.navigate(Q.PersonalFoodItem,{foodId:e.id,cameFromVisualSearch:r?.cameFromVisualSearch})},onAddToCalculation:a,testID:`personal-food-item-${e.id}`}),[i,n,r?.cameFromVisualSearch,a,p]),g=(0,H.useCallback)(e=>(0,W.jsx)(L0t,{...e,bottomOffset:16}),[]);return(0,W.jsxs)(B,{style:[c9.screen,{backgroundColor:e.bgPrimary}],children:[(0,W.jsx)(M2.default,{colors:[e.bgMyFoodCategory,X2(e.bgMyFoodCategory,0)],style:c9.gradient,pointerEvents:`none`}),u?(0,W.jsx)(w4,{}):(0,W.jsx)(nl,{data:l,keyExtractor:e=>e.id,renderItem:h,style:c9.list,contentContainerStyle:[c9.contentContainer,d?{justifyContent:`center`,paddingTop:o+8,paddingBottom:i?o+8:c}:{paddingTop:o+8,paddingBottom:i?s:c}],scrollEventThrottle:16,keyboardShouldPersistTaps:`handled`,renderScrollComponent:g,ListEmptyComponent:(0,W.jsx)(B,{children:(0,W.jsx)(Q7,{icon:(0,W.jsx)(z8t,{}),message:t(`food_myFood_empty_state_default`)})}),ListFooterComponent:(0,W.jsx)(I2,{title:t(`food_button_createFood`),onPress:f,type:F2.Secondary})})]})},c9=R.create({screen:{flex:1},gradient:{position:`absolute`,top:0,left:0,right:0,height:`50%`},list:{flex:1},contentContainer:{flexGrow:1,gap:8,paddingHorizontal:16}});V();var Cbn=()=>{let{t:e}=RK(),t=XQ(),{params:n}=QQ(),{COLORS:r}=J(),{topInsideModal:i}=B2(),{canAddToCalculation:a,addToCalculation:o}=X7(n.cameFromVisualSearch),s=Kyn(),c=(0,H.useCallback)(()=>{s([{name:Q.PersonalFood}])},[s]),l=[l9.headerRow,{paddingTop:i}],{foodIntakeItems:u}=q8(),{food:d,isFoodLoading:f,isFoodError:p}=Run(n.foodId),[m,h]=(0,H.useState)(()=>{let e=u.find(e=>e.foodItem.id===n.foodId);return e?e.amount.toString():v5.getState().extraFoodItems.find(e=>e.foodItem.id===n.foodId)?.amount.toString()??null}),g=d?.source===`personal`?d:null,_=l5(g?g.imageId:null);(0,H.useEffect)(()=>{g||f||p||t.goBack()},[g,f,p,t]);let v=(0,H.useCallback)(()=>{g&&t.navigate(Q.CreateFood,{personalFoodId:g.id})},[t,g]),y=(0,H.useMemo)(()=>g?I6(Number(m||0),g.measures[0].gramsPerUnit,g.nutritionPer100g.carbohydrates.value):0,[g,m]),b=(0,H.useCallback)(()=>{g&&o(g,Number(m)||0)},[g,m,o]);if(!g)return(0,W.jsxs)(B,{style:l9.screen,children:[(0,W.jsxs)(B,{style:l9.gradient,children:[(0,W.jsx)(M2.default,{colors:[r.bgMyFoodCategory,X2(r.bgMyFoodCategory,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsx)(B,{style:l,children:(0,W.jsx)($8,{})})]}),p?(0,W.jsx)(Q7,{icon:(0,W.jsx)(G8t,{}),message:e(`food_offline_state_default`)}):(0,W.jsx)(w4,{})]});let x=`${Math.round(g.nutritionPer100g.carbohydrates.value*10)/10} carbs / 100${g.nutritionPer100g.carbohydrates.unit}`;return(0,W.jsxs)(B,{style:l9.screen,children:[(0,W.jsxs)(B,{style:l9.gradient,children:[(0,W.jsx)(M2.default,{colors:[r.bgMyFoodCategory,X2(r.bgMyFoodCategory,0)],style:R.absoluteFill,pointerEvents:`none`}),(0,W.jsxs)(B,{style:l,children:[(0,W.jsx)($8,{}),(0,W.jsx)(Aun,{onPress:v})]}),(0,W.jsx)(X,{style:[l9.title,a&&l9.titleInCalculation,{color:r.labelPrimary}],numberOfLines:2,children:g.title}),a?(0,W.jsx)(B,{style:l9.inputCardSection,children:(0,W.jsx)(ebn,{amount:m||``,onChangeAmount:h,unit:g.measures[0].unit,carbs:y,onAdd:b,testID:`personal-food-item-input`})}):(0,W.jsxs)(B,{style:l9.carbsContainer,children:[(0,W.jsx)(Yyn,{totalAmount:100,carbsValue:g.nutritionPer100g.carbohydrates.value,carbsUnit:g.nutritionPer100g.carbohydrates.unit}),(0,W.jsx)(X,{style:[l9.carbsLabel,{color:r.labelPrimary}],children:x})]})]}),(0,W.jsxs)(B,{style:l9.section,children:[(0,W.jsxs)(B,{style:l9.categoryRow,children:[(0,W.jsx)(X,{style:[l9.categorySectionTitle,{color:r.labelSecondary}],children:e(`food_library_info_category`)}),(0,W.jsx)(Xyn,{title:e(`food_segment_button_my_food`),color:r.bgMyFoodCategory,onPress:c})]}),(0,W.jsx)(B,{style:[l9.divider,{backgroundColor:r.border}]}),a&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B,{style:l9.carbsInfoRow,children:[(0,W.jsx)(X,{style:[l9.carbsInfoLabel,{color:r.labelPrimary}],children:x}),(0,W.jsx)(Yyn,{size:`small`,totalAmount:100,carbsValue:g.nutritionPer100g.carbohydrates.value,carbsUnit:g.nutritionPer100g.carbohydrates.unit})]}),(0,W.jsx)(B,{style:[l9.divider,{backgroundColor:r.border}]})]}),(!!g.description||!!_)&&(0,W.jsxs)(B,{style:l9.notesRow,children:[!!g.description&&(0,W.jsx)(X,{style:[l9.description,{color:r.labelSecondary}],children:g.description}),!!_&&(0,W.jsx)(gd,{source:{uri:_},style:l9.foodImage,resizeMode:`cover`})]})]})]})},l9=R.create({screen:{flex:1},gradient:{alignItems:`center`},headerRow:{flexDirection:`row`,justifyContent:`space-between`,alignSelf:`stretch`,paddingHorizontal:16,paddingBottom:10,marginBottom:20},title:{...q.Poppins.medium_2XL,textAlign:`center`,marginBottom:32,paddingHorizontal:16},titleInCalculation:{marginBottom:22},inputCardSection:{alignSelf:`stretch`,paddingHorizontal:16},carbsContainer:{alignItems:`center`},carbsLabel:{...q.Poppins.regular_Base,marginTop:12},notesRow:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:16,gap:8},description:{...q.Poppins.regular_SM,flex:1},foodImage:{width:64,height:64,borderRadius:8},section:{paddingHorizontal:16,marginTop:32,gap:16},categoryRow:{flexDirection:`row`,alignItems:`center`,paddingHorizontal:16},categorySectionTitle:{...q.Poppins.regular_SM,marginRight:7},divider:{height:1},carbsInfoRow:{flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`,paddingHorizontal:16},carbsInfoLabel:{...q.Poppins.regular_Base,flex:1}}),{Group:wbn,Navigator:Tbn,Screen:u9}=V8();function Ebn(){return(0,W.jsxs)(Tbn,{screenOptions:{...n5,header:()=>null,...d8},children:[(0,W.jsx)(u9,{name:Q.FoodAndDrink,component:bbn}),(0,W.jsx)(u9,{name:Q.FoodSubcategories,component:xbn,options:{headerTransparent:!0}}),(0,W.jsx)(u9,{name:Q.PersonalFood,component:Sbn,options:{headerTransparent:!0}}),(0,W.jsx)(u9,{name:Q.CuratedFood,component:Hyn,options:{headerTransparent:!0}}),(0,W.jsxs)(wbn,{screenOptions:{...won,headerShown:!1,gestureEnabled:!1},children:[(0,W.jsx)(u9,{name:Q.PersonalFoodItem,component:Cbn}),(0,W.jsx)(u9,{name:Q.CuratedFoodItem,component:obn})]})]})}var{Navigator:Dbn,Screen:d9}=V8();function Obn(){let{COLORS:e}=J();return(0,W.jsxs)(Dbn,{id:`NewCalculationStack`,screenOptions:{headerShown:!1,...d8},children:[(0,W.jsx)(d9,{name:Q.Calculation,component:Tvn,options:{headerShown:!0,cardStyle:{flex:1}}}),(0,W.jsx)(d9,{name:Q.LoadingRecommendation,component:Ayn}),(0,W.jsx)(d9,{name:Q.Recommendation,component:Myn,options:{...n5,headerStyle:{backgroundColor:e.bgSheet},headerShown:!1}}),(0,W.jsx)(d9,{name:Q.LeavingRecommendation,component:Dvn}),(0,W.jsx)(d9,{name:Q.FoodLibrary,component:Ebn,options:{...Mun,...Mon,headerShown:!1,gestureEnabled:!1}})]})}var kbn=Y.Milliseconds.Minute*20,Abn=()=>{let{pinCode:e,settingsUnlockedTimestamp:t,setSettingsUnlockedTimestamp:n}=z4(),r=(0,H.useMemo)(()=>t===null||Date.now()-t>kbn,[t]);i$((0,H.useCallback)(()=>{if(t===null)return;let e=kbn-(Date.now()-t);if(e<=0)return;let r=setTimeout(()=>n(null),e);return()=>clearTimeout(r)},[t,n]));let i=(0,H.useCallback)(()=>{n(Date.now())},[n]),a=(0,H.useCallback)(()=>{n(null)},[n]);return{areSettingsLocked:r,isPINSet:!!e,unlockSettings:i,lockSettings:a}};V();var jbn=()=>{let{t:e}=RK(),{COLORS:t}=J();return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{style:[f9.header,f9.firstHeaderSpacing],testID:`activity-info-title`,children:e(`physical_activity_modal_activity_insulin_title`)}),(0,W.jsx)(X,{style:[{color:t.labelSecondary},f9.spacing],children:e(`physical_activity_modal_activity_insulin_body`)}),(0,W.jsx)(X,{style:f9.header,children:e(`physical_activity_modal_adjust_insulin_title`)}),(0,W.jsx)(X,{style:[{color:t.labelSecondary},f9.spacing],children:e(`physical_activity_modal_adjust_insulin_body`)})]})},f9=R.create({header:{...q.Poppins.semiBold_2XL,marginBottom:8},firstHeaderSpacing:{marginTop:32},spacing:{marginBottom:32}});V();var p9=({text:e,learnMoreText:t,learnMoreOnPress:n})=>{let{t:r}=RK(),{COLORS:i}=J();return(0,W.jsxs)(B,{style:[m9.card,{backgroundColor:i.bgSecondary}],children:[(0,W.jsx)(e5t,{}),(0,W.jsxs)(B,{style:m9.rightContainer,children:[(0,W.jsx)(X,{style:[m9.contactText,{color:i.labelPrimary}],children:e??r(`warning_HCP`)}),t!==void 0&&n!==void 0&&(0,W.jsx)(_p,{onPress:n,style:m9.learnMoreContainer,children:(0,W.jsx)(X,{style:[m9.learnMoreText,{color:i.textLink}],children:t})})]})]})},m9=R.create({card:{borderRadius:16,paddingHorizontal:16,paddingVertical:12,flexDirection:`row`,gap:8},rightContainer:{flex:1,gap:8},learnMoreContainer:{flexDirection:`row`,alignItems:`center`,gap:4},contactText:{flexShrink:1,...q.Poppins.medium_SM},learnMoreText:{flexShrink:1,...q.Poppins.semiBold_SM}});V();var h9=4,Mbn=({onFinish:e,ref:t})=>{let{COLORS:n}=J(),{colorScheme:r}=d0(),i=(0,H.useRef)(Array.from({length:h9},()=>H.createRef())),[a,o]=(0,H.useState)(()=>Array.from({length:h9},()=>``)),[s,c]=(0,H.useState)(0),[l,u]=(0,H.useState)(null);(0,H.useImperativeHandle)(t,()=>({resetDigits(){o(Array.from({length:h9},()=>``)),c(0),u(null),i.current[0].current?.focus()},displayError(e){u(e)}}),[i]);let d=(0,H.useCallback)((e,t)=>{let n=e.replace(/[^0-9]/g,``),r=[...a];r[t]=n,o(r),u(null),n&&t<i.current.length-1&&i.current[t+1].current?.focus(),!e&&t!==0&&i.current[t-1].current?.focus()},[a,i]),f=(0,H.useCallback)(e=>{a[e]===``&&e!==0&&i.current[e-1].current?.focus()},[a,i]);return(0,H.useEffect)(()=>{let t=a.join(``);t.length===h9&&e(t)},[a,e]),(0,W.jsxs)(B,{children:[(0,W.jsx)(B,{style:Nbn.inputContainer,children:i.current.map((e,t)=>(0,W.jsx)(am,{ref:e,testID:`pin-digit-${t}`,value:a[t],autoFocus:t===0&&HK,keyboardType:`number-pad`,maxLength:1,onChangeText:e=>d(e,t),onKeyPress:e=>{e.nativeEvent.key===`Backspace`&&f(t)},onFocus:()=>c(t),onBlur:()=>c(null),style:[Nbn.input,{borderColor:l===null?s===t?n.borderActivationCodeFocus:r===u0.Light?n.border:n.bgTertiary:n.borderActivationCodeDanger,backgroundColor:n.bgTertiary,color:n.labelPrimary}]},t))}),l!==null&&(0,W.jsx)(X,{style:[Nbn.error,{color:n.textDanger}],children:l})]})},Nbn=R.create({inputContainer:{flexDirection:`row`,gap:8,justifyContent:`center`},input:{...q.Poppins.medium_2XL,lineHeight:z.select({ios:0,default:q.Poppins.regular_Base.lineHeight}),width:49,height:55,borderRadius:8,padding:0,textAlign:`center`,textAlignVertical:`center`,borderWidth:2},error:{...q.Poppins.regular_SM,textAlign:`center`,marginTop:8}});V();var Pbn=()=>(0,W.jsx)(B,{style:Fbn.animationContainer,children:(0,W.jsx)(S4,{autoPlay:!0,source:C4.LEAVING_RECOMMENDATION,style:Fbn.animation,loop:!0})}),Fbn=R.create({animationContainer:{justifyContent:`center`,alignItems:`center`},animation:{width:75,height:75}});V(),fQ();var Ibn=1600,Lbn=({isVisible:e,onClose:t,onForgotPIN:n,onModalHide:r,onModalHideWithSuccess:i})=>{let{COLORS:a}=J(),{t:o}=(0,Vvt.useTranslation)(),{pinCode:s}=z4(),[c,l]=(0,H.useState)(`enter_pin`),[u,d]=H.useState(!1),f=(0,H.useRef)(null),p=(0,H.useRef)(null),{height:m}=y0t(),h=OZ(!1),g=OZ(0),_=NZ(()=>({paddingBottom:h.value?g.value:-m.value}));(0,H.useEffect)(()=>{e&&(h.value=!1)},[e,h]),(0,H.useEffect)(()=>(p.current&&=(clearTimeout(p.current),null),c===`success`&&(p.current=setTimeout(()=>{d(!0)},Ibn)),()=>{p.current&&=(clearTimeout(p.current),null)}),[c]);let v=(0,H.useCallback)(()=>{g.value=-m.value,h.value=!0,qf.dismiss(),t()},[t,h,g,m]),y=(0,H.useCallback)(()=>{l(`enter_pin`),d(!1),c===`success`?i():r?.()},[i,r,c]);(0,H.useEffect)(()=>{c===`success`&&u&&v()},[u,c,v]);let b=(0,H.useCallback)(e=>{c===`enter_pin`&&(e===s?l(`success`):f.current?.displayError(o(`pin_modal_error_invalid`)))},[c,s,o]),x=(0,H.useCallback)(()=>{g.value=-m.value,h.value=!0,qf.dismiss(),n()},[n,h,g,m]);return(0,W.jsxs)(Q2,{testID:`validate_pin_code_modal`,isVisible:e,onModalHide:y,onModalShow:()=>f.current?.resetDigits(),containerStyle:{backgroundColor:a.bgSheet},children:[(0,W.jsx)(B,{style:Rbn.header,children:(0,W.jsx)($8,{onPress:v})}),(0,W.jsx)(X,{style:Rbn.title,children:o(`pin_modal_header_enter`)}),(0,W.jsxs)(dQ.View,{style:[Rbn.content,_],children:[c===`success`?(0,W.jsx)(Pbn,{}):(0,W.jsx)(Mbn,{onFinish:b,ref:f}),(0,W.jsx)(I2,{title:o(`pin_modal_button_forgot`),onPress:x,type:F2.Plain})]})]})},Rbn=R.create({title:{...q.Poppins.bold_2XL,marginBottom:6,textAlign:`center`},header:{alignItems:`flex-start`,paddingTop:16,marginBottom:10},content:{paddingTop:10}});V(),fQ();var zbn=1600,Bbn=({isVisible:e,onClose:t,onModalHideWithSuccess:n})=>{let{COLORS:r}=J(),{t:i}=RK(),[a,o]=(0,H.useState)(`enter_pin`),[s,c]=(0,H.useState)(``),[l,u]=H.useState(!1),d=(0,H.useRef)(null),f=(0,H.useRef)(null),{height:p}=y0t(),m=OZ(!1),h=OZ(0),g=NZ(()=>({paddingBottom:m.value?h.value:-p.value}));(0,H.useEffect)(()=>{e&&(m.value=!1)},[e,m]),(0,H.useEffect)(()=>(f.current&&=(clearTimeout(f.current),null),a===`success`&&(f.current=setTimeout(()=>{u(!0)},zbn)),()=>{f.current&&=(clearTimeout(f.current),null)}),[a]);let _=(0,H.useCallback)(()=>{h.value=-p.value,m.value=!0,qf.dismiss(),t()},[t,m,h,p]),v=(0,H.useCallback)(()=>{o(`enter_pin`),u(!1),a===`success`&&n(s)},[n,s,a]);(0,H.useEffect)(()=>{a===`success`&&l&&_()},[l,a,_]);let y=(0,H.useCallback)(e=>{a===`enter_pin`?(c(e),d.current?.resetDigits(),o(`repeat_pin`)):a===`repeat_pin`&&(e===s?o(`success`):d.current?.displayError(i(`pin_modal_error_noMatch`)))},[a,s,i]);return(0,W.jsxs)(Q2,{testID:`pin_code_modal`,isVisible:e,onModalHide:v,onModalShow:()=>d.current?.resetDigits(),containerStyle:{backgroundColor:r.bgSheet},children:[(0,W.jsx)(B,{style:g9.header,children:(0,W.jsx)($8,{onPress:_})}),(0,W.jsx)(X,{style:g9.title,children:i(a===`enter_pin`?`pin_modal_header_enter`:`pin_modal_header_repeat`)}),(0,W.jsxs)(dQ.View,{style:[g9.content,g],children:[a===`success`&&(0,W.jsx)(B,{style:g9.animationContainer,children:(0,W.jsx)(S4,{autoPlay:!0,source:C4.LEAVING_RECOMMENDATION,style:g9.animation,loop:!0})}),a!==`success`&&(0,W.jsx)(Mbn,{onFinish:y,ref:d})]})]})},g9=R.create({title:{...q.Poppins.bold_2XL,marginBottom:6,textAlign:`center`},header:{alignItems:`flex-start`,paddingTop:16,marginBottom:10},content:{paddingTop:10},animationContainer:{justifyContent:`center`,alignItems:`center`},animation:{width:75,height:75}}),Vbn=()=>{let{setPINCode:e,isElevatedAuthConfirmed:t,setIsElevatedAuthConfirmed:n}=z4(),[r,i]=(0,H.useState)(!1);return i$((0,H.useCallback)(()=>{t&&(n(!1),i(!0))},[t,n])),(0,W.jsx)(Bbn,{isVisible:r,onClose:()=>i(!1),onModalHideWithSuccess:(0,H.useCallback)(t=>{e(t)},[e])})},Hbn=({isVisible:e,onModalHide:t,onEnterPIN:n,onCancel:r})=>{let{t:i}=RK();return(0,W.jsx)(Q2,{isVisible:e,title:i(`settings_locked_modal_header`),onModalHide:t,icon:()=>(0,W.jsx)(H8t,{width:96,height:96}),buttons:[{title:i(`settings_locked_modal_button_enter`),type:F2.Primary,onPress:n},{title:i(`button_cancel`),type:F2.Secondary,onPress:r}]})};V();function _9({columnDisposition:e,disabled:t=!1,testID:n,children:r,style:i}){let{COLORS:a}=J();return(0,W.jsx)(B,{testID:n,style:[Ubn.row,t&&Ubn.disabledRow,{backgroundColor:a.bgTableOdd},i],children:H.Children.map(r,(n,r)=>H.isValidElement(n)?H.cloneElement(n,{disabled:t,cellRatio:e?e[r]:void 0}):null)})}var Ubn=R.create({row:{flexDirection:`row`,justifyContent:`space-between`},disabledRow:{opacity:.5}});V();function v9({index:e,columnDisposition:t,disabled:n=!1,testID:r,children:i,style:a}){let{COLORS:o}=J(),s=(0,H.useCallback)(e=>e===void 0?o.bgTableEven:e%2?o.bgTableOdd:o.bgTableEven,[o]);return(0,W.jsx)(B,{testID:r,style:[Wbn.row,{backgroundColor:s(e)},a],children:H.Children.map(i,(e,r)=>H.isValidElement(e)?H.cloneElement(e,{disabled:n,cellRatio:t?t[r]:void 0}):null)})}var Wbn=R.create({row:{flexDirection:`row`,justifyContent:`space-between`}});V();function y9({columnDisposition:e,disabled:t=!1,testID:n,children:r,style:i}){let{COLORS:a}=J();return(0,W.jsx)(B,{testID:n,style:[Gbn.table,{backgroundColor:a.bgSecondary,borderWidth:1,borderColor:a.divider},t&&{backgroundColor:a.bgButtonSecondaryDangerDisabled},i],children:(()=>{let n=0;return H.Children.map(r,r=>{if(H.isValidElement(r)){if(r.type===_9){let n=r;return H.cloneElement(n,{disabled:n.props.disabled??t,columnDisposition:e})}if(r.type===v9){let i=r,a=H.cloneElement(i,{disabled:i.props.disabled??t,index:n,columnDisposition:e});return n+=1,a}return H.cloneElement(r)}return null})})()})}var Gbn=R.create({table:{borderRadius:16,overflow:`hidden`}});V();function b9({disabled:e=!1,onPress:t,testID:n,accessibilityLabel:r,accessibilityValue:i,cellRatio:a,children:o,style:s}){let{COLORS:c}=J();return(0,W.jsx)(_p,{disabled:!t||e,onPress:t,style:[Kbn.cell,{flex:a??1,borderColor:c.divider},s],testID:n,accessibilityRole:`button`,accessibilityHint:`Double-tap to set value`,accessibilityState:{disabled:e},accessibilityLabel:r,accessibilityValue:{text:i},children:H.Children.map(o,t=>{if(H.isValidElement(t)){let n=t;if(e){let e=n.props.style,t=Array.isArray(e)?[...e,{color:c.textTableSecondary}]:[e,{color:c.textTableSecondary}];return H.cloneElement(n,{...n.props,style:t})}else return H.cloneElement(n)}return null})})}var Kbn=R.create({cell:{justifyContent:`center`,alignItems:`center`,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}});V();function x9({testID:e,cellRatio:t,children:n,style:r,accessibilityLabel:i,accessibilityValue:a,disabled:o=!1}){let{COLORS:s}=J();return(0,W.jsx)(B,{style:[qbn.cell,{flex:t??1,borderColor:s.divider},r],testID:e,accessible:!0,accessibilityRole:`header`,accessibilityState:{disabled:o},accessibilityLabel:i,accessibilityValue:{text:a},children:n})}var qbn=R.create({cell:{justifyContent:`space-between`,alignItems:`center`,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}});V();var Jbn=[Y.ActivityIntensity.light,Y.ActivityIntensity.moderate,Y.ActivityIntensity.hard],Ybn=[Y.ActivityReductionIntervals.fromZero,Y.ActivityReductionIntervals.fromThirty,Y.ActivityReductionIntervals.fromFortysix,Y.ActivityReductionIntervals.fromSixtyone],Xbn={[Y.ActivityReductionIntervals.fromZero]:`0-29`,[Y.ActivityReductionIntervals.fromThirty]:`30-45`,[Y.ActivityReductionIntervals.fromFortysix]:`46-60`,[Y.ActivityReductionIntervals.fromSixtyone]:`61-120`},Zbn=e=>Math.round((1-e)*100),Qbn=e=>e==null?`-`:`${Zbn(e).toString()} %`,$bn=e=>Math.round((1-e/100)*100)/100;function exn(){let{t:e}=RK(),t=XQ(),{COLORS:n}=J(),{modalStoreActions:r}=Y8(),{bottomWithScroll:i}=B2(),a=U8(),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(null),[m,h]=(0,H.useState)(null),[g,_]=(0,H.useState)(void 0),{glucoseUnit:v,activity:y,created:b}=H6;if(v===void 0)throw Error(`[ActivitySettings::render] glucoseUnit is not defined`);if(y===void 0)throw Error(`[ActivitySettings::render] activity is not defined`);let{target:x,post:S,hard:C,light:w,moderate:T}=y,E=(0,H.useMemo)(()=>$6(x,Y.BloodGlucoseUnit.MMOL_L,v),[v,x]),{text:D}=(0,H.useMemo)(()=>X6(v),[v]),O=(0,H.useMemo)(()=>({light:w,moderate:T,hard:C}),[w,T,C]),k=(0,H.useMemo)(()=>({post:S}),[S]),A=(0,H.useMemo)(()=>[{title:e(`table_activity_duration`),maxFontSizeMultiplier:g0.s1},{title:Z6.light(),maxFontSizeMultiplier:g0.s1},{title:Z6.moderate(),maxFontSizeMultiplier:g0.s1},{title:Z6.hard(),maxFontSizeMultiplier:g0.s1}],[e]),[ee,te]=(0,H.useState)(!1),[ne,re]=(0,H.useState)(!1),{areSettingsLocked:ie,isPINSet:j,lockSettings:ae,unlockSettings:oe}=Abn(),[se,ce]=(0,H.useState)(!1),[M,N]=(0,H.useState)(!1),P=(0,H.useCallback)(()=>{ie?te(!0):ae()},[ie,ae]);(0,H.useEffect)(()=>{t.setOptions({header:()=>(0,W.jsx)(G8,{title:e(`physical_activity_navigation`),LeftButton:(0,W.jsx)(Q8,{}),RightButton:j?(0,W.jsx)(jun,{onPress:P,isLocked:ie}):void 0,overlay:!0})})},[t,ie,j,P,e]);let le=(0,H.useCallback)(async()=>{let e={...L6(),target:x,post:S},{updatedAt:t,...n}=y;Y2(n,e)||_(await H6.postUserSettings({activity:{...e,updatedAt:new Date().toISOString()}}))},[y,S,x]),ue=(0,H.useCallback)(async()=>{let e={hard:C,moderate:T,light:w,target:x,post:L6().post},{updatedAt:t,...n}=y;Y2(n,e)||_(await H6.postUserSettings({activity:{...e,updatedAt:new Date().toISOString()}}))},[y,C,w,T,x]),de=(0,H.useCallback)((e,t)=>{p({interval:t,intensity:e}),s(!0)},[s,p]),fe=(0,H.useCallback)(()=>{p(null),s(!0)},[]),pe=(0,H.useCallback)(async e=>{if(f===null)throw Error(`[ActivitySettings::updateActivity] pressedTableCell is null`);if($bn(e)!==y[f.intensity][f.interval]){let t=JSON.parse(JSON.stringify(y));t[f.intensity][f.interval]=$bn(e),t.updatedAt=new Date().toISOString(),_(await H6.postUserSettings({activity:t}))}},[y,f]),me=(0,H.useCallback)(async e=>{let t=Q6(e,v,Y.BloodGlucoseUnit.MMOL_L);if(t!==y.target){let e=JSON.parse(JSON.stringify(y));e.target=t,e.updatedAt=new Date().toISOString(),_(await H6.postUserSettings({activity:e}))}},[y,v]),he=(0,H.useCallback)(async e=>{f?await pe(e):await me(e),s(!1)},[f,pe,me]),ge=(0,H.useMemo)(()=>f===null?v===Y.BloodGlucoseUnit.MMOL_L?Tin:Ein:q2(0,75),[f,v]),F=(0,H.useMemo)(()=>{if(f===null){let e=$6(x,Y.BloodGlucoseUnit.MMOL_L,v);return ge.findIndex(t=>t===e)}let e=y[f.intensity][f.interval];return e===0?0:e?Zbn(e):75},[f,y,x,v,ge]),_e=async()=>{m===`after`?await ue():await le(),l(!1)},I=()=>{h(`during`),l(!0)},ve=()=>{h(`after`),l(!0)},ye=(0,H.useCallback)(()=>{g===!1&&r.set({showSyncErrorModal:!0}),_(void 0)},[g,r]),be=(0,H.useCallback)(()=>{se&&(re(!0),ce(!1))},[se,re,ce]),xe=(0,H.useCallback)(()=>{ce(!0),te(!1)},[ce,te]),L=(0,H.useCallback)(()=>{oe()},[oe]),Se=(0,H.useCallback)(e=>j&&ie?(...e)=>te(!0):(...t)=>e(...t),[ie,j]),Ce=(0,H.useCallback)(()=>{M&&(N(!1),setTimeout(()=>{t.navigate(Q.ChangePINCode)},500))},[M,t]),we=y.updatedAt??b;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`settings-activity-scroll`,style:S9.scrollView,contentContainerStyle:[S9.scrollViewContent,{paddingBottom:i,paddingTop:a+16}],children:[(0,W.jsx)(X,{style:[S9.updatedAtText,{color:n.labelSecondary}],children:e(`settings_lastEdited`,{date:we?Y6(we,`d MMM yyyy`):``})}),(0,W.jsx)(p9,{text:e(`physical_activity_hcp_card_body`),learnMoreText:e(`physical_activity_hcp_card_button`),learnMoreOnPress:()=>{d(!0)}}),(0,W.jsxs)(y9,{children:[(0,W.jsxs)(B,{style:[S9.tableDescripContainer,{borderBottomColor:n.divider}],children:[(0,W.jsx)(X,{style:[S9.title,{color:n.labelPrimary}],accessibilityRole:`header`,children:e(`physical_activity_target_title`)}),(0,W.jsx)(X,{style:[S9.subtitle,{color:n.labelSecondary}],children:e(`physical_activity_target_body`)})]}),(0,W.jsx)(t4,{title:e(`target_activity_input`),value:`${E} ${D}`,style:{backgroundColor:n.bgSecondary},testID:`activity-target`,onPress:Se(fe),valueStyle:{color:n.labelBrand}})]}),(0,W.jsxs)(y9,{columnDisposition:[1,1,1,1],children:[(0,W.jsxs)(B,{style:[S9.tableDescripContainer,{borderBottomColor:n.divider}],children:[(0,W.jsx)(X,{style:[S9.title,{color:n.labelPrimary}],accessibilityRole:`header`,children:e(`target_activity_reduction_title`)}),(0,W.jsx)(X,{style:[S9.subtitle,{color:n.labelSecondary}],children:e(`target_activity_reduction_body`)})]}),(0,W.jsx)(_9,{children:A.map((e,t)=>(0,W.jsx)(x9,{style:[t===0&&S9.tableFirstCell,S9.noTopBorder],children:(0,W.jsx)(X,{style:[S9.tableHeaderTitle,{color:n.labelPrimary}],maxFontSizeMultiplier:e.maxFontSizeMultiplier,children:e.title})},e.title))}),Ybn.map(t=>(0,W.jsxs)(v9,{children:[(0,W.jsxs)(b9,{style:S9.tableFirstCell,children:[(0,W.jsx)(X,{style:[S9.tableInterval,{color:n.labelPrimary}],children:Xbn[t]}),(0,W.jsx)(X,{style:[S9.minutes,{color:n.textTableSecondary}],children:e(`activity_settings_table_min`)})]}),Jbn.map(e=>(0,W.jsx)(b9,{testID:`settings-activity-${e}-${t}`,onPress:Se(()=>{de(e,t)}),children:(0,W.jsx)(X,{style:[S9.tablePercentage,{color:n.textTableHighlight}],children:Qbn(O[e][t])})},`${t}-${e}`))]},t)),(0,W.jsx)(_p,{style:[S9.resetContainer,{backgroundColor:n.bgButtonSecondaryDanger,borderColor:n.divider}],onPress:Se(I),testID:`restore-default-activity-settings-during`,children:(0,W.jsx)(X,{style:[S9.resetText,{color:n.textButtonSecondaryDanger}],children:e(`button_reset_default`)})})]}),(0,W.jsxs)(y9,{children:[(0,W.jsxs)(B,{style:[S9.tableDescripContainer,{borderBottomWidth:0}],children:[(0,W.jsx)(X,{style:[S9.title,{color:n.labelPrimary}],accessibilityRole:`header`,children:e(`target_activity_reduction_after_title`)}),(0,W.jsx)(X,{style:[S9.subtitle,{color:n.labelSecondary}],children:e(`target_activity_reduction_after_body`)})]}),Ybn.map(t=>(0,W.jsxs)(v9,{children:[(0,W.jsxs)(b9,{style:[S9.tableFirstCell,S9.noLeftBorder],children:[(0,W.jsx)(X,{style:S9.tableInterval,children:Xbn[t]}),(0,W.jsx)(X,{style:[S9.minutes,{color:n.textTableSecondary}],children:e(`activity_settings_table_min`)})]}),(0,W.jsx)(b9,{testID:`settings-activity-post-${t}`,onPress:Se(()=>{de(`post`,t)}),children:(0,W.jsx)(X,{style:[S9.tablePercentage,{color:n.textTableHighlight}],children:Qbn(k.post[t])})})]},`post-${t}`)),(0,W.jsx)(_p,{style:[S9.resetContainer,{backgroundColor:n.bgButtonSecondaryDanger,borderColor:n.divider}],onPress:Se(ve),testID:`restore-default-activity-settings-after`,children:(0,W.jsx)(X,{style:[S9.resetText,{color:n.textButtonSecondaryDanger}],children:e(`button_reset_default`)})})]})]}),(0,W.jsx)(c5,{initialScrollIndex:F,isVisible:o,onCancel:()=>{s(!1)},onConfirm:he,items:ge,onModalHide:ye,testID:`activity-wheel-picker`}),(0,W.jsx)(Q2,{title:e(`physical_activity_modal_reset_title `),isVisible:c,onModalHide:ye,buttons:[{title:e(`button_reset`),type:F2.Error,onPress:_e},{title:e(`button_cancel`),type:F2.Secondary,onPress:()=>{l(!1)}}]}),(0,W.jsx)(Q2,{isVisible:u,enableScroll:!0,buttons:[{title:e(`button_close`),onPress:()=>{d(!1)},style:S9.activityInfoModalButton}],children:(0,W.jsx)(jbn,{})}),(0,W.jsx)(d5,{onModalHide:()=>{_(void 0)}}),(0,W.jsx)(Hbn,{isVisible:ee,onModalHide:be,onEnterPIN:xe,onCancel:()=>te(!1)}),(0,W.jsx)(Lbn,{isVisible:ne,onClose:()=>re(!1),onModalHide:Ce,onForgotPIN:()=>{N(!0),re(!1)},onModalHideWithSuccess:L}),(0,W.jsx)(Vbn,{})]})}var txn=S5(exn),S9=R.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32,paddingTop:32},updatedAtText:{...q.Poppins.regular_SM,textAlign:`center`},tableDescripContainer:{padding:16,borderBottomWidth:1},title:{...q.Poppins.semiBold_Base,marginBottom:8},subtitle:{...q.Poppins.regular_SM},tableFirstCell:{paddingLeft:16,paddingVertical:12,borderLeftWidth:0},resetText:{...q.Poppins.semiBold_Base,textAlign:`center`},resetContainer:{alignItems:`center`,padding:16,borderTopWidth:1},tableHeaderTitle:{...q.Poppins.medium_SM},minutes:{...q.Poppins.regular_XS},tableInterval:{...q.Poppins.medium_Base},tablePercentage:{...q.Poppins.medium_Base},activityInfoModalButton:{marginTop:32},noTopBorder:{borderTopWidth:0,paddingVertical:16},noLeftBorder:{borderLeftWidth:0}});function C9(e,t){return+H2(e)>+H2(t)}function nxn(e,t,n){return O7(e,-t,n)}function rxn(e,t){let n=H2(e,t?.in);return n.setMinutes(0,0,0),n}function ixn(e,t,n){let[r,i]=A6(n?.in,e,t);return+rxn(r)==+rxn(i)}V();var w9=Array.from({length:60},(e,t)=>t.toString().padStart(2,`0`));function axn({isVisible:e,initialValue:t,min:n,max:r,onCancel:i,onConfirm:a,onModalHide:o}){let{COLORS:s}=J(),{width:c}=Cm(),l=(0,H.useRef)(null),u=(0,H.useRef)(null),d=(0,H.useMemo)(()=>{let e=[],t=r?k7(`59`,`mm`,new Date(r)):k7(`23:59`,`HH:mm`,new Date),i=n?k7(`00`,`mm`,new Date(n)):k7(`00:00`,`HH:mm`,new Date);for(;q7(i,t)||ixn(i,t);)e.push(i),i=Tan(i,1);return e},[r,n]),f=(0,H.useMemo)(()=>d.map(e=>e.getHours().toString().padStart(2,`0`),[]),[d]),[p,m]=(0,H.useState)(t),h=I2t(e);(0,H.useEffect)(()=>{!h&&e&&m(t)},[h,e,t]);let g=(0,H.useMemo)(()=>d.findIndex(e=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()&&e.getHours()===t.getHours()),[d,t]),_=(0,H.useMemo)(()=>{let[,e]=Y6(t,`HH:mm`).split(`:`);return w9.indexOf(e)},[t]),v=(0,H.useMemo)(()=>d.findIndex(e=>e.getFullYear()===p.getFullYear()&&e.getMonth()===p.getMonth()&&e.getDate()===p.getDate()&&e.getHours()===p.getHours()),[d,p]),y=(0,H.useMemo)(()=>{let[,e]=Y6(p,`HH:mm`).split(`:`);return w9.indexOf(e)},[p]),b=(0,H.useMemo)(()=>n?0:null,[n]),x=(0,H.useMemo)(()=>r?d.length-1:null,[r,d]),S=(0,H.useMemo)(()=>{if(!n)return null;let[,e]=Y6(n,`HH:mm`).split(`:`);return w9.indexOf(e)},[n]),C=(0,H.useMemo)(()=>{if(!r)return null;let[,e]=Y6(r,`HH:mm`).split(`:`);return w9.indexOf(e)},[r]),w=(0,H.useCallback)(()=>{a(p)},[a,p]),T=(0,H.useCallback)(()=>{m(t),i()},[i,t]),E=(0,H.useCallback)((e,i)=>{if(e<0||i<0||e>=d.length||i>=w9.length)return;let a=`${d[e].getHours()}:${w9[i]}`;if(!n||!r){m(k7(a,`HH:mm`,new Date(t)));return}let o=d[e];m(k7(a,`HH:mm`,new Date(o)))},[n,r,d,t]),D=(0,H.useCallback)(e=>{u.current?.scrollToIndex(e)},[]),O=(0,H.useCallback)(e=>{if(x===null||b===null||C===null||S===null){E(e,y);return}e===b&&y<S?(E(e,S),D(S)):e===x&&y>C?(E(e,C),D(C)):E(e,y)},[x,b,C,S,E,y,D]),k=(0,H.useCallback)(e=>{if(x===null||b===null||C===null||S===null){E(v,e);return}v===b&&e<S?(E(v,S),D(S)):v===x&&e>C?(E(v,C),D(C)):E(v,e)},[E,x,C,b,S,D,v]);return(0,W.jsx)(Q2,{isVisible:e,containerStyle:{backgroundColor:s.bgTransparent},onModalHide:o,children:(0,W.jsxs)(B,{children:[(0,W.jsxs)(B,{style:T9.pickersContainer,children:[(0,W.jsx)(s5,{testID:`hours_wheel_picker`,ref:l,initialScrollIndex:g,options:f,onChange:O,containerStyle:[T9.itemContainerLeft,{width:(c-32)/2}],selectedIndicatorStyle:[T9.selectedIndicatorLeft,{width:(c-32)/2-10}],itemStyle:T9.itemLeft},`hours-wheel-picker`),(0,W.jsx)(s5,{testID:`minutes_wheel_picker`,ref:u,initialScrollIndex:_,options:w9,onChange:k,containerStyle:[T9.itemContainerRight,{width:(c-32)/2}],selectedIndicatorStyle:[T9.selectedIndicatorRight,{width:(c-32)/2-10}],itemStyle:T9.itemRight},`minutes-wheel-picker`)]}),(0,W.jsxs)(B,{style:T9.buttonContainer,children:[(0,W.jsx)(o5,{onPress:w}),(0,W.jsx)(a5,{onPress:T})]})]})})}var oxn=H.memo(axn),T9=R.create({buttonContainer:{gap:8},pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:`flex-end`,marginRight:16},itemRight:{alignSelf:`flex-start`,marginLeft:16},selectedIndicatorRight:{alignSelf:`flex-start`,borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:`flex-end`,borderTopRightRadius:0,borderBottomRightRadius:0}});V();var sxn=(e,t)=>({startTime:e.startTime,target:$6(e.target,Y.BloodGlucoseUnit.MMOL_L,t)}),cxn=(e,t)=>e.map(e=>sxn(e,t)),lxn=(e,t)=>{let n=e.startTime,r=parseFloat(e.target);return r=Q6(r,t,Y.BloodGlucoseUnit.MMOL_L),{startTime:n,target:r}},uxn=(e,t)=>e.map(e=>lxn(e,t));function dxn(){let{t:e}=RK(),{COLORS:t}=J(),{modalStoreActions:n}=Y8(),{bottomWithScroll:r}=B2(),i=XQ(),a=U8(),[o,s]=(0,H.useState)(),[c,l]=(0,H.useState)(void 0),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(),[v,y]=(0,H.useState)(!1),[b,x]=(0,H.useState)(!1),S=H6.glucoseUnit;if(S===void 0)throw Error(`[GlucoseSettings::render] glucoseUnit is undefined.`);let{glucoseLevelTargets:C,created:w}=H6;if(C===void 0)throw Error(`[GlucoseSettings::render] parameters from userSettings must be defined and non-null.`);let T=C.targetBGLIntervals;if(!T)throw Error(`[GlucoseSettings::render] parameters from userSettings must be defined and non-null.`);let E=C.overallTargetBGL;if(!E)throw Error(`[GlucoseSettings::render] parameters from userSettings must be defined and non-null.`);let D=C.use===Y.Usage.Overall,O=cxn(T,S),k=sxn(E,S),{areSettingsLocked:A,isPINSet:ee,lockSettings:te,unlockSettings:ne}=Abn(),[re,ie]=(0,H.useState)(!1),[j,ae]=(0,H.useState)(!1),oe=(0,H.useCallback)(()=>{A?y(!0):te()},[A,te]);(0,H.useEffect)(()=>{i.setOptions({header:()=>(0,W.jsx)(G8,{title:e(`glucose_navigation`),LeftButton:(0,W.jsx)(Q8,{}),RightButton:ee?(0,W.jsx)(jun,{onPress:oe,isLocked:A}):void 0,overlay:!0})})},[i,A,ee,oe,e]);let se=(0,H.useCallback)(e=>{p(!0),_(e)},[]),ce=(0,H.useCallback)(async()=>{let e=Min(),t=Nin(),n={...C,targetBGLIntervals:e},r={...C,overallTargetBGL:t},i=D?r:n;if(D?!Y2(C.overallTargetBGL,t):!Y2(C.targetBGLIntervals,e)){let e={glucoseLevelTargets:{...i,updatedAt:new Date().toISOString()}};l(await H6.postUserSettings(e))}h(!1)},[C,D]),M=(0,H.useCallback)(async e=>{if(e!==parseFloat(k.target)){let t={...k};t.target=e.toString();let n=lxn(t,S),r={glucoseLevelTargets:{...C,updatedAt:new Date().toISOString(),overallTargetBGL:n}};l(await H6.postUserSettings(r))}},[S,k,C]),N=(0,H.useCallback)(async e=>{if(g!==void 0&&e!==parseFloat(O[g].target)){let t=[...O],n={...t[g]};n.target=e.toString(),t[g]=n;let r=uxn(t,S),i={glucoseLevelTargets:{...C,updatedAt:new Date().toISOString(),targetBGLIntervals:r}};l(await H6.postUserSettings(i))}},[g,O,S,C]),P=(0,H.useCallback)(async e=>{D?await M(e):await N(e),p(!1)},[D,M,N]),le=(0,H.useCallback)(async()=>{let e=!D,t={glucoseLevelTargets:{...C,use:e?Y.Usage.Overall:Y.Usage.Intervals,updatedAt:new Date().toISOString()}},r=await H6.postUserSettings(t);n.set({showSyncErrorModal:!r})},[D,C,n]),ue=(0,H.useMemo)(()=>X6(S).text,[S]),de=(0,H.useMemo)(()=>{let{min:e,max:t}=S===Y.BloodGlucoseUnit.MMOL_L?Fin():Iin();return S===Y.BloodGlucoseUnit.MG_DL?q2(e,t):J2(e,t)},[S]),fe=(0,H.useMemo)(()=>g===void 0?0:D?de.indexOf(k.target):de.indexOf(O[g].target),[g,D,de,O,k.target]),pe=(0,H.useCallback)(e=>{let t=O[(e-1+O.length)%O.length].startTime,n=O[(e+1+O.length)%O.length].startTime,r=O[e].startTime,i=k7(r,`HH:mm`,new Date),a=k7(t,`HH:mm`,new Date),o=k7(n,`HH:mm`,new Date);q7(i,a)&&q7(i,o)?s({current:i,min:U2(nxn(a,1),1),max:W2(o,1)}):C9(i,a)&&C9(i,o)?s({current:i,min:U2(a,1),max:W2(O7(o,1),1)}):s({current:i,min:U2(a,1),max:W2(o,1)}),d(!0),_(e)},[O]),me=(0,H.useCallback)(async e=>{if(g===void 0)return;let t=Y6(e,`HH:mm`);if(t!==O[g].startTime){let e=[...O],n={...e[g]};n.startTime=t,e[g]=n;let r=uxn(e,S),i={glucoseLevelTargets:{...C,targetBGLIntervals:r,updatedAt:new Date().toISOString()}};l(await H6.postUserSettings(i))}d(!1)},[g,O,S,C]),he=(0,H.useCallback)(()=>{d(!1)},[]),ge=(0,H.useCallback)(()=>{p(!1)},[]),F=(0,H.useCallback)(()=>{c===!1&&n.set({showSyncErrorModal:!0}),l(void 0)},[n,c]),_e=(0,H.useCallback)(()=>{re&&(x(!0),ie(!1))},[re,x,ie]),I=(0,H.useCallback)(()=>{ie(!0),y(!1)},[ie,y]),ve=(0,H.useCallback)(()=>{i.navigate(Q.GlucoseUnit)},[i]),ye=(0,H.useCallback)(()=>{ne()},[ne]),be=(0,H.useCallback)(e=>ee&&A?(...e)=>y(!0):(...t)=>e(...t),[A,ee]),xe=(0,H.useCallback)(()=>{j&&(ae(!1),setTimeout(()=>{i.navigate(Q.ChangePINCode)},500))},[j,i]),L=C.updatedAt??w;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`settings-glucose-scrollview`,style:E9.scrollView,contentContainerStyle:[E9.scrollViewContent,{paddingBottom:r,paddingTop:a+16}],children:[(0,W.jsx)(X,{style:[E9.updatedAtText,{color:t.labelSecondary}],children:e(`settings_lastEdited`,{date:L?Y6(L,`d MMM yyyy`):``})}),(0,W.jsx)(p9,{}),(0,W.jsx)(t4,{title:e(`glucose_input`),value:ue,testID:`glucose-change`,onPress:be(ve),renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsxs)(y9,{columnDisposition:[1,2],children:[(0,W.jsx)(E4,{title:e(`fixed_input_title`),message:e(`fixed_input_body`),value:D,testID:`settings-glucose-overall-switch`,onValueChange:be(le),style:E9.switchContainer}),(0,W.jsxs)(_9,{disabled:!D,testID:`settings-glucose-overall-header`,children:[(0,W.jsx)(x9,{style:E9.tableFirstCell,testID:`settings-glucose-overall-header-time`,children:(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_fixed_time`)})}),(0,W.jsxs)(x9,{testID:`settings-glucose-overall-header-target`,children:[(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_fixed_target`)}),(0,W.jsx)(X,{style:[E9.headerSubtitle,{color:t.textTableSecondary}],children:ue})]})]}),(0,W.jsxs)(v9,{disabled:!D,children:[(0,W.jsx)(b9,{style:E9.tableFirstCell,children:(0,W.jsx)(X,{style:[E9.subtitle,{color:t.textTableActive}],children:e(`table_fixed_all_day `)})}),(0,W.jsx)(b9,{onPress:be(()=>se(0)),children:(0,W.jsx)(X,{style:[E9.fixedValueTitle,{color:t.textTableHighlight}],testID:`settings-glucose-overall-all-day-target`,children:k.target})})]}),(0,W.jsx)(_p,{style:[E9.resetContainer,{borderColor:t.divider}],disabled:!D,onPress:be(()=>h(!0)),children:(0,W.jsx)(X,{style:[E9.resetText,D?{color:t.textButtonSecondaryDanger}:{color:t.textButtonSecondaryDangerDisabled}],children:e(`button_reset_default`)})})]}),(0,W.jsxs)(y9,{columnDisposition:[1,2],children:[(0,W.jsx)(E4,{title:e(`table_variable_title`),message:e(`table_variable_body`),value:!D,testID:`daily-interval-switch`,onValueChange:be(le),style:E9.switchContainer}),(0,W.jsxs)(_9,{disabled:D,testID:`settings-glucose-variable-header`,children:[(0,W.jsxs)(x9,{style:E9.tableFirstCell,testID:`settings-glucose-variable-header-time`,children:[(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_variable_time`)}),(0,W.jsx)(X,{style:[E9.headerSubtitle,{color:t.textTableSecondary}],children:e(`table_variable_time_unit`)})]}),(0,W.jsxs)(x9,{testID:`settings-glucose-variable-header-target`,children:[(0,W.jsx)(X,{style:[E9.headerTitle,{color:t.textTableActive}],maxFontSizeMultiplier:g0.s2,children:e(`table_fixed_target`)}),(0,W.jsx)(X,{style:[E9.headerSubtitle,{color:t.textTableSecondary}],children:ue})]})]}),O.map((e,n)=>(0,W.jsxs)(v9,{disabled:D,children:[(0,W.jsxs)(b9,{style:E9.tableFirstCell,onPress:be(()=>{pe(n)}),children:[(0,W.jsx)(X,{style:[E9.title,{color:t.textTableHighlight}],children:e.startTime}),(0,W.jsx)(X,{style:[E9.subtitle,{color:t.textTableSecondary}],children:iyt[Object.keys(BK)[n]]()})]}),(0,W.jsx)(b9,{onPress:be(()=>{se(n)}),children:(0,W.jsx)(X,{style:[E9.title,{color:t.textTableHighlight}],testID:`settings-glucose-variable-target-${Object.keys(BK)[n].toLowerCase()}`,children:e.target})})]},e.startTime)),(0,W.jsx)(_p,{style:[E9.resetContainer,{borderColor:t.divider}],disabled:D,onPress:be(()=>{h(!0)}),children:(0,W.jsx)(X,{style:[E9.resetText,D?{color:t.textButtonSecondaryDangerDisabled}:{color:t.textButtonSecondaryDanger}],children:e(`button_reset_default`)})})]})]}),(0,W.jsx)(c5,{isVisible:f,items:de,onConfirm:P,onCancel:ge,initialScrollIndex:fe,onModalHide:F,testID:`settings-glucose-target-wheel-picker`}),(0,W.jsx)(oxn,{isVisible:u,initialValue:o?.current??new Date,min:o?.min,max:o?.max,onConfirm:me,onCancel:he,onModalHide:F}),(0,W.jsx)(Q2,{isVisible:m,title:e(`physical_activity_modal_reset_title `),onModalHide:F,buttons:[{title:e(`button_reset`),type:F2.Error,onPress:ce},{title:e(`button_cancel`),type:F2.Secondary,onPress:()=>{h(!1)}}]}),(0,W.jsx)(d5,{onModalHide:()=>{l(void 0)}}),(0,W.jsx)(Hbn,{isVisible:v,onModalHide:_e,onEnterPIN:I,onCancel:()=>y(!1)}),(0,W.jsx)(Lbn,{isVisible:b,onClose:()=>x(!1),onModalHide:xe,onForgotPIN:()=>{ae(!0),x(!1)},onModalHideWithSuccess:ye}),(0,W.jsx)(Vbn,{})]})}var fxn=S5(dxn),E9=R.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32},updatedAtText:{...q.Poppins.regular_SM,textAlign:`center`},tableFirstCell:{alignItems:`flex-start`,paddingLeft:16,borderLeftWidth:0},resetContainer:{alignItems:`center`,padding:16,borderTopWidth:1},resetText:{...q.Poppins.semiBold_Base,textAlign:`center`},headerTitle:{...q.Poppins.medium_SM},headerSubtitle:{...q.Poppins.medium_XS},title:{...q.Poppins.medium_Base},fixedValueTitle:{...q.Poppins.medium_Base,paddingVertical:8},subtitle:{...q.Poppins.regular_XS},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}});V();var pxn=e=>{let{t}=RK(),{COLORS:n}=J(),{glucoseUnit:r,isError:i,onPressMGDL:a,onPressMMOLL:o}=e,s=r===Y.BloodGlucoseUnit.MMOL_L,c=r===Y.BloodGlucoseUnit.MG_DL;return(0,W.jsxs)(B,{style:D9.unitsContainer,children:[(0,W.jsxs)(Kp,{testID:`mmoll-button-${s}`,onPress:o,style:({pressed:e})=>[D9.unitButton,{backgroundColor:s?n.bgSegmentPrimary:n.bgSegmentContainer,borderColor:s?n.bgSegmentPrimary:n.buttonBorder,opacity:e?.5:1},i&&{borderColor:n.borderInputDanger}],accessibilityRole:`button`,accessibilityState:{selected:s},children:[(0,W.jsx)(X,{style:[D9.unitText,{color:s?n.textLabelActive:n.textLabelInactive}],children:t(`glucose_unit_mmol/l`)}),(0,W.jsx)(X,{style:[D9.exampleText,{color:s?n.textLabelActive:n.textLabelInactive}],children:t(`example`)}),(0,W.jsx)(X,{style:[D9.unitExampleText,{color:s?n.textLabelActive:n.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:t(`glucose_unit_example_mmol/L`)})]}),(0,W.jsxs)(Kp,{testID:`mgdl-button-${c}`,onPress:a,style:({pressed:e})=>[D9.unitButton,{backgroundColor:c?n.bgSegmentPrimary:n.bgSegmentContainer,borderColor:c?n.bgSegmentPrimary:n.buttonBorder,opacity:e?.5:1},i&&{borderColor:n.borderInputDanger}],accessibilityRole:`button`,accessibilityState:{selected:c},children:[(0,W.jsx)(X,{style:[D9.unitText,{color:c?n.textLabelActive:n.textLabelInactive}],children:t(`glucose_unit_mg/dl`)}),(0,W.jsx)(X,{style:[D9.exampleText,{color:c?n.textLabelActive:n.textLabelInactive}],children:t(`example`)}),(0,W.jsx)(X,{style:[D9.unitExampleText,{color:c?n.textLabelActive:n.textLabelInactive}],maxFontSizeMultiplier:g0.s2,children:t(`glucose_unit_example_mg/dl`)})]})]})},D9=R.create({unitsContainer:{flexDirection:`row`,justifyContent:`space-between`,gap:12},unitButton:{flex:1,paddingHorizontal:14,paddingVertical:10,borderRadius:16,borderWidth:2},unitText:{...q.Poppins.medium_Base,marginBottom:8},exampleText:{...q.Poppins.medium_XS,marginBottom:4},unitExampleText:{...q.Poppins.regular_XS}});V();var mxn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),n=(0,H.useCallback)(async t=>{if(t===H6.glucoseUnit)return;let n=H6.glucoseLevelTargets,r=await H6.postUserSettings({bloodGlucoseUnits:t,...n&&{glucoseLevelTargets:{...n,updatedAt:new Date().toISOString()}}});e.set({showSyncErrorModal:!r})},[e]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(B,{style:[hxn.container,{paddingTop:t+16}],children:(0,W.jsx)(pxn,{onPressMMOLL:()=>n(Y.BloodGlucoseUnit.MMOL_L),onPressMGDL:()=>n(Y.BloodGlucoseUnit.MG_DL),glucoseUnit:H6.glucoseUnit})}),(0,W.jsx)(d5,{})]})},hxn=R.create({container:{paddingHorizontal:16}}),gxn=S5(mxn);V();var _xn=()=>{let{t:e}=RK(),{COLORS:t}=J(),n=XQ(),{bottomWithScroll:r}=B2(),i=U8();return(0,W.jsxs)(ys,{contentContainerStyle:[O9.scrollView,{paddingBottom:r,paddingTop:i+16}],testID:`legal-page-scrollview`,children:[(0,W.jsx)(X,{style:O9.title,children:e(`legal_title`)}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(W8t,{testID:`manufacturer-symbol`,color:t.bgPrimary}),(0,W.jsx)(X,{style:[O9.textContainer,{color:t.labelSecondary}],children:Rnn})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(U8t,{testID:`manual-icon`}),(0,W.jsx)(X,{testID:`manual-button`,style:[O9.manualText,{color:t.textLink}],onPress:()=>{C6(S6.SettingsIFU),n.navigate(Q.IFU)},children:e(`legal_IFU`)})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(Y8t,{testID:`SN-symbol`}),(0,W.jsx)(X,{style:[O9.textContainer,{color:t.labelSecondary}],children:x6})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(j8t,{testID:`ce-logo`}),(0,W.jsx)(X,{style:[O9.alignTop,{color:t.labelSecondary}],children:e(`legal_ce_mark_text`)})]}),(0,W.jsxs)(B,{style:O9.section,children:[(0,W.jsx)(W8t,{color:t.labelPrimary}),(0,W.jsxs)(B,{style:O9.textContainer,children:[(0,W.jsx)(X,{style:[O9.sectionTitle,{color:t.labelSecondary}],children:e(`legal_company_name`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_adress`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_country`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_email`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_company_cvr_vat`)})]})]}),(0,W.jsxs)(B,{style:[O9.section,O9.udiSection],children:[(0,W.jsx)(X8t,{testID:`udi-logo`,style:O9.udiLogo}),(0,W.jsxs)(X,{style:[O9.textContainer,O9.udiText,{color:t.labelSecondary}],children:[(0,W.jsx)(X,{style:{color:t.labelSecondary},children:`(01)${Bnn}(10)`}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:`${x6}(8012)${x6}`})]})]}),(0,W.jsxs)(B,{style:O9.sectionColumn,children:[(0,W.jsx)(Z8t,{testID:`uk-rep-logo`,style:O9.repIcon}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`legal_ukrep`)})]}),VK?null:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{style:[O9.sectionTitle,{color:t.labelSecondary}],children:e(`more_legal_novo_nordisk_disclaimer_title`)}),(0,W.jsx)(X,{style:{color:t.labelSecondary},children:e(`more_legal_novo_nordisk_disclaimer_text`)})]})]})},O9=R.create({scrollView:{paddingTop:32,paddingHorizontal:16},title:{...q.Poppins.regular_SM,textAlign:`center`,marginBottom:32},section:{flexDirection:`row`,marginBottom:32},sectionTitle:{...q.Poppins.medium_Base},textContainer:{flex:1,marginLeft:20,alignSelf:`center`},alignTop:{flex:1,marginLeft:20,alignSelf:`flex-start`},sectionColumn:{marginBottom:32},repIcon:{marginBottom:12},manualText:{...q.Poppins.medium_Base,marginLeft:20,alignSelf:`center`},udiSection:{flexWrap:`wrap`,marginBottom:20},udiLogo:{marginRight:20,marginBottom:12},udiText:{marginLeft:0,marginBottom:12,display:`flex`,flexWrap:`wrap`}});V();var vxn=()=>{let e=new Date().getFullYear();return[...Array(12).keys()].map(t=>Y6(new Date(e,t),`MMM`))},yxn=()=>{let e=1900,t=new Date().getFullYear()-e+1;return Array.from({length:t},(t,n)=>(n+e).toString())},bxn=(e,t)=>Gdn(new Date(e,t)),xxn=vxn(),Sxn=Array.from({length:31},(e,t)=>(t+1).toString().padStart(2,`0`)),Cxn=yxn();function wxn({isVisible:e,initialValue:t,onCancel:n,onConfirm:r,onModalHide:i}){let{COLORS:a}=J(),{width:o}=Cm(),s=(0,H.useRef)(null),c=(0,H.useRef)(null),l=(0,H.useRef)(null),[u,d]=(0,H.useState)(t);(0,H.useEffect)(()=>{e&&d(e=>e.getTime()===t.getTime()?e:new Date(t))},[t,e]);let f=(0,H.useMemo)(()=>t.getDate()-1,[t]),p=(0,H.useMemo)(()=>t.getMonth(),[t]),m=(0,H.useMemo)(()=>{let e=t.getFullYear();return Cxn.indexOf(e.toString())},[t]),h=(0,H.useMemo)(()=>u.getDate()-1,[u]),g=(0,H.useMemo)(()=>u.getMonth(),[u]),_=(0,H.useMemo)(()=>u.getFullYear(),[u]),v=(0,H.useCallback)(()=>{r(u)},[r,u]),y=(0,H.useCallback)(()=>{d(t),n()},[n,t]),b=(0,H.useCallback)(e=>{let t=bxn(_,e)-1;d(new Date(_,e,Math.min(h,t)+1)),h>t&&s.current?.scrollToIndex(t)},[h,_]),x=(0,H.useCallback)(e=>{let t=bxn(_,g)-1;d(new Date(_,g,Math.min(e,t)+1)),e>t&&s.current?.scrollToIndex(t)},[g,_]),S=(0,H.useCallback)(e=>{let t=parseInt(Cxn[e],10),n=bxn(t,g)-1;d(new Date(t,g,Math.min(h,n)+1)),h>n&&s.current?.scrollToIndex(n)},[h,g]);return(0,W.jsx)(Q2,{isVisible:e,containerStyle:{backgroundColor:a.bgTransparent},onModalHide:i,children:(0,W.jsxs)(B,{children:[(0,W.jsxs)(B,{style:k9.pickersContainer,children:[(0,W.jsx)(s5,{ref:c,initialScrollIndex:p,options:xxn,onChange:b,containerStyle:[k9.itemContainerLeft,{width:(o-32)/3}],selectedIndicatorStyle:[k9.selectedIndicatorLeft,{width:(o-32)/3-10}],itemStyle:k9.itemLeft,testID:`months-wheel-picker`},`months-wheel-picker`),(0,W.jsx)(s5,{ref:s,initialScrollIndex:f,options:Sxn,onChange:x,containerStyle:[k9.itemContainerCenter,{width:(o-32)/3}],selectedIndicatorStyle:[k9.selectedIndicatorCenter,{width:(o-32)/3}],itemStyle:k9.itemCenter,testID:`days-wheel-picker`},`days-wheel-picker`),(0,W.jsx)(s5,{ref:l,initialScrollIndex:m,options:Cxn,onChange:S,containerStyle:[k9.itemContainerRight,{width:(o-32)/3}],selectedIndicatorStyle:[k9.selectedIndicatorRight,{width:(o-32)/3-10}],itemStyle:k9.itemRight,testID:`years-wheel-picker`},`years-wheel-picker`)]}),(0,W.jsxs)(B,{style:k9.buttonContainer,children:[(0,W.jsx)(o5,{onPress:v}),(0,W.jsx)(a5,{onPress:y})]})]})})}var Txn=H.memo(wxn),k9=R.create({buttonContainer:{gap:8},pickersContainer:{flexDirection:`row`,borderTopLeftRadius:13,borderTopRightRadius:13,overflow:`hidden`},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:8},itemContainerCenter:{borderTopLeftRadius:0,borderTopRightRadius:0},itemContainerRight:{borderTopLeftRadius:0,paddingRight:8},itemLeft:{alignSelf:`flex-end`},itemCenter:{alignSelf:`center`},itemRight:{alignSelf:`flex-start`},selectedIndicatorRight:{alignSelf:`flex-start`,borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorCenter:{alignSelf:`center`,borderRadius:0},selectedIndicatorLeft:{alignSelf:`flex-end`,borderTopRightRadius:0,borderBottomRightRadius:0}}),Exn=q2(0,220),Dxn=q2(0,300),Oxn=S5(({isVisible:e,onCancel:t,onModalHide:n})=>{let{t:r}=RK(),{isOnboardingFinished:i}=z4(),{biologicalSex:a}=_5(),{setSetupCalculatorStoreValues:o}=g5(),{modalStoreActions:s}=Y8(),c=i?H6.biologicalSex:a,[l,u]=(0,H.useState)(void 0),d=!H6.biologicalSex,f=+!!d,p=(0,H.useMemo)(()=>{switch(c){case Y.BiologicalSex.Male:return 0;case Y.BiologicalSex.Female:return 1;case Y.BiologicalSex.Unspecified:return 2;default:return 0}},[c]),m=(0,H.useCallback)(async(e,n)=>{if(d&&n===0){o({biologicalSex:void 0}),t();return}let r=n-f,a=Y.BiologicalSex.Male;if(r===1&&(a=Y.BiologicalSex.Female),r===2&&(a=Y.BiologicalSex.Unspecified),c===a){t();return}i?u(await H6.postUserSettings({biologicalSex:a})):o({biologicalSex:a}),t()},[c,i,d,f,t,o]),h=(0,H.useCallback)(()=>{l===!1?s.set({showSyncErrorModal:!0}):n&&n(),u(void 0)},[s,l,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(c5,{isVisible:e,items:d?[`-`,r(`biological_sex_male`),r(`biological_sex_female`),r(`biological_sex_no_answer`)]:[r(`biological_sex_male`),r(`biological_sex_female`),r(`biological_sex_no_answer`)],onConfirm:m,onCancel:t,initialScrollIndex:p,onModalHide:h,testID:`biological_sex_wheel_picker`}),(0,W.jsx)(d5,{})]})}),kxn=S5(({isVisible:e,onCancel:t,onModalHide:n})=>{let{t:r}=RK(),{modalStoreActions:i}=Y8(),a=H6.diabetesType,[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(void 0),u=(0,H.useMemo)(()=>a===Y.DiabetesType.Type1?0:1,[a]),d=(0,H.useCallback)(async(e,n)=>{let r=n===0?Y.DiabetesType.Type1:Y.DiabetesType.Type2;if(a===r){t();return}l(await H6.postUserSettings({diabetesType:r})),t()},[a,t]),f=(0,H.useCallback)(()=>{s(!1)},[]),p=(0,H.useCallback)(()=>{c===!1?i.set({showSyncErrorModal:!0}):c&&a===Y.DiabetesType.Type2?s(!0):n&&n(),l(void 0)},[i,c,a,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(c5,{isVisible:e,items:[r(`type_of_diabetes_type1`),r(`type_of_diabetes_type2`)],onConfirm:d,onCancel:t,initialScrollIndex:u,onModalHide:p,testID:`diabetes_type_wheel_picker`}),(0,W.jsx)(Q2,{title:r(`modal_diabetes2_title`),isVisible:o,message:r(`modal_diabetes2_body`),onModalHide:n,buttons:[{title:r(`button_close`),onPress:f}]}),(0,W.jsx)(d5,{})]})});V(),l0();function Axn(){let{t:e}=RK(),{COLORS:t}=J(),{bottom:n}=n0(),{modalStoreActions:r}=Y8(),{colorScheme:i}=d0(),a=_0(i),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(void 0),{birthDate:v,diabetesType:y,biologicalSex:b,weightKg:x,heightCm:S}=H6;if(y===void 0)throw Error(`[AboutSection::render] diatbetesType must be defined.`);let C=(0,H.useMemo)(()=>v?new Date(v):void 0,[v]),w=(0,H.useMemo)(()=>y===Y.DiabetesType.Type1?`type_of_diabetes_type1`:`type_of_diabetes_type2`,[y]),T=(0,H.useCallback)(async e=>{e!==S&&_(await H6.postUserSettings({height:e})),d(!1)},[S]),E=(0,H.useCallback)(async e=>{e!==x&&_(await H6.postUserSettings({weight:e})),p(!1)},[x]),D=(0,H.useMemo)(()=>{if(S===void 0)return 0;let e=Math.round(S*10)/10;return Exn.indexOf(e.toString())},[S]),O=(0,H.useMemo)(()=>{if(x===void 0)return 0;let e=Math.round(x*10)/10;return Dxn.indexOf(e.toString())},[x]),k=async e=>{e.toISOString()!==v&&_(await H6.postUserSettings({birthday:e.toISOString()})),h(!1)},A=(0,H.useCallback)(()=>{g===!1&&r.set({showSyncErrorModal:!0}),_(void 0)},[r,g]),ee=(0,H.useCallback)(()=>{A()},[A]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(B,{children:(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`my_profile_birth`),value:C?C.toLocaleDateString():`-`,testID:`date-of-birth`,onPress:()=>{h(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_diabetes_type`),value:e(w),testID:`diabetes-type`,onPress:()=>{s(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_sex`),testID:`biologicalSex`,value:b?ayt[b]():`-`,onPress:()=>{l(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_height`),value:`${S??`-`} cm`,testID:`height`,onPress:()=>{d(!0)}}),(0,W.jsx)(t4,{title:e(`my_profile_weight`),value:`${x??`-`} kg`,testID:`weight`,onPress:()=>{p(!0)}})]})}),HK?(0,W.jsx)(vfn,{testID:`birthday-date-picker`,display:`spinner`,minimumDate:new Date(1900,0,1),maximumDate:new Date,date:C,isVisible:m,onConfirm:k,onCancel:()=>{h(!1)},customConfirmButtonIOS:xfn,customCancelButtonIOS:Sfn,pickerContainerStyleIOS:{backgroundColor:t.iosKeyboardPicker},modalStyleIOS:{paddingBottom:n},themeVariant:a,isDarkModeEnabled:a===`dark`,onHide:ee,pickerStyleIOS:{alignSelf:`center`}}):(0,W.jsx)(Txn,{isVisible:m,initialValue:C??new Date,onConfirm:k,onCancel:()=>{h(!1)},onModalHide:ee}),(0,W.jsx)(kxn,{isVisible:o,onCancel:()=>{s(!1)},onModalHide:A}),(0,W.jsx)(Oxn,{isVisible:c,onCancel:()=>{l(!1)},onModalHide:A}),(0,W.jsx)(c5,{isVisible:u,items:Exn,onConfirm:T,onCancel:()=>{d(!1)},initialScrollIndex:D,onModalHide:A,testID:`height_wheel_picker`}),(0,W.jsx)(c5,{isVisible:f,items:Dxn,onConfirm:E,onCancel:()=>{p(!1)},initialScrollIndex:O,onModalHide:A,testID:`weight_wheel_picker`}),(0,W.jsx)(d5,{onModalHide:()=>{_(void 0)}})]})}var jxn=S5(Axn);V();function Mxn(){let{t:e}=RK();return(0,W.jsxs)(ys,{testID:`profile-screen-scroll`,style:Nxn.scrollView,contentContainerStyle:Nxn.contentContainer,children:[(0,W.jsx)(t4,{title:e(`my_profile_account`),testID:`first-name`,renderRightSlot:()=>(0,W.jsx)(z2,{}),onPress:()=>{window.location.href=`/account`}}),(0,W.jsx)(jxn,{})]})}var Nxn=R.create({scrollView:{paddingHorizontal:16},contentContainer:{paddingVertical:32,flexGrow:1,gap:24}});V(),new Xf(Oi.RNDeviceInfo);var Pxn=c({getBaseOs:()=>tSn,getBatteryLevel:()=>Zxn,getBatteryLevelSync:()=>Qxn,getFreeDiskStorage:()=>iSn,getFreeDiskStorageSync:()=>aSn,getInstallReferrer:()=>Gxn,getInstallReferrerSync:()=>Lxn,getMaxMemory:()=>oSn,getMaxMemorySync:()=>Ixn,getPowerState:()=>lSn,getPowerStateSync:()=>uSn,getTotalDiskCapacity:()=>nSn,getTotalDiskCapacitySync:()=>rSn,getTotalMemory:()=>cSn,getTotalMemorySync:()=>Vxn,getUsedMemory:()=>sSn,getUsedMemorySync:()=>Hxn,getUserAgent:()=>Kxn,getUserAgentSync:()=>zxn,isAirplaneMode:()=>eSn,isAirplaneModeSync:()=>Rxn,isBatteryCharging:()=>qxn,isBatteryChargingSync:()=>Jxn,isCameraPresent:()=>Yxn,isCameraPresentSync:()=>Xxn,isLocationEnabled:()=>$xn,isLocationEnabledSync:()=>Bxn}),A9,j9,Fxn,M9,N9,Ixn,Lxn,Rxn,zxn,Bxn,Vxn,Hxn,Uxn,Wxn,Gxn,Kxn,qxn,Jxn,Yxn,Xxn,Zxn,Qxn,$xn,eSn,tSn,nSn,rSn,iSn,aSn,oSn,sSn,cSn,lSn,uSn,dSn=o((()=>{V(),A9=new Xf(Oi.RNDeviceInfo),j9=!1,Fxn=-1,M9={},N9=e=>{let{level:t,charging:n,chargingtime:r,dischargingtime:i}=e;return{batteryLevel:t,lowPowerMode:!1,batteryState:t===1?`full`:n?`charging`:`unplugged`,chargingtime:r,dischargingtime:i}},Ixn=()=>window.performance&&window.performance.memory?window.performance.memory.jsHeapSizeLimit:-1,Lxn=()=>document.referrer,Rxn=()=>!!navigator.onLine,zxn=()=>window.navigator.userAgent,Bxn=()=>!!navigator.geolocation,Vxn=()=>navigator.deviceMemory?navigator.deviceMemory*1e9:-1,Hxn=()=>window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:-1,Uxn=()=>{typeof navigator>`u`||!navigator.getBattery||navigator.getBattery().then(e=>{j9=e.charging,e.addEventListener(`chargingchange`,()=>{let{charging:t}=e;j9=t,M9=N9(e),A9.emit(`RNDeviceInfo_powerStateDidChange`,M9)}),e.addEventListener(`levelchange`,()=>{let{level:t}=e;Fxn=t,M9=N9(e),A9.emit(`RNDeviceInfo_batteryLevelDidChange`,t),t<.2&&A9.emit(`RNDeviceInfo_batteryLevelIsLow`,t)})})},Wxn=()=>{let e=window.navigator.userAgent,t=window.navigator.platform,n=[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`],r=[`Win32`,`Win64`,`Windows`,`WinCE`],i=[`iPhone`,`iPad`,`iPod`],a=t;return n.indexOf(t)===-1?i.indexOf(t)===-1?r.indexOf(t)===-1?/Android/.test(e)?a=`Android`:!a&&/Linux/.test(t)&&(a=`Linux`):a=`Windows`:a=`iOS`:a=`Mac OS`,a},Uxn(),Gxn=async()=>Lxn(),Kxn=async()=>zxn(),qxn=async()=>navigator.getBattery?navigator.getBattery().then(e=>e.charging):!1,Jxn=()=>j9,Yxn=async()=>navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?navigator.mediaDevices.enumerateDevices().then(e=>!!e.find(e=>e.kind===`videoinput`)):!1,Xxn=()=>(console.log(`[react-native-device-info] isCameraPresentSync not supported - please use isCameraPresent`),!1),Zxn=async()=>navigator.getBattery?navigator.getBattery().then(e=>e.level):-1,Qxn=()=>Fxn,$xn=async()=>Bxn(),eSn=async()=>Rxn(),tSn=async()=>Wxn(),nSn=async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e})=>e):-1,rSn=()=>(console.log(`[react-native-device-info] getTotalDiskCapacitySync not supported - please use getTotalDiskCapacity`),-1),iSn=async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e,usage:t})=>e-t):-1,aSn=()=>(console.log(`[react-native-device-info] getFreeDiskStorageSync not supported - please use getFreeDiskStorage`),-1),oSn=async()=>Ixn(),sSn=async()=>Hxn(),cSn=async()=>Vxn(),lSn=async()=>navigator.getBattery?navigator.getBattery().then(e=>N9(e)):{},uSn=()=>M9}));V();var fSn=Oi.RNDeviceInfo;if((z.OS===`web`||z.OS===`dom`)&&(fSn=(dSn(),d(Pxn))),!fSn&&(z.OS===`android`||z.OS===`ios`||z.OS===`web`||z.OS===`dom`))throw Error("react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:\n • For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.\n • Rebuild and re-run the app.\n • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-device-info/react-native-device-info");var $=fSn;V();var P9={};function pSn(e,t,n){let r={};return e.filter(e=>z.OS==e).forEach(e=>r[e]=t),z.select({...r,default:n})}function mSn({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:r}){if(r&&P9[r]!=null)return P9[r];{let i=pSn(t,e,()=>n)();return r&&(P9[r]=i),i}}async function hSn({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:r}){if(r&&P9[r]!=null)return P9[r];{let i=await pSn(t,e,()=>Promise.resolve(n))();return r&&(P9[r]=i),i}}function F9({syncGetter:e,...t}){return[(...e)=>hSn({...t,getter:()=>t.getter(...e)}),(...n)=>mSn({...t,getter:()=>e(...n)})]}V();var[gSn,_Sn]=F9({memoKey:`uniqueId`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getUniqueId(),syncGetter:()=>$.getUniqueIdSync(),defaultValue:`unknown`}),[vSn,ySn]=F9({memoKey:`instanceId`,supportedPlatforms:[`android`],getter:()=>$.getInstanceId(),syncGetter:()=>$.getInstanceIdSync(),defaultValue:`unknown`}),[bSn,xSn]=F9({memoKey:`serialNumber`,supportedPlatforms:[`android`,`windows`],getter:()=>$.getSerialNumber(),syncGetter:()=>$.getSerialNumberSync(),defaultValue:`unknown`}),[SSn,CSn]=F9({memoKey:`androidId`,supportedPlatforms:[`android`],getter:()=>$.getAndroidId(),syncGetter:()=>$.getAndroidIdSync(),defaultValue:`unknown`}),[wSn,TSn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getIpAddress(),syncGetter:()=>$.getIpAddressSync(),defaultValue:`unknown`}),[ESn,DSn]=F9({supportedPlatforms:[`android`,`windows`,`web`],getter:()=>$.isCameraPresent(),syncGetter:()=>$.isCameraPresentSync(),defaultValue:!1}),[OSn,kSn]=F9({memoKey:`manufacturer`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>z.OS==`ios`?Promise.resolve(`Apple`):$.getSystemManufacturer(),syncGetter:()=>z.OS==`ios`?`Apple`:$.getSystemManufacturerSync(),defaultValue:`unknown`}),ASn=()=>mSn({defaultValue:`unknown`,supportedPlatforms:[`ios`,`android`,`windows`],memoKey:`systemName`,getter:()=>z.select({ios:$.systemName,android:`Android`,windows:`Windows`,default:`unknown`})}),jSn=()=>mSn({defaultValue:`unknown`,getter:()=>$.systemVersion,supportedPlatforms:[`android`,`ios`,`windows`],memoKey:`systemVersion`}),[MSn,NSn]=F9({memoKey:`buildId`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getBuildId(),syncGetter:()=>$.getBuildIdSync(),defaultValue:`unknown`}),[PSn,FSn]=F9({memoKey:`apiLevel`,supportedPlatforms:[`android`],getter:()=>$.getApiLevel(),syncGetter:()=>$.getApiLevelSync(),defaultValue:-1}),[ISn,LSn]=F9({memoKey:`installerPackageName`,supportedPlatforms:[`android`,`windows`,`ios`],getter:()=>$.getInstallerPackageName(),syncGetter:()=>$.getInstallerPackageNameSync(),defaultValue:`unknown`}),[RSn,zSn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getDeviceName(),syncGetter:()=>$.getDeviceNameSync(),defaultValue:`unknown`}),[BSn,VSn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getUsedMemory(),syncGetter:()=>$.getUsedMemorySync(),defaultValue:-1}),[HSn,USn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getFontScale(),syncGetter:()=>$.getFontScaleSync(),defaultValue:-1}),[WSn,GSn]=F9({memoKey:`bootloader`,supportedPlatforms:[`android`],getter:()=>$.getBootloader(),syncGetter:()=>$.getBootloaderSync(),defaultValue:`unknown`}),[KSn,qSn]=F9({getter:()=>$.getDevice(),syncGetter:()=>$.getDeviceSync(),defaultValue:`unknown`,memoKey:`device`,supportedPlatforms:[`android`]}),[JSn,YSn]=F9({memoKey:`display`,supportedPlatforms:[`android`],getter:()=>$.getDisplay(),syncGetter:()=>$.getDisplaySync(),defaultValue:`unknown`}),[XSn,ZSn]=F9({memoKey:`fingerprint`,supportedPlatforms:[`android`],getter:()=>$.getFingerprint(),syncGetter:()=>$.getFingerprintSync(),defaultValue:`unknown`}),[QSn,$Sn]=F9({memoKey:`hardware`,supportedPlatforms:[`android`],getter:()=>$.getHardware(),syncGetter:()=>$.getHardwareSync(),defaultValue:`unknown`}),[eCn,tCn]=F9({memoKey:`host`,supportedPlatforms:[`android`,`windows`],getter:()=>$.getHost(),syncGetter:()=>$.getHostSync(),defaultValue:`unknown`}),[nCn,rCn]=F9({memoKey:`hostNames`,supportedPlatforms:[`windows`],getter:()=>$.getHostNames(),syncGetter:()=>$.getHostNamesSync(),defaultValue:[]}),[iCn,aCn]=F9({memoKey:`product`,supportedPlatforms:[`android`],getter:()=>$.getProduct(),syncGetter:()=>$.getProductSync(),defaultValue:`unknown`}),[oCn,sCn]=F9({memoKey:`tags`,supportedPlatforms:[`android`],getter:()=>$.getTags(),syncGetter:()=>$.getTagsSync(),defaultValue:`unknown`}),[cCn,lCn]=F9({memoKey:`type`,supportedPlatforms:[`android`],getter:()=>$.getType(),syncGetter:()=>$.getTypeSync(),defaultValue:`unknown`}),[uCn,dCn]=F9({memoKey:`baseOs`,supportedPlatforms:[`android`,`web`,`windows`],getter:()=>$.getBaseOs(),syncGetter:()=>$.getBaseOsSync(),defaultValue:`unknown`}),[fCn,pCn]=F9({memoKey:`previewSdkInt`,supportedPlatforms:[`android`],getter:()=>$.getPreviewSdkInt(),syncGetter:()=>$.getPreviewSdkIntSync(),defaultValue:-1}),[mCn,hCn]=F9({memoKey:`securityPatch`,supportedPlatforms:[`android`],getter:()=>$.getSecurityPatch(),syncGetter:()=>$.getSecurityPatchSync(),defaultValue:`unknown`}),[gCn,_Cn]=F9({memoKey:`codeName`,supportedPlatforms:[`android`],getter:()=>$.getCodename(),syncGetter:()=>$.getCodenameSync(),defaultValue:`unknown`}),[vCn,yCn]=F9({memoKey:`incremental`,supportedPlatforms:[`android`],getter:()=>$.getIncremental(),syncGetter:()=>$.getIncrementalSync(),defaultValue:`unknown`}),[bCn,xCn]=F9({memoKey:`emulator`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.isEmulator(),syncGetter:()=>$.isEmulatorSync(),defaultValue:!1}),[SCn,CCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.isPinOrFingerprintSet(),syncGetter:()=>$.isPinOrFingerprintSetSync(),defaultValue:!1}),[wCn,TCn]=F9({supportedPlatforms:[`android`],getter:()=>$.hasGms(),syncGetter:()=>$.hasGmsSync(),defaultValue:!1}),[ECn,DCn]=F9({supportedPlatforms:[`android`],getter:()=>$.hasHms(),syncGetter:()=>$.hasHmsSync(),defaultValue:!1}),[OCn,kCn]=F9({memoKey:`firstInstallTime`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getFirstInstallTime(),syncGetter:()=>$.getFirstInstallTimeSync(),defaultValue:-1}),[ACn,jCn]=F9({memoKey:`installReferrer`,supportedPlatforms:[`android`,`windows`,`web`],getter:()=>$.getInstallReferrer(),syncGetter:()=>$.getInstallReferrerSync(),defaultValue:`unknown`}),[MCn,NCn]=F9({memoKey:`lastUpdateTime`,supportedPlatforms:[`android`],getter:()=>$.getLastUpdateTime(),syncGetter:()=>$.getLastUpdateTimeSync(),defaultValue:-1}),[PCn,FCn]=F9({memoKey:`startupTime`,supportedPlatforms:[`android`,`ios`],getter:()=>$.getStartupTime(),syncGetter:()=>$.getStartupTimeSync(),defaultValue:-1}),[ICn,LCn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.getCarrier(),syncGetter:()=>$.getCarrierSync(),defaultValue:`unknown`}),[RCn,zCn]=F9({memoKey:`totalMemory`,supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getTotalMemory(),syncGetter:()=>$.getTotalMemorySync(),defaultValue:-1}),[BCn,VCn]=F9({memoKey:`maxMemory`,supportedPlatforms:[`android`,`windows`,`web`],getter:()=>$.getMaxMemory(),syncGetter:()=>$.getMaxMemorySync(),defaultValue:-1}),[HCn,UCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getTotalDiskCapacity(),syncGetter:()=>$.getTotalDiskCapacitySync(),defaultValue:-1}),[WCn,GCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:(e=`total`)=>z.OS===`ios`?$.getFreeDiskStorage(e):$.getFreeDiskStorage(),syncGetter:(e=`total`)=>z.OS===`ios`?$.getFreeDiskStorageSync(e):$.getFreeDiskStorageSync(),defaultValue:-1}),[KCn,qCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.getBatteryLevel(),syncGetter:()=>$.getBatteryLevelSync(),defaultValue:-1}),[JCn,YCn]=F9({supportedPlatforms:[`ios`,`android`,`windows`,`web`],getter:()=>$.getPowerState(),syncGetter:()=>$.getPowerStateSync(),defaultValue:{}}),[XCn,ZCn]=F9({supportedPlatforms:[`android`,`ios`,`windows`,`web`],getter:()=>$.isBatteryCharging(),syncGetter:()=>$.isBatteryChargingSync(),defaultValue:!1}),[QCn,$Cn]=F9({supportedPlatforms:[`android`,`web`],getter:()=>$.isAirplaneMode(),syncGetter:()=>$.isAirplaneModeSync(),defaultValue:!1}),[ewn,twn]=F9({memoKey:`_supportedAbis`,supportedPlatforms:[`android`,`ios`,`windows`],getter:()=>$.getSupportedAbis(),syncGetter:()=>$.getSupportedAbisSync(),defaultValue:[]}),[nwn,rwn]=F9({memoKey:`_supported32BitAbis`,supportedPlatforms:[`android`],getter:()=>$.getSupported32BitAbis(),syncGetter:()=>$.getSupported32BitAbisSync(),defaultValue:[]}),[iwn,awn]=F9({memoKey:`_supported64BitAbis`,supportedPlatforms:[`android`],getter:()=>$.getSupported64BitAbis(),syncGetter:()=>$.getSupported64BitAbisSync(),defaultValue:[]}),[own,swn]=F9({supportedPlatforms:[`android`],getter:()=>$.getSystemAvailableFeatures(),syncGetter:()=>$.getSystemAvailableFeaturesSync(),defaultValue:[]}),[cwn,lwn]=F9({supportedPlatforms:[`android`,`ios`,`web`],getter:()=>$.isLocationEnabled(),syncGetter:()=>$.isLocationEnabledSync(),defaultValue:!1}),[uwn,dwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.isHeadphonesConnected(),syncGetter:()=>$.isHeadphonesConnectedSync(),defaultValue:!1}),[fwn,pwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.isWiredHeadphonesConnected(),syncGetter:()=>$.isWiredHeadphonesConnectedSync(),defaultValue:!1}),[mwn,hwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.isBluetoothHeadphonesConnected(),syncGetter:()=>$.isBluetoothHeadphonesConnectedSync(),defaultValue:!1}),[gwn,_wn]=F9({supportedPlatforms:[`windows`],getter:()=>$.isMouseConnected(),syncGetter:()=>$.isMouseConnectedSync(),defaultValue:!1}),[vwn,ywn]=F9({supportedPlatforms:[`windows`],getter:()=>$.isKeyboardConnected(),syncGetter:()=>$.isKeyboardConnectedSync(),defaultValue:!1}),[bwn,xwn]=F9({supportedPlatforms:[`android`],getter:()=>$.getSupportedMediaTypeList(),syncGetter:()=>$.getSupportedMediaTypeListSync(),defaultValue:[]}),[Swn,Cwn]=F9({supportedPlatforms:[`android`,`ios`],getter:()=>$.getAvailableLocationProviders(),syncGetter:()=>$.getAvailableLocationProvidersSync(),defaultValue:{}}),[wwn,Twn]=F9({supportedPlatforms:[`ios`],getter:()=>$.getBrightness(),syncGetter:()=>$.getBrightnessSync(),defaultValue:-1});new Xf(Oi.RNDeviceInfo),V();var Ewn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{navigate:n}=XQ(),r=(0,H.useCallback)(async()=>{if(VK)n(Q.SupportContact);else{let e=`App version: ${x6}\n${ASn()} version: ${jSn()}`;await vre.openURL(`mailto:support@hedia.com?subject=Hedia support&body=${e}`)}},[n]);return(0,W.jsxs)(ys,{contentContainerStyle:Dwn.wrapper,children:[(0,W.jsx)(X,{style:[Dwn.title,{color:t.labelPrimary}],children:e(`support_title`)}),(0,W.jsxs)(B,{style:Dwn.buttons,children:[(0,W.jsx)(I2,{title:e(`button_email`),onPress:r,testID:`send_email_button`}),(0,W.jsx)(I2,{title:e(`button_support_page`),onPress:()=>{n(Q.SupportWebView)},testID:`open_support_page_button`,type:F2.Secondary}),(0,W.jsx)(I2,{title:e(`button_instructions`),onPress:()=>{C6(S6.SettingsIFU),n(Q.IFU)},testID:`open_ifu_page_button`,type:F2.Secondary})]})]})},Dwn=R.create({wrapper:{flex:1,justifyContent:`center`,paddingHorizontal:16},title:{...q.Poppins.bold_2XL,marginBottom:48,textAlign:`center`},buttons:{gap:16}});V();var Own=()=>{let{t:e}=RK(),{COLORS:t}=J(),{colorScheme:n,setColorScheme:r}=d0(),i=U8(),{bottomWithScroll:a}=B2(),o=(0,H.useCallback)(e=>{let t=`colorScheme-${e.toLowerCase()}`;return u0[e]===n?`${t}-selected`:t},[n]),s=(0,H.useCallback)(e=>{u0[e]!==n&&r(u0[e])},[n,r]);return(0,W.jsxs)(ys,{contentContainerStyle:[I9.scrollView,{paddingTop:i+16,paddingBottom:a}],children:[(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`theme_system`),renderRightSlot:()=>(0,W.jsx)(B,{style:I9.checkmarkContainer,children:u0.System===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{s(`System`)},testID:o(`System`),displayType:e4.ListItem}),(0,W.jsx)(t4,{title:e(`theme_dark`),renderRightSlot:()=>(0,W.jsx)(B,{style:I9.checkmarkContainer,children:u0.Dark===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{s(`Dark`)},testID:o(`Dark`),displayType:e4.ListItem}),(0,W.jsx)(t4,{title:e(`theme_light`),renderRightSlot:()=>(0,W.jsx)(B,{style:I9.checkmarkContainer,children:u0.Light===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{s(`Light`)},testID:o(`Light`),displayType:e4.ListItem})]}),(0,W.jsx)(X,{style:[I9.description,{color:t.labelSecondary}],testID:`settings-colorScheme-hint`,children:e(`theme_subtitle`)})]})},I9=R.create({scrollView:{paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24},description:{...q.Poppins.regular_SM,margin:16}});V();var kwn=()=>{let{COLORS:e}=J(),{fontScale:t}=Cm(),n=t.toFixed(3);return(0,W.jsxs)(B,{style:{backgroundColor:e.textWarning,borderRadius:16,padding:8},children:[(0,W.jsx)(X,{style:[Awn.text,{color:e.bgPrimary}],children:`Font scale: ${n}`}),(0,W.jsx)(X,{style:[Awn.textBold,{color:e.bgPrimary}],children:NK.HEDIA_API_URL_V2})]})},Awn=R.create({text:{...q.Poppins.regular_Base,textAlign:`center`},textBold:{...q.Poppins.semiBold_Base,textAlign:`center`}});V();function jwn(){let{t:e}=RK(),{COLORS:t}=J(),n=XQ(),[r,i]=(0,H.useState)(!0),a=(0,H.useCallback)(()=>{C6(S6.SettingsProfile),n.navigate(Q.Profile)},[n]),o=(0,H.useCallback)(()=>{C6(S6.SettingsGlucose),n.navigate(Q.GlucoseSettings)},[n]),s=(0,H.useCallback)(()=>{C6(S6.SettingsInsulin),n.navigate(Q.InsulinSettingsStack,{screen:Q.InsulinSettings})},[n]),c=(0,H.useCallback)(()=>{C6(S6.SettingsActivity),n.navigate(Q.ActivitySettings)},[n]),l=(0,H.useCallback)(()=>{C6(S6.SettingsSupport),n.navigate(Q.Support)},[n]),u=(0,H.useCallback)(()=>{C6(S6.SettingsLegal),n.navigate(Q.Legal)},[n]);return(0,W.jsxs)(ys,{testID:`scroll-settings`,style:L9.scrollView,contentContainerStyle:L9.scrollViewContentContainer,contentInsetAdjustmentBehavior:`automatic`,children:[(0,W.jsx)(t4,{title:e(`settings_card_my_profile`),testID:`edit-profile-button`,renderRightSlot:()=>(0,W.jsx)(z2,{}),onPress:a}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`settings_card_glucose`),testID:`settings-glucose`,onPress:o,renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:e(`settings_card_insulin_settings`),testID:`settings-insulin`,onPress:s,renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:e(`settings_card_physical_activity`),testID:`settings-activity`,onPress:c,renderRightSlot:()=>(0,W.jsx)(z2,{})})]}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:e(`settings_support`),testID:`settings-support`,onPress:l,renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:e(`settings_card_legal`),testID:`settings-legal`,onPress:u,renderRightSlot:()=>(0,W.jsx)(z2,{})})]}),(0,W.jsx)(_p,{onPress:()=>{i(!r)},style:L9.versionContainer,children:(0,W.jsx)(X,{style:[L9.versionText,{color:t.labelSecondary}],children:r?x6:`(${znn})`})}),NK.IS_PRODUCTION!==`true`&&(0,W.jsx)(B,{children:(0,W.jsx)(kwn,{})})]})}var L9=R.create({scrollView:{flex:1,paddingHorizontal:16},scrollViewContentContainer:{paddingVertical:32,flexGrow:1,gap:24},versionContainer:{alignItems:`center`,marginTop:`auto`},versionText:{...q.Poppins.regular_Base}});V();function Mwn(){let{COLORS:e}=J();return(0,W.jsx)(B,{style:[Nwn.separator,{backgroundColor:e.divider}]})}var Nwn=R.create({separator:{height:1}}),R9=J2(Y.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,Y.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX),z9=function(e){return e.DividendNumber=`109`,e.ExampleInsulinSensitivity=`2.2`,e}({}),Pwn=function(e){return e.DividendNumber=`1960`,e.ExampleInsulinSensitivity=`39.2`,e}({}),Fwn=J2(Y.CONSTANTS.INSULIN_SENSITIVITY_MIN,Y.CONSTANTS.INSULIN_SENSITIVITY_MAX),Iwn=q2(5,393);V();var Lwn=({onPress:e,isVisible:t})=>{let{t:n}=RK(),{COLORS:r}=J();return(0,W.jsxs)(Q2,{isVisible:t,title:n(`insulin_settings_modal_carb_ratio_title`),enableScroll:!0,buttons:[{title:n(`button_close`),onPress:e,testID:`close-button`}],children:[(0,W.jsx)(X,{testID:`insulin_settings_modal_carb_ratio_body`,style:[Rwn.bodyText,{color:r.labelSecondary}],children:n(`insulin_settings_modal_carb_ratio_body`)}),(0,W.jsx)(X,{testID:`insulin_settings_modal_carb_ratio_example`,style:{color:r.labelSecondary},children:n(`insulin_settings_modal_carb_example_body`)})]})},Rwn=R.create({bodyText:{marginTop:12,marginBottom:16}});V();var zwn=({glucoseUnit:e,onPress:t,isVisible:n})=>{let{t:r}=RK(),{COLORS:i}=J(),{text:a}=X6(e),o=e===Y.BloodGlucoseUnit.MMOL_L?z9.DividendNumber:Pwn.DividendNumber,s=e===Y.BloodGlucoseUnit.MMOL_L?z9.ExampleInsulinSensitivity:Pwn.ExampleInsulinSensitivity;return(0,W.jsxs)(Q2,{title:r(`modal_insulin_seneitivity_title`),isVisible:n,enableScroll:!0,buttons:[{title:r(`button_close`),onPress:t,testID:`close-button`}],children:[(0,W.jsx)(X,{testID:`insulin_sensitivity_modal_body`,style:[Bwn.bodyText,{color:i.labelSecondary}],children:r(`insulin_sensitivity_modal_body`,{dividerNumber:o})}),(0,W.jsx)(X,{testID:`insulin_sensitivity_modal_example`,style:{color:i.labelSecondary},children:r(`insulin_sensitivity_modal_example`,{dividerNumber:o,displayResult:s,displayUnit:a})})]})},Bwn=R.create({bodyText:{marginTop:12,marginBottom:16}});V();var Vwn=()=>{let{t:e}=RK(),{bloodGlucoseUnits:t}=_5(),n=H6.glucoseUnit??t;if(n===void 0)throw Error(`[HelpCalculatingSection::render] glucoseUnit must be defined.`);let[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(!1),s=n===Y.BloodGlucoseUnit.MMOL_L?z9.DividendNumber:Pwn.DividendNumber;return(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:e(`insulin_settings_learn_more_title`)}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{testID:`info-insulin-carbs-ratio`,title:e(`insulin_settings_learn_more_carb_ratio`),onPress:()=>{o(!0)},displayType:e4.ListItem}),(0,W.jsx)(t4,{testID:`info-insulin-sensitivity-${s}`,title:e(`insulin_settings_learn_more_sensitivity`),onPress:()=>{i(!0)},displayType:e4.ListItem})]}),(0,W.jsx)(zwn,{onPress:()=>{i(!1)},glucoseUnit:n,isVisible:r}),(0,W.jsx)(Lwn,{onPress:()=>{o(!1)},isVisible:a})]})};V();var Hwn=({withLockedSettings:e})=>{let{t}=RK(),{COLORS:n}=J(),{modalStoreActions:r}=Y8(),{glucoseUnit:i,treatmentParameters:a}=H6;if(i===void 0)throw Error(`[DailyInsulinTable::render] glucoseUnit is undefined.`);if(a===void 0)throw Error(`[DailyInsulinTable::render] parameters from userSettings must be defined and non-null.`);let o=a.use,[s,c]=(0,H.useState)(!1),[l,u]=(0,H.useState)(!1),[d,f]=(0,H.useState)(void 0),[p,m]=(0,H.useState)(0),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(),y=(0,H.useCallback)(async e=>{let t=Q6(e,i,Y.BloodGlucoseUnit.MMOL_L);if(t!==a.parameterIntervals[p].insulinSensitivity){let e={...a,parameterIntervals:a.parameterIntervals.map((e,n)=>n===p?{...e,insulinSensitivity:t}:e),updatedAt:new Date().toISOString()};f(await H6.postUserSettings({parameters:e}))}c(!1)},[i,a,p]),b=(0,H.useCallback)(async e=>{let t=Number(e.toFixed(1));if(t!==a.parameterIntervals[p].carbohydrateRatio){let e={...a,parameterIntervals:a.parameterIntervals.map((e,n)=>n===p?{...e,carbohydrateRatio:t}:e),updatedAt:new Date().toISOString()};f(await H6.postUserSettings({parameters:e}))}u(!1)},[a,p]),{text:x}=X6(i),S=(0,H.useMemo)(()=>[{title:t(`table_variable_insulin_time`),subtitle:t(`table_variable_time_unit`),scale:g0.s2},{title:t(`table_variable_insulin_sensitivity`),subtitle:t(`table_variable_insulin_sensitivity_unit`,{displayUnit:x}),scale:g0.s2},{title:t(`table_variable_insulin_carb`),subtitle:t(`table_variable_insulin_carb_unit`),scale:g0.s2}],[x,t]),C=(0,H.useMemo)(()=>i===Y.BloodGlucoseUnit.MG_DL?Iwn:Fwn,[i]),w=(0,H.useMemo)(()=>{let e=a.parameterIntervals[p].insulinSensitivity,t=$6(e,Y.BloodGlucoseUnit.MMOL_L,i);return C.findIndex(e=>e===t)},[C,i,a.parameterIntervals,p]),T=(0,H.useMemo)(()=>{let e=a.parameterIntervals[p].carbohydrateRatio.toFixed(1);return R9.findIndex(t=>t===e)},[a.parameterIntervals,p]),E=e=>{let t=a.parameterIntervals[(e-1+a.parameterIntervals.length)%a.parameterIntervals.length].startTime,n=a.parameterIntervals[(e+1+a.parameterIntervals.length)%a.parameterIntervals.length].startTime,r=a.parameterIntervals[e].startTime,i=k7(r,`HH:mm`,new Date),o=k7(t,`HH:mm`,new Date),s=k7(n,`HH:mm`,new Date);q7(i,o)&&q7(i,s)?v({current:i,min:U2(k7(t,`HH:mm`,nxn(new Date,1)),1),max:W2(s,1)}):C9(i,o)&&C9(i,s)?v({current:i,min:U2(o,1),max:W2(k7(n,`HH:mm`,O7(new Date,1)),1)}):v({current:i,min:U2(o,1),max:W2(s,1)}),m(e),g(!0)},D=e=>{m(e),c(!0)},O=e=>{m(e),u(!0)},k=(0,H.useCallback)(async e=>{let t=Y6(e,`HH:mm`);if(t!==a.parameterIntervals[p].startTime){let e=[...a.parameterIntervals],n={...e[p]};n.startTime=t,e[p]=n,f(await H6.postUserSettings({parameters:{...a,parameterIntervals:e,updatedAt:new Date().toISOString()}}))}g(!1)},[a,p]),A=(0,H.useCallback)(()=>{g(!1)},[]),ee=(0,H.useCallback)(async e=>{let t={...a,use:e?Y.Usage.Intervals:Y.Usage.Overall,updatedAt:new Date().toISOString()},n=await H6.postUserSettings({parameters:t});r.set({showSyncErrorModal:!n})},[a,r]),te=(0,H.useCallback)(()=>{d===!1&&r.set({showSyncErrorModal:!0}),f(void 0)},[r,d]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(y9,{columnDisposition:[2,3,3],children:[(0,W.jsx)(E4,{testID:`daily-interval-switch`,title:t(`variable_insulin_settings_title`),message:t(`variable_insulin_settings_body`),value:o===Y.Usage.Intervals,onValueChange:e(ee),style:B9.switchContainer}),(0,W.jsx)(_9,{disabled:o!==Y.Usage.Intervals,children:S.map((e,t)=>(0,W.jsxs)(x9,{style:t===0&&B9.firstTableCell,children:[(0,W.jsx)(X,{maxFontSizeMultiplier:e.scale,style:[B9.tableHeaderTitle,{color:n.labelPrimary},t!==0&&B9.tableHeaderTitleWithMargin],children:e.title}),(0,W.jsx)(X,{style:[B9.tableSubtitle,{color:n.textTableSecondary}],children:e.subtitle})]},e.title))}),Object.keys(BK).map((t,r)=>(0,W.jsxs)(v9,{disabled:o!==Y.Usage.Intervals,children:[(0,W.jsxs)(b9,{onPress:e(()=>{E(r)}),style:B9.firstTableCell,children:[(0,W.jsx)(X,{maxFontSizeMultiplier:g0.s2,style:[B9.tableTitle,{color:n.textTableHighlight}],children:a.parameterIntervals[r].startTime}),(0,W.jsx)(X,{style:[B9.tableSubtitle,{color:n.textTableSecondary}],children:iyt[t]()})]}),(0,W.jsx)(b9,{testID:`${t.toLowerCase()}-insulin`,onPress:e(()=>{D(r)}),children:(0,W.jsx)(X,{maxFontSizeMultiplier:g0.s2,style:[B9.tableText,{color:n.textTableHighlight}],children:$6(a.parameterIntervals[r].insulinSensitivity,Y.BloodGlucoseUnit.MMOL_L,i)})}),(0,W.jsx)(b9,{testID:`${t.toLowerCase()}-carbs`,onPress:e(()=>{O(r)}),children:(0,W.jsx)(X,{maxFontSizeMultiplier:g0.s2,style:[B9.tableText,{color:n.textTableHighlight}],children:a.parameterIntervals[r].carbohydrateRatio.toFixed(1)})})]},t))]}),(0,W.jsx)(oxn,{isVisible:h,initialValue:_?.current??new Date,min:_?.min,max:_?.max,onConfirm:k,onCancel:A,onModalHide:te}),(0,W.jsx)(c5,{isVisible:s,items:C,initialScrollIndex:w,onConfirm:y,onCancel:()=>{c(!1)},onModalHide:te,testID:`insulin_sensitivity_picker`}),(0,W.jsx)(c5,{isVisible:l,items:R9,initialScrollIndex:T,onConfirm:b,onCancel:()=>{u(!1)},onModalHide:te,testID:`insulin_to_carb_ratio_picker`})]})},B9=R.create({switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0},firstTableCell:{paddingLeft:16,alignItems:`flex-start`,justifyContent:`space-between`,borderLeftWidth:0},tableHeaderTitle:{...q.Poppins.medium_SM,textAlign:`center`},tableHeaderTitleWithMargin:{marginHorizontal:8},tableTitle:{...q.Poppins.medium_Base},tableSubtitle:{...q.Poppins.regular_XS},tableText:{...q.Poppins.medium_Base}}),Uwn=S5(Hwn);V();var Wwn={Lantus:()=>LK(`long-acting_insulin_option1`),Basaglar:()=>LK(`long-acting_insulin_option2`),Tuojeo:()=>LK(`long-acting_insulin_option3`),Levemir:()=>LK(`long-acting_insulin_option4`),Tresiba:()=>LK(`long-acting_insulin_option5`),Other:()=>LK(`long-acting_insulin_option6`),None:()=>LK(`long-acting_insulin_option7`)},Gwn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),{longActingInsulin:n,treatmentParameters:r}=H6,i=(0,H.useCallback)(async t=>{t!==n&&(await H6.postUserSettings({longActingInsulin:Y.LongActingInsulin[t],parameters:r?{...r,updatedAt:new Date().toISOString()}:void 0})||e.set({showSyncErrorModal:!0}))},[n,r,e]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[Kwn.scrollView,{paddingTop:t+16}],children:[(0,W.jsx)(t4.Container,{children:Object.keys(Y.LongActingInsulin).map(e=>(0,W.jsx)(t4,{title:Wwn[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:Kwn.checkmarkContainer,children:Y.LongActingInsulin[e]===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>i(e),displayType:e4.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`},e))}),(0,W.jsx)(d5,{})]})},Kwn=R.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),qwn=S5(Gwn);V();var Jwn={Novorapid:()=>LK(`rapid-acting_insulin_option1`),Fiasp:()=>LK(`rapid-acting_insulin_option2`),Humalog:()=>LK(`rapid-acting_insulin_option3`),Apidra:()=>LK(`rapid-acting_insulin_option4`),Other:()=>LK(`rapid-acting_insulin_option5`),None:()=>LK(`rapid-acting_insulin_option6`)},Ywn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),{fastActingInsulin:n,treatmentParameters:r}=H6,i=(0,H.useCallback)(async t=>{t!==n&&(await H6.postUserSettings({fastActingInsulin:Y.FastActingInsulin[t],parameters:r?{...r,updatedAt:new Date().toISOString()}:void 0})||e.set({showSyncErrorModal:!0}))},[n,r,e]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[Xwn.scrollView,{paddingTop:t+16}],children:[(0,W.jsx)(t4.Container,{children:Object.keys(Y.FastActingInsulin).map(e=>(0,W.jsx)(t4,{title:Jwn[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:Xwn.checkmarkContainer,children:Y.FastActingInsulin[e]===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>i(e),displayType:e4.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`},e))}),(0,W.jsx)(d5,{})]})},Xwn=R.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),Zwn=S5(Ywn);V();var V9={PenHalf:()=>LK(`treatment_type_option1`),PenWhole:()=>LK(`treatment_type_option2`),Pump:()=>LK(`treatment_type_option3`)},Qwn=()=>{let{modalStoreActions:e}=Y8(),t=U8(),{injectionMethod:n,treatmentParameters:r}=H6,i=(0,H.useCallback)(async t=>{t!==n&&(await H6.postUserSettings({treatmentType:Y.InjectionMethod[t],parameters:r?{...r,updatedAt:new Date().toISOString()}:void 0})||e.set({showSyncErrorModal:!0}))},[n,r,e]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[{...$wn.scrollView,paddingTop:t+16}],children:[(0,W.jsx)(t4.Container,{children:Object.keys(Y.InjectionMethod).map(e=>(0,W.jsx)(t4,{title:V9[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:$wn.checkmarkContainer,children:Y.InjectionMethod[e]===n?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>i(e),testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`,displayType:e4.ListItem},e))}),(0,W.jsx)(d5,{})]})},$wn=R.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),eTn=S5(Qwn);V();function tTn({withLockedSettings:e}){let{t}=RK(),n=XQ(),{injectionMethod:r,fastActingInsulin:i,longActingInsulin:a}=H6;if(r===void 0)throw Error(`[TreatmentSection::render] injectionMethod must be defined and non-null.`);let o=(0,H.useMemo)(()=>V9[C5t(Y.InjectionMethod,r)](),[r]),s=(0,H.useMemo)(()=>i?Jwn[i]():`-`,[i]),c=(0,H.useMemo)(()=>a?Wwn[a]():`-`,[a]);return(0,W.jsxs)(B,{children:[(0,W.jsx)(t4,{title:t(`my_profile_treatment_type`),value:o,testID:`treatment-type`,onPress:e(()=>{n.navigate(Q.TreatmentType)}),renderRightSlot:()=>(0,W.jsx)(z2,{}),style:{marginBottom:24}}),(0,W.jsxs)(t4.Container,{children:[(0,W.jsx)(t4,{title:t(`my_profile_rapid-acting_insulin`),value:s,testID:`fast-acting-insulin`,onPress:e(()=>{n.navigate(Q.RapidActingInsulin)}),renderRightSlot:()=>(0,W.jsx)(z2,{})}),(0,W.jsx)(t4,{title:t(`my_profile_long-acting_insulin`),value:c,testID:`long-acting-insulin`,onPress:e(()=>{n.navigate(Q.LongActingInsulin)}),renderRightSlot:()=>(0,W.jsx)(z2,{})})]})]})}var nTn=S5(tTn);V();var{MMOL_L:H9}=Y.BloodGlucoseUnit,rTn=()=>{let e=XQ(),{t}=RK(),{COLORS:n}=J(),{modalStoreActions:r}=Y8(),{bottomWithScroll:i}=B2(),a=U8(),{glucoseUnit:o,treatmentParameters:s,created:c}=H6;if(o===void 0)throw Error(`[InsulinSettings::render] glucoseUnit is undefined.`);if(s===void 0)throw Error(`[InsulinSettings::render] parameters from userSettings must be defined and non-null.`);let l=s.use===Y.Usage.Overall,{text:u}=X6(o),{carbohydrateRatio:d,insulinSensitivity:f}=s.overallParameters,[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(void 0),[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(!1),{areSettingsLocked:C,isPINSet:w,lockSettings:T,unlockSettings:E}=Abn(),[D,O]=(0,H.useState)(!1),[k,A]=(0,H.useState)(!1),ee=(0,H.useCallback)(()=>{C?b(!0):T()},[C,T]);(0,H.useEffect)(()=>{e.setOptions({header:()=>(0,W.jsx)(G8,{title:t(`insulin_settings_navigation`),LeftButton:(0,W.jsx)(Q8,{}),RightButton:w?(0,W.jsx)(jun,{onPress:ee,isLocked:C}):void 0,overlay:!0})})},[e,C,w,ee,t]);let te=(0,H.useMemo)(()=>o===H9?Fwn:Iwn,[o]),ne=()=>{m(!0)},re=()=>{g(!0)},ie=(0,H.useCallback)(async e=>{let t=Q6(e,o,H9);if(t!==s.overallParameters.insulinSensitivity){let e={...s,overallParameters:{...s.overallParameters,insulinSensitivity:t},updatedAt:new Date().toISOString()};v(await H6.postUserSettings({parameters:e}))}m(!1)},[o,s]),j=(0,H.useCallback)(async e=>{let t=Number(e.toFixed(1));if(t!==s.overallParameters.carbohydrateRatio){let e={...s,overallParameters:{...s.overallParameters,carbohydrateRatio:t},updatedAt:new Date().toISOString()};v(await H6.postUserSettings({parameters:e}))}g(!1)},[s]),ae=(0,H.useMemo)(()=>{let e=$6(f,H9,o);return te.findIndex(t=>t===e)},[te,o,f]),oe=(0,H.useMemo)(()=>R9.findIndex(e=>e===d.toFixed(1)),[d]),se=(0,H.useCallback)(()=>{_===!1&&r.set({showSyncErrorModal:!0}),v(void 0)},[r,_]),ce=(0,H.useCallback)(async e=>{let t={...s,use:e?Y.Usage.Overall:Y.Usage.Intervals,updatedAt:new Date().toISOString()},n=await H6.postUserSettings({parameters:t});r.set({showSyncErrorModal:!n})},[s,r]),M=(0,H.useCallback)(()=>{D&&(S(!0),O(!1))},[D,S,O]),N=(0,H.useCallback)(()=>{O(!0),b(!1)},[O,b]),P=(0,H.useCallback)(()=>{E()},[E]),le=(0,H.useCallback)(e=>w&&C?(...e)=>b(!0):(...t)=>e(...t),[C,w]),ue=(0,H.useCallback)(()=>{k&&(A(!1),setTimeout(()=>{e.navigate(Q.ChangePINCode)},500))},[k,e]),de=s.updatedAt??c;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[U9.scrollView,{paddingBottom:i,paddingTop:a+16}],children:[(0,W.jsx)(X,{style:[U9.updatedAtText,{color:n.labelSecondary}],children:t(`settings_lastEdited`,{date:de?Y6(de,`d MMM yyyy`):``})}),(0,W.jsx)(nTn,{withLockedSettings:le}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsx)(p9,{}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsxs)(t4.Container,{containerStyle:{backgroundColor:n.bgSecondary,borderColor:n.divider,borderWidth:1},children:[(0,W.jsx)(E4,{testID:`insulin-settings-overall-switch`,title:t(`fixed_insulin_settings_title`),message:t(`fixed_insulin_settings_body`),value:l,onValueChange:le(ce),style:U9.switchContainer}),(0,W.jsx)(Mwn,{}),(0,W.jsx)(t4,{title:t(`fixed_insulin_settings_carb_ratio_title`),value:`${d.toFixed(1)} ${t(`fixed_insulin_settings_carb_ratio_unit`)}`,testID:`carbohydrate-ratio`,onPress:le(()=>l?re():void 0),containerStyle:l?U9.active:U9.inactive,valueStyle:l?{color:n.textTableHighlight}:{color:n.labelSecondary}}),(0,W.jsx)(t4,{title:t(`fixed_insulin_settings_sensitivity_title`),value:`${$6(f,H9,o)} ${t(`fixed_insulin_settings_sensitivity_unit`,{displayUnit:u})}`,testID:`insulin-sensitivity`,onPress:le(()=>l?ne():void 0),containerStyle:l?U9.active:U9.inactive,valueStyle:l?{color:n.textTableHighlight}:{color:n.labelSecondary}})]}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsx)(Uwn,{withLockedSettings:le}),(0,W.jsx)(B,{style:U9.spacing}),(0,W.jsx)(Vwn,{})]}),(0,W.jsx)(c5,{isVisible:p,items:te,initialScrollIndex:ae,onConfirm:ie,onCancel:()=>{m(!1)},onModalHide:se,testID:`insulin_sensitivity_picker`}),(0,W.jsx)(c5,{isVisible:h,items:R9,initialScrollIndex:oe,onConfirm:j,onCancel:()=>{g(!1)},onModalHide:se,testID:`insulin_to_carb_ratio_picker`}),(0,W.jsx)(d5,{onModalHide:()=>{v(void 0)}}),(0,W.jsx)(Hbn,{isVisible:y,onModalHide:M,onEnterPIN:N,onCancel:()=>b(!1)}),(0,W.jsx)(Lbn,{isVisible:x,onClose:()=>S(!1),onModalHide:ue,onForgotPIN:()=>{A(!0),S(!1)},onModalHideWithSuccess:P}),(0,W.jsx)(Vbn,{})]})},U9=R.create({scrollView:{paddingTop:32,paddingHorizontal:16,flexGrow:1},spacing:{height:32},updatedAtText:{...q.Poppins.regular_SM,textAlign:`center`,marginBottom:24},active:{opacity:1},inactive:{opacity:.5},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}),iTn=S5(rTn),{Navigator:aTn,Screen:W9}=V8(),oTn=()=>{let{t:e}=RK();return(0,W.jsxs)(aTn,{screenOptions:{...n5,...d8},children:[(0,W.jsx)(W9,{name:Q.InsulinSettings,component:iTn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`insulin_settings_navigation`),overlay:!0})}}),(0,W.jsx)(W9,{name:Q.TreatmentType,component:eTn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`treatment_type_navigation`),overlay:!0})}}),(0,W.jsx)(W9,{name:Q.RapidActingInsulin,component:Zwn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`rapid-acting_insulin_navigation`),overlay:!0})}}),(0,W.jsx)(W9,{name:Q.LongActingInsulin,component:qwn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`long-acting_insulin_navigation`),overlay:!0})}})]})},{Navigator:sTn,Screen:G9}=V8(),cTn=()=>{let{t:e}=RK(),{COLORS:t}=J();return(0,W.jsxs)(sTn,{screenOptions:{...n5,...d8,headerStyle:{backgroundColor:t.bgNavigationBar}},children:[(0,W.jsx)(G9,{name:Q.Settings,component:jwn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`settings_navigation`)})}}),(0,W.jsx)(G9,{name:Q.Profile,component:Mxn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`my_profile_navigation`)})}}),(0,W.jsx)(G9,{name:Q.GlucoseSettings,component:fxn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`glucose_navigation`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.GlucoseUnit,component:gxn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`glucose_unit_navigation`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.ActivitySettings,component:txn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`physical_activity_navigation`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.InsulinSettingsStack,component:oTn,options:{headerShown:!1}}),(0,W.jsx)(G9,{name:Q.Theme,component:Own,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`navigation_title_theme`),overlay:!0})}}),(0,W.jsx)(G9,{name:Q.Support,component:Ewn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`support_navigation`)})}}),(0,W.jsx)(G9,{name:Q.Legal,component:_xn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)(Q8,{}),title:e(`legal_navigation`),overlay:!0})}})]})},lTn=e=>!(!e||e.authenticationContextClassReference!==`urn:hedia:acr:elevated`||(Date.now()-Date.parse(e.authenticationTime))/6e4>60),uTn=()=>{let e=XQ();return(0,H.useEffect)(()=>{(async()=>{try{lTn(await f9t())?e.replace(Q.SettingsStack,{screen:Q.Settings}):window.location.href=`/reauthenticate`}catch{e.goBack()}})()},[e]),(0,W.jsx)(w4,{})};V();function dTn(){return(0,W.jsx)(ydn,{style:fTn.iframe,uri:`https://www.hedia.com/contact#contactsupport`})}var fTn=R.create({iframe:{flex:1}}),{Navigator:pTn,Screen:K9,Group:mTn}=V8(),hTn=()=>{let{t:e}=RK();return(0,W.jsxs)(pTn,{children:[(0,W.jsxs)(mTn,{screenOptions:{headerShown:!1},children:[(0,W.jsx)(K9,{name:Q.NewCalculationStack,component:Obn}),(0,W.jsx)(K9,{name:Q.SettingsStack,component:cTn})]}),(0,W.jsxs)(mTn,{screenOptions:{...Mun},children:[(0,W.jsx)(K9,{name:Q.CreateFood,component:vdn}),(0,W.jsx)(K9,{name:Q.IFU,component:xdn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`IFU_navigation`)})}}),(0,W.jsx)(K9,{name:Q.SupportWebView,component:Ddn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`support_navigation`)})}}),(0,W.jsx)(K9,{name:Q.SupportContact,component:dTn,options:{header:()=>(0,W.jsx)(G8,{LeftButton:(0,W.jsx)($8,{}),title:e(`support_navigation`)})}}),(0,W.jsx)(K9,{name:Q.ConfirmPINCode,component:uTn,options:{headerShown:!1}})]})]})};V();var gTn=({title:e,subtitle:t,stepChecked:n,onAnimationFinished:r})=>{let{t:i}=RK(),{COLORS:a}=J();return(0,H.useEffect)(()=>{r?.()},[r]),(0,W.jsxs)(ys,{contentContainerStyle:q9.container,style:{backgroundColor:a.bgPrimary},children:[(0,W.jsx)(X,{style:q9.title,children:e}),(0,W.jsx)(X,{style:[q9.subtitle,{color:a.labelSecondary}],children:t}),(0,W.jsxs)(B,{style:q9.stepsWrapper,children:[(0,W.jsxs)(B,{style:q9.stepContainer,children:[(0,W.jsx)(X,{style:[q9.text,n===1||n===2||n===3?{color:a.labelPrimary}:{color:a.labelSecondary}],children:` 1. `+i(`overview1`)}),(n===1||n===2||n===3)&&(0,W.jsx)(R2,{width:24,height:24,color:a.labelPrimary})]}),(0,W.jsxs)(B,{style:q9.stepContainer,children:[(0,W.jsx)(X,{style:[q9.text,n===2||n===3?{color:a.labelPrimary}:{color:a.labelSecondary}],children:`2. `+i(`overview2`)}),(n===2||n===3)&&(0,W.jsx)(R2,{width:24,height:24,color:a.labelPrimary})]}),(0,W.jsxs)(B,{style:q9.stepContainer,children:[(0,W.jsx)(X,{style:[q9.text,n===3?{color:a.labelPrimary}:{color:a.labelSecondary}],children:`3. `+i(`overview3`)}),n===3&&(0,W.jsx)(R2,{width:24,height:24,color:a.labelPrimary})]})]})]})},q9=R.create({container:{flex:1,justifyContent:`center`,paddingHorizontal:16},title:{...q.Poppins.bold_4XL,paddingHorizontal:16,marginBottom:2},subtitle:{...q.Poppins.regular_Base,paddingHorizontal:16,marginBottom:32},stepsWrapper:{padding:16,gap:8},stepContainer:{flexDirection:`row`,alignItems:`center`,gap:8},text:{marginBottom:8}}),_Tn=()=>{let{t:e}=RK(),{setIsOnboardingFinished:t}=z4(),n=(0,H.useCallback)(()=>{setTimeout(()=>{t(!0)},1e3)},[t]);return(0,W.jsx)(gTn,{title:e(`guide_end_title`),subtitle:e(`guide_end_body`),stepChecked:3,onAnimationFinished:n})};V();var J9=({currentStep:e,text:t,onPress:n,inactive:r,isBackVisible:i=!0,onBackPress:a})=>{let{t:o}=RK(),{COLORS:s}=J(),{goBack:c}=XQ();return(0,W.jsx)(Mdn,{children:(0,W.jsxs)(B,{style:[vTn.buttonsWrapper,{borderColor:s.bgTransparent}],children:[i&&(0,W.jsx)(I2,{title:o(`button_back`),onPress:a||c,testID:`back${e}`,style:vTn.button,type:F2.Secondary}),(0,W.jsx)(I2,{title:t??o(`button_next`),onPress:n,inactive:r,testID:`next${e}`,style:vTn.button})]})})},vTn=R.create({buttonsWrapper:{flexDirection:`row`,paddingTop:16,gap:8,borderWidth:1},button:{flex:1}});V();var yTn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{top:n}=B2(),{navigate:r}=XQ(),i=(0,H.useCallback)(()=>{r(K8.QuickGuideStack,{screen:K8.QuickGuide}),C6(S6.QuickGuideStartPress)},[r]);return(0,W.jsxs)(B,{style:{flex:1,backgroundColor:t.bgSecondary,paddingTop:n},children:[(0,W.jsx)(gTn,{title:e(`guide_quick_guide_title`),subtitle:e(`guide_quick_guide_body`),stepChecked:2}),(0,W.jsx)(J9,{currentStep:1,isBackVisible:!1,onPress:i,text:e(`button_start`)})]})},bTn=`/assets/webp/1_EN.webp`,xTn=`/assets/webp/2_EN.webp`,STn=`/assets/webp/3_EN.webp`,CTn=`/assets/webp/4_EN.webp`,wTn=`/assets/webp/1_EN2.webp`,TTn=`/assets/webp/2_EN2.webp`,ETn=`/assets/webp/3_EN2.webp`,DTn=`/assets/webp/4_EN2.webp`;V();var OTn=()=>{let{t:e}=RK(),t=XQ(),{COLORS:n}=J(),r=(0,H.useRef)(null),[i,a]=(0,H.useState)(2),[o,s]=(0,H.useState)(0),{colorScheme:c}=d0(),l=_0(c),{width:u}=Cm(),d=(0,H.useMemo)(()=>[{title:e(`guide_recent_insulin_title`),body:e(`guide_recent_insulin_body`),image:l===`dark`?bTn:wTn},{title:e(`web_guide_no_import_title`),body:e(`web_guide_no_import_body`),image:l===`dark`?xTn:TTn},{title:e(`guide_glucose_title`),body:e(`guide_glucose_body`),image:l===`dark`?STn:ETn},{title:e(`guide_recommendation_title`),body:e(`guide_recommendation_body`),image:l===`dark`?CTn:DTn}],[l,e]),f=(0,H.useCallback)(e=>{switch(e-1){case 1:return S6.QuickGuideBackPressStep1;case 2:return S6.QuickGuideBackPressStep2;case 3:return S6.QuickGuideBackPressStep3;case 4:return S6.QuickGuideBackPressStep4;default:throw Error(`[QuickGuide::getTrackingEventBackPress] Invalid step`)}},[]),p=(0,H.useCallback)(e=>{switch(e-1){case 1:return S6.QuickGuideNextPressStep1;case 2:return S6.QuickGuideNextPressStep2;case 3:return S6.QuickGuideNextPressStep3;default:throw Error(`[QuickGuide::getTrackingEventNextPress] Invalid step`)}},[]),m=(0,H.useCallback)(()=>{if(o===d.length-1)C6(S6.QuickGuideFinishPress),t.navigate(K8.QuickGuideAllSet);else{let e=o+1;r.current?.scrollToIndex({index:e,animated:!0}),a(i+1),s(e),C6(p(i))}},[o,i,p,t,d.length]),h=(0,H.useCallback)(()=>{if(o===0)t.navigate(K8.QuickGuideStart);else{let e=o-1;r.current?.scrollToIndex({index:e,animated:!0}),a(i-1),s(e)}C6(f(i))},[o,i,f,t]);return(0,W.jsxs)(B,{style:{flex:1,backgroundColor:n.bgSecondary},children:[(0,W.jsx)(nl,{ref:r,data:d,initialNumToRender:1,scrollEnabled:!1,horizontal:!0,showsHorizontalScrollIndicator:!1,renderItem:({item:e,index:t})=>(0,W.jsxs)(B,{style:[Y9.container,{width:u,backgroundColor:n.bgPrimary}],children:[(0,W.jsx)(gd,{source:e.image,style:[Y9.image,{bottom:t===0?64:0,width:t===1?`55%`:`100%`,height:t===1?`55%`:`60%`}],resizeMode:`contain`}),(0,W.jsxs)(B,{style:Y9.contentContainer,children:[(0,W.jsx)(X,{style:Y9.title,maxFontSizeMultiplier:g0.s2,children:e.title}),(0,W.jsx)(X,{style:[Y9.body,{color:n.labelSecondary}],maxFontSizeMultiplier:g0.s2,children:e.body})]})]})}),(0,W.jsx)(J9,{currentStep:i,onPress:m,onBackPress:h,text:o===d.length-1?e(`button_complete`):e(`button_next`)})]})},Y9=R.create({container:{alignItems:`center`,justifyContent:`flex-end`},image:{width:`100%`,height:`60%`,marginTop:64},contentContainer:{minHeight:`25%`,paddingTop:12,marginBottom:84},title:{...q.Poppins.semiBold_2XL,marginBottom:2,paddingHorizontal:16,textAlign:`center`},body:{...q.Poppins.regular_Base,paddingHorizontal:rd.getFontScale()>g0.s0?16:32,textAlign:`center`}}),{Navigator:kTn,Screen:ATn}=V8(),jTn=()=>(0,W.jsxs)(kTn,{screenOptions:{...n5,headerShown:!1},children:[(0,W.jsx)(ATn,{name:K8.QuickGuideStart,component:yTn}),(0,W.jsx)(ATn,{name:K8.QuickGuide,component:OTn}),(0,W.jsx)(ATn,{name:K8.QuickGuideAllSet,component:_Tn})]});V();function MTn({onOptionSelect:e,setNextEnabled:t,ref:n}){let{t:r}=RK(),{COLORS:i}=J(),{width:a}=Cm(),o=U8(),[s,c]=(0,H.useState)(null),l=(0,H.useCallback)(n=>{c(n),e(n),t(!0)},[e,t]);return(0,H.useImperativeHandle)(n,()=>({onBackPress(){C6(S6.SetupOptionsBackPress)},onNextPressed:()=>s===null?(t(!1),{transitionAllowed:!1}):(C6(S6.SetupOptionsNextPress),t(!0),{transitionAllowed:!0}),validateData(){return{isValid:s!==null}}}),[s,t]),(0,W.jsxs)(ys,{contentContainerStyle:[X9.container,{width:a,paddingTop:o+16}],style:{backgroundColor:i.bgPrimary},children:[(0,W.jsx)(X,{style:[X9.header,{color:i.labelPrimary}],children:r(`insulin_settings_title`)}),(0,W.jsxs)(B,{style:X9.buttonsContainer,children:[(0,W.jsx)(I2,{title:r(`insulin_settings_button_yes`),testID:`insulin_settings_yes`,onPress:()=>{l(`yes`)},type:s===`yes`?F2.Primary:F2.Secondary,style:X9.button}),(0,W.jsx)(I2,{title:r(`insulin_settings_button_no`),testID:`insulin_settings_no`,onPress:()=>{l(`no`)},type:s===`no`?F2.Primary:F2.Secondary,style:X9.button})]})]})}var X9=R.create({container:{flex:1,paddingHorizontal:16,paddingTop:32},header:{...q.Poppins.bold_2XL,paddingHorizontal:16,marginBottom:24},buttonsContainer:{flexDirection:`row`,marginBottom:24,gap:12},button:{flex:1}});function NTn(e,t){let n=H2(e)-+H2(t);return n<0?-1:n>0?1:n}function PTn(e,t,n){let[r,i]=A6(n?.in,e,t);return r.getFullYear()-i.getFullYear()}function FTn(e,t,n){let[r,i]=A6(n?.in,e,t),a=NTn(r,i),o=Math.abs(PTn(r,i));r.setFullYear(1584),i.setFullYear(1584);let s=a*(o-+(NTn(r,i)===-a));return s===0?0:s}V(),l0();function ITn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),{bottom:a}=n0(),{bottomWithFooterButton:o}=B2(),s=U8(),{birthday:c,biologicalSex:l,diabetesType:u,bloodGlucoseUnits:d}=_5(),{setSetupCalculatorStoreValues:f}=g5(),{colorScheme:p}=d0(),m=_0(p),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(!1),[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(``),[C,w]=(0,H.useState)(``),[T,E]=(0,H.useState)(!1),D=(0,H.useCallback)(e=>{let t=new Date(e);t.setHours(0,0,0,0);let r=new Date;r.setHours(0,0,0,0);let i=FTn(r,t)>=18;f({birthday:t.toISOString()}),S(``),w(i?``:n(`setup_birthday_hint_under18`))},[f,n]),O=(0,H.useCallback)(e=>{D(e),g(!1)},[D]),k=(0,H.useCallback)(()=>{f({diabetesType:Y.DiabetesType.Type2}),v(!0)},[f]),A=(0,H.useCallback)(()=>!!(c&&l&&u&&d),[c,d,u,l]);return(0,H.useEffect)(()=>{e(A())},[e,A]),(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupGeneralBackPress)},onNextPressed:()=>(E(!0),!c&&S(n(`birthday_error`)),A()?(e(!0),C6(S6.SetupGeneralNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})),validateData(){return{isValid:A()}}}),[c,n,A,e]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{testID:`step_2`,contentContainerStyle:[Z9.container,{width:i,paddingTop:s+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsx)(t4,{testID:`birthday`,title:n(`general_input_birthday`),renderRightSlot:()=>(0,W.jsx)(B,{style:[Z9.pillButton,{backgroundColor:r.bgPill}],children:(0,W.jsx)(X,{style:[Z9.pillText,{color:h?r.textLink:r.labelPrimary}],children:c?Y6(new Date(c),`dd-MM-yyyy`):`DD-MM-YYYY`})}),errorMessage:x,warningMessage:C,containerStyle:Z9.wrapper,style:Z9.customRow,onPress:()=>{g(!0)}}),(0,W.jsx)(B,{style:Z9.wrapper,children:(0,W.jsx)(N2,{isAnimated:T&&!l,children:(0,W.jsx)(t4,{title:n(`my_profile_sex`),testID:`biological-sex`,value:l?ayt[l]():`-`,onPress:()=>{b(!0)},errorMessage:T&&!l?n(`diabetes_error`):void 0})})}),(0,W.jsxs)(B,{style:Z9.wrapper,children:[(0,W.jsx)(T4,{title:n(`type_of_diabetes_title`)}),(0,W.jsx)(N2,{isAnimated:T&&!u,message:n(`diabetes_error`),children:(0,W.jsxs)(B,{style:[Z9.row,{backgroundColor:r.bgSegmentContainer,borderColor:r.buttonBorder}],children:[(0,W.jsx)(z5t,{title:n(`type_of_diabetes_type1`),isActive:u===Y.DiabetesType.Type1,testID:`type-1`,onPress:()=>{f({diabetesType:Y.DiabetesType.Type1})},isError:T&&!u}),!u&&(0,W.jsx)(B,{style:[Z9.separator,{backgroundColor:r.divider}]}),(0,W.jsx)(z5t,{title:n(`type_of_diabetes_type2`),isActive:u===Y.DiabetesType.Type2,testID:`type-2`,onPress:k,isError:T&&!u})]})})]}),(0,W.jsxs)(B,{style:Z9.wrapper,children:[(0,W.jsx)(T4,{title:n(`glucose_unit_title`)}),(0,W.jsx)(N2,{isAnimated:T&&!d,message:n(`glucose_unit_error`),children:(0,W.jsx)(pxn,{glucoseUnit:d,onPressMMOLL:()=>{f({bloodGlucoseUnits:Y.BloodGlucoseUnit.MMOL_L})},onPressMGDL:()=>{f({bloodGlucoseUnits:Y.BloodGlucoseUnit.MG_DL})},isError:T&&!d})})]})]}),HK?(0,W.jsx)(vfn,{testID:`birthday-date-picker`,display:`spinner`,date:c?new Date(c):new Date,isVisible:h,onConfirm:O,onCancel:()=>{g(!1)},customConfirmButtonIOS:xfn,customCancelButtonIOS:Sfn,pickerContainerStyleIOS:{backgroundColor:r.iosKeyboardPicker},modalStyleIOS:{paddingBottom:a},themeVariant:m,isDarkModeEnabled:m===`dark`,pickerStyleIOS:Z9.alignCenter,minimumDate:new Date(1900,0,1),maximumDate:new Date(2100,0,1)}):(0,W.jsx)(Txn,{isVisible:h,initialValue:c?new Date(c):new Date,onConfirm:O,onCancel:()=>{g(!1)}}),(0,W.jsx)(Q2,{isVisible:_,title:n(`modal_diabetes2_title`),message:n(`modal_diabetes2_body`),buttons:[{title:n(`button_close`),testID:`type2-modal-understood-button`,onPress:()=>{v(!1)}}]}),(0,W.jsx)(Oxn,{isVisible:y,onCancel:()=>{b(!1)}})]})}var Z9=R.create({container:{paddingHorizontal:16},wrapper:{marginBottom:24},row:{flexDirection:`row`,padding:2,borderRadius:16,borderWidth:1},alignCenter:{alignSelf:`center`},separator:{width:1,height:24,alignSelf:`center`},customRow:{paddingVertical:8},pillButton:{borderRadius:16},pillText:{...q.Poppins.regular_SM,paddingHorizontal:8,paddingVertical:6}});V();function LTn({setNextEnabled:e,ref:t}){let{COLORS:n}=J(),{t:r}=RK(),{width:i}=Cm(),a=U8(),{parameters:o,treatmentType:s}=_5(),{setSetupCalculatorStoreValues:c}=g5(),[l,u]=(0,H.useState)(!1);(0,H.useEffect)(()=>{o||c({parameters:V6(0,0,Y.Usage.Overall)})},[o,c]),(0,H.useEffect)(()=>{e(!!s)},[e,s]);let d=(0,H.useCallback)(e=>{c({treatmentType:Y.InjectionMethod[e]})},[c]);return(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupTreatmentBackPress)},onNextPressed:()=>(u(!0),s?(e(!0),C6(S6.SetupTreatmentNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})),validateData(){return{isValid:!!s}}}),[e,s]),(0,W.jsxs)(B,{testID:`step_3`,style:[RTn.container,{width:i,backgroundColor:n.bgPrimary,paddingTop:a+16}],children:[(0,W.jsx)(T4,{title:r(`treatment_units_title`)}),(0,W.jsx)(N2,{isAnimated:l&&!s,message:r(`treatment_type_input_error`),children:(0,W.jsx)(t4.Container,{children:Object.keys(Y.InjectionMethod).map(e=>(0,W.jsx)(t4,{title:V9[e](),renderRightSlot:()=>(0,W.jsx)(B,{style:RTn.checkmarkContainer,children:Y.InjectionMethod[e]===s?(0,W.jsx)(R2,{width:24,height:24}):null}),onPress:()=>{d(e)},testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join(`-`).toLowerCase()}`,displayType:e4.ListItem},e))})})]})}var RTn=R.create({container:{paddingHorizontal:16,paddingVertical:32},checkmarkContainer:{width:24,height:24}}),zTn=q2(5,350);V();function BTn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),a=U8(),{bottomWithFooterButton:o}=B2(),{bloodGlucoseUnits:s,parameters:c}=_5();if(!s||!c)throw Error(`[Step4::render] are not defined`);let l=Hdn(),{setSetupCalculatorStoreValues:u,setTotalDailyDosage:d}=g5(),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(void 0),g=(0,H.useMemo)(()=>l?{carbohydrateRatio:parseFloat((500/l).toFixed(1)),insulinSensitivityMMOLL:Number(z9.DividendNumber)/l}:{carbohydrateRatio:0,insulinSensitivityMMOLL:0},[l]);(0,H.useEffect)(()=>{let{carbohydrateRatio:e,insulinSensitivityMMOLL:t}=g;u({parameters:V6(t,e,Y.Usage.Overall)})},[s,g,u]);let _=(0,H.useMemo)(()=>l?zTn.findIndex(e=>e===l.toString()):zTn.findIndex(e=>e===`50`),[l]);(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupTDDBackPress)},onNextPressed:()=>l?(C6(S6.SetupTDDNextPress),e(!0),{transitionAllowed:!0}):(h(n(`insulin_settings_input_error`,{inputTypeTranslated:n(`daily_insulin_dosage_input`)})),e(!1),{transitionAllowed:!1}),validateData(){return{isValid:!!l}}}),[e,l,n]);let v=(0,H.useCallback)(t=>{d(t),p(!1),h(void 0),e(!0)},[e,d]),{text:y}=(0,H.useMemo)(()=>X6(s),[s]),b=(0,H.useMemo)(()=>`${$6(c.overallParameters.insulinSensitivity,Y.BloodGlucoseUnit.MMOL_L,s)} ${n(`fixed_insulin_settings_sensitivity_unit`,{displayUnit:y})}`,[c,y,n,s]),x=(0,H.useMemo)(()=>c.overallParameters.carbohydrateRatio+` `+n(`insulin_helper_carb_ratio_unit`),[c,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{contentContainerStyle:[Q9.container,{width:i,paddingTop:a+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:n(`daily_insulin_dosage_title`)}),(0,W.jsx)(X,{style:[Q9.subheader,{color:r.labelSecondary}],children:n(`daily_insulin_dosage_body`)}),(0,W.jsx)(N2,{isAnimated:!!m,children:(0,W.jsx)(t4,{testID:`daily_insulin_dosage`,title:n(`daily_insulin_dosage_input`),value:`${l??`-`} ${n(l===1?`unit`:`units`)}`,valueStyle:{color:r.labelBrand},onPress:()=>{p(!0)},errorMessage:m})})]}),!!l&&(0,W.jsxs)(B,{style:[Q9.explanation,{backgroundColor:r.bgSecondary}],children:[(0,W.jsx)(X,{style:[Q9.description,{color:r.labelPrimary,borderBottomColor:r.divider}],children:n(`insulin_helper_body`)}),(0,W.jsxs)(B,{style:Q9.row,children:[(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelPrimary}],children:n(`insulin_helper_carb_ratio_input`)}),(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelSecondary}],children:x})]}),(0,W.jsx)(Mwn,{}),(0,W.jsxs)(B,{style:Q9.row,children:[(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelPrimary}],children:n(`insulin_helper_insulin_sensitivity_input`)}),(0,W.jsx)(X,{style:[Q9.textSemiBold,{color:r.labelSecondary}],children:b})]})]}),(0,W.jsx)(p9,{}),(0,W.jsx)(B,{children:(0,W.jsx)(Vwn,{})})]}),(0,W.jsx)(c5,{testID:`daily_insulin_dosage_picker`,onCancel:()=>{p(!1)},onConfirm:v,initialScrollIndex:_,isVisible:f,items:zTn})]})}var Q9=R.create({container:{paddingVertical:32,paddingHorizontal:16,gap:24},subheader:{...q.Poppins.regular_SM,marginBottom:8},explanation:{borderRadius:8,paddingBottom:0},row:{flexDirection:`row`,justifyContent:`space-between`},description:{...q.Poppins.regular_SM,padding:16,borderBottomWidth:1},textSemiBold:{...q.Poppins.medium_SM,padding:16}});V();function VTn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),a=U8(),{bottomWithFooterButton:o}=B2(),{bloodGlucoseUnits:s,parameters:c}=_5();if(!c||!s)throw Error(`[Step5::render] setupCalculatorStoreValues are not defined`);let{setSetupCalculatorStoreValues:l,setTotalDailyDosage:u}=g5(),[d,f]=(0,H.useState)(void 0),[p,m]=(0,H.useState)(void 0),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(!1),{text:y}=(0,H.useMemo)(()=>X6(s),[s]),{carbohydrateRatio:b,insulinSensitivity:x}=(0,H.useMemo)(()=>c.overallParameters,[c]),S=(0,H.useCallback)(e=>n(`insulin_settings_input_error`,{inputTypeTranslated:n(e===`IS`?`insulin_sensitivity_input`:`insulin-to-carb_ratio_input`)}),[n]);(0,H.useEffect)(()=>{e(!!(x&&b))},[b,x,e]),(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupInsulinBackPress)},onNextPressed:()=>!b&&!x?(m(S(`ICR`)),f(S(`IS`)),e(!1),{transitionAllowed:!1}):b?x?(m(void 0),f(void 0),u(null),e(!0),C6(S6.SetupInsulinNextPress),{transitionAllowed:!0}):(e(!1),f(S(`IS`)),{transitionAllowed:!1}):(m(S(`ICR`)),e(!1),{transitionAllowed:!1}),validateData(){return{isValid:!!(b&&x)}}}),[b,x,u,e,S]);let C=(0,H.useCallback)(e=>{let t=Q6(e,s,Y.BloodGlucoseUnit.MMOL_L);l({parameters:{...c,overallParameters:{...c.overallParameters,insulinSensitivity:t}}}),u(null),f(void 0),g(!1)},[s,c,l,u]),w=(0,H.useCallback)(e=>{let t=Number(e.toFixed(1));c.overallParameters.carbohydrateRatio=t,l({parameters:{...c,overallParameters:{...c.overallParameters,carbohydrateRatio:t}}}),u(null),m(void 0),v(!1)},[c,l,u]),T=(0,H.useMemo)(()=>s===Y.BloodGlucoseUnit.MMOL_L?Fwn:Iwn,[s]),E=(0,H.useMemo)(()=>{let e=s===Y.BloodGlucoseUnit.MMOL_L?2 .toFixed(1):`36`;if(x===0)return T.findIndex(t=>t===e);let t=$6(x,Y.BloodGlucoseUnit.MMOL_L,s);return T.findIndex(e=>e===t)},[T,s,x]),D=(0,H.useMemo)(()=>b===0?R9.findIndex(e=>e===10 .toFixed(1)):R9.findIndex(e=>e===b.toFixed(1)),[b]),O=(0,H.useMemo)(()=>{let e=$6(x,Y.BloodGlucoseUnit.MMOL_L,s);return`${x?e:`-`} ${n(`fixed_insulin_settings_sensitivity_unit`,{displayUnit:y})}`},[x,s,y,n]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ys,{contentContainerStyle:[HTn.contentContainer,{width:i,paddingTop:a+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:n(`insulin-to-carb_ratio_title`)}),(0,W.jsx)(N2,{isAnimated:!!p,children:(0,W.jsx)(t4,{title:n(`insulin-to-carb_ratio_input`),value:`${b||`-`} ${n(`fixed_insulin_settings_carb_ratio_unit`)}`,valueStyle:{color:r.labelBrand},testID:`carb_ratio`,onPress:()=>{v(!0)},errorMessage:p})})]}),(0,W.jsxs)(B,{children:[(0,W.jsx)(T4,{title:n(`insulin_sensitivity_title`)}),(0,W.jsx)(N2,{isAnimated:!!d,children:(0,W.jsx)(t4,{title:n(`insulin_sensitivity_input`),value:O,valueStyle:{color:r.labelBrand},testID:`insulin_sensitivity`,onPress:()=>{g(!0)},errorMessage:d})})]}),(0,W.jsx)(p9,{}),(0,W.jsx)(Vwn,{})]}),(0,W.jsx)(c5,{testID:`insulin_sensitivity_picker`,isVisible:h,items:T,initialScrollIndex:E,onConfirm:C,onCancel:()=>{g(!1)}}),(0,W.jsx)(c5,{testID:`insulin_to_carb_ratio_picker`,isVisible:_,items:R9,initialScrollIndex:D,onConfirm:w,onCancel:()=>{v(!1)}})]})}var HTn=R.create({contentContainer:{paddingTop:32,paddingHorizontal:16,gap:24}});V();function UTn({setNextEnabled:e,ref:t}){let{t:n}=RK(),{COLORS:r}=J(),{width:i}=Cm(),a=U8(),{bottomWithFooterButton:o}=B2(),{bloodGlucoseUnits:s,parameters:c,treatmentType:l,diabetesType:u,birthday:d,biologicalSex:f}=_5(),p=Hdn(),{modalStoreActions:m}=Y8(),h=(0,H.useCallback)(async()=>{if(s===void 0)throw Error(`[Step6::setUserSettings] bloodGlucoseUnits from userSettingsManager is undefined.`);if(u===void 0)throw Error(`[Step6::setUserSettings] diabetesType from userSettingsManager is undefined.`);if(c===void 0)throw Error(`[Step6::setUserSettings] parameters from newUserSettingsManager is undefined.`);if(d===void 0)throw Error(`[Step6::setUserSettings] birthday from newUserSettingsManager is undefined.`);if(f===void 0)throw Error(`[Step6::setUserSettings] biologicalSex from newUserSettingsManager is undefined.`);let{carbohydrateRatio:e,insulinSensitivity:t}=c.overallParameters,n=V6(t,e,Y.Usage.Overall);return H6.postUserSettings({parameters:n,activity:L6(),notifications:zin(),glucoseLevelTargets:Pin(),bloodGlucoseUnits:s,treatmentType:l,diabetesType:u,birthday:d,biologicalSex:f})},[d,s,u,f,c,l]);(0,H.useImperativeHandle)(t,()=>({onBackPress(){C6(S6.SetupSummaryBackPress)},onNextPressed:async()=>{C6(S6.SetupSummaryFinishPress);let t=await h();return t?e(!0):m.set({showSyncErrorModal:!0}),{transitionAllowed:t}},validateData(){return{isValid:!0}}}),[e,m,h]);let g=(0,H.useMemo)(()=>{if(s===void 0)throw Error(`[Step6::generalTreatmentItems] bloodGlucoseUnits is undefined`);if(l===void 0)throw Error(`[Step6::generalTreatmentItems] treatmentType is undefined`);if(u===void 0)throw Error(`[Step6::generalTreatmentItems] diabetesType is undefined`);let{text:e}=X6(s),t=C5t(Y.InjectionMethod,l),r=u===Y.DiabetesType.Type1?`type_of_diabetes_type1`:`type_of_diabetes_type2`;return[{label:n(`summary_setup_input_diabetes_type`),value:n(r),testID:`diabetes-type-result`},{label:n(`summary_setup_input_treatment_type`),value:V9[t](),testID:`treatment-type-result`},{label:n(`summary_setup_input_glucose_unit`),value:e,testID:`glucose-result`}]},[s,u,l,n]),_=(0,H.useMemo)(()=>{if(s===void 0)throw Error(`[Step6::insulinFactorsItems] bloodGlucoseUnits is undefined`);let{text:e}=X6(s),{carbohydrateRatio:t,insulinSensitivity:r}=c?.overallParameters??{};if(t===void 0||r===void 0)throw Error(`[Step6::insulinFactorsItems] carbohydrateRatio or insulinSensitivity is undefined`);return[p?{label:n(`summary_setup_input_daily_dose_input`),value:p.toFixed(0),unit:n(`units`),testID:`total-daily-insulin-result`}:null,{label:n(`summary_setup_input_insulin-to-carb_input`),value:`${t}`,unit:n(`summary_setup_insulin-to-carb_unit`),testID:`carb-ratio-result`},{label:n(`summary_setup_input_insulin_sensitivity_input`),value:$6(r,Y.BloodGlucoseUnit.MMOL_L,s),unit:n(`summary_setup_insulin_sensitivity_unit`,{displayUnit:e}),testID:`insulin-sensitivity-result`}].filter(e=>e!==null)},[s,c?.overallParameters,n,p]);return(0,W.jsxs)(ys,{testID:`scroll`,contentContainerStyle:[WTn.scrollContent,{width:i,paddingTop:a+16,paddingBottom:o}],style:{backgroundColor:r.bgPrimary},children:[(0,W.jsx)(p9,{}),(0,W.jsx)(B,{style:WTn.spacer}),(0,W.jsx)(T4,{title:n(`summary_setup_general_title`)}),(0,W.jsx)(t4.Container,{children:g.map(({testID:e,label:t,value:n,unit:i})=>(0,W.jsx)(t4,{testID:e,title:t,displayStyle:L5t.List,displayType:e4.ListItem,titleStyle:{color:r.labelPrimary},valueStyle:{color:r.labelSecondary},value:`${n} ${i??``}`},e))}),(0,W.jsx)(B,{style:WTn.spacer}),(0,W.jsx)(T4,{title:n(`summary_setup_insuling_settings_title`)}),(0,W.jsx)(t4.Container,{children:_.map(({testID:e,label:t,value:n,unit:i})=>(0,W.jsx)(t4,{testID:e,title:t,displayStyle:L5t.List,displayType:e4.ListItem,titleStyle:{color:r.labelPrimary},valueStyle:{color:r.labelSecondary},value:`${n} ${i??``}`},e))}),(0,W.jsx)(d5,{})]})}var WTn=R.create({scrollContent:{paddingHorizontal:16},spacer:{height:24}});V();var GTn=()=>{let{t:e}=RK(),{COLORS:t}=J(),{width:n}=Cm(),{clear:r}=g5(),{setHasCompletedSetupFlow:i,setIsPinSetupShouldBeShown:a}=z4(),o=XQ(),[s,c]=(0,H.useState)(2),[l,u]=(0,H.useState)(0),[d,f]=(0,H.useState)(0),[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(!1),_=(0,H.useRef)(null),v=(0,H.useRef)(null);(0,H.useEffect)(()=>{r()},[r]);let y=(0,H.useCallback)(e=>{m(e)},[]),b=(0,H.useCallback)(e=>{g(e===`yes`)},[]),x=(0,H.useMemo)(()=>[{title:e(`general_navigation`),stepNumber:2,renderComponent:e=>(0,W.jsx)(ITn,{ref:e,setNextEnabled:y})},{title:e(`treatment_navigation`),stepNumber:3,renderComponent:e=>(0,W.jsx)(LTn,{ref:e,setNextEnabled:y})},{title:e(`insulin_settings_navigation`),stepNumber:4,renderComponent:e=>(0,W.jsx)(MTn,{ref:e,onOptionSelect:b,setNextEnabled:y})},{title:e(`insulin_settings_navigation`),stepNumber:4,renderComponent:e=>h?(0,W.jsx)(VTn,{ref:e,setNextEnabled:y}):(0,W.jsx)(BTn,{ref:e,setNextEnabled:y})},{title:e(`summary_setup_navigation`),stepNumber:5,renderComponent:e=>(0,W.jsx)(UTn,{ref:e,setNextEnabled:y})}],[b,y,h,e]);(0,H.useEffect)(()=>{o.setOptions({headerTransparent:!0,header:()=>(0,W.jsx)(G8,{title:x[l].title,overlay:!0})})},[l,o,x]),(0,H.useEffect)(()=>{if(!v.current)return;let{isValid:e}=v.current.validateData();m(e)},[l,x]);let S=(0,H.useCallback)(async()=>{if(!v.current)return;let{transitionAllowed:e}=await v.current.onNextPressed();if(e)if(l===x.length-1){VK||a(!0),i(!0);let e=VK?{name:K8.QuickGuideStack}:{name:K8.PINCodeSetup,params:{comingFrom:K8.Setup}};o.dispatch(RQ({index:0,routes:[e]}))}else{let e=l+1;_.current?.scrollToIndex({index:e,animated:!0}),c(x[e].stepNumber),u(e),f(t=>Math.max(t,e))}},[l,x,o,i,a]),C=(0,H.useCallback)(()=>{if(v.current?.onBackPress(),l===0)o.goBack();else{let e=l-1;_.current?.scrollToIndex({index:e,animated:!0}),c(x[e].stepNumber),u(e),f(t=>Math.max(t,e))}},[l,o,x]);return i$((0,H.useCallback)(()=>{let e=Gf.addEventListener(`hardwareBackPress`,()=>(C(),!0));return()=>{e.remove()}},[C])),(0,W.jsxs)(B,{style:[KTn.container,{backgroundColor:t.bgSecondary}],children:[(0,W.jsx)(nl,{ref:_,data:x,renderItem:({item:e,index:t})=>t<=d?e.renderComponent(t===l?v:null):(0,W.jsx)(B,{style:{width:n}}),scrollEnabled:!1,horizontal:!0,initialNumToRender:1,showsHorizontalScrollIndicator:!1}),(0,W.jsx)(J9,{currentStep:s,onPress:S,onBackPress:C,inactive:!p,text:l===x.length-1?e(`button_complete`):e(`button_next`)})]})},KTn=R.create({container:{flex:1}});V();var qTn=({isVisible:e,onCancelPress:t,onContinuePress:n,onModalHide:r})=>{let{t:i}=RK(),{COLORS:a}=J(),[o,s]=(0,H.useState)([!1,!1]),[c,l]=(0,H.useState)(!1),u=(0,H.useMemo)(()=>o.every(Boolean),[o]);(0,H.useEffect)(()=>{e&&(s([!1,!1]),l(!1))},[e]);let d=(0,H.useCallback)(e=>{s(t=>t.map((t,n)=>n===e?!t:t))},[]),f=(0,H.useCallback)(()=>{c&&u&&r()},[u,c,r]),p=(0,H.useCallback)(()=>{l(!0),n()},[n]);return(0,W.jsxs)(Q2,{testID:`restrictions_modal`,isVisible:e,enableScroll:!0,onModalHide:f,containerStyle:{backgroundColor:a.bgModal},buttons:[{testID:`restrictions_continue_button`,title:i(`welcome_modal_button_confirm`),onPress:p,disabled:!u},{testID:`restrictions_cancel_button`,title:i(`button_cancel`),type:F2.Secondary,onPress:t}],children:[(0,W.jsx)(X,{style:$9.title,children:i(`welcome_modal_title`)}),(0,W.jsx)(X,{style:[$9.subtitle,{color:a.labelSecondary}],children:i(`welcome_modal_body`)}),(0,W.jsxs)(Kp,{testID:`restrictions_checkmark_1`,onPress:()=>{d(0)},style:({pressed:e})=>[{opacity:e?.5:1},$9.checkmarkContainer],children:[o[0]?(0,W.jsx)(N8t,{}):(0,W.jsx)(M8t,{}),(0,W.jsxs)(B,{style:$9.checkmarkTextContainer,children:[(0,W.jsx)(X,{style:$9.checkmarkTitle,children:i(`welcome_modal_pregnancy_title`)}),(0,W.jsx)(X,{style:[$9.checkmarkSubtitle,{color:a.labelSecondary}],children:i(`welcome_modal_pregnancy_body`)})]})]}),(0,W.jsx)(B,{style:[$9.separatorLine,{backgroundColor:a.divider}]}),(0,W.jsxs)(Kp,{testID:`restrictions_checkmark_2`,onPress:()=>{d(1)},style:({pressed:e})=>[{opacity:e?.5:1},$9.checkmarkContainer],children:[o[1]?(0,W.jsx)(N8t,{}):(0,W.jsx)(M8t,{}),(0,W.jsxs)(B,{style:$9.checkmarkTextContainer,children:[(0,W.jsx)(X,{style:$9.checkmarkTitle,children:i(`welcome_modal_gestational_title`)}),(0,W.jsx)(X,{style:[$9.checkmarkSubtitle,{color:a.labelSecondary}],children:i(`welcome_modal_gestational_body`)})]})]})]})},$9=R.create({title:{...q.Poppins.bold_2XL,marginTop:32,marginBottom:8},subtitle:{...q.Poppins.regular_Base,marginBottom:16},checkmarkContainer:{paddingVertical:16,flexDirection:`row`,justifyContent:`space-between`},checkmarkTextContainer:{flex:1,marginLeft:8},checkmarkTitle:{...q.Poppins.semiBold_Base,marginBottom:2},checkmarkSubtitle:{...q.Poppins.regular_SM},separatorLine:{width:`100%`,height:1}});V();var JTn=()=>{let{t:e}=RK(),{navigate:t}=XQ(),{clear:n}=g5(),{COLORS:r}=J(),[i,a]=(0,H.useState)(!1);(0,H.useEffect)(()=>{n()},[n]);let o=(0,H.useCallback)(()=>{a(!0),C6(S6.SetupIntroStartPress)},[]);return(0,W.jsxs)(B,{style:[YTn.container,{backgroundColor:r.bgSecondary}],children:[(0,W.jsx)(gTn,{title:e(`setup_account_title`),subtitle:e(`setup_account_body`),stepChecked:1}),(0,W.jsx)(J9,{currentStep:1,isBackVisible:!1,onPress:o,text:e(`button_start`)}),(0,W.jsx)(qTn,{isVisible:i,onCancelPress:()=>{a(!1)},onContinuePress:()=>{a(!1)},onModalHide:()=>{t(K8.Setup)}})]})},YTn=R.create({container:{flex:1}}),{Navigator:XTn,Screen:ZTn}=V8(),QTn=()=>{let{t:e}=RK();return(0,W.jsxs)(XTn,{screenOptions:{...n5},children:[(0,W.jsx)(ZTn,{name:K8.SetupStart,component:JTn,options:{header:()=>(0,W.jsx)(G8,{title:e(`setup_account_navigation`),overlay:!0})}}),(0,W.jsx)(ZTn,{name:K8.Setup,component:GTn,options:{header:()=>(0,W.jsx)(G8,{title:e(`general_navigation`),overlay:!0})}})]})},{Navigator:$Tn,Screen:eEn}=V8(),tEn=()=>{let{hasCompletedSetupFlow:e}=z4(),t=H.useMemo(()=>e?K8.QuickGuideStack:K8.SetupBolusCalculator,[e]);return(0,W.jsxs)($Tn,{initialRouteName:t,screenOptions:{...n5,headerShown:!1},children:[(0,W.jsx)(eEn,{name:K8.SetupBolusCalculator,component:QTn}),(0,W.jsx)(eEn,{name:K8.QuickGuideStack,component:jTn})]},t)},nEn=()=>{let{isOnboardingFinished:e,setIsOnboardingFinished:t}=z4(),[n,r]=H.useState(!1),i=(0,H.useCallback)(async()=>{if(await a8.syncAll(),!H6.uuid){if(NK.IS_PRODUCTION===`true`)throw window.location.href=`/redirect?status=error`,Error(`[App::syncData] User settings not found`);H6.updateMockUserSettings()}t(U4t(Y.BloodGlucoseUnit).safeParse(H6.glucoseUnit).success)},[t]);return(0,H.useEffect)(()=>{i().catch(console.error).finally(()=>{r(!0)})},[i]),!n||e===void 0?(0,W.jsx)(w4,{}):e?(0,W.jsx)(hTn,{}):(0,W.jsx)(tEn,{})},rEn={prefixes:[],config:{screens:{SetupBolusCalculator:{path:`setup-bolus-calculator`,screens:{SetupStart:`setup-start`,Setup:`setup`}},QuickGuideStack:{path:`quick-guide`,screens:{QuickGuideStart:`quick-guide-start`,QuickGuide:`quick-guide`,QuickGuideAllSet:`quick-guide-all-set`}},NewCalculationStack:{path:`new-calculation`,screens:{Calculation:``,LoadingRecommendation:{path:`loading`},Recommendation:{path:`recommendation`},LeavingRecommendation:{path:`leaving`}}},IFU:`ifu`,SettingsStack:{path:`settings`,screens:{Settings:``,ProfileStack:`profile`,GlucoseSettings:`glucose`,ActivitySettings:`activity`,InsulinSettingsStack:{path:`insulin-settings`,screens:{InsulinSettings:``,TreatmentType:`treatment-type`,RapidActingInsulin:`rapid-acting-insulin`,LongActingInsulin:`long-acting-insulin`}},IFU:`ifu`,Legal:`legal`,GlucoseUnit:`glucose-unit`}}}}};l0();var iEn=XUt();NK.SENTRY_ENABLED===`true`&&j$t({dsn:NK.SENTRY_DSN,environment:NK.SENTRY_ENVIRONMENT,beforeSend:(e,t)=>{let n=e.exception?.values?.[0],r=[n?.type,n?.value].filter(Boolean).join(`: `);if(r.includes(ryt.NetworkErrorFailure)||r.includes(ryt.NetworkErrorTimeout)||NK.IS_PRODUCTION===`false`&&r.includes(ryt.TranslationError))return null;if(t.originalException instanceof M2t){let{statusCode:n,method:r,url:i,responseBody:a}=t.originalException;e.tags={...e.tags,"http.status":String(n),"http.method":r},e.contexts={...e.contexts,response:{status:n,url:i,method:r,body:a}}}return e.user&&(delete e.user.email,delete e.user.ip_address,delete e.user.username,delete e.user.geo),e}});var aEn=()=>{let{colorScheme:e}=d0(),{COLORS:t}=J(),n=e===`light`?fKt:eKt;return(0,W.jsx)(qSt,{children:(0,W.jsx)(c2t,{children:(0,W.jsx)(l0t,{children:(0,W.jsx)(T1t,{client:E2t,children:(0,W.jsx)(dKt,{theme:{...n,colors:{...n.colors,background:t.bgPrimary,border:t.divider,text:t.labelPrimary},fonts:{...n.fonts,regular:{...n.fonts.regular,fontFamily:h0.PoppinsRegular},medium:{...n.fonts.medium,fontFamily:h0.PoppinsMedium},bold:{...n.fonts.bold,fontFamily:h0.PoppinsSemiBold},heavy:{...n.fonts.heavy,fontFamily:h0.PoppinsBold}}},ref:iEn,linking:rEn,children:(0,W.jsx)(mUt,{children:(0,W.jsx)(nEn,{})})})})})})})},oEn=u(b());lyt(),oEn.createRoot(document.getElementById(`root`)).render((0,W.jsx)(aEn,{}));