/**!
 * IMPORTANT NOTE:
 *    This file is licensed only for use in providing the iCloud
 *    service or any part thereof, and is subject to the iCloud
 *    Terms and Conditions. You may not port this file to another
 *    platform without Apple's written consent.
 *
 *    Portions of this Apple Software may utilize copyrighted material under open source licenses.
 *    Please see the file at https://www.icloud.com/system/icloud.com/2302Hotfix226/es-mx/acknowledgements.txt for licensing information.
 */
!function(e){try{var n=window,r=n.performance,t=n.Promise,o=n.MessageChannel,a=n.requestAnimationFrame;if(!(r&&r.mark&&t&&o&&a))return;var s=function(n){return r.mark("chunk-"+e+"-"+n)},i=!1,c=!1,u=t.resolve();s("exec-start");for(var f=0;f<5;f++)u=u.then();u.then((function(){s("exec-sync-end")}));var m=function(){i&&!c&&(s("after-paint"),c=!0)},p=new o;p.port1.onmessage=m,p.port2.postMessage(null),setTimeout(m),a((function(){i=!0,s("raf"),p.port2.postMessage(null),setTimeout(m)}))}catch(e){window.__jsPerformanceMarksError=e}}("main");function __CW_loadBinaries(e,t,n,r,i,o,a){var s=e.URL||e.webkitURL;i=i||(e.__CW_BLOB_URLS={}),e.__CW_BLOBS_READY=!1;var c,u,l=["image/gif","image/png","image/jpeg","image/svg+xml"],d=3,p=!1,f=!1,h=(o||"cw")+"-css",m=o?"_"+o:"";t.match(/\/$/)||(t+="/");function g(t){p=!1,e.__CW_BLOBS_READY=!1,y("__CW_SPRITE_ERROR",t)}function v(e,t,n){if(e.slice)return e.slice(t,n);var r=e.byteLength;if(t=t||0,n=n||r,0===r||t>=r||t>=n)return new ArrayBuffer(0);var i=Math.min(r-t,n-t),o=new ArrayBuffer(i);return new Uint8Array(o).set(new Uint8Array(e,t,i)),o}function y(e,t){var n=document.createEvent("Event");n.data=t,n.initEvent(e+m,!0,!0),document.dispatchEvent(n)}function b(e){var t=i[e],n=new RegExp("\\(blob_"+e+"\\)","gi");return function(){c++,r=r.replace(n,"("+JSON.stringify(t)+")"),c===u&&function(){var e=document.getElementById(h);e||((e=document.createElement("link")).rel="stylesheet",e.id=h),e.onload=function(){y("__CW_CSS_LOADED"),r=null,f=!1},e.href="data:text/css;base64,"+btoa(r),document.head.appendChild(e)}()}}document.addEventListener("__CW_SPRITE_LOADED"+m,(function(){if(!f)if(f=!0,y("__CW_CSS_START"),i&&(u=Object.keys(i).length),i&&u>0){c=0;var t=function(){var t="cw-img-container-r"+e.devicePixelRatio,n=document.getElementById(t);if(!n){(n=document.createElement("div")).setAttribute("aria-hidden",!0),n.id=t;var r=n.style;r.overflow="hidden",r.height="0",r.width="0",document.body.appendChild(n)}return n}();for(var n in i){var r=document.createElement("img");r.addEventListener("load",b(n)),r.src=i[n],t.appendChild(r)}}else f=!1})),function(r){for(var o=Math.ceil(r);o>=1&&!n[o-1];)o--;var c=n[o-1];c||(c=n[0]),function n(r){if(!p){p=!0,y("__CW_SPRITE_START");var o=new XMLHttpRequest;o.open("GET",t+r,!0),o.withCredentials=a,o.responseType="arraybuffer",o.onload=function(){!function(t){try{if(t&&t instanceof ArrayBuffer)for(var n=new DataView(t),r=n.byteLength,o=0;o<r;){var a=n.getUint16(o),c=n.getUint8(o+2),u=n.getUint32(o+3),d=v(t,o+=7,o+u),f=new Blob([d],{type:l[c-1]});i[a]=s.createObjectURL(f),o+=u}p=!1,e.__CW_BLOBS_READY=!0,y("__CW_SPRITE_LOADED")}catch(h){g(h)}}(o.response)},o.onerror=function(e){--d>0?n(r):g(e)},o.send()}}(c)}(e.devicePixelRatio)}!function(e,t,n,r){var i=e.__CW_IMG_URLS={};function o(t){var n=Math.ceil(e.devicePixelRatio);return 1===n?t:t.replace(/@\d{1}(?=x)/i,"@"+n)}var a=function(e){var r=n[e];Object.defineProperty(i,e,{get:function(){return[t,o(r)].join("/")}})};for(var s in n)a(s)}(this,"/system/icloud.com/2302Hotfix226/es-mx/",{}),__CW_loadBinaries(this,"/system/icloud.com/2302Hotfix226/es-mx/",["images@1x.bin","images@2x.bin"],".document-row .icon .excel-icon{background-image:url(blob_53)}\n.document-row .icon .ppt-icon{background-image:url(blob_54)}\n.document-row .icon .word-icon{background-image:url(blob_55)}\n.cloudos-alert .alert-main-content .alert-icon{background-image:url(blob_131)}\n.cloudos-alert .alert-main-content .alert-icon.icloud-icon{background-image:url(blob_132)}\n.cloudos-alert .alert-main-content .alert-icon.photos-icon{background-image:url(blob_133)}\n",void 0,void 0,!1),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/system/icloud.com/2302Hotfix226/es-mx/",n(n.s=131)}(Array(131).concat([function(e,t,n){n(1287),n(1288),n(132),n(536),n(537),n(538),e.exports=n(1289)},function(e,t,n){"use strict";n.r(t),n(133),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(234),n(237),n(239),n(240),n(241),n(242),n(244),n(245),n(254),n(255),n(263),n(265),n(266),n(267),n(268),n(269),n(274),n(276),n(277),n(278),n(279),n(286),n(288),n(291),n(293),n(294),n(295),n(296),n(305),n(307),n(308),n(309),n(311),n(312),n(314),n(315),n(317),n(318),n(319),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(332),n(333),n(335),n(337),n(338),n(339),n(340),n(341),n(343),n(345),n(347),n(349),n(351),n(352),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(373),n(374),n(375),n(376),n(391),n(392),n(393),n(395),n(396),n(397),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(413),n(415),n(416),n(417),n(418),n(420),n(423),n(424),n(425),n(426),n(430),n(433),n(434),n(435),n(436),n(438),n(439),n(440),n(441),n(443),n(444),n(445),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(481),n(482),n(483),n(484),n(485),n(486),n(487),n(488),n(489),n(491),n(492),n(493),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504),n(506),n(507),n(511),n(512),n(513),n(514),n(518),n(517),n(519),n(525),n(527),n(529),n(531),n(533),n(535)},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(154),a=n(197),s=n(140),c=n(146),u=n(166),l=n(138),d=n(157),p=n(139),f=n(169),h=n(198),m=n(152),g=n(151),v=n(155),y=n(153),b=n(177),_=n(170),C=n(144),I=n(149),w=n(199),E=n(143),S=n(202),T=n(204),O=n(187),P=n(206),x=n(195),A=n(137),N=n(175),R=n(203),D=n(142),k=n(209),U=n(178),L=n(165),M=n(182),j=n(183),F=n(171),B=n(164),z=n(210),H=n(211),W=n(213),V=n(180),Z=n(214).forEach,q=M("hidden"),K=B("toPrimitive"),G=V.set,Y=V.getterFor("Symbol"),Q=Object.prototype,X=i.Symbol,J=X&&X.prototype,$=i.TypeError,ee=i.QObject,te=o("JSON","stringify"),ne=A.f,re=N.f,ie=P.f,oe=D.f,ae=c([].push),se=L("symbols"),ce=L("op-symbols"),ue=L("string-to-symbol-registry"),le=L("symbol-to-string-registry"),de=L("wks"),pe=!ee||!ee.prototype||!ee.prototype.findChild,fe=l&&p((function(){return 7!=S(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ne(Q,t);r&&delete Q[t],re(e,t,n),r&&e!==Q&&re(Q,t,r)}:re,he=function(e,t){var n=se[e]=S(J);return G(n,{type:"Symbol",tag:e,description:t}),l||(n.description=t),n},me=function(e,t,n){e===Q&&me(ce,t,n),b(e);var r=I(t);return b(n),f(se,r)?(n.enumerable?(f(e,q)&&e[q][r]&&(e[q][r]=!1),n=S(n,{enumerable:E(0,!1)})):(f(e,q)||re(e,q,E(1,{})),e[q][r]=!0),fe(e,r,n)):re(e,r,n)},ge=function(e,t){b(e);var n=C(t),r=T(n).concat(_e(n));return Z(r,(function(t){l&&!s(ve,n,t)||me(e,t,n[t])})),e},ve=function(e){var t=I(e),n=s(oe,this,t);return!(this===Q&&f(se,t)&&!f(ce,t))&&(!(n||!f(this,t)||!f(se,t)||f(this,q)&&this[q][t])||n)},ye=function(e,t){var n=C(e),r=I(t);if(n!==Q||!f(se,r)||f(ce,r)){var i=ne(n,r);return!i||!f(se,r)||f(n,q)&&n[q][r]||(i.enumerable=!0),i}},be=function(e){var t=ie(C(e)),n=[];return Z(t,(function(e){f(se,e)||f(j,e)||ae(n,e)})),n},_e=function(e){var t=e===Q,n=ie(t?ce:C(e)),r=[];return Z(n,(function(e){!f(se,e)||t&&!f(Q,e)||ae(r,se[e])})),r};if(d||(U(J=(X=function(){if(v(J,this))throw $("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,t=F(e),n=function(e){this===Q&&s(n,ce,e),f(this,q)&&f(this[q],t)&&(this[q][t]=!1),fe(this,t,E(1,e))};return l&&pe&&fe(Q,t,{configurable:!0,set:n}),he(t,e)}).prototype,"toString",(function(){return Y(this).tag})),U(X,"withoutSetter",(function(e){return he(F(e),e)})),D.f=ve,N.f=me,R.f=ge,A.f=ye,O.f=P.f=be,x.f=_e,z.f=function(e){return he(B(e),e)},l&&(re(J,"description",{configurable:!0,get:function(){return Y(this).description}}),u||U(Q,"propertyIsEnumerable",ve,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!d,sham:!d},{Symbol:X}),Z(T(de),(function(e){H(e)})),r({target:"Symbol",stat:!0,forced:!d},{for:function(e){var t=w(e);if(f(ue,t))return ue[t];var n=X(t);return ue[t]=n,le[n]=t,n},keyFor:function(e){if(!y(e))throw $(e+" is not a symbol");if(f(le,e))return le[e]},useSetter:function(){pe=!0},useSimple:function(){pe=!1}}),r({target:"Object",stat:!0,forced:!d,sham:!l},{create:function(e,t){return void 0===t?S(e):ge(S(e),t)},defineProperty:me,defineProperties:ge,getOwnPropertyDescriptor:ye}),r({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:be,getOwnPropertySymbols:_e}),r({target:"Object",stat:!0,forced:p((function(){x.f(1)}))},{getOwnPropertySymbols:function(e){return x.f(_(e))}}),te&&r({target:"JSON",stat:!0,forced:!d||p((function(){var e=X();return"[null]"!=te([e])||"{}"!=te({a:e})||"{}"!=te(Object(e))}))},{stringify:function(e,t,n){var r=k(arguments),i=t;if((g(t)||void 0!==e)&&!y(e))return h(t)||(t=function(e,t){if(m(i)&&(t=s(i,this,e,t)),!y(t))return t}),r[1]=t,a(te,null,r)}}),!J[K]){var Ce=J.valueOf;U(J,K,(function(e){return s(Ce,this)}))}W(X,"Symbol"),j[q]=!0},function(e,t,n){var r=n(135),i=n(137).f,o=n(174),a=n(178),s=n(168),c=n(185),u=n(196);e.exports=function(e,t){var n,l,d,p,f,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(l in t){if(p=t[l],d=e.noTargetGet?(f=i(n,l))&&f.value:n[l],!u(m?l:h+(g?".":"#")+l,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;c(p,d)}(e.sham||d&&d.sham)&&o(p,"sham",!0),a(n,l,p,e)}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(136))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(138),i=n(140),o=n(142),a=n(143),s=n(144),c=n(149),u=n(169),l=n(172),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=c(t),l)try{return d(e,t)}catch(n){}if(u(e,t))return a(!i(o.f,e,t),e[t])}},function(e,t,n){var r=n(139);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(141),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},function(e,t,n){var r=n(139);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(145),i=n(148);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(135),i=n(146),o=n(139),a=n(147),s=r.Object,c=i("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):s(e)}:s},function(e,t,n){var r=n(141),i=Function.prototype,o=i.bind,a=i.call,s=r&&o.bind(a,a);e.exports=r?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},function(e,t,n){var r=n(146),i=r({}.toString),o=r("".slice);e.exports=function(e){return o(i(e),8,-1)}},function(e,t,n){var r=n(135).TypeError;e.exports=function(e){if(void 0==e)throw r("Can't call method on "+e);return e}},function(e,t,n){var r=n(150),i=n(153);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},function(e,t,n){var r=n(135),i=n(140),o=n(151),a=n(153),s=n(160),c=n(163),u=n(164),l=r.TypeError,d=u("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var n,r=s(e,d);if(r){if(void 0===t&&(t="default"),n=i(r,e,t),!o(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},function(e,t,n){var r=n(152);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,n){var r=n(135),i=n(154),o=n(152),a=n(155),s=n(156),c=r.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&a(t.prototype,c(e))}},function(e,t,n){var r=n(135),i=n(152),o=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e]):r[e]&&r[e][t]}},function(e,t,n){var r=n(146);e.exports=r({}.isPrototypeOf)},function(e,t,n){var r=n(157);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(158),i=n(139);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r,i,o=n(135),a=n(159),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},function(e,t,n){var r=n(154);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(161);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},function(e,t,n){var r=n(135),i=n(152),o=n(162),a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},function(e,t,n){var r=n(135).String;e.exports=function(e){try{return r(e)}catch(t){return"Object"}}},function(e,t,n){var r=n(135),i=n(140),o=n(152),a=n(151),s=r.TypeError;e.exports=function(e,t){var n,r;if("string"===t&&o(n=e.toString)&&!a(r=i(n,e)))return r;if(o(n=e.valueOf)&&!a(r=i(n,e)))return r;if("string"!==t&&o(n=e.toString)&&!a(r=i(n,e)))return r;throw s("Can't convert object to primitive value")}},function(e,t,n){var r=n(135),i=n(165),o=n(169),a=n(171),s=n(157),c=n(156),u=i("wks"),l=r.Symbol,d=l&&l.for,p=c?l:l&&l.withoutSetter||a;e.exports=function(e){if(!o(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&o(l,e)?u[e]=l[e]:u[e]=c&&d?d(t):p(t)}return u[e]}},function(e,t,n){var r=n(166),i=n(167);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:r?"pure":"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(e,t){e.exports=!1},function(e,t,n){var r=n(135),i=n(168),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(135),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(146),i=n(170),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},function(e,t,n){var r=n(135),i=n(148),o=r.Object;e.exports=function(e){return o(i(e))}},function(e,t,n){var r=n(146),i=0,o=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},function(e,t,n){var r=n(138),i=n(139),o=n(173);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(135),i=n(151),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(138),i=n(175),o=n(143);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(135),i=n(138),o=n(172),a=n(176),s=n(177),c=n(149),u=r.TypeError,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor;t.f=i?a?function(e,t,n){if(s(e),t=c(t),s(n),"function"===typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=d(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(s(e),t=c(t),s(n),o)try{return l(e,t,n)}catch(r){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(138),i=n(139);e.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,n){var r=n(135),i=n(151),o=r.String,a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},function(e,t,n){var r=n(135),i=n(152),o=n(169),a=n(174),s=n(168),c=n(179),u=n(180),l=n(184).CONFIGURABLE,d=u.get,p=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,c){var u,d=!!c&&!!c.unsafe,h=!!c&&!!c.enumerable,m=!!c&&!!c.noTargetGet,g=c&&void 0!==c.name?c.name:t;i(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(n,"name")||l&&n.name!==g)&&a(n,"name",g),(u=p(n)).source||(u.source=f.join("string"==typeof g?g:""))),e!==r?(d?!m&&e[t]&&(h=!0):delete e[t],h?e[t]=n:a(e,t,n)):h?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return i(this)&&d(this).source||c(this)}))},function(e,t,n){var r=n(146),i=n(152),o=n(167),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},function(e,t,n){var r,i,o,a=n(181),s=n(135),c=n(146),u=n(151),l=n(174),d=n(169),p=n(167),f=n(182),h=n(183),m=s.TypeError,g=s.WeakMap;if(a||p.state){var v=p.state||(p.state=new g),y=c(v.get),b=c(v.has),_=c(v.set);r=function(e,t){if(b(v,e))throw new m("Object already initialized");return t.facade=e,_(v,e,t),t},i=function(e){return y(v,e)||{}},o=function(e){return b(v,e)}}else{var C=f("state");h[C]=!0,r=function(e,t){if(d(e,C))throw new m("Object already initialized");return t.facade=e,l(e,C,t),t},i=function(e){return d(e,C)?e[C]:{}},o=function(e){return d(e,C)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(135),i=n(152),o=n(179),a=r.WeakMap;e.exports=i(a)&&/native code/.test(o(a))},function(e,t,n){var r=n(165),i=n(171),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t){e.exports={}},function(e,t,n){var r=n(138),i=n(169),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},function(e,t,n){var r=n(169),i=n(186),o=n(137),a=n(175);e.exports=function(e,t,n){for(var s=i(t),c=a.f,u=o.f,l=0;l<s.length;l++){var d=s[l];r(e,d)||n&&r(n,d)||c(e,d,u(t,d))}}},function(e,t,n){var r=n(154),i=n(146),o=n(187),a=n(195),s=n(177),c=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),n=a.f;return n?c(t,n(e)):t}},function(e,t,n){var r=n(188),i=n(194).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(146),i=n(169),o=n(144),a=n(189).indexOf,s=n(183),c=r([].push);e.exports=function(e,t){var n,r=o(e),u=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&c(l,n);for(;t.length>u;)i(r,n=t[u++])&&(~a(l,n)||c(l,n));return l}},function(e,t,n){var r=n(144),i=n(190),o=n(192),a=function(e){return function(t,n,a){var s,c=r(t),u=o(c),l=i(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(191),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!==t||0===t?0:(t>0?r:n)(t)}},function(e,t,n){var r=n(193);e.exports=function(e){return r(e.length)}},function(e,t,n){var r=n(191),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(139),i=n(152),o=/#|\.prototype\./,a=function(e,t){var n=c[s(e)];return n==l||n!=u&&(i(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},function(e,t,n){var r=n(141),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},function(e,t,n){var r=n(147);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(135),i=n(200),o=r.String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,n){var r=n(135),i=n(201),o=n(152),a=n(147),s=n(164)("toStringTag"),c=r.Object,u="Arguments"==a(function(){return arguments}());e.exports=i?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=c(e),s))?n:u?a(t):"Object"==(r=a(t))&&o(t.callee)?"Arguments":r}},function(e,t,n){var r={};r[n(164)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r,i=n(177),o=n(203),a=n(194),s=n(183),c=n(205),u=n(173),l=n(182)("IE_PROTO"),d=function(){},p=function(e){return"<script>"+e+"<\/script>"},f=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}h="undefined"!=typeof document?document.domain&&r?f(r):function(){var e,t=u("iframe");return t.style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F}():f(r);for(var e=a.length;e--;)delete h.prototype[a[e]];return h()};s[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=i(e),n=new d,d.prototype=null,n[l]=e):n=h(),void 0===t?n:o.f(n,t)}},function(e,t,n){var r=n(138),i=n(176),o=n(175),a=n(177),s=n(144),c=n(204);t.f=r&&!i?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),i=c(t),u=i.length,l=0;u>l;)o.f(e,n=i[l++],r[n]);return e}},function(e,t,n){var r=n(188),i=n(194);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(154);e.exports=r("document","documentElement")},function(e,t,n){var r=n(147),i=n(144),o=n(187).f,a=n(207),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==r(e)?function(e){try{return o(e)}catch(t){return a(s)}}(e):o(i(e))}},function(e,t,n){var r=n(135),i=n(190),o=n(192),a=n(208),s=r.Array,c=Math.max;e.exports=function(e,t,n){for(var r=o(e),u=i(t,r),l=i(void 0===n?r:n,r),d=s(c(l-u,0)),p=0;u<l;u++,p++)a(d,p,e[u]);return d.length=p,d}},function(e,t,n){"use strict";var r=n(149),i=n(175),o=n(143);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(146);e.exports=r([].slice)},function(e,t,n){var r=n(164);t.f=r},function(e,t,n){var r=n(212),i=n(169),o=n(210),a=n(175).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){var r=n(135);e.exports=r},function(e,t,n){var r=n(175).f,i=n(169),o=n(164)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(215),i=n(146),o=n(145),a=n(170),s=n(192),c=n(216),u=i([].push),l=function(e){var t=1==e,n=2==e,i=3==e,l=4==e,d=6==e,p=7==e,f=5==e||d;return function(h,m,g,v){for(var y,b,_=a(h),C=o(_),I=r(m,g),w=s(C),E=0,S=v||c,T=t?S(h,w):n||p?S(h,0):void 0;w>E;E++)if((f||E in C)&&(b=I(y=C[E],E,_),e))if(t)T[E]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return E;case 2:u(T,y)}else switch(e){case 4:return!1;case 7:u(T,y)}return d?-1:i||l?l:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(e,t,n){var r=n(146),i=n(161),o=n(141),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(217);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},function(e,t,n){var r=n(135),i=n(198),o=n(218),a=n(151),s=n(164)("species"),c=r.Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,(o(t)&&(t===c||i(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?c:t}},function(e,t,n){var r=n(146),i=n(139),o=n(152),a=n(200),s=n(154),c=n(179),u=function(){},l=[],d=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,f=r(p.exec),h=!p.exec(u),m=function(e){if(!o(e))return!1;try{return d(u,l,e),!0}catch(t){return!1}},g=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(p,c(e))}catch(t){return!0}};g.sham=!0,e.exports=!d||i((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?g:m},function(e,t,n){"use strict";var r=n(134),i=n(138),o=n(135),a=n(146),s=n(169),c=n(152),u=n(155),l=n(199),d=n(175).f,p=n(185),f=o.Symbol,h=f&&f.prototype;if(i&&c(f)&&(!("description"in h)||void 0!==f().description)){var m={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(h,this)?new f(e):void 0===e?f():f(e);return""===e&&(m[t]=!0),t};p(g,f),g.prototype=h,h.constructor=g;var v="Symbol(test)"==String(f("test")),y=a(h.toString),b=a(h.valueOf),_=/^Symbol\((.*)\)[^)]+$/,C=a("".replace),I=a("".slice);d(h,"description",{configurable:!0,get:function(){var e=b(this),t=y(e);if(s(m,e))return"";var n=v?I(t,7,-1):C(t,_,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:g})}},function(e,t,n){n(211)("asyncIterator")},function(e,t,n){n(211)("hasInstance")},function(e,t,n){n(211)("isConcatSpreadable")},function(e,t,n){n(211)("iterator")},function(e,t,n){n(211)("match")},function(e,t,n){n(211)("replace")},function(e,t,n){n(211)("search")},function(e,t,n){n(211)("species")},function(e,t,n){n(211)("split")},function(e,t,n){n(211)("toPrimitive")},function(e,t,n){n(211)("toStringTag")},function(e,t,n){n(211)("unscopables")},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(139),a=n(198),s=n(151),c=n(170),u=n(192),l=n(208),d=n(216),p=n(233),f=n(164),h=n(158),m=f("isConcatSpreadable"),g=i.TypeError,v=h>=51||!o((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),y=p("concat"),b=function(e){if(!s(e))return!1;var t=e[m];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,forced:!v||!y},{concat:function(e){var t,n,r,i,o,a=c(this),s=d(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(b(o=-1===t?a:arguments[t])){if(p+(i=u(o))>9007199254740991)throw g("Maximum allowed index exceeded");for(n=0;n<i;n++,p++)n in o&&l(s,p,o[n])}else{if(p>=9007199254740991)throw g("Maximum allowed index exceeded");l(s,p++,o)}return s.length=p,s}})},function(e,t,n){var r=n(139),i=n(164),o=n(158),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r=n(134),i=n(235),o=n(236);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){"use strict";var r=n(170),i=n(190),o=n(192),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n),c=i(e,s),u=i(t,s),l=arguments.length>2?arguments[2]:void 0,d=a((void 0===l?s:i(l,s))-u,s-c),p=1;for(u<c&&c<u+d&&(p=-1,u+=d-1,c+=d-1);d-- >0;)u in n?n[c]=n[u]:delete n[c],c+=p,u+=p;return n}},function(e,t,n){var r=n(164),i=n(202),o=n(175),a=r("unscopables"),s=Array.prototype;void 0==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){var r=n(134),i=n(238),o=n(236);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){"use strict";var r=n(170),i=n(190),o=n(192);e.exports=function(e){for(var t=r(this),n=o(t),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(134),i=n(214).filter;r({target:"Array",proto:!0,forced:!n(233)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(134),i=n(214).find,o=n(236),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(134),i=n(214).findIndex,o=n(236),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){"use strict";var r=n(134),i=n(243),o=n(170),a=n(192),s=n(191),c=n(216);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t),r=c(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){"use strict";var r=n(135),i=n(198),o=n(192),a=n(215),s=r.TypeError,c=function(e,t,n,r,u,l,d,p){for(var f,h,m=u,g=0,v=!!d&&a(d,p);g<r;){if(g in n){if(f=v?v(n[g],g,t):n[g],l>0&&i(f))h=o(f),m=c(e,t,f,h,m,l-1)-1;else{if(m>=9007199254740991)throw s("Exceed the acceptable array length");e[m]=f}m++}g++}return m};e.exports=c},function(e,t,n){"use strict";var r=n(134),i=n(243),o=n(161),a=n(170),s=n(192),c=n(216);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=a(this),r=s(n);return o(e),(t=c(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(134),i=n(246);r({target:"Array",stat:!0,forced:!n(253)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){"use strict";var r=n(135),i=n(215),o=n(140),a=n(170),s=n(247),c=n(249),u=n(218),l=n(192),d=n(208),p=n(251),f=n(252),h=r.Array;e.exports=function(e){var t=a(e),n=u(this),r=arguments.length,m=r>1?arguments[1]:void 0,g=void 0!==m;g&&(m=i(m,r>2?arguments[2]:void 0));var v,y,b,_,C,I,w=f(t),E=0;if(!w||this==h&&c(w))for(v=l(t),y=n?new this(v):h(v);v>E;E++)I=g?m(t[E],E):t[E],d(y,E,I);else for(C=(_=p(t,w)).next,y=n?new this:[];!(b=o(C,_)).done;E++)I=g?s(_,m,[b.value,E],!0):b.value,d(y,E,I);return y.length=E,y}},function(e,t,n){var r=n(177),i=n(248);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){i(e,"throw",a)}}},function(e,t,n){var r=n(140),i=n(177),o=n(160);e.exports=function(e,t,n){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(c){s=!0,a=c}if("throw"===t)throw n;if(s)throw a;return i(a),n}},function(e,t,n){var r=n(164),i=n(250),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(135),i=n(140),o=n(161),a=n(177),s=n(162),c=n(252),u=r.TypeError;e.exports=function(e,t){var n=arguments.length<2?c(e):t;if(o(n))return a(i(n,e));throw u(s(e)+" is not iterable")}},function(e,t,n){var r=n(200),i=n(160),o=n(250),a=n(164)("iterator");e.exports=function(e){if(void 0!=e)return i(e,a)||i(e,"@@iterator")||o[r(e)]}},function(e,t,n){var r=n(164)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(s){}return n}},function(e,t,n){"use strict";var r=n(134),i=n(189).includes,o=n(236);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(144),i=n(236),o=n(250),a=n(180),s=n(175).f,c=n(256),u=n(166),l=n(138),d=a.set,p=a.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){d(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var f=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&l&&"values"!==f.name)try{s(f,"name",{value:"values"})}catch(h){}},function(e,t,n){"use strict";var r=n(134),i=n(140),o=n(166),a=n(184),s=n(152),c=n(257),u=n(259),l=n(261),d=n(213),p=n(174),f=n(178),h=n(164),m=n(250),g=n(258),v=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,C=h("iterator"),I=function(){return this};e.exports=function(e,t,n,a,h,g,w){c(n,t,a);var E,S,T,O=function(e){if(e===h&&R)return R;if(!_&&e in A)return A[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},P=t+" Iterator",x=!1,A=e.prototype,N=A[C]||A["@@iterator"]||h&&A[h],R=!_&&N||O(h),D="Array"==t&&A.entries||N;if(D&&(E=u(D.call(new e)))!==Object.prototype&&E.next&&(o||u(E)===b||(l?l(E,b):s(E[C])||f(E,C,I)),d(E,P,!0,!0),o&&(m[P]=I)),v&&"values"==h&&N&&"values"!==N.name&&(!o&&y?p(A,"name","values"):(x=!0,R=function(){return i(N,this)})),h)if(S={values:O("values"),keys:g?R:O("keys"),entries:O("entries")},w)for(T in S)(_||x||!(T in A))&&f(A,T,S[T]);else r({target:t,proto:!0,forced:_||x},S);return o&&!w||A[C]===R||f(A,C,R,{name:h}),m[t]=R,S}},function(e,t,n){"use strict";var r=n(258).IteratorPrototype,i=n(202),o=n(143),a=n(213),s=n(250),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=i(r,{next:o(+!u,n)}),a(e,l,!1,!0),s[l]=c,e}},function(e,t,n){"use strict";var r,i,o,a=n(139),s=n(152),c=n(202),u=n(259),l=n(178),d=n(164),p=n(166),f=d("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):h=!0),void 0==r||a((function(){var e={};return r[f].call(e)!==e}))?r={}:p&&(r=c(r)),s(r[f])||l(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t,n){var r=n(135),i=n(169),o=n(152),a=n(170),s=n(182),c=n(260),u=s("IE_PROTO"),l=r.Object,d=l.prototype;e.exports=c?l.getPrototypeOf:function(e){var t=a(e);if(i(t,u))return t[u];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof l?d:null}},function(e,t,n){var r=n(139);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(146),i=n(177),o=n(262);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(a){}return function(n,r){return i(n),o(r),t?e(n,r):n.__proto__=r,n}}():void 0)},function(e,t,n){var r=n(135),i=n(152),o=r.String,a=r.TypeError;e.exports=function(e){if("object"==typeof e||i(e))return e;throw a("Can't set "+o(e)+" as a prototype")}},function(e,t,n){"use strict";var r=n(134),i=n(146),o=n(145),a=n(144),s=n(264),c=i([].join),u=o!=Object,l=s("join",",");r({target:"Array",proto:!0,forced:u||!l},{join:function(e){return c(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(139);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},function(e,t,n){"use strict";var r=n(134),i=n(214).map;r({target:"Array",proto:!0,forced:!n(233)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(139),a=n(218),s=n(208),c=i.Array;r({target:"Array",stat:!0,forced:o((function(){function e(){}return!(c.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new(a(this)?this:c)(t);t>e;)s(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(134),i=n(146),o=n(198),a=i([].reverse),s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),a(this)}})},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(198),a=n(218),s=n(151),c=n(190),u=n(192),l=n(144),d=n(208),p=n(164),f=n(233),h=n(209),m=f("slice"),g=p("species"),v=i.Array,y=Math.max;r({target:"Array",proto:!0,forced:!m},{slice:function(e,t){var n,r,i,p=l(this),f=u(p),m=c(e,f),b=c(void 0===t?f:t,f);if(o(p)&&(n=p.constructor,(a(n)&&(n===v||o(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return h(p,m,b);for(r=new(void 0===n?v:n)(y(b-m,0)),i=0;m<b;m++,i++)m in p&&d(r,i,p[m]);return r.length=i,r}})},function(e,t,n){"use strict";var r=n(134),i=n(146),o=n(161),a=n(170),s=n(192),c=n(199),u=n(139),l=n(270),d=n(264),p=n(271),f=n(272),h=n(158),m=n(273),g=[],v=i(g.sort),y=i(g.push),b=u((function(){g.sort(void 0)})),_=u((function(){g.sort(null)})),C=d("sort"),I=!u((function(){if(h)return h<70;if(!(p&&p>3)){if(f)return!0;if(m)return m<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)g.push({k:t+r,v:n})}for(g.sort((function(e,t){return t.v-e.v})),r=0;r<g.length;r++)t=g[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:b||!_||!C||!I},{sort:function(e){void 0!==e&&o(e);var t=a(this);if(I)return void 0===e?v(t):v(t,e);var n,r,i=[],u=s(t);for(r=0;r<u;r++)r in t&&y(i,t[r]);for(l(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:c(t)>c(n)?1:-1}}(e)),n=i.length,r=0;r<n;)t[r]=i[r++];for(;r<u;)delete t[r++];return t}})},function(e,t,n){var r=n(207),i=Math.floor,o=function(e,t){var n=e.length,c=i(n/2);return n<8?a(e,t):s(e,o(r(e,0,c),t),o(r(e,c),t),t)},a=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},s=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e};e.exports=o},function(e,t,n){var r=n(159).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},function(e,t,n){var r=n(159);e.exports=/MSIE|Trident/.test(r)},function(e,t,n){var r=n(159).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},function(e,t,n){n(275)("Array")},function(e,t,n){"use strict";var r=n(154),i=n(175),o=n(164),a=n(138),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(190),a=n(191),s=n(192),c=n(170),u=n(216),l=n(208),d=n(233)("splice"),p=i.TypeError,f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var n,r,i,d,m,g,v=c(this),y=s(v),b=o(e,y),_=arguments.length;if(0===_?n=r=0:1===_?(n=0,r=y-b):(n=_-2,r=h(f(a(t),0),y-b)),y+n-r>9007199254740991)throw p("Maximum allowed length exceeded");for(i=u(v,r),d=0;d<r;d++)(m=b+d)in v&&l(i,d,v[m]);if(i.length=r,n<r){for(d=b;d<y-r;d++)g=d+n,(m=d+r)in v?v[g]=v[m]:delete v[g];for(d=y;d>y-r+n;d--)delete v[d-1]}else if(n>r)for(d=y-r;d>b;d--)g=d+n-1,(m=d+r-1)in v?v[g]=v[m]:delete v[g];for(d=0;d<n;d++)v[d+b]=arguments[d+2];return v.length=y-r+n,i}})},function(e,t,n){n(236)("flat")},function(e,t,n){n(236)("flatMap")},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(280),a=n(275),s=o.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==s},{ArrayBuffer:s}),a("ArrayBuffer")},function(e,t,n){"use strict";var r=n(135),i=n(146),o=n(138),a=n(281),s=n(184),c=n(174),u=n(282),l=n(139),d=n(283),p=n(191),f=n(193),h=n(284),m=n(285),g=n(259),v=n(261),y=n(187).f,b=n(175).f,_=n(238),C=n(207),I=n(213),w=n(180),E=s.PROPER,S=s.CONFIGURABLE,T=w.get,O=w.set,P=r.ArrayBuffer,x=P,A=x&&x.prototype,N=r.DataView,R=N&&N.prototype,D=Object.prototype,k=r.Array,U=r.RangeError,L=i(_),M=i([].reverse),j=m.pack,F=m.unpack,B=function(e){return[255&e]},z=function(e){return[255&e,e>>8&255]},H=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},W=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},V=function(e){return j(e,23,4)},Z=function(e){return j(e,52,8)},q=function(e,t){b(e.prototype,t,{get:function(){return T(this)[t]}})},K=function(e,t,n,r){var i=h(n),o=T(e);if(i+t>o.byteLength)throw U("Wrong index");var a=T(o.buffer).bytes,s=i+o.byteOffset,c=C(a,s,s+t);return r?c:M(c)},G=function(e,t,n,r,i,o){var a=h(n),s=T(e);if(a+t>s.byteLength)throw U("Wrong index");for(var c=T(s.buffer).bytes,u=a+s.byteOffset,l=r(+i),d=0;d<t;d++)c[u+d]=l[o?d:t-d-1]};if(a){var Y=E&&"ArrayBuffer"!==P.name;if(l((function(){P(1)}))&&l((function(){new P(-1)}))&&!l((function(){return new P,new P(1.5),new P(NaN),Y&&!S})))Y&&S&&c(P,"name","ArrayBuffer");else{(x=function(e){return d(this,A),new P(h(e))}).prototype=A;for(var Q,X=y(P),J=0;X.length>J;)(Q=X[J++])in x||c(x,Q,P[Q]);A.constructor=x}v&&g(R)!==D&&v(R,D);var $=new N(new x(2)),ee=i(R.setInt8);$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||u(R,{setInt8:function(e,t){ee(this,e,t<<24>>24)},setUint8:function(e,t){ee(this,e,t<<24>>24)}},{unsafe:!0})}else A=(x=function(e){d(this,A);var t=h(e);O(this,{bytes:L(k(t),0),byteLength:t}),o||(this.byteLength=t)}).prototype,R=(N=function(e,t,n){d(this,R),d(e,A);var r=T(e).byteLength,i=p(t);if(i<0||i>r)throw U("Wrong offset");if(i+(n=void 0===n?r-i:f(n))>r)throw U("Wrong length");O(this,{buffer:e,byteLength:n,byteOffset:i}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=i)}).prototype,o&&(q(x,"byteLength"),q(N,"buffer"),q(N,"byteLength"),q(N,"byteOffset")),u(R,{getInt8:function(e){return K(this,1,e)[0]<<24>>24},getUint8:function(e){return K(this,1,e)[0]},getInt16:function(e){var t=K(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=K(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return W(K(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return W(K(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return F(K(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return F(K(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){G(this,1,e,B,t)},setUint8:function(e,t){G(this,1,e,B,t)},setInt16:function(e,t){G(this,2,e,z,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){G(this,2,e,z,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){G(this,4,e,H,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){G(this,4,e,H,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){G(this,4,e,V,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){G(this,8,e,Z,t,arguments.length>2?arguments[2]:void 0)}});I(x,"ArrayBuffer"),I(N,"DataView"),e.exports={ArrayBuffer:x,DataView:N}},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){var r=n(178);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){var r=n(135),i=n(155),o=r.TypeError;e.exports=function(e,t){if(i(t,e))return e;throw o("Incorrect invocation")}},function(e,t,n){var r=n(135),i=n(191),o=n(193),a=r.RangeError;e.exports=function(e){if(void 0===e)return 0;var t=i(e),n=o(t);if(t!==n)throw a("Wrong length or index");return n}},function(e,t,n){var r=n(135).Array,i=Math.abs,o=Math.pow,a=Math.floor,s=Math.log,c=Math.LN2;e.exports={pack:function(e,t,n){var u,l,d,p=r(n),f=8*n-t-1,h=(1<<f)-1,m=h>>1,g=23===t?o(2,-24)-o(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=i(e))!=e||e===1/0?(l=e!=e?1:0,u=h):(u=a(s(e)/c),e*(d=o(2,-u))<1&&(u--,d*=2),(e+=u+m>=1?g/d:g*o(2,1-m))*d>=2&&(u++,d/=2),u+m>=h?(l=0,u=h):u+m>=1?(l=(e*d-1)*o(2,t),u+=m):(l=e*o(2,m-1)*o(2,t),u=0));t>=8;)p[y++]=255&l,l/=256,t-=8;for(u=u<<t|l,f+=t;f>0;)p[y++]=255&u,u/=256,f-=8;return p[--y]|=128*v,p},unpack:function(e,t){var n,r=e.length,i=8*r-t-1,a=(1<<i)-1,s=a>>1,c=i-7,u=r-1,l=e[u--],d=127&l;for(l>>=7;c>0;)d=256*d+e[u--],c-=8;for(n=d&(1<<-c)-1,d>>=-c,c+=t;c>0;)n=256*n+e[u--],c-=8;if(0===d)d=1-s;else{if(d===a)return n?NaN:l?-1/0:1/0;n+=o(2,t),d-=s}return(l?-1:1)*n*o(2,d-t)}}},function(e,t,n){var r=n(134),i=n(287);r({target:"ArrayBuffer",stat:!0,forced:!i.NATIVE_ARRAY_BUFFER_VIEWS},{isView:i.isView})},function(e,t,n){"use strict";var r,i,o,a=n(281),s=n(138),c=n(135),u=n(152),l=n(151),d=n(169),p=n(200),f=n(162),h=n(174),m=n(178),g=n(175).f,v=n(155),y=n(259),b=n(261),_=n(164),C=n(171),I=c.Int8Array,w=I&&I.prototype,E=c.Uint8ClampedArray,S=E&&E.prototype,T=I&&y(I),O=w&&y(w),P=Object.prototype,x=c.TypeError,A=_("toStringTag"),N=C("TYPED_ARRAY_TAG"),R=C("TYPED_ARRAY_CONSTRUCTOR"),D=a&&!!b&&"Opera"!==p(c.opera),k=!1,U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},M=function(e){if(!l(e))return!1;var t=p(e);return d(U,t)||d(L,t)};for(r in U)(o=(i=c[r])&&i.prototype)?h(o,R,i):D=!1;for(r in L)(o=(i=c[r])&&i.prototype)&&h(o,R,i);if((!D||!u(T)||T===Function.prototype)&&(T=function(){throw x("Incorrect invocation")},D))for(r in U)c[r]&&b(c[r],T);if((!D||!O||O===P)&&(O=T.prototype,D))for(r in U)c[r]&&b(c[r].prototype,O);if(D&&y(S)!==O&&b(S,O),s&&!d(O,A))for(r in k=!0,g(O,A,{get:function(){return l(this)?this[N]:void 0}}),U)c[r]&&h(c[r],N,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_CONSTRUCTOR:R,TYPED_ARRAY_TAG:k&&N,aTypedArray:function(e){if(M(e))return e;throw x("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!b||v(T,e)))return e;throw x(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(s){if(n)for(var i in U){var o=c[i];if(o&&d(o.prototype,e))try{delete o.prototype[e]}catch(a){try{o.prototype[e]=t}catch(u){}}}O[e]&&!n||m(O,e,n?t:D&&w[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(s){if(b){if(n)for(r in U)if((i=c[r])&&d(i,e))try{delete i[e]}catch(o){}if(T[e]&&!n)return;try{return m(T,e,n?t:D&&T[e]||t)}catch(o){}}for(r in U)!(i=c[r])||i[e]&&!n||m(i,e,t)}},isView:function(e){if(!l(e))return!1;var t=p(e);return"DataView"===t||d(U,t)||d(L,t)},isTypedArray:M,TypedArray:T,TypedArrayPrototype:O}},function(e,t,n){"use strict";var r=n(134),i=n(146),o=n(139),a=n(280),s=n(177),c=n(190),u=n(193),l=n(289),d=a.ArrayBuffer,p=a.DataView,f=p.prototype,h=i(d.prototype.slice),m=i(f.getUint8),g=i(f.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new d(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(h&&void 0===t)return h(s(this),e);for(var n=s(this).byteLength,r=c(e,n),i=c(void 0===t?n:t,n),o=new(l(this,d))(u(i-r)),a=new p(this),f=new p(o),v=0;r<i;)g(f,v++,m(a,r++));return o}})},function(e,t,n){var r=n(177),i=n(290),o=n(164)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r=n(135),i=n(218),o=n(162),a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a constructor")}},function(e,t,n){var r=n(169),i=n(178),o=n(292),a=n(164)("toPrimitive"),s=Date.prototype;r(s,a)||i(s,a,o)},function(e,t,n){"use strict";var r=n(135),i=n(177),o=n(163),a=r.TypeError;e.exports=function(e){if(i(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw a("Incorrect hint");return o(this,e)}},function(e,t,n){"use strict";var r=n(152),i=n(151),o=n(175),a=n(259),s=n(164)("hasInstance"),c=Function.prototype;s in c||o.f(c,s,{value:function(e){if(!r(this)||!i(e))return!1;var t=this.prototype;if(!i(t))return e instanceof this;for(;e=a(e);)if(t===e)return!0;return!1}})},function(e,t,n){var r=n(138),i=n(184).EXISTS,o=n(146),a=n(175).f,s=Function.prototype,c=o(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(u.exec);r&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(e){return""}}})},function(e,t,n){var r=n(135);n(213)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";n(297)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(304))},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(146),a=n(196),s=n(178),c=n(298),u=n(302),l=n(283),d=n(152),p=n(151),f=n(139),h=n(253),m=n(213),g=n(303);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),b=v?"set":"add",_=i[e],C=_&&_.prototype,I=_,w={},E=function(e){var t=o(C[e]);s(C,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!p(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return y&&!p(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!p(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!d(_)||!(y||C.forEach&&!f((function(){(new _).entries().next()})))))I=n.getConstructor(t,e,v,b),c.enable();else if(a(e,!0)){var S=new I,T=S[b](y?{}:-0,1)!=S,O=f((function(){S.has(1)})),P=h((function(e){new _(e)})),x=!y&&f((function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)}));P||((I=t((function(e,t){l(e,C);var n=g(new _,e,I);return void 0!=t&&u(t,n[b],{that:n,AS_ENTRIES:v}),n}))).prototype=C,C.constructor=I),(O||x)&&(E("delete"),E("has"),v&&E("get")),(x||T)&&E(b),y&&C.clear&&delete C.clear}return w[e]=I,r({global:!0,forced:I!=_},w),m(I,e),y||n.setStrong(I,e,v),I}},function(e,t,n){var r=n(134),i=n(146),o=n(183),a=n(151),s=n(169),c=n(175).f,u=n(187),l=n(206),d=n(299),p=n(171),f=n(301),h=!1,m=p("meta"),g=0,v=function(e){c(e,m,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},h=!0;var e=u.f,t=i([].splice),n={};n[m]=1,e(n).length&&(u.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===m){t(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!d(e))return"F";if(!t)return"E";v(e)}return e[m].objectID},getWeakData:function(e,t){if(!s(e,m)){if(!d(e))return!0;if(!t)return!1;v(e)}return e[m].weakData},onFreeze:function(e){return f&&h&&d(e)&&!s(e,m)&&v(e),e}};o[m]=!0},function(e,t,n){var r=n(139),i=n(151),o=n(147),a=n(300),s=Object.isExtensible,c=r((function(){s(1)}));e.exports=c||a?function(e){return!!i(e)&&(!a||"ArrayBuffer"!=o(e))&&(!s||s(e))}:s},function(e,t,n){var r=n(139);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},function(e,t,n){var r=n(139);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(135),i=n(215),o=n(140),a=n(177),s=n(162),c=n(249),u=n(192),l=n(155),d=n(251),p=n(252),f=n(248),h=r.TypeError,m=function(e,t){this.stopped=e,this.result=t},g=m.prototype;e.exports=function(e,t,n){var r,v,y,b,_,C,I,w=n&&n.that,E=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_ITERATOR),T=!(!n||!n.INTERRUPTED),O=i(t,w),P=function(e){return r&&f(r,"normal",e),new m(!0,e)},x=function(e){return E?(a(e),T?O(e[0],e[1],P):O(e[0],e[1])):T?O(e,P):O(e)};if(S)r=e;else{if(!(v=p(e)))throw h(s(e)+" is not iterable");if(c(v)){for(y=0,b=u(e);b>y;y++)if((_=x(e[y]))&&l(g,_))return _;return new m(!1)}r=d(e,v)}for(C=r.next;!(I=o(C,r)).done;){try{_=x(I.value)}catch(A){f(r,"throw",A)}if("object"==typeof _&&_&&l(g,_))return _}return new m(!1)}},function(e,t,n){var r=n(152),i=n(151),o=n(261);e.exports=function(e,t,n){var a,s;return o&&r(a=t.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&o(e,s),e}},function(e,t,n){"use strict";var r=n(175).f,i=n(202),o=n(282),a=n(215),s=n(283),c=n(302),u=n(256),l=n(275),d=n(138),p=n(298).fastKey,f=n(180),h=f.set,m=f.getterFor;e.exports={getConstructor:function(e,t,n,u){var l=e((function(e,r){s(e,f),h(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),d||(e.size=0),void 0!=r&&c(r,e[u],{that:e,AS_ENTRIES:n})})),f=l.prototype,g=m(t),v=function(e,t,n){var r,i,o=g(e),a=y(e,t);return a?a.value=n:(o.last=a={index:i=p(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},y=function(e,t){var n,r=g(e),i=p(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(f,{clear:function(){for(var e=g(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=g(this),n=y(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),d?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=g(this),r=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),o(f,n?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),d&&r(f,"size",{get:function(){return g(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",i=m(t),o=m(r);u(e,t,(function(e,t){h(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){var r=n(134),i=n(306),o=Math.acosh,a=Math.log,s=Math.sqrt,c=Math.LN2;r({target:"Math",stat:!0,forced:!o||710!=Math.floor(o(Number.MAX_VALUE))||o(1/0)!=1/0},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?a(e)+c:i(e-1+s(e-1)*s(e+1))}})},function(e,t){var n=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:n(1+e)}},function(e,t,n){var r=n(134),i=Math.asinh,o=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(i&&1/i(0)>0)},{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):o(t+a(t*t+1)):t}})},function(e,t,n){var r=n(134),i=Math.atanh,o=Math.log;r({target:"Math",stat:!0,forced:!(i&&1/i(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:o((1+e)/(1-e))/2}})},function(e,t,n){var r=n(134),i=n(310),o=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(e){return i(e=+e)*a(o(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(134),i=Math.floor,o=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-i(o(e+.5)*a):32}})},function(e,t,n){var r=n(134),i=n(313),o=Math.cosh,a=Math.abs,s=Math.E;r({target:"Math",stat:!0,forced:!o||o(710)===1/0},{cosh:function(e){var t=i(a(e)-1)+1;return(t+1/(t*s*s))*(s/2)}})},function(e,t){var n=Math.expm1,r=Math.exp;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:n},function(e,t,n){var r=n(134),i=n(313);r({target:"Math",stat:!0,forced:i!=Math.expm1},{expm1:i})},function(e,t,n){n(134)({target:"Math",stat:!0},{fround:n(316)})},function(e,t,n){var r=n(310),i=Math.abs,o=Math.pow,a=o(2,-52),s=o(2,-23),c=o(2,127)*(2-s),u=o(2,-126);e.exports=Math.fround||function(e){var t,n,o=i(e),l=r(e);return o<u?l*function(e){return e+1/a-1/a}(o/u/s)*u*s:(n=(t=(1+s/a)*o)-(t-o))>c||n!=n?l*(1/0):l*n}},function(e,t,n){var r=n(134),i=Math.hypot,o=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!i&&i(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,i=0,s=0,c=arguments.length,u=0;s<c;)u<(n=o(arguments[s++]))?(i=i*(r=u/n)*r+1,u=n):i+=n>0?(r=n/u)*r:n;return u===1/0?1/0:u*a(i)}})},function(e,t,n){var r=n(134),i=n(139),o=Math.imul;r({target:"Math",stat:!0,forced:i((function(){return-5!=o(4294967295,5)||2!=o.length}))},{imul:function(e,t){var n=+e,r=+t,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){n(134)({target:"Math",stat:!0},{log10:n(320)})},function(e,t){var n=Math.log,r=Math.LOG10E;e.exports=Math.log10||function(e){return n(e)*r}},function(e,t,n){n(134)({target:"Math",stat:!0},{log1p:n(306)})},function(e,t,n){var r=n(134),i=Math.log,o=Math.LN2;r({target:"Math",stat:!0},{log2:function(e){return i(e)/o}})},function(e,t,n){n(134)({target:"Math",stat:!0},{sign:n(310)})},function(e,t,n){var r=n(134),i=n(139),o=n(313),a=Math.abs,s=Math.exp,c=Math.E;r({target:"Math",stat:!0,forced:i((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return a(e=+e)<1?(o(e)-o(-e))/2:(s(e-1)-s(-e-1))*(c/2)}})},function(e,t,n){var r=n(134),i=n(313),o=Math.exp;r({target:"Math",stat:!0},{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){n(213)(Math,"Math",!0)},function(e,t,n){var r=n(134),i=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(e){return(e>0?o:i)(e)}})},function(e,t,n){"use strict";var r=n(138),i=n(135),o=n(146),a=n(196),s=n(178),c=n(169),u=n(303),l=n(155),d=n(153),p=n(150),f=n(139),h=n(187).f,m=n(137).f,g=n(175).f,v=n(329),y=n(330).trim,b=i.Number,_=b.prototype,C=i.TypeError,I=o("".slice),w=o("".charCodeAt),E=function(e){var t=p(e,"number");return"bigint"==typeof t?t:S(t)},S=function(e){var t,n,r,i,o,a,s,c,u=p(e,"number");if(d(u))throw C("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=y(u),43===(t=w(u,0))||45===t){if(88===(n=w(u,2))||120===n)return NaN}else if(48===t){switch(w(u,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(a=(o=I(u,2)).length,s=0;s<a;s++)if((c=w(o,s))<48||c>i)return NaN;return parseInt(o,r)}return+u};if(a("Number",!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var T,O=function(e){var t=arguments.length<1?0:b(E(e)),n=this;return l(_,n)&&f((function(){v(n)}))?u(Object(t),n,O):t},P=r?h(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),x=0;P.length>x;x++)c(b,T=P[x])&&!c(O,T)&&g(O,T,m(b,T));O.prototype=_,_.constructor=O,s(i,"Number",O)}},function(e,t,n){var r=n(146);e.exports=r(1..valueOf)},function(e,t,n){var r=n(146),i=n(148),o=n(199),a=n(331),s=r("".replace),c="["+a+"]",u=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),d=function(e){return function(t){var n=o(i(t));return 1&e&&(n=s(n,u,"")),2&e&&(n=s(n,l,"")),n}};e.exports={start:d(1),end:d(2),trim:d(3)}},function(e,t){e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){n(134)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){n(134)({target:"Number",stat:!0},{isFinite:n(334)})},function(e,t,n){var r=n(135).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},function(e,t,n){n(134)({target:"Number",stat:!0},{isInteger:n(336)})},function(e,t,n){var r=n(151),i=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){n(134)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(134),i=n(336),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){n(134)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){n(134)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(134),i=n(342);r({target:"Number",stat:!0,forced:Number.parseFloat!=i},{parseFloat:i})},function(e,t,n){var r=n(135),i=n(139),o=n(146),a=n(199),s=n(330).trim,c=n(331),u=o("".charAt),l=r.parseFloat,d=r.Symbol,p=d&&d.iterator,f=1/l(c+"-0")!==-1/0||p&&!i((function(){l(Object(p))}));e.exports=f?function(e){var t=s(a(e)),n=l(t);return 0===n&&"-"==u(t,0)?-0:n}:l},function(e,t,n){var r=n(134),i=n(344);r({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},function(e,t,n){var r=n(135),i=n(139),o=n(146),a=n(199),s=n(330).trim,c=n(331),u=r.parseInt,l=r.Symbol,d=l&&l.iterator,p=/^[+-]?0x/i,f=o(p.exec),h=8!==u(c+"08")||22!==u(c+"0x16")||d&&!i((function(){u(Object(d))}));e.exports=h?function(e,t){var n=s(a(e));return u(n,t>>>0||(f(p,n)?16:10))}:u},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(146),a=n(191),s=n(329),c=n(346),u=n(139),l=i.RangeError,d=i.String,p=Math.floor,f=o(c),h=o("".slice),m=o(1..toFixed),g=function(e,t,n){return 0===t?n:t%2===1?g(e,t-1,n*e):g(e*e,t/2,n)},v=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=p(i/1e7)},y=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=p(r/t),r=r%t*1e7},b=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=d(e[t]);n=""===n?r:n+f("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:u((function(){return"0.000"!==m(8e-5,3)||"1"!==m(.9,0)||"1.25"!==m(1.255,2)||"1000000000000000128"!==m(0xde0b6b3a7640080,0)}))||!u((function(){m({})}))},{toFixed:function(e){var t,n,r,i,o=s(this),c=a(e),u=[0,0,0,0,0,0],p="",m="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return d(o);if(o<0&&(p="-",o=-o),o>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(o*g(2,69,1))-69)<0?o*g(2,-t,1):o/g(2,t,1),n*=4503599627370496,(t=52-t)>0){for(v(u,0,n),r=c;r>=7;)v(u,1e7,0),r-=7;for(v(u,g(10,r,1),0),r=t-1;r>=23;)y(u,1<<23),r-=23;y(u,1<<r),v(u,1,1),y(u,2),m=b(u)}else v(u,0,n),v(u,1<<-t,0),m=b(u)+f("0",c);return c>0?p+((i=m.length)<=c?"0."+f("0",c-i)+m:h(m,0,i-c)+"."+h(m,i-c)):p+m}})},function(e,t,n){"use strict";var r=n(135),i=n(191),o=n(199),a=n(148),s=r.RangeError;e.exports=function(e){var t=o(a(this)),n="",r=i(e);if(r<0||r==1/0)throw s("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}},function(e,t,n){var r=n(134),i=n(348);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){"use strict";var r=n(138),i=n(146),o=n(140),a=n(139),s=n(204),c=n(195),u=n(142),l=n(170),d=n(145),p=Object.assign,f=Object.defineProperty,h=i([].concat);e.exports=!p||a((function(){if(r&&1!==p({b:1},p(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=p({},e)[n]||"abcdefghijklmnopqrst"!=s(p({},t)).join("")}))?function(e,t){for(var n=l(e),i=arguments.length,a=1,p=c.f,f=u.f;i>a;)for(var m,g=d(arguments[a++]),v=p?h(s(g),p(g)):s(g),y=v.length,b=0;y>b;)m=v[b++],r&&!o(f,g,m)||(n[m]=g[m]);return n}:p},function(e,t,n){"use strict";var r=n(134),i=n(138),o=n(350),a=n(161),s=n(170),c=n(175);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){c.f(s(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(166),i=n(135),o=n(139),a=n(273);e.exports=r||!o((function(){if(!(a&&a<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete i[e]}}))},function(e,t,n){"use strict";var r=n(134),i=n(138),o=n(350),a=n(161),s=n(170),c=n(175);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){c.f(s(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(134),i=n(353).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(138),i=n(146),o=n(204),a=n(144),s=i(n(142).f),c=i([].push),u=function(e){return function(t){for(var n,i=a(t),u=o(i),l=u.length,d=0,p=[];l>d;)n=u[d++],r&&!s(i,n)||c(p,e?[n,i[n]]:i[n]);return p}};e.exports={entries:u(!0),values:u(!1)}},function(e,t,n){var r=n(134),i=n(301),o=n(139),a=n(151),s=n(298).onFreeze,c=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){c(1)})),sham:!i},{freeze:function(e){return c&&a(e)?c(s(e)):e}})},function(e,t,n){var r=n(134),i=n(302),o=n(208);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),{AS_ENTRIES:!0}),t}})},function(e,t,n){var r=n(134),i=n(139),o=n(144),a=n(137).f,s=n(138),c=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(134),i=n(138),o=n(186),a=n(144),s=n(137),c=n(208);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,u=o(r),l={},d=0;u.length>d;)void 0!==(n=i(r,t=u[d++]))&&c(l,t,n);return l}})},function(e,t,n){var r=n(134),i=n(139),o=n(206).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(134),i=n(139),o=n(170),a=n(259),s=n(260);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(134)({target:"Object",stat:!0},{is:n(361)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(134),i=n(299);r({target:"Object",stat:!0,forced:Object.isExtensible!==i},{isExtensible:i})},function(e,t,n){var r=n(134),i=n(139),o=n(151),a=n(147),s=n(300),c=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){c(1)}))||s},{isFrozen:function(e){return!o(e)||!(!s||"ArrayBuffer"!=a(e))||!!c&&c(e)}})},function(e,t,n){var r=n(134),i=n(139),o=n(151),a=n(147),s=n(300),c=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){c(1)}))||s},{isSealed:function(e){return!o(e)||!(!s||"ArrayBuffer"!=a(e))||!!c&&c(e)}})},function(e,t,n){var r=n(134),i=n(170),o=n(204);r({target:"Object",stat:!0,forced:n(139)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(134),i=n(138),o=n(350),a=n(170),s=n(149),c=n(259),u=n(137).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e);do{if(t=u(n,r))return t.get}while(n=c(n))}})},function(e,t,n){"use strict";var r=n(134),i=n(138),o=n(350),a=n(170),s=n(149),c=n(259),u=n(137).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e);do{if(t=u(n,r))return t.set}while(n=c(n))}})},function(e,t,n){var r=n(134),i=n(151),o=n(298).onFreeze,a=n(301),s=n(139),c=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){c(1)})),sham:!a},{preventExtensions:function(e){return c&&i(e)?c(o(e)):e}})},function(e,t,n){var r=n(134),i=n(151),o=n(298).onFreeze,a=n(301),s=n(139),c=Object.seal;r({target:"Object",stat:!0,forced:s((function(){c(1)})),sham:!a},{seal:function(e){return c&&i(e)?c(o(e)):e}})},function(e,t,n){n(134)({target:"Object",stat:!0},{setPrototypeOf:n(261)})},function(e,t,n){var r=n(201),i=n(178),o=n(372);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,n){"use strict";var r=n(201),i=n(200);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t,n){var r=n(134),i=n(353).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){var r=n(134),i=n(342);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},function(e,t,n){var r=n(134),i=n(344);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(e,t,n){"use strict";var r,i,o,a,s=n(134),c=n(166),u=n(135),l=n(154),d=n(140),p=n(377),f=n(178),h=n(282),m=n(261),g=n(213),v=n(275),y=n(161),b=n(152),_=n(151),C=n(283),I=n(179),w=n(302),E=n(253),S=n(289),T=n(378).set,O=n(382),P=n(385),x=n(387),A=n(386),N=n(388),R=n(389),D=n(180),k=n(196),U=n(164),L=n(390),M=n(381),j=n(158),F=U("species"),B="Promise",z=D.getterFor(B),H=D.set,W=D.getterFor(B),V=p&&p.prototype,Z=p,q=V,K=u.TypeError,G=u.document,Y=u.process,Q=A.f,X=Q,J=!!(G&&G.createEvent&&u.dispatchEvent),$=b(u.PromiseRejectionEvent),ee=!1,te=k(B,(function(){var e=I(Z),t=e!==String(Z);if(!t&&66===j)return!0;if(c&&!q.finally)return!0;if(j>=51&&/native code/.test(e))return!1;var n=new Z((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[F]=r,!(ee=n.then((function(){}))instanceof r)||!t&&L&&!$})),ne=te||!E((function(e){Z.all(e).catch((function(){}))})),re=function(e){var t;return!(!_(e)||!b(t=e.then))&&t},ie=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&ue(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?u(K("Promise-chain cycle")):(r=re(n))?d(r,n,c,u):c(n)):u(o)}catch(p){l&&!i&&l.exit(),u(p)}},oe=function(e,t){e.notified||(e.notified=!0,O((function(){for(var n,r=e.reactions;n=r.get();)ie(n,e);e.notified=!1,t&&!e.rejection&&se(e)})))},ae=function(e,t,n){var r,i;J?((r=G.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),u.dispatchEvent(r)):r={promise:t,reason:n},!$&&(i=u["on"+e])?i(r):"unhandledrejection"===e&&x("Unhandled promise rejection",n)},se=function(e){d(T,u,(function(){var t,n=e.facade,r=e.value;if(ce(e)&&(t=N((function(){M?Y.emit("unhandledRejection",r,n):ae("unhandledrejection",n,r)})),e.rejection=M||ce(e)?2:1,t.error))throw t.value}))},ce=function(e){return 1!==e.rejection&&!e.parent},ue=function(e){d(T,u,(function(){var t=e.facade;M?Y.emit("rejectionHandled",t):ae("rejectionhandled",t,e.value)}))},le=function(e,t,n){return function(r){e(t,r,n)}},de=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,oe(e,!0))},pe=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw K("Promise can't be resolved itself");var r=re(t);r?O((function(){var n={done:!1};try{d(r,t,le(pe,n,e),le(de,n,e))}catch(i){de(n,i,e)}})):(e.value=t,e.state=1,oe(e,!1))}catch(i){de({done:!1},i,e)}}};if(te&&(q=(Z=function(e){C(this,q),y(e),d(r,this);var t=z(this);try{e(le(pe,t),le(de,t))}catch(n){de(t,n)}}).prototype,(r=function(e){H(this,{type:B,done:!1,notified:!1,parent:!1,reactions:new R,rejection:!1,state:0,value:void 0})}).prototype=h(q,{then:function(e,t){var n=W(this),r=Q(S(this,Z));return n.parent=!0,r.ok=!b(e)||e,r.fail=b(t)&&t,r.domain=M?Y.domain:void 0,0==n.state?n.reactions.add(r):O((function(){ie(r,n)})),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=z(e);this.promise=e,this.resolve=le(pe,t),this.reject=le(de,t)},A.f=Q=function(e){return e===Z||e===o?new i(e):X(e)},!c&&b(p)&&V!==Object.prototype)){a=V.then,ee||(f(V,"then",(function(e,t){var n=this;return new Z((function(e,t){d(a,n,e,t)})).then(e,t)}),{unsafe:!0}),f(V,"catch",q.catch,{unsafe:!0}));try{delete V.constructor}catch(fe){}m&&m(V,q)}s({global:!0,wrap:!0,forced:te},{Promise:Z}),g(Z,B,!1,!0),v(B),o=l(B),s({target:B,stat:!0,forced:te},{reject:function(e){var t=Q(this);return d(t.reject,void 0,e),t.promise}}),s({target:B,stat:!0,forced:c||te},{resolve:function(e){return P(c&&this===o?Z:this,e)}}),s({target:B,stat:!0,forced:ne},{all:function(e){var t=this,n=Q(t),r=n.resolve,i=n.reject,o=N((function(){var n=y(t.resolve),o=[],a=0,s=1;w(e,(function(e){var c=a++,u=!1;s++,d(n,t,e).then((function(e){u||(u=!0,o[c]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=Q(t),r=n.reject,i=N((function(){var i=y(t.resolve);w(e,(function(e){d(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r=n(135);e.exports=r.Promise},function(e,t,n){var r,i,o,a,s=n(135),c=n(197),u=n(215),l=n(152),d=n(169),p=n(139),f=n(205),h=n(209),m=n(173),g=n(379),v=n(380),y=n(381),b=s.setImmediate,_=s.clearImmediate,C=s.process,I=s.Dispatch,w=s.Function,E=s.MessageChannel,S=s.String,T=0,O={};try{r=s.location}catch(R){}var P=function(e){if(d(O,e)){var t=O[e];delete O[e],t()}},x=function(e){return function(){P(e)}},A=function(e){P(e.data)},N=function(e){s.postMessage(S(e),r.protocol+"//"+r.host)};b&&_||(b=function(e){g(arguments.length,1);var t=l(e)?e:w(e),n=h(arguments,1);return O[++T]=function(){c(t,void 0,n)},i(T),T},_=function(e){delete O[e]},y?i=function(e){C.nextTick(x(e))}:I&&I.now?i=function(e){I.now(x(e))}:E&&!v?(a=(o=new E).port2,o.port1.onmessage=A,i=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!p(N)?(i=N,s.addEventListener("message",A,!1)):i="onreadystatechange"in m("script")?function(e){f.appendChild(m("script")).onreadystatechange=function(){f.removeChild(this),P(e)}}:function(e){setTimeout(x(e),0)}),e.exports={set:b,clear:_}},function(e,t,n){var r=n(135).TypeError;e.exports=function(e,t){if(e<t)throw r("Not enough arguments");return e}},function(e,t,n){var r=n(159);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(e,t,n){var r=n(147),i=n(135);e.exports="process"==r(i.process)},function(e,t,n){var r,i,o,a,s,c,u,l,d=n(135),p=n(215),f=n(137).f,h=n(378).set,m=n(380),g=n(383),v=n(384),y=n(381),b=d.MutationObserver||d.WebKitMutationObserver,_=d.document,C=d.process,I=d.Promise,w=f(d,"queueMicrotask"),E=w&&w.value;E||(r=function(){var e,t;for(y&&(e=C.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(n){throw i?a():o=void 0,n}}o=void 0,e&&e.enter()},m||y||v||!b||!_?!g&&I&&I.resolve?((u=I.resolve(void 0)).constructor=I,l=p(u.then,u),a=function(){l(r)}):y?a=function(){C.nextTick(r)}:(h=p(h,d),a=function(){h(r)}):(s=!0,c=_.createTextNode(""),new b(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),e.exports=E||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(159),i=n(135);e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},function(e,t,n){var r=n(159);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(177),i=n(151),o=n(386);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(161),i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(135);e.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t){var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=n},function(e,t){e.exports="object"==typeof window},function(e,t,n){"use strict";var r=n(134),i=n(166),o=n(377),a=n(139),s=n(154),c=n(152),u=n(289),l=n(385),d=n(178);if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),n=c(e);return this.then(n?function(n){return l(t,e()).then((function(){return n}))}:e,n?function(n){return l(t,e()).then((function(){throw n}))}:e)}}),!i&&c(o)){var p=s("Promise").prototype.finally;o.prototype.finally!==p&&d(o.prototype,"finally",p,{unsafe:!0})}},function(e,t,n){var r=n(134),i=n(197),o=n(161),a=n(177);r({target:"Reflect",stat:!0,forced:!n(139)((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return i(o(e),t,a(n))}})},function(e,t,n){var r=n(134),i=n(154),o=n(197),a=n(394),s=n(290),c=n(177),u=n(151),l=n(202),d=n(139),p=i("Reflect","construct"),f=Object.prototype,h=[].push,m=d((function(){function e(){}return!(p((function(){}),[],e)instanceof e)})),g=!d((function(){p((function(){}))})),v=m||g;r({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(e,t){s(e),c(t);var n=arguments.length<3?e:s(arguments[2]);if(g&&!m)return p(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return o(h,r,t),new(o(a,e,r))}var i=n.prototype,d=l(u(i)?i:f),v=o(e,d,t);return u(v)?v:d}})},function(e,t,n){"use strict";var r=n(135),i=n(146),o=n(161),a=n(151),s=n(169),c=n(209),u=n(141),l=r.Function,d=i([].concat),p=i([].join),f={},h=function(e,t,n){if(!s(f,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";f[t]=l("C,a","return new C("+p(r,",")+")")}return f[t](e,n)};e.exports=u?l.bind:function(e){var t=o(this),n=t.prototype,r=c(arguments,1),i=function(){var n=d(r,c(arguments));return this instanceof i?h(t,n.length,n):t.apply(e,n)};return a(n)&&(i.prototype=n),i}},function(e,t,n){var r=n(134),i=n(138),o=n(177),a=n(149),s=n(175);r({target:"Reflect",stat:!0,forced:n(139)((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})})),sham:!i},{defineProperty:function(e,t,n){o(e);var r=a(t);o(n);try{return s.f(e,r,n),!0}catch(i){return!1}}})},function(e,t,n){var r=n(134),i=n(177),o=n(137).f;r({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=o(i(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){var r=n(134),i=n(140),o=n(151),a=n(177),s=n(398),c=n(137),u=n(259);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,l,d=arguments.length<3?t:arguments[2];return a(t)===d?t[n]:(r=c.f(t,n))?s(r)?r.value:void 0===r.get?void 0:i(r.get,d):o(l=u(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(169);e.exports=function(e){return void 0!==e&&(r(e,"value")||r(e,"writable"))}},function(e,t,n){var r=n(134),i=n(138),o=n(177),a=n(137);r({target:"Reflect",stat:!0,sham:!i},{getOwnPropertyDescriptor:function(e,t){return a.f(o(e),t)}})},function(e,t,n){var r=n(134),i=n(177),o=n(259);r({target:"Reflect",stat:!0,sham:!n(260)},{getPrototypeOf:function(e){return o(i(e))}})},function(e,t,n){n(134)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){var r=n(134),i=n(177),o=n(299);r({target:"Reflect",stat:!0},{isExtensible:function(e){return i(e),o(e)}})},function(e,t,n){n(134)({target:"Reflect",stat:!0},{ownKeys:n(186)})},function(e,t,n){var r=n(134),i=n(154),o=n(177);r({target:"Reflect",stat:!0,sham:!n(301)},{preventExtensions:function(e){o(e);try{var t=i("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){var r=n(134),i=n(140),o=n(177),a=n(151),s=n(398),c=n(139),u=n(175),l=n(137),d=n(259),p=n(143);r({target:"Reflect",stat:!0,forced:c((function(){var e=function(){},t=u.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}))},{set:function e(t,n,r){var c,f,h,m=arguments.length<4?t:arguments[3],g=l.f(o(t),n);if(!g){if(a(f=d(t)))return e(f,n,r,m);g=p(0)}if(s(g)){if(!1===g.writable||!a(m))return!1;if(c=l.f(m,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=r,u.f(m,n,c)}else u.f(m,n,p(0,r))}else{if(void 0===(h=g.set))return!1;i(h,m,r)}return!0}})},function(e,t,n){var r=n(134),i=n(177),o=n(262),a=n(261);a&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){i(e),o(t);try{return a(e,t),!0}catch(n){return!1}}})},function(e,t,n){var r=n(138),i=n(135),o=n(146),a=n(196),s=n(303),c=n(174),u=n(175).f,l=n(187).f,d=n(155),p=n(408),f=n(199),h=n(409),m=n(410),g=n(178),v=n(139),y=n(169),b=n(180).enforce,_=n(275),C=n(164),I=n(411),w=n(412),E=C("match"),S=i.RegExp,T=S.prototype,O=i.SyntaxError,P=o(h),x=o(T.exec),A=o("".charAt),N=o("".replace),R=o("".indexOf),D=o("".slice),k=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,U=/a/g,L=/a/g,M=new S(U)!==U,j=m.MISSED_STICKY,F=m.UNSUPPORTED_Y;if(a("RegExp",r&&(!M||j||I||w||v((function(){return L[E]=!1,S(U)!=U||S(L)==L||"/a/i"!=S(U,"i")}))))){for(var B=function(e,t){var n,r,i,o,a,u,l=d(T,this),h=p(e),m=void 0===t,g=[],v=e;if(!l&&h&&m&&e.constructor===B)return e;if((h||d(T,e))&&(e=e.source,m&&(t="flags"in v?v.flags:P(v))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),v=e,I&&"dotAll"in U&&(r=!!t&&R(t,"s")>-1)&&(t=N(t,/s/g,"")),n=t,j&&"sticky"in U&&(i=!!t&&R(t,"y")>-1)&&F&&(t=N(t,/y/g,"")),w&&(e=(o=function(e){for(var t,n=e.length,r=0,i="",o=[],a={},s=!1,c=!1,u=0,l="";r<=n;r++){if("\\"===(t=A(e,r)))t+=A(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:x(k,D(e,r+1))&&(r+=2,c=!0),i+=t,u++;continue;case">"===t&&c:if(""===l||y(a,l))throw new O("Invalid capture group name");a[l]=!0,o[o.length]=[l,u],c=!1,l="";continue}c?l+=t:i+=t}return[i,o]}(e))[0],g=o[1]),a=s(S(e,t),l?this:T,B),(r||i||g.length)&&(u=b(a),r&&(u.dotAll=!0,u.raw=B(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(t=A(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+A(e,++r);return i}(e),n)),i&&(u.sticky=!0),g.length&&(u.groups=g)),e!==v)try{c(a,"source",""===v?"(?:)":v)}catch(_){}return a},z=function(e){e in B||u(B,e,{configurable:!0,get:function(){return S[e]},set:function(t){S[e]=t}})},H=l(S),W=0;H.length>W;)z(H[W++]);T.constructor=B,B.prototype=T,g(i,"RegExp",B)}_("RegExp")},function(e,t,n){var r=n(151),i=n(147),o=n(164)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(177);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(139),i=n(135).RegExp,o=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},function(e,t,n){var r=n(139),i=n(135).RegExp;e.exports=r((function(){var e=i(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},function(e,t,n){var r=n(139),i=n(135).RegExp;e.exports=r((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},function(e,t,n){"use strict";var r=n(134),i=n(414);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";var r=n(140),i=n(146),o=n(199),a=n(409),s=n(410),c=n(165),u=n(202),l=n(180).get,d=n(411),p=n(412),f=c("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,m=h,g=i("".charAt),v=i("".indexOf),y=i("".replace),b=i("".slice),_=function(){var e=/a/,t=/b*/g;return r(h,e,"a"),r(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),C=s.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(_||I||C||d||p)&&(m=function(e){var t,n,i,s,c,d,p,w=this,E=l(w),S=o(e),T=E.raw;if(T)return T.lastIndex=w.lastIndex,t=r(m,T,S),w.lastIndex=T.lastIndex,t;var O=E.groups,P=C&&w.sticky,x=r(a,w),A=w.source,N=0,R=S;if(P&&(x=y(x,"y",""),-1===v(x,"g")&&(x+="g"),R=b(S,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&"\n"!==g(S,w.lastIndex-1))&&(A="(?: "+A+")",R=" "+R,N++),n=new RegExp("^(?:"+A+")",x)),I&&(n=new RegExp("^"+A+"$(?!\\s)",x)),_&&(i=w.lastIndex),s=r(h,P?n:w,R),P?s?(s.input=b(s.input,N),s[0]=b(s[0],N),s.index=w.lastIndex,w.lastIndex+=s[0].length):w.lastIndex=0:_&&s&&(w.lastIndex=w.global?s.index+s[0].length:i),I&&s&&s.length>1&&r(f,s[0],n,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&O)for(s.groups=d=u(null),c=0;c<O.length;c++)d[(p=O[c])[0]]=s[p[1]];return s}),e.exports=m},function(e,t,n){var r=n(138),i=n(175),o=n(409),a=n(139),s=RegExp.prototype;r&&a((function(){return"sy"!==Object.getOwnPropertyDescriptor(s,"flags").get.call({dotAll:!0,sticky:!0})}))&&i.f(s,"flags",{configurable:!0,get:o})},function(e,t,n){"use strict";var r=n(146),i=n(184).PROPER,o=n(178),a=n(177),s=n(155),c=n(199),u=n(139),l=n(409),d=RegExp.prototype,p=d.toString,f=r(l),h=u((function(){return"/a/b"!=p.call({source:"a",flags:"b"})})),m=i&&"toString"!=p.name;(h||m)&&o(RegExp.prototype,"toString",(function(){var e=a(this),t=c(e.source),n=e.flags;return"/"+t+"/"+c(void 0===n&&s(d,e)&&!("flags"in d)?f(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";n(297)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(304))},function(e,t,n){"use strict";var r=n(134),i=n(419).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){var r=n(146),i=n(191),o=n(199),a=n(148),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,d=o(a(t)),p=i(n),f=d.length;return p<0||p>=f?e?"":void 0:(r=c(d,p))<55296||r>56319||p+1===f||(l=c(d,p+1))<56320||l>57343?e?s(d,p):r:e?u(d,p,p+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},function(e,t,n){"use strict";var r=n(134),i=n(146),o=n(137).f,a=n(193),s=n(199),c=n(421),u=n(148),l=n(422),d=n(166),p=i("".endsWith),f=i("".slice),h=Math.min,m=l("endsWith");r({target:"String",proto:!0,forced:!(!d&&!m&&function(){var e=o(String.prototype,"endsWith");return e&&!e.writable}())&&!m},{endsWith:function(e){var t=s(u(this));c(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,i=void 0===n?r:h(a(n),r),o=s(e);return p?p(t,o,i):f(t,i-o.length,i)===o}})},function(e,t,n){var r=n(135),i=n(408),o=r.TypeError;e.exports=function(e){if(i(e))throw o("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(164)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(i){}}return!1}},function(e,t,n){var r=n(134),i=n(135),o=n(146),a=n(190),s=i.RangeError,c=String.fromCharCode,u=String.fromCodePoint,l=o([].join);r({target:"String",stat:!0,forced:!!u&&1!=u.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;r>i;){if(t=+arguments[i++],a(t,1114111)!==t)throw s(t+" is not a valid code point");n[i]=t<65536?c(t):c(55296+((t-=65536)>>10),t%1024+56320)}return l(n,"")}})},function(e,t,n){"use strict";var r=n(134),i=n(146),o=n(421),a=n(148),s=n(199),c=n(422),u=i("".indexOf);r({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(419).charAt,i=n(199),o=n(180),a=n(256),s=o.set,c=o.getterFor("String Iterator");a(String,"String",(function(e){s(this,{type:"String Iterator",string:i(e),index:0})}),(function(){var e,t=c(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(140),i=n(427),o=n(177),a=n(193),s=n(199),c=n(148),u=n(160),l=n(428),d=n(429);i("match",(function(e,t,n){return[function(t){var n=c(this),i=void 0==t?void 0:u(t,e);return i?r(i,t,n):new RegExp(t)[e](s(n))},function(e){var r=o(this),i=s(e),c=n(t,r,i);if(c.done)return c.value;if(!r.global)return d(r,i);var u=r.unicode;r.lastIndex=0;for(var p,f=[],h=0;null!==(p=d(r,i));){var m=s(p[0]);f[h]=m,""===m&&(r.lastIndex=l(i,a(r.lastIndex),u)),h++}return 0===h?null:f}]}))},function(e,t,n){"use strict";n(413);var r=n(146),i=n(178),o=n(414),a=n(139),s=n(164),c=n(174),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,n,d){var p=s(e),f=!a((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),h=f&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!f||!h||n){var m=r(/./[p]),g=t(p,""[e],(function(e,t,n,i,a){var s=r(e),c=t.exec;return c===o||c===l.exec?f&&!a?{done:!0,value:m(t,n,i)}:{done:!0,value:s(n,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(l,p,g[1])}d&&c(l[p],"sham",!0)}},function(e,t,n){"use strict";var r=n(419).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(135),i=n(140),o=n(177),a=n(152),s=n(147),c=n(414),u=r.TypeError;e.exports=function(e,t){var n=e.exec;if(a(n)){var r=i(n,e,t);return null!==r&&o(r),r}if("RegExp"===s(e))return i(c,e,t);throw u("RegExp#exec called on incompatible receiver")}},function(e,t,n){"use strict";var r=n(134),i=n(431).end;r({target:"String",proto:!0,forced:n(432)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(146),i=n(193),o=n(199),a=n(346),s=n(148),c=r(a),u=r("".slice),l=Math.ceil,d=function(e){return function(t,n,r){var a,d,p=o(s(t)),f=i(n),h=p.length,m=void 0===r?" ":o(r);return f<=h||""==m?p:((d=c(m,l((a=f-h)/m.length))).length>a&&(d=u(d,0,a)),e?p+d:d+p)}};e.exports={start:d(!1),end:d(!0)}},function(e,t,n){var r=n(159);e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){"use strict";var r=n(134),i=n(431).start;r({target:"String",proto:!0,forced:n(432)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(134),i=n(146),o=n(144),a=n(170),s=n(199),c=n(192),u=i([].push),l=i([].join);r({target:"String",stat:!0},{raw:function(e){for(var t=o(a(e).raw),n=c(t),r=arguments.length,i=[],d=0;n>d;){if(u(i,s(t[d++])),d===n)return l(i,"");d<r&&u(i,s(arguments[d]))}}})},function(e,t,n){n(134)({target:"String",proto:!0},{repeat:n(346)})},function(e,t,n){"use strict";var r=n(197),i=n(140),o=n(146),a=n(427),s=n(139),c=n(177),u=n(152),l=n(191),d=n(193),p=n(199),f=n(148),h=n(428),m=n(160),g=n(437),v=n(429),y=n(164)("replace"),b=Math.max,_=Math.min,C=o([].concat),I=o([].push),w=o("".indexOf),E=o("".slice),S="$0"==="a".replace(/./,"$0"),T=!!/./[y]&&""===/./[y]("a","$0");a("replace",(function(e,t,n){var o=T?"$":"$0";return[function(e,n){var r=f(this),o=void 0==e?void 0:m(e,y);return o?i(o,e,r,n):i(t,p(r),e,n)},function(e,i){var a=c(this),s=p(e);if("string"==typeof i&&-1===w(i,o)&&-1===w(i,"$<")){var f=n(t,a,s,i);if(f.done)return f.value}var m=u(i);m||(i=p(i));var y=a.global;if(y){var S=a.unicode;a.lastIndex=0}for(var T=[];;){var O=v(a,s);if(null===O)break;if(I(T,O),!y)break;""===p(O[0])&&(a.lastIndex=h(s,d(a.lastIndex),S))}for(var P,x="",A=0,N=0;N<T.length;N++){for(var R=p((O=T[N])[0]),D=b(_(l(O.index),s.length),0),k=[],U=1;U<O.length;U++)I(k,void 0===(P=O[U])?P:String(P));var L=O.groups;if(m){var M=C([R],k,D,s);void 0!==L&&I(M,L);var j=p(r(i,void 0,M))}else j=g(R,s,D,k,L,i);D>=A&&(x+=E(s,A,D)+j,A=D+R.length)}return x+E(s,A)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!S||T)},function(e,t,n){var r=n(146),i=n(170),o=Math.floor,a=r("".charAt),s=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,d,p){var f=n+e.length,h=r.length,m=l;return void 0!==d&&(d=i(d),m=u),s(p,m,(function(i,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,n);case"'":return c(t,f);case"<":u=d[c(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>h){var p=o(l/10);return 0===p?i:p<=h?void 0===r[p-1]?a(s,1):r[p-1]+a(s,1):i}u=r[l-1]}return void 0===u?"":u}))}},function(e,t,n){"use strict";var r=n(140),i=n(427),o=n(177),a=n(148),s=n(361),c=n(199),u=n(160),l=n(429);i("search",(function(e,t,n){return[function(t){var n=a(this),i=void 0==t?void 0:u(t,e);return i?r(i,t,n):new RegExp(t)[e](c(n))},function(e){var r=o(this),i=c(e),a=n(t,r,i);if(a.done)return a.value;var u=r.lastIndex;s(u,0)||(r.lastIndex=0);var d=l(r,i);return s(r.lastIndex,u)||(r.lastIndex=u),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var r=n(197),i=n(140),o=n(146),a=n(427),s=n(408),c=n(177),u=n(148),l=n(289),d=n(428),p=n(193),f=n(199),h=n(160),m=n(207),g=n(429),v=n(414),y=n(410),b=n(139),_=y.UNSUPPORTED_Y,C=Math.min,I=[].push,w=o(/./.exec),E=o(I),S=o("".slice);a("split",(function(e,t,n){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var o=f(u(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[o];if(!s(e))return i(t,o,e,a);for(var c,l,d,p=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,y=new RegExp(e.source,h+"g");(c=i(v,y,o))&&!((l=y.lastIndex)>g&&(E(p,S(o,g,c.index)),c.length>1&&c.index<o.length&&r(I,p,m(c,1)),d=c[0].length,g=l,p.length>=a));)y.lastIndex===c.index&&y.lastIndex++;return g===o.length?!d&&w(y,"")||E(p,""):E(p,S(o,g)),p.length>a?m(p,0,a):p}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:i(t,this,e,n)}:t,[function(t,n){var r=u(this),a=void 0==t?void 0:h(t,e);return a?i(a,t,r,n):i(o,f(r),t,n)},function(e,r){var i=c(this),a=f(e),s=n(o,i,a,r,o!==t);if(s.done)return s.value;var u=l(i,RegExp),h=i.unicode,m=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(_?"g":"y"),v=new u(_?"^(?:"+i.source+")":i,m),y=void 0===r?4294967295:r>>>0;if(0===y)return[];if(0===a.length)return null===g(v,a)?[a]:[];for(var b=0,I=0,w=[];I<a.length;){v.lastIndex=_?0:I;var T,O=g(v,_?S(a,I):a);if(null===O||(T=C(p(v.lastIndex+(_?I:0)),a.length))===b)I=d(a,I,h);else{if(E(w,S(a,b,I)),w.length===y)return w;for(var P=1;P<=O.length-1;P++)if(E(w,O[P]),w.length===y)return w;I=b=T}}return E(w,S(a,b)),w}]}),!!b((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),_)},function(e,t,n){"use strict";var r=n(134),i=n(146),o=n(137).f,a=n(193),s=n(199),c=n(421),u=n(148),l=n(422),d=n(166),p=i("".startsWith),f=i("".slice),h=Math.min,m=l("startsWith");r({target:"String",proto:!0,forced:!(!d&&!m&&function(){var e=o(String.prototype,"startsWith");return e&&!e.writable}())&&!m},{startsWith:function(e){var t=s(u(this));c(e);var n=a(h(arguments.length>1?arguments[1]:void 0,t.length)),r=s(e);return p?p(t,r,n):f(t,n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(134),i=n(330).trim;r({target:"String",proto:!0,forced:n(442)("trim")},{trim:function(){return i(this)}})},function(e,t,n){var r=n(184).PROPER,i=n(139),o=n(331);e.exports=function(e){return i((function(){return!!o[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||r&&o[e].name!==e}))}},function(e,t,n){"use strict";var r=n(134),i=n(330).end,o=n(442)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,name:"trimEnd",forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(134),i=n(330).start,o=n(442)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,name:"trimStart",forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){var r=n(146),i=n(148),o=n(199),a=/"/g,s=r("".replace);e.exports=function(e,t,n,r){var c=o(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+s(o(r),a,"&quot;")+'"'),u+">"+c+"</"+t+">"}},function(e,t,n){var r=n(139);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(134),i=n(446);r({target:"String",proto:!0,forced:n(447)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){n(461)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(140),a=n(138),s=n(462),c=n(287),u=n(280),l=n(283),d=n(143),p=n(174),f=n(336),h=n(193),m=n(284),g=n(463),v=n(149),y=n(169),b=n(200),_=n(151),C=n(153),I=n(202),w=n(155),E=n(261),S=n(187).f,T=n(465),O=n(214).forEach,P=n(275),x=n(175),A=n(137),N=n(180),R=n(303),D=N.get,k=N.set,U=x.f,L=A.f,M=Math.round,j=i.RangeError,F=u.ArrayBuffer,B=F.prototype,z=u.DataView,H=c.NATIVE_ARRAY_BUFFER_VIEWS,W=c.TYPED_ARRAY_CONSTRUCTOR,V=c.TYPED_ARRAY_TAG,Z=c.TypedArray,q=c.TypedArrayPrototype,K=c.aTypedArrayConstructor,G=c.isTypedArray,Y=function(e,t){K(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},Q=function(e,t){U(e,t,{get:function(){return D(this)[t]}})},X=function(e){var t;return w(B,e)||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},J=function(e,t){return G(e)&&!C(t)&&t in e&&f(+t)&&t>=0},$=function(e,t){return t=v(t),J(e,t)?d(2,e[t]):L(e,t)},ee=function(e,t,n){return t=v(t),!(J(e,t)&&_(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?U(e,t,n):(e[t]=n.value,e)};a?(H||(A.f=$,x.f=ee,Q(q,"buffer"),Q(q,"byteOffset"),Q(q,"byteLength"),Q(q,"length")),r({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:$,defineProperty:ee}),e.exports=function(e,t,n){var a=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",u="get"+e,d="set"+e,f=i[c],v=f,y=v&&v.prototype,b={},C=function(e,t){U(e,t,{get:function(){return function(e,t){var n=D(e);return n.view[u](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=D(e);n&&(r=(r=M(r))<0?0:r>255?255:255&r),i.view[d](t*a+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};H?s&&(v=t((function(e,t,n,r){return l(e,y),R(_(t)?X(t)?void 0!==r?new f(t,g(n,a),r):void 0!==n?new f(t,g(n,a)):new f(t):G(t)?Y(v,t):o(T,v,t):new f(m(t)),e,v)})),E&&E(v,Z),O(S(f),(function(e){e in v||p(v,e,f[e])})),v.prototype=y):(v=t((function(e,t,n,r){l(e,y);var i,s,c,u=0,d=0;if(_(t)){if(!X(t))return G(t)?Y(v,t):o(T,v,t);i=t,d=g(n,a);var p=t.byteLength;if(void 0===r){if(p%a)throw j("Wrong length");if((s=p-d)<0)throw j("Wrong length")}else if((s=h(r)*a)+d>p)throw j("Wrong length");c=s/a}else c=m(t),i=new F(s=c*a);for(k(e,{buffer:i,byteOffset:d,byteLength:s,length:c,view:new z(i)});u<c;)C(e,u++)})),E&&E(v,Z),y=v.prototype=I(q)),y.constructor!==v&&p(y,"constructor",v),p(y,W,v),V&&p(y,V,c),b[c]=v,r({global:!0,forced:v!=f,sham:!H},b),"BYTES_PER_ELEMENT"in v||p(v,"BYTES_PER_ELEMENT",a),"BYTES_PER_ELEMENT"in y||p(y,"BYTES_PER_ELEMENT",a),P(c)}):e.exports=function(){}},function(e,t,n){var r=n(135),i=n(139),o=n(253),a=n(287).NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,c=r.Int8Array;e.exports=!a||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||i((function(){return 1!==new c(new s(2),1,void 0).length}))},function(e,t,n){var r=n(135),i=n(464),o=r.RangeError;e.exports=function(e,t){var n=i(e);if(n%t)throw o("Wrong offset");return n}},function(e,t,n){var r=n(135),i=n(191),o=r.RangeError;e.exports=function(e){var t=i(e);if(t<0)throw o("The argument can't be less than 0");return t}},function(e,t,n){var r=n(215),i=n(140),o=n(290),a=n(170),s=n(192),c=n(251),u=n(252),l=n(249),d=n(287).aTypedArrayConstructor;e.exports=function(e){var t,n,p,f,h,m,g=o(this),v=a(e),y=arguments.length,b=y>1?arguments[1]:void 0,_=void 0!==b,C=u(v);if(C&&!l(C))for(m=(h=c(v,C)).next,v=[];!(f=i(m,h)).done;)v.push(f.value);for(_&&y>2&&(b=r(b,arguments[2])),n=s(v),p=new(d(g))(n),t=0;n>t;t++)p[t]=_?b(v[t],t):v[t];return p}},function(e,t,n){n(461)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(461)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(461)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(461)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(461)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(461)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){n(461)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(461)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(146),i=n(287),o=r(n(235)),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},function(e,t,n){"use strict";var r=n(287),i=n(214).every,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(287),i=n(140),o=n(238),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return i(o,a(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}))},function(e,t,n){"use strict";var r=n(287),i=n(214).filter,o=n(478),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=i(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},function(e,t,n){var r=n(479),i=n(480);e.exports=function(e,t){return r(i(e),t)}},function(e,t,n){var r=n(192);e.exports=function(e,t){for(var n=0,i=r(t),o=new e(i);i>n;)o[n]=t[n++];return o}},function(e,t,n){var r=n(287),i=n(289),o=r.TYPED_ARRAY_CONSTRUCTOR,a=r.aTypedArrayConstructor;e.exports=function(e){return a(i(e,e[o]))}},function(e,t,n){"use strict";var r=n(287),i=n(214).find,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(287),i=n(214).findIndex,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(287),i=n(214).forEach,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(462);(0,n(287).exportTypedArrayStaticMethod)("from",n(465),r)},function(e,t,n){"use strict";var r=n(287),i=n(189).includes,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(287),i=n(189).indexOf,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(135),i=n(139),o=n(146),a=n(287),s=n(255),c=n(164)("iterator"),u=r.Uint8Array,l=o(s.values),d=o(s.keys),p=o(s.entries),f=a.aTypedArray,h=a.exportTypedArrayMethod,m=u&&u.prototype,g=!i((function(){m[c].call([1])})),v=!!m&&m.values&&m[c]===m.values&&"values"===m.values.name,y=function(){return l(f(this))};h("entries",(function(){return p(f(this))}),g),h("keys",(function(){return d(f(this))}),g),h("values",y,g||!v,{name:"values"}),h(c,y,g||!v,{name:"values"})},function(e,t,n){"use strict";var r=n(287),i=n(146),o=r.aTypedArray,a=r.exportTypedArrayMethod,s=i([].join);a("join",(function(e){return s(o(this),e)}))},function(e,t,n){"use strict";var r=n(287),i=n(197),o=n(490),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,a(this),t>1?[e,arguments[1]]:[e])}))},function(e,t,n){"use strict";var r=n(197),i=n(144),o=n(191),a=n(192),s=n(264),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,d=s("lastIndexOf"),p=l||!d;e.exports=p?function(e){if(l)return r(u,this,arguments)||0;var t=i(this),n=a(t),s=n-1;for(arguments.length>1&&(s=c(s,o(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},function(e,t,n){"use strict";var r=n(287),i=n(214).map,o=n(480),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},function(e,t,n){"use strict";var r=n(287),i=n(462),o=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(o(this))(t);t>e;)n[e]=arguments[e++];return n}),i)},function(e,t,n){"use strict";var r=n(287),i=n(494).left,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},function(e,t,n){var r=n(135),i=n(161),o=n(170),a=n(145),s=n(192),c=r.TypeError,u=function(e){return function(t,n,r,u){i(n);var l=o(t),d=a(l),p=s(l),f=e?p-1:0,h=e?-1:1;if(r<2)for(;;){if(f in d){u=d[f],f+=h;break}if(f+=h,e?f<0:p<=f)throw c("Reduce of empty array with no initial value")}for(;e?f>=0:p>f;f+=h)f in d&&(u=n(u,d[f],f,l));return u}};e.exports={left:u(!1),right:u(!0)}},function(e,t,n){"use strict";var r=n(287),i=n(494).right,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(287),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=i(this).length,n=a(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}))},function(e,t,n){"use strict";var r=n(135),i=n(140),o=n(287),a=n(192),s=n(463),c=n(170),u=n(139),l=r.RangeError,d=r.Int8Array,p=d&&d.prototype,f=p&&p.set,h=o.aTypedArray,m=o.exportTypedArrayMethod,g=!u((function(){var e=new Uint8ClampedArray(2);return i(f,e,{length:1,0:3},1),3!==e[1]})),v=g&&o.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));m("set",(function(e){h(this);var t=s(arguments.length>1?arguments[1]:void 0,1),n=c(e);if(g)return i(f,this,n,t);var r=this.length,o=a(n),u=0;if(o+t>r)throw l("Wrong length");for(;u<o;)this[t+u]=n[u++]}),!g||v)},function(e,t,n){"use strict";var r=n(287),i=n(480),o=n(139),a=n(209),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("slice",(function(e,t){for(var n=a(s(this),e,t),r=i(this),o=0,c=n.length,u=new r(c);c>o;)u[o]=n[o++];return u}),o((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var r=n(287),i=n(214).some,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(135),i=n(146),o=n(139),a=n(161),s=n(270),c=n(287),u=n(271),l=n(272),d=n(158),p=n(273),f=r.Array,h=c.aTypedArray,m=c.exportTypedArrayMethod,g=r.Uint16Array,v=g&&i(g.prototype.sort),y=!!v&&!(o((function(){v(new g(2),null)}))&&o((function(){v(new g(2),{})}))),b=!!v&&!o((function(){if(d)return d<74;if(u)return u<67;if(l)return!0;if(p)return p<602;var e,t,n=new g(516),r=f(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(v(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));m("sort",(function(e){return void 0!==e&&a(e),b?v(this,e):s(h(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!==n?-1:t!==t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!b||y)},function(e,t,n){"use strict";var r=n(287),i=n(193),o=n(190),a=n(480),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=s(this),r=n.length,c=o(e,r);return new(a(n))(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,i((void 0===t?r:o(t,r))-c))}))},function(e,t,n){"use strict";var r=n(135),i=n(197),o=n(287),a=n(139),s=n(209),c=r.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,d=[].toLocaleString,p=!!c&&a((function(){d.call(new c(1))}));l("toLocaleString",(function(){return i(d,p?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var r=n(287).exportTypedArrayMethod,i=n(139),o=n(135),a=n(146),s=o.Uint8Array,c=s&&s.prototype||{},u=[].toString,l=a([].join);i((function(){u.call({})}))&&(u=function(){return l(this)});var d=c.toString!=u;r("toString",u,d)},function(e,t,n){"use strict";var r,i=n(135),o=n(146),a=n(282),s=n(298),c=n(297),u=n(505),l=n(151),d=n(299),p=n(180).enforce,f=n(181),h=!i.ActiveXObject&&"ActiveXObject"in i,m=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=c("WeakMap",m,u);if(f&&h){r=u.getConstructor(m,"WeakMap",!0),s.enable();var v=g.prototype,y=o(v.delete),b=o(v.has),_=o(v.get),C=o(v.set);a(v,{delete:function(e){if(l(e)&&!d(e)){var t=p(this);return t.frozen||(t.frozen=new r),y(this,e)||t.frozen.delete(e)}return y(this,e)},has:function(e){if(l(e)&&!d(e)){var t=p(this);return t.frozen||(t.frozen=new r),b(this,e)||t.frozen.has(e)}return b(this,e)},get:function(e){if(l(e)&&!d(e)){var t=p(this);return t.frozen||(t.frozen=new r),b(this,e)?_(this,e):t.frozen.get(e)}return _(this,e)},set:function(e,t){if(l(e)&&!d(e)){var n=p(this);n.frozen||(n.frozen=new r),b(this,e)?C(this,e,t):n.frozen.set(e,t)}else C(this,e,t);return this}})}},function(e,t,n){"use strict";var r=n(146),i=n(282),o=n(298).getWeakData,a=n(177),s=n(151),c=n(283),u=n(302),l=n(214),d=n(169),p=n(180),f=p.set,h=p.getterFor,m=l.find,g=l.findIndex,v=r([].splice),y=0,b=function(e){return e.frozen||(e.frozen=new _)},_=function(){this.entries=[]},C=function(e,t){return m(e.entries,(function(e){return e[0]===t}))};_.prototype={get:function(e){var t=C(this,e);if(t)return t[1]},has:function(e){return!!C(this,e)},set:function(e,t){var n=C(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));return~t&&v(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var l=e((function(e,i){c(e,p),f(e,{type:t,id:y++,frozen:void 0}),void 0!=i&&u(i,e[r],{that:e,AS_ENTRIES:n})})),p=l.prototype,m=h(t),g=function(e,t,n){var r=m(e),i=o(a(t),!0);return!0===i?b(r).set(t,n):i[r.id]=n,e};return i(p,{delete:function(e){var t=m(this);if(!s(e))return!1;var n=o(e);return!0===n?b(t).delete(e):n&&d(n,t.id)&&delete n[t.id]},has:function(e){var t=m(this);if(!s(e))return!1;var n=o(e);return!0===n?b(t).has(e):n&&d(n,t.id)}}),i(p,n?{get:function(e){var t=m(this);if(s(e)){var n=o(e);return!0===n?b(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),l}}},function(e,t,n){"use strict";n(297)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(505))},function(e,t,n){var r=n(135),i=n(508),o=n(509),a=n(510),s=n(174),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in i)i[u]&&c(r[u]&&r[u].prototype);c(o)},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(173)("span").classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},function(e,t,n){"use strict";var r=n(214).forEach,i=n(264)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var r=n(135),i=n(508),o=n(509),a=n(255),s=n(174),c=n(164),u=c("iterator"),l=c("toStringTag"),d=a.values,p=function(e,t){if(e){if(e[u]!==d)try{s(e,u,d)}catch(r){e[u]=d}if(e[l]||s(e,l,t),i[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(r){e[n]=a[n]}}};for(var f in i)p(r[f]&&r[f].prototype,f);p(o,"DOMTokenList")},function(e,t,n){var r=n(134),i=n(135),o=n(378);r({global:!0,bind:!0,enumerable:!0,forced:!i.setImmediate||!i.clearImmediate},{setImmediate:o.set,clearImmediate:o.clear})},function(e,t,n){var r=n(134),i=n(135),o=n(382),a=n(161),s=n(379),c=n(381),u=i.process;r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){s(arguments.length,1),a(e);var t=c&&u.domain;o(t?t.bind(e):e)}})},function(e,t,n){"use strict";n(425);var r,i=n(134),o=n(138),a=n(515),s=n(135),c=n(215),u=n(146),l=n(203).f,d=n(178),p=n(283),f=n(169),h=n(348),m=n(246),g=n(207),v=n(419).codeAt,y=n(516),b=n(199),_=n(213),C=n(379),I=n(517),w=n(180),E=w.set,S=w.getterFor("URL"),T=I.URLSearchParams,O=I.getState,P=s.URL,x=s.TypeError,A=s.parseInt,N=Math.floor,R=Math.pow,D=u("".charAt),k=u(/./.exec),U=u([].join),L=u(1..toString),M=u([].pop),j=u([].push),F=u("".replace),B=u([].shift),z=u("".split),H=u("".slice),W=u("".toLowerCase),V=u([].unshift),Z=/[a-z]/i,q=/[\d+-.a-z]/i,K=/\d/,G=/^0x/i,Y=/^[0-7]+$/,Q=/^\d+$/,X=/^[\da-f]+$/i,J=/[\0\t\n\r #%/:<>?@[\\\]^|]/,$=/[\0\t\n\r #/:<>?@[\\\]^|]/,ee=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,te=/[\t\n\r]/g,ne=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)V(t,e%256),e=N(e/256);return U(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=L(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},re={},ie=h({},re,{" ":1,'"':1,"<":1,">":1,"`":1}),oe=h({},ie,{"#":1,"?":1,"{":1,"}":1}),ae=h({},oe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),se=function(e,t){var n=v(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},ce={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ue=function(e,t){var n;return 2==e.length&&k(Z,D(e,0))&&(":"==(n=D(e,1))||!t&&"|"==n)},le=function(e){var t;return e.length>1&&ue(H(e,0,2))&&(2==e.length||"/"===(t=D(e,2))||"\\"===t||"?"===t||"#"===t)},de=function(e){return"."===e||"%2e"===W(e)},pe={},fe={},he={},me={},ge={},ve={},ye={},be={},_e={},Ce={},Ie={},we={},Ee={},Se={},Te={},Oe={},Pe={},xe={},Ae={},Ne={},Re={},De=function(e,t,n){var r,i,o,a=b(e);if(t){if(i=this.parse(a))throw x(i);this.searchParams=null}else{if(void 0!==n&&(r=new De(n,!0)),i=this.parse(a,null,r))throw x(i);(o=O(new T)).bindURL(this),this.searchParams=o}};De.prototype={type:"URL",parse:function(e,t,n){var i,o,a,s,c,u=this,l=t||pe,d=0,p="",h=!1,v=!1,y=!1;for(e=b(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=F(e,ee,"")),e=F(e,te,""),i=m(e);d<=i.length;){switch(o=i[d],l){case pe:if(!o||!k(Z,o)){if(t)return"Invalid scheme";l=he;continue}p+=W(o),l=fe;break;case fe:if(o&&(k(q,o)||"+"==o||"-"==o||"."==o))p+=W(o);else{if(":"!=o){if(t)return"Invalid scheme";p="",l=he,d=0;continue}if(t&&(u.isSpecial()!=f(ce,p)||"file"==p&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=p,t)return void(u.isSpecial()&&ce[u.scheme]==u.port&&(u.port=null));p="","file"==u.scheme?l=Se:u.isSpecial()&&n&&n.scheme==u.scheme?l=me:u.isSpecial()?l=be:"/"==i[d+1]?(l=ge,d++):(u.cannotBeABaseURL=!0,j(u.path,""),l=Ae)}break;case he:if(!n||n.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==o){u.scheme=n.scheme,u.path=g(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Re;break}l="file"==n.scheme?Se:ve;continue;case me:if("/"!=o||"/"!=i[d+1]){l=ve;continue}l=_e,d++;break;case ge:if("/"==o){l=Ce;break}l=xe;continue;case ve:if(u.scheme=n.scheme,o==r)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query=n.query;else if("/"==o||"\\"==o&&u.isSpecial())l=ye;else if("?"==o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query="",l=Ne;else{if("#"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.path.length--,l=xe;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=g(n.path),u.query=n.query,u.fragment="",l=Re}break;case ye:if(!u.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=xe;continue}l=Ce}else l=_e;break;case be:if(l=_e,"/"!=o||"/"!=D(p,d+1))continue;d++;break;case _e:if("/"!=o&&"\\"!=o){l=Ce;continue}break;case Ce:if("@"==o){h&&(p="%40"+p),h=!0,a=m(p);for(var _=0;_<a.length;_++){var C=a[_];if(":"!=C||y){var I=se(C,ae);y?u.password+=I:u.username+=I}else y=!0}p=""}else if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(h&&""==p)return"Invalid authority";d-=m(p).length+1,p="",l=Ie}else p+=o;break;case Ie:case we:if(t&&"file"==u.scheme){l=Oe;continue}if(":"!=o||v){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(u.isSpecial()&&""==p)return"Invalid host";if(t&&""==p&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(p))return s;if(p="",l=Pe,t)return;continue}"["==o?v=!0:"]"==o&&(v=!1),p+=o}else{if(""==p)return"Invalid host";if(s=u.parseHost(p))return s;if(p="",l=Ee,t==we)return}break;case Ee:if(!k(K,o)){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()||t){if(""!=p){var w=A(p,10);if(w>65535)return"Invalid port";u.port=u.isSpecial()&&w===ce[u.scheme]?null:w,p=""}if(t)return;l=Pe;continue}return"Invalid port"}p+=o;break;case Se:if(u.scheme="file","/"==o||"\\"==o)l=Te;else{if(!n||"file"!=n.scheme){l=xe;continue}if(o==r)u.host=n.host,u.path=g(n.path),u.query=n.query;else if("?"==o)u.host=n.host,u.path=g(n.path),u.query="",l=Ne;else{if("#"!=o){le(U(g(i,d),""))||(u.host=n.host,u.path=g(n.path),u.shortenPath()),l=xe;continue}u.host=n.host,u.path=g(n.path),u.query=n.query,u.fragment="",l=Re}}break;case Te:if("/"==o||"\\"==o){l=Oe;break}n&&"file"==n.scheme&&!le(U(g(i,d),""))&&(ue(n.path[0],!0)?j(u.path,n.path[0]):u.host=n.host),l=xe;continue;case Oe:if(o==r||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&ue(p))l=xe;else if(""==p){if(u.host="",t)return;l=Pe}else{if(s=u.parseHost(p))return s;if("localhost"==u.host&&(u.host=""),t)return;p="",l=Pe}continue}p+=o;break;case Pe:if(u.isSpecial()){if(l=xe,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=r&&(l=xe,"/"!=o))continue}else u.fragment="",l=Re;else u.query="",l=Ne;break;case xe:if(o==r||"/"==o||"\\"==o&&u.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(c=W(c=p))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"==o||"\\"==o&&u.isSpecial()||j(u.path,"")):de(p)?"/"==o||"\\"==o&&u.isSpecial()||j(u.path,""):("file"==u.scheme&&!u.path.length&&ue(p)&&(u.host&&(u.host=""),p=D(p,0)+":"),j(u.path,p)),p="","file"==u.scheme&&(o==r||"?"==o||"#"==o))for(;u.path.length>1&&""===u.path[0];)B(u.path);"?"==o?(u.query="",l=Ne):"#"==o&&(u.fragment="",l=Re)}else p+=se(o,oe);break;case Ae:"?"==o?(u.query="",l=Ne):"#"==o?(u.fragment="",l=Re):o!=r&&(u.path[0]+=se(o,re));break;case Ne:t||"#"!=o?o!=r&&("'"==o&&u.isSpecial()?u.query+="%27":u.query+="#"==o?"%23":se(o,re)):(u.fragment="",l=Re);break;case Re:o!=r&&(u.fragment+=se(o,ie))}d++}},parseHost:function(e){var t,n,r;if("["==D(e,0)){if("]"!=D(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,n,r,i,o,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,d=0,p=function(){return D(e,d)};if(":"==p()){if(":"!=D(e,1))return;d+=2,l=++u}for(;p();){if(8==u)return;if(":"!=p()){for(t=n=0;n<4&&k(X,p());)t=16*t+A(p(),16),d++,n++;if("."==p()){if(0==n)return;if(d-=n,u>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;d++}if(!k(K,p()))return;for(;k(K,p());){if(o=A(p(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}c[u]=256*c[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==p()){if(d++,!p())return}else if(p())return;c[u++]=t}else{if(null!==l)return;d++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!=u)return;return c}(H(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=y(e),k(J,e))return"Invalid host";if(null===(t=function(e){var t,n,r,i,o,a,s,c=z(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(o=10,i.length>1&&"0"==D(i,0)&&(o=k(G,i)?16:8,i=H(i,8==o?1:2)),""===i)a=0;else{if(!k(10==o?Q:8==o?Y:X,i))return e;a=A(i,o)}j(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=R(256,5-t))return null}else if(a>255)return null;for(s=M(n),r=0;r<n.length;r++)s+=n[r]*R(256,3-r);return s}(e)))return"Invalid host";this.host=t}else{if(k($,e))return"Invalid host";for(t="",n=m(e),r=0;r<n.length;r++)t+=se(n[r],re);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return f(ce,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ue(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=ne(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+U(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw x(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new ke(e.path[0]).origin}catch(n){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ne(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(b(e)+":",pe)},getUsername:function(){return this.username},setUsername:function(e){var t=m(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=se(t[n],ae)}},getPassword:function(){return this.password},setPassword:function(e){var t=m(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=se(t[n],ae)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ne(e):ne(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ie)},getHostname:function(){var e=this.host;return null===e?"":ne(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,we)},getPort:function(){var e=this.port;return null===e?"":b(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=b(e))?this.port=null:this.parse(e,Ee))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+U(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Pe))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=b(e))?this.query=null:("?"==D(e,0)&&(e=H(e,1)),this.query="",this.parse(e,Ne)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=b(e))?("#"==D(e,0)&&(e=H(e,1)),this.fragment="",this.parse(e,Re)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var ke=function(e){var t=p(this,Ue),n=C(arguments.length,1)>1?arguments[1]:void 0,r=E(t,new De(e,!1,n));o||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Ue=ke.prototype,Le=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(o&&l(Ue,{href:Le("serialize","setHref"),origin:Le("getOrigin"),protocol:Le("getProtocol","setProtocol"),username:Le("getUsername","setUsername"),password:Le("getPassword","setPassword"),host:Le("getHost","setHost"),hostname:Le("getHostname","setHostname"),port:Le("getPort","setPort"),pathname:Le("getPathname","setPathname"),search:Le("getSearch","setSearch"),searchParams:Le("getSearchParams"),hash:Le("getHash","setHash")}),d(Ue,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),d(Ue,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),P){var Me=P.createObjectURL,je=P.revokeObjectURL;Me&&d(ke,"createObjectURL",c(Me,P)),je&&d(ke,"revokeObjectURL",c(je,P))}_(ke,"URL"),i({global:!0,forced:!a,sham:!o},{URL:ke})},function(e,t,n){var r=n(139),i=n(164),o=n(166),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("http://a#\u0431").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(e,t,n){"use strict";var r=n(135),i=n(146),o=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=r.RangeError,u=i(a.exec),l=Math.floor,d=String.fromCharCode,p=i("".charCodeAt),f=i([].join),h=i([].push),m=i("".replace),g=i("".split),v=i("".toLowerCase),y=function(e){return e+22+75*(e<26)},b=function(e,t,n){var r=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),r+=36;return l(r+36*e/(e+38))},_=function(e){var t,n,r=[],i=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=p(e,n++);if(i>=55296&&i<=56319&&n<r){var o=p(e,n++);56320==(64512&o)?h(t,((1023&i)<<10)+(1023&o)+65536):(h(t,i),n--)}else h(t,i)}return t}(e)).length,o=128,a=0,u=72;for(t=0;t<e.length;t++)(n=e[t])<128&&h(r,d(n));var m=r.length,g=m;for(m&&h(r,"-");g<i;){var v=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=o&&n<v&&(v=n);var _=g+1;if(v-o>l((2147483647-a)/_))throw c(s);for(a+=(v-o)*_,o=v,t=0;t<e.length;t++){if((n=e[t])<o&&++a>2147483647)throw c(s);if(n==o){for(var C=a,I=36;;){var w=I<=u?1:I>=u+26?26:I-u;if(C<w)break;var E=C-w,S=36-w;h(r,d(y(w+E%S))),C=l(E/S),I+=36}h(r,d(y(C))),u=b(a,_,g==m),a=0,g++}}a++,o++}return f(r,"")};e.exports=function(e){var t,n,r=[],i=g(m(v(e),a,"."),".");for(t=0;t<i.length;t++)n=i[t],h(r,u(o,n)?"xn--"+_(n):n);return f(r,".")}},function(e,t,n){"use strict";n(255);var r=n(134),i=n(135),o=n(154),a=n(140),s=n(146),c=n(515),u=n(178),l=n(282),d=n(213),p=n(257),f=n(180),h=n(283),m=n(152),g=n(169),v=n(215),y=n(200),b=n(177),_=n(151),C=n(199),I=n(202),w=n(143),E=n(251),S=n(252),T=n(379),O=n(164),P=n(270),x=O("iterator"),A=f.set,N=f.getterFor("URLSearchParams"),R=f.getterFor("URLSearchParamsIterator"),D=o("fetch"),k=o("Request"),U=o("Headers"),L=k&&k.prototype,M=U&&U.prototype,j=i.RegExp,F=i.TypeError,B=i.decodeURIComponent,z=i.encodeURIComponent,H=s("".charAt),W=s([].join),V=s([].push),Z=s("".replace),q=s([].shift),K=s([].splice),G=s("".split),Y=s("".slice),Q=/\+/g,X=Array(4),J=function(e){return X[e-1]||(X[e-1]=j("((?:%[\\da-f]{2}){"+e+"})","gi"))},$=function(e){try{return B(e)}catch(t){return e}},ee=function(e){var t=Z(e,Q," "),n=4;try{return B(t)}catch(r){for(;n;)t=Z(t,J(n--),$);return t}},te=/[!'()~]|%20/g,ne={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},re=function(e){return ne[e]},ie=function(e){return Z(z(e),te,re)},oe=p((function(e,t){A(this,{type:"URLSearchParamsIterator",iterator:E(N(e).entries),kind:t})}),"Iterator",(function(){var e=R(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),ae=function(e){this.entries=[],this.url=null,void 0!==e&&(_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===H(e,0)?Y(e,1):e:C(e)))};ae.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,s,c,u=S(e);if(u)for(n=(t=E(e,u)).next;!(r=a(n,t)).done;){if(o=(i=E(b(r.value))).next,(s=a(o,i)).done||(c=a(o,i)).done||!a(o,i).done)throw F("Expected sequence with length 2");V(this.entries,{key:C(s.value),value:C(c.value)})}else for(var l in e)g(e,l)&&V(this.entries,{key:l,value:C(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=G(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=G(t,"="),V(this.entries,{key:ee(q(n)),value:ee(W(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],V(n,ie(e.key)+"="+ie(e.value));return W(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var se=function(){h(this,ce);var e=arguments.length>0?arguments[0]:void 0;A(this,new ae(e))},ce=se.prototype;if(l(ce,{append:function(e,t){T(arguments.length,2);var n=N(this);V(n.entries,{key:C(e),value:C(t)}),n.updateURL()},delete:function(e){T(arguments.length,1);for(var t=N(this),n=t.entries,r=C(e),i=0;i<n.length;)n[i].key===r?K(n,i,1):i++;t.updateURL()},get:function(e){T(arguments.length,1);for(var t=N(this).entries,n=C(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){T(arguments.length,1);for(var t=N(this).entries,n=C(e),r=[],i=0;i<t.length;i++)t[i].key===n&&V(r,t[i].value);return r},has:function(e){T(arguments.length,1);for(var t=N(this).entries,n=C(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){T(arguments.length,1);for(var n,r=N(this),i=r.entries,o=!1,a=C(e),s=C(t),c=0;c<i.length;c++)(n=i[c]).key===a&&(o?K(i,c--,1):(o=!0,n.value=s));o||V(i,{key:a,value:s}),r.updateURL()},sort:function(){var e=N(this);P(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=N(this).entries,r=v(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new oe(this,"keys")},values:function(){return new oe(this,"values")},entries:function(){return new oe(this,"entries")}},{enumerable:!0}),u(ce,x,ce.entries,{name:"entries"}),u(ce,"toString",(function(){return N(this).serialize()}),{enumerable:!0}),d(se,"URLSearchParams"),r({global:!0,forced:!c},{URLSearchParams:se}),!c&&m(U)){var ue=s(M.has),le=s(M.set),de=function(e){if(_(e)){var t,n=e.body;if("URLSearchParams"===y(n))return t=e.headers?new U(e.headers):new U,ue(t,"content-type")||le(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),I(e,{body:w(0,C(n)),headers:w(0,t)})}return e};if(m(D)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return D(e,arguments.length>1?de(arguments[1]):{})}}),m(k)){var pe=function(e){return h(this,L),new k(e,arguments.length>1?de(arguments[1]):{})};L.constructor=pe,pe.prototype=L,r({global:!0,forced:!0},{Request:pe})}}e.exports={URLSearchParams:se,getState:N}},function(e,t,n){"use strict";var r=n(134),i=n(140);r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},function(e,t,n){n(520)},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(155),a=n(259),s=n(261),c=n(185),u=n(202),l=n(174),d=n(143),p=n(521),f=n(522),h=n(302),m=n(523),g=n(164),v=n(524),y=g("toStringTag"),b=i.Error,_=[].push,C=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=o(I,this);s?n=s(new b,i?a(this):I):(n=i?this:u(I),l(n,y,"Error")),void 0!==t&&l(n,"message",m(t)),v&&l(n,"stack",p(n.stack,1)),f(n,r);var c=[];return h(e,_,{that:c}),l(n,"errors",c),n};s?s(C,b):c(C,b,{name:!0});var I=C.prototype=u(b.prototype,{constructor:d(1,C),message:d(1,""),name:d(1,"AggregateError")});r({global:!0},{AggregateError:C})},function(e,t,n){var r=n(146)("".replace),i=String(Error("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,a=o.test(i);e.exports=function(e,t){if(a&&"string"==typeof e)for(;t--;)e=r(e,o,"");return e}},function(e,t,n){var r=n(151),i=n(174);e.exports=function(e,t){r(t)&&"cause"in t&&i(e,"cause",t.cause)}},function(e,t,n){var r=n(199);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},function(e,t,n){var r=n(139),i=n(143);e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},function(e,t,n){n(526)},function(e,t,n){n(134)({global:!0},{globalThis:n(135)})},function(e,t,n){n(528)},function(e,t,n){"use strict";var r=n(134),i=n(140),o=n(161),a=n(386),s=n(388),c=n(302);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=a.f(t),r=n.resolve,u=n.reject,l=s((function(){var n=o(t.resolve),a=[],s=0,u=1;c(e,(function(e){var o=s++,c=!1;u++,i(n,t,e).then((function(e){c||(c=!0,a[o]={status:"fulfilled",value:e},--u||r(a))}),(function(e){c||(c=!0,a[o]={status:"rejected",reason:e},--u||r(a))}))})),--u||r(a)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){n(530)},function(e,t,n){"use strict";var r=n(134),i=n(161),o=n(154),a=n(140),s=n(386),c=n(388),u=n(302);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=o("AggregateError"),r=s.f(t),l=r.resolve,d=r.reject,p=c((function(){var r=i(t.resolve),o=[],s=0,c=1,p=!1;u(e,(function(e){var i=s++,u=!1;c++,a(r,t,e).then((function(e){u||p||(p=!0,l(e))}),(function(e){u||p||(u=!0,o[i]=e,--c||d(new n(o,"No one promise resolved")))}))})),--c||d(new n(o,"No one promise resolved"))}));return p.error&&d(p.value),r.promise}})},function(e,t,n){n(532)},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(140),a=n(146),s=n(257),c=n(148),u=n(193),l=n(199),d=n(177),p=n(147),f=n(155),h=n(408),m=n(409),g=n(160),v=n(178),y=n(139),b=n(164),_=n(289),C=n(428),I=n(429),w=n(180),E=n(166),S=b("matchAll"),T=w.set,O=w.getterFor("RegExp String Iterator"),P=RegExp.prototype,x=i.TypeError,A=a(m),N=a("".indexOf),R=a("".matchAll),D=!!R&&!y((function(){R("a",/./)})),k=s((function(e,t,n,r){T(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=O(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=I(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""===l(r[0])&&(t.lastIndex=C(n,u(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),U=function(e){var t,n,r,i,o,a,s=d(this),c=l(e);return t=_(s,RegExp),void 0===(n=s.flags)&&f(P,s)&&!("flags"in P)&&(n=A(s)),r=void 0===n?"":l(n),i=new t(t===RegExp?s.source:s,r),o=!!~N(r,"g"),a=!!~N(r,"u"),i.lastIndex=u(s.lastIndex),new k(i,c,o,a)};r({target:"String",proto:!0,forced:D},{matchAll:function(e){var t,n,r,i,a=c(this);if(null!=e){if(h(e)&&(t=l(c("flags"in P?e.flags:A(e))),!~N(t,"g")))throw x("`.matchAll` does not allow non-global regexes");if(D)return R(a,e);if(void 0===(r=g(e,S))&&E&&"RegExp"==p(e)&&(r=U),r)return o(r,e,a)}else if(D)return R(a,e);return n=l(a),i=new RegExp(e,"g"),E?o(U,i,n):i[S](n)}}),E||S in P||v(P,S,U)},function(e,t,n){n(534)},function(e,t,n){"use strict";var r=n(134),i=n(135),o=n(140),a=n(146),s=n(148),c=n(152),u=n(408),l=n(199),d=n(160),p=n(409),f=n(437),h=n(164),m=n(166),g=h("replace"),v=RegExp.prototype,y=i.TypeError,b=a(p),_=a("".indexOf),C=a("".replace),I=a("".slice),w=Math.max,E=function(e,t,n){return n>e.length?-1:""===t?n:_(e,t,n)};r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,i,a,p,h,S,T,O,P=s(this),x=0,A=0,N="";if(null!=e){if((n=u(e))&&(r=l(s("flags"in v?e.flags:b(e))),!~_(r,"g")))throw y("`.replaceAll` does not allow non-global regexes");if(i=d(e,g))return o(i,e,P,t);if(m&&n)return C(l(P),e,t)}for(a=l(P),p=l(e),(h=c(t))||(t=l(t)),S=p.length,T=w(1,S),x=E(a,p,0);-1!==x;)O=h?l(t(p,x,a)):f(p,a,x,[],void 0,t),N+=I(a,A,x)+O,A=x+S,x=E(a,p,x+T);return A<a.length&&(N+=I(a,A)),N}})},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(T){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,o=Object.create(i.prototype),a=new w(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var l={};function d(){}function p(){}function f(){}var h={};s(h,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==t&&n.call(g,i)&&(h=g);var v=f.prototype=d.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var c=u(e[i],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"===typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=f,s(v,"constructor",f),s(f,"constructor",p),p.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";if(globalThis.performance||(globalThis.performance={}),!globalThis.performance.now){var r,i=globalThis.performance.timing;r=i&&i.navigationStart?i.navigationStart:Date.now(),globalThis.performance.now=function(){return Date.now()-r}}},function(e,t,n){var r=globalThis.MediaQueryList?MediaQueryList.prototype:Object.getPrototypeOf(matchMedia(""));r.addEventListener||(r.addEventListener=function(e,t,n){"change"===e&&this.addListener(t)}),r.removeEventListener||(r.removeEventListener=function(e,t,n){"change"===e&&this.removeListener(t)})},function(e,t){var n=globalThis.crypto;!n.subtle&&n.webkitSubtle&&(n.subtle=n.webkitSubtle),n.randomUUID||(n.randomUUID=function(){var e=crypto.getRandomValues(new Uint8Array(16));e[6]=15&e[6]|64,e[8]=63&e[8]|128;for(var t="",n=0;n<16;++n)t+=e[n].toString(16).padStart(2,"0"),3!==n&&5!==n&&7!==n&&9!==n||(t+="-");return t})},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){},function(e,t,n){"use strict";e.exports=n(573)},function(e,t,n){"use strict";var r=n(574),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,c=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function C(){}function I(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=_.prototype;var w=I.prototype=new C;w.constructor=I,r(w,_.prototype),w.isPureReactComponent=!0;var E={current:null},S=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,r)&&!T.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===i[r]&&(i[r]=c[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:E.current}}function P(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var x=/\/+/g,A=[];function N(e,t,n,r){if(A.length){var i=A.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case a:c=!0}}if(c)return r(i,t,""===n?"."+k(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u<t.length;u++){var l=n+k(s=t[u],u);c+=e(s,l,r,i)}else if("function"===typeof(l=null===t||"object"!==typeof t?null:"function"===typeof(l=g&&t[g]||t["@@iterator"])?l:null))for(t=l.call(t),u=0;!(s=t.next()).done;)c+=e(s=s.value,l=n+k(s,u++),r,i);else if("object"===s)throw r=""+t,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return c}(e,"",t,n)}function k(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function U(e,t){e.func.call(e.context,t,e.count++)}function L(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?M(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(x,"$&/")+"/")+n)),r.push(e))}function M(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(x,"$&/")+"/"),D(e,L,t=N(t,o,r,i)),R(t)}var j={current:null};function F(){var e=j.current;if(null===e)throw Error(v(321));return e}var B={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return M(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;D(e,U,t=N(null,null,t,n)),R(t)},count:function(e){return D(e,(function(){return null}),null)},toArray:function(e){var t=[];return M(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(v(143));return e}},t.Component=_,t.Fragment=s,t.Profiler=u,t.PureComponent=I,t.StrictMode=c,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(v(267,e));var i=r({},e.props),a=e.key,s=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,c=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)S.call(t,l)&&!T.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==u?u[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){u=Array(l);for(var d=0;d<l;d++)u[d]=arguments[d+2];i.children=u}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:c}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),u=1;u<arguments.length;u++){for(var l in n=Object(arguments[u]))i.call(n,l)&&(c[l]=n[l]);if(r){s=r(n);for(var d=0;d<s.length;d++)o.call(n,s[d])&&(c[s[d]]=n[s[d]])}}return c}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(576)},function(e,t,n){"use strict";var r=n(572),i=n(574),o=n(577);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}if(!r)throw Error(a(227));function s(e,t,n,r,i,o,a,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(l){this.onError(l)}}var c=!1,u=null,l=!1,d=null,p={onError:function(e){c=!0,u=e}};function f(e,t,n,r,i,o,a,l,d){c=!1,u=null,s.apply(p,arguments)}var h=null,m=null,g=null;function v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,i,o,s,p,h){if(f.apply(this,arguments),c){if(!c)throw Error(a(198));var m=u;c=!1,u=null,l||(l=!0,d=m)}}(r,t,void 0,e),e.currentTarget=null}var y=null,b={};function _(){if(y)for(var e in b){var t=b[e],n=y.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!I[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in I[n]=t,n=t.eventTypes){var i=void 0,o=n[r],s=t,c=r;if(w.hasOwnProperty(c))throw Error(a(99,c));w[c]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&C(u[i],s,c);i=!0}else o.registrationName?(C(o.registrationName,s,c),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function C(e,t,n){if(E[e])throw Error(a(100,e));E[e]=t,S[e]=t.eventTypes[n].dependencies}var I=[],w={},E={},S={};function T(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&_()}var O=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),P=null,x=null,A=null;function N(e){if(e=m(e)){if("function"!==typeof P)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),P(e.stateNode,e.type,t))}}function R(e){x?A?A.push(e):A=[e]:x=e}function D(){if(x){var e=x,t=A;if(A=x=null,N(e),t)for(e=0;e<t.length;e++)N(t[e])}}function k(e,t){return e(t)}function U(e,t,n,r,i){return e(t,n,r,i)}function L(){}var M=k,j=!1,F=!1;function B(){null===x&&null===A||(L(),D())}function z(e,t,n){if(F)return e(t,n);F=!0;try{return M(e,t,n)}finally{F=!1,B()}}var H=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,W=Object.prototype.hasOwnProperty,V={},Z={};function q(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){K[e]=new q(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];K[t]=new q(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){K[e]=new q(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){K[e]=new q(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){K[e]=new q(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){K[e]=new q(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){K[e]=new q(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){K[e]=new q(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){K[e]=new q(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function Y(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,Y);K[t]=new q(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,Y);K[t]=new q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,Y);K[t]=new q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){K[e]=new q(e,1,!1,e.toLowerCase(),null,!1)})),K.xlinkHref=new q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){K[e]=new q(e,1,!1,e.toLowerCase(),null,!0)}));var Q=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t,n,r){var i=K.hasOwnProperty(t)?K[t]:null;(null!==i?0===i.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!W.call(Z,e)||!W.call(V,e)&&(H.test(e)?Z[e]=!0:(V[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Q.hasOwnProperty("ReactCurrentDispatcher")||(Q.ReactCurrentDispatcher={current:null}),Q.hasOwnProperty("ReactCurrentBatchConfig")||(Q.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,$="function"===typeof Symbol&&Symbol.for,ee=$?Symbol.for("react.element"):60103,te=$?Symbol.for("react.portal"):60106,ne=$?Symbol.for("react.fragment"):60107,re=$?Symbol.for("react.strict_mode"):60108,ie=$?Symbol.for("react.profiler"):60114,oe=$?Symbol.for("react.provider"):60109,ae=$?Symbol.for("react.context"):60110,se=$?Symbol.for("react.concurrent_mode"):60111,ce=$?Symbol.for("react.forward_ref"):60112,ue=$?Symbol.for("react.suspense"):60113,le=$?Symbol.for("react.suspense_list"):60120,de=$?Symbol.for("react.memo"):60115,pe=$?Symbol.for("react.lazy"):60116,fe=$?Symbol.for("react.block"):60121,he="function"===typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ie:return"Profiler";case re:return"StrictMode";case ue:return"Suspense";case le:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case oe:return"Context.Provider";case ce:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case de:return ge(e.type);case fe:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ve(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=ge(e.type);n=null,r&&(n=ge(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(J,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function _e(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ce(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ie(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function we(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ee(e,t){null!=(t=t.checked)&&X(e,"checked",t,!1)}function Se(e,t){Ee(e,t);var n=ye(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oe(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Te(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Oe(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Pe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function xe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ye(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Ae(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ne(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function Re(e,t){var n=ye(t.value),r=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function De(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ke(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ke(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Le,Me=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Le=Le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function je(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Fe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Fe("Animation","AnimationEnd"),animationiteration:Fe("Animation","AnimationIteration"),animationstart:Fe("Animation","AnimationStart"),transitionend:Fe("Transition","TransitionEnd")},ze={},He={};function We(e){if(ze[e])return ze[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in He)return ze[e]=n[t];return e}O&&(He=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var Ve=We("animationend"),Ze=We("animationiteration"),qe=We("animationstart"),Ke=We("transitionend"),Ge="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new("function"===typeof WeakMap?WeakMap:Map);function Qe(e){var t=Ye.get(e);return void 0===t&&(t=new Map,Ye.set(e,t)),t}function Xe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Je(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function $e(e){if(Xe(e)!==e)throw Error(a(188))}function et(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Xe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return $e(i),e;if(o===r)return $e(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function tt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function nt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var rt=null;function it(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)v(e,t[r],n[r]);else t&&v(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function ot(e){if(null!==e&&(rt=tt(rt,e)),e=rt,rt=null,e){if(nt(e,it),rt)throw Error(a(95));if(l)throw e=d,l=!1,d=null,e}}function at(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function st(e){if(!O)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"===typeof t[e]),t}var ct=[];function ut(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function lt(e,t,n,r){if(ct.length){var i=ct.pop();return i.topLevelType=e,i.eventSystemFlags=r,i.nativeEvent=t,i.targetInst=n,i}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function dt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Sn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=at(e.nativeEvent);r=e.topLevelType;var o=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,c=0;c<I.length;c++){var u=I[c];u&&(u=u.extractEvents(r,t,o,i,a))&&(s=tt(s,u))}ot(s)}}function pt(e,t,n){if(!n.has(e)){switch(e){case"scroll":qt(t,"scroll",!0);break;case"focus":case"blur":qt(t,"focus",!0),qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":st(e)&&qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ge.indexOf(e)&&Zt(e,t)}n.set(e,null)}}var ft,ht,mt,gt=!1,vt=[],yt=null,bt=null,_t=null,Ct=new Map,It=new Map,wt=[],Et="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),St="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Tt(e,t,n,r,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Ot(e,t){switch(e){case"focus":case"blur":yt=null;break;case"dragenter":case"dragleave":bt=null;break;case"mouseover":case"mouseout":_t=null;break;case"pointerover":case"pointerout":Ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":It.delete(t.pointerId)}}function Pt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=Tt(t,n,r,i,o),null!==t&&null!==(t=Tn(t))&&ht(t),e):(e.eventSystemFlags|=r,e)}function xt(e){var t=Sn(e.target);if(null!==t){var n=Xe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Je(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){mt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function At(e){if(null!==e.blockedOn)return!1;var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Tn(t);return null!==n&&ht(n),e.blockedOn=t,!1}return!0}function Nt(e,t,n){At(e)&&n.delete(t)}function Rt(){for(gt=!1;0<vt.length;){var e=vt[0];if(null!==e.blockedOn){null!==(e=Tn(e.blockedOn))&&ft(e);break}var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:vt.shift()}null!==yt&&At(yt)&&(yt=null),null!==bt&&At(bt)&&(bt=null),null!==_t&&At(_t)&&(_t=null),Ct.forEach(Nt),It.forEach(Nt)}function Dt(e,t){e.blockedOn===t&&(e.blockedOn=null,gt||(gt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Rt)))}function kt(e){function t(t){return Dt(t,e)}if(0<vt.length){Dt(vt[0],e);for(var n=1;n<vt.length;n++){var r=vt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==yt&&Dt(yt,e),null!==bt&&Dt(bt,e),null!==_t&&Dt(_t,e),Ct.forEach(t),It.forEach(t),n=0;n<wt.length;n++)(r=wt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<wt.length&&null===(n=wt[0]).blockedOn;)xt(n),null===n.blockedOn&&wt.shift()}var Ut={},Lt=new Map,Mt=new Map,jt=["abort","abort",Ve,"animationEnd",Ze,"animationIteration",qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ke,"transitionEnd","waiting","waiting"];function Ft(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:t},Mt.set(r,t),Lt.set(r,o),Ut[i]=o}}Ft("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ft("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ft(jt,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),zt=0;zt<Bt.length;zt++)Mt.set(Bt[zt],0);var Ht=o.unstable_UserBlockingPriority,Wt=o.unstable_runWithPriority,Vt=!0;function Zt(e,t){qt(t,e,!1)}function qt(e,t,n){var r=Mt.get(t);switch(void 0===r?2:r){case 0:r=Kt.bind(null,t,1,e);break;case 1:r=Gt.bind(null,t,1,e);break;default:r=Yt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Kt(e,t,n,r){j||L();var i=Yt,o=j;j=!0;try{U(i,e,t,n,r)}finally{(j=o)||B()}}function Gt(e,t,n,r){Wt(Ht,Yt.bind(null,e,t,n,r))}function Yt(e,t,n,r){if(Vt)if(0<vt.length&&-1<Et.indexOf(e))e=Tt(null,e,t,n,r),vt.push(e);else{var i=Qt(e,t,n,r);if(null===i)Ot(e,r);else if(-1<Et.indexOf(e))e=Tt(i,e,t,n,r),vt.push(e);else if(!function(e,t,n,r,i){switch(t){case"focus":return yt=Pt(yt,e,t,n,r,i),!0;case"dragenter":return bt=Pt(bt,e,t,n,r,i),!0;case"mouseover":return _t=Pt(_t,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ct.set(o,Pt(Ct.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,It.set(o,Pt(It.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r)){Ot(e,r),e=lt(e,r,null,t);try{z(dt,e)}finally{ut(e)}}}}function Qt(e,t,n,r){if(null!==(n=Sn(n=at(r)))){var i=Xe(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=Je(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}e=lt(e,r,n,t);try{z(dt,e)}finally{ut(e)}return null}var Xt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jt=["Webkit","ms","Moz","O"];function $t(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||Xt.hasOwnProperty(e)&&Xt[e]?(""+t).trim():t+"px"}function en(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=$t(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Xt).forEach((function(e){Jt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xt[t]=Xt[e]}))}));var tn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nn(e,t){if(t){if(tn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62,""))}}function rn(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var on="http://www.w3.org/1999/xhtml";function an(e,t){var n=Qe(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=S[t];for(var r=0;r<t.length;r++)pt(t[r],e,n)}function sn(){}function cn(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function un(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ln(e,t){var n,r=un(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=un(r)}}function dn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var fn=null,hn=null;function mn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function gn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var vn="function"===typeof setTimeout?setTimeout:void 0,yn="function"===typeof clearTimeout?clearTimeout:void 0;function bn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function _n(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Cn=Math.random().toString(36).slice(2),In="__reactInternalInstance$"+Cn,wn="__reactEventHandlers$"+Cn,En="__reactContainere$"+Cn;function Sn(e){var t=e[In];if(t)return t;for(var n=e.parentNode;n;){if(t=n[En]||n[In]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=_n(e);null!==e;){if(n=e[In])return n;e=_n(e)}return t}n=(e=n).parentNode}return null}function Tn(e){return!(e=e[In]||e[En])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function On(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Pn(e){return e[wn]||null}function xn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function An(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}function Nn(e,t,n){(t=An(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=tt(n._dispatchListeners,t),n._dispatchInstances=tt(n._dispatchInstances,e))}function Rn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=xn(t);for(t=n.length;0<t--;)Nn(n[t],"captured",e);for(t=0;t<n.length;t++)Nn(n[t],"bubbled",e)}}function Dn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=An(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=tt(n._dispatchListeners,t),n._dispatchInstances=tt(n._dispatchInstances,e))}function kn(e){e&&e.dispatchConfig.registrationName&&Dn(e._targetInst,null,e)}function Un(e){nt(e,Rn)}var Ln=null,Mn=null,jn=null;function Fn(){if(jn)return jn;var e,t,n=Mn,r=n.length,i="value"in Ln?Ln.value:Ln.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return jn=i.slice(e,1<t?1-t:void 0)}function Bn(){return!0}function zn(){return!1}function Hn(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Bn:zn,this.isPropagationStopped=zn,this}function Wn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Vn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Zn(e){e.eventPool=[],e.getPooled=Wn,e.release=Vn}i(Hn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Bn)},persist:function(){this.isPersistent=Bn},isPersistent:zn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=zn,this._dispatchInstances=this._dispatchListeners=null}}),Hn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Hn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Zn(n),n},Zn(Hn);var qn=Hn.extend({data:null}),Kn=Hn.extend({data:null}),Gn=[9,13,27,32],Yn=O&&"CompositionEvent"in window,Qn=null;O&&"documentMode"in document&&(Qn=document.documentMode);var Xn=O&&"TextEvent"in window&&!Qn,Jn=O&&(!Yn||Qn&&8<Qn&&11>=Qn),$n=String.fromCharCode(32),er={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},tr=!1;function nr(e,t){switch(e){case"keyup":return-1!==Gn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function rr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var ir=!1,or={eventTypes:er,extractEvents:function(e,t,n,r){var i;if(Yn)e:{switch(e){case"compositionstart":var o=er.compositionStart;break e;case"compositionend":o=er.compositionEnd;break e;case"compositionupdate":o=er.compositionUpdate;break e}o=void 0}else ir?nr(e,n)&&(o=er.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=er.compositionStart);return o?(Jn&&"ko"!==n.locale&&(ir||o!==er.compositionStart?o===er.compositionEnd&&ir&&(i=Fn()):(Mn="value"in(Ln=r)?Ln.value:Ln.textContent,ir=!0)),o=qn.getPooled(o,t,n,r),(i||null!==(i=rr(n)))&&(o.data=i),Un(o),i=o):i=null,(e=Xn?function(e,t){switch(e){case"compositionend":return rr(t);case"keypress":return 32!==t.which?null:(tr=!0,$n);case"textInput":return(e=t.data)===$n&&tr?null:e;default:return null}}(e,n):function(e,t){if(ir)return"compositionend"===e||!Yn&&nr(e,t)?(e=Fn(),jn=Mn=Ln=null,ir=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Jn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Kn.getPooled(er.beforeInput,t,n,r)).data=e,Un(t)):t=null,null===i?t:null===t?i:[i,t]}},ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ar[e.type]:"textarea"===t}var cr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function ur(e,t,n){return(e=Hn.getPooled(cr.change,e,t,n)).type="change",R(n),Un(e),e}var lr=null,dr=null;function pr(e){ot(e)}function fr(e){if(Ce(On(e)))return e}function hr(e,t){if("change"===e)return t}var mr=!1;function gr(){lr&&(lr.detachEvent("onpropertychange",vr),dr=lr=null)}function vr(e){if("value"===e.propertyName&&fr(dr))if(e=ur(dr,e,at(e)),j)ot(e);else{j=!0;try{k(pr,e)}finally{j=!1,B()}}}function yr(e,t,n){"focus"===e?(gr(),dr=n,(lr=t).attachEvent("onpropertychange",vr)):"blur"===e&&gr()}function br(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return fr(dr)}function _r(e,t){if("click"===e)return fr(t)}function Cr(e,t){if("input"===e||"change"===e)return fr(t)}O&&(mr=st("input")&&(!document.documentMode||9<document.documentMode));var Ir={eventTypes:cr,_isInputEventSupported:mr,extractEvents:function(e,t,n,r){var i=t?On(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=hr;else if(sr(i))if(mr)a=Cr;else{a=br;var s=yr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=_r);if(a&&(a=a(e,t)))return ur(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Oe(i,"number",i.value)}},wr=Hn.extend({view:null,detail:null}),Er={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Er[e])&&!!t[e]}function Tr(){return Sr}var Or=0,Pr=0,xr=!1,Ar=!1,Nr=wr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Tr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Or;return Or=e.screenX,xr?"mousemove"===e.type?e.screenX-t:0:(xr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Pr;return Pr=e.screenY,Ar?"mousemove"===e.type?e.screenY-t:0:(Ar=!0,0)}}),Rr=Nr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Dr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},kr={eventTypes:Dr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0===(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Sn(t):null)&&(t!==Xe(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Nr,c=Dr.mouseLeave,u=Dr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Rr,c=Dr.pointerLeave,u=Dr.pointerEnter,l="pointer");if(e=null==a?o:On(a),o=null==t?o:On(t),(c=s.getPooled(c,a,n,r)).type=l+"leave",c.target=e,c.relatedTarget=o,(n=s.getPooled(u,t,n,r)).type=l+"enter",n.target=o,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(u=l,a=0,e=s=r;e;e=xn(e))a++;for(e=0,t=u;t;t=xn(t))e++;for(;0<a-e;)s=xn(s),a--;for(;0<e-a;)u=xn(u),e--;for(;a--;){if(s===u||s===u.alternate)break e;s=xn(s),u=xn(u)}s=null}else s=null;for(u=s,s=[];r&&r!==u&&(null===(a=r.alternate)||a!==u);)s.push(r),r=xn(r);for(r=[];l&&l!==u&&(null===(a=l.alternate)||a!==u);)r.push(l),l=xn(l);for(l=0;l<s.length;l++)Dn(s[l],"bubbled",c);for(l=r.length;0<l--;)Dn(r[l],"captured",n);return 0===(64&i)?[c]:[c,n]}},Ur="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},Lr=Object.prototype.hasOwnProperty;function Mr(e,t){if(Ur(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Lr.call(t,n[r])||!Ur(e[n[r]],t[n[r]]))return!1;return!0}var jr=O&&"documentMode"in document&&11>=document.documentMode,Fr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Br=null,zr=null,Hr=null,Wr=!1;function Vr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Wr||null==Br||Br!==cn(n)?null:(n="selectionStart"in(n=Br)&&pn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hr&&Mr(Hr,n)?null:(Hr=n,(e=Hn.getPooled(Fr.select,zr,e,t)).type="select",e.target=Br,Un(e),e))}var Zr={eventTypes:Fr,extractEvents:function(e,t,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{i=Qe(i),o=S.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break e}i=!0}o=!i}if(o)return null;switch(i=t?On(t):window,e){case"focus":(sr(i)||"true"===i.contentEditable)&&(Br=i,zr=t,Hr=null);break;case"blur":Hr=zr=Br=null;break;case"mousedown":Wr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Wr=!1,Vr(n,r);case"selectionchange":if(jr)break;case"keydown":case"keyup":return Vr(n,r)}return null}},qr=Hn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Kr=Hn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gr=wr.extend({relatedTarget:null});function Yr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Qr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Jr=wr.extend({key:function(e){if(e.key){var t=Qr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Xr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Tr,charCode:function(e){return"keypress"===e.type?Yr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),$r=Nr.extend({dataTransfer:null}),ei=wr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Tr}),ti=Hn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ni=Nr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),ri={eventTypes:Ut,extractEvents:function(e,t,n,r){var i=Lt.get(e);if(!i)return null;switch(e){case"keypress":if(0===Yr(n))return null;case"keydown":case"keyup":e=Jr;break;case"blur":case"focus":e=Gr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Nr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=$r;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ei;break;case Ve:case Ze:case qe:e=qr;break;case Ke:e=ti;break;case"scroll":e=wr;break;case"wheel":e=ni;break;case"copy":case"cut":case"paste":e=Kr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Rr;break;default:e=Hn}return Un(t=e.getPooled(i,t,n,r)),t}};if(y)throw Error(a(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_(),h=Pn,m=Tn,g=On,T({SimpleEventPlugin:ri,EnterLeaveEventPlugin:kr,ChangeEventPlugin:Ir,SelectEventPlugin:Zr,BeforeInputEventPlugin:or});var ii=[],oi=-1;function ai(e){0>oi||(e.current=ii[oi],ii[oi]=null,oi--)}function si(e,t){oi++,ii[oi]=e.current,e.current=t}var ci={},ui={current:ci},li={current:!1},di=ci;function pi(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function hi(){ai(li),ai(ui)}function mi(e,t,n){if(ui.current!==ci)throw Error(a(168));si(ui,t),si(li,n)}function gi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,ge(t)||"Unknown",o));return i({},n,{},r)}function vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,di=ui.current,si(ui,e),si(li,li.current),!0}function yi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=gi(e,t,di),r.__reactInternalMemoizedMergedChildContext=e,ai(li),ai(ui),si(ui,e)):ai(li),si(li,n)}var bi=o.unstable_runWithPriority,_i=o.unstable_scheduleCallback,Ci=o.unstable_cancelCallback,Ii=o.unstable_requestPaint,wi=o.unstable_now,Ei=o.unstable_getCurrentPriorityLevel,Si=o.unstable_ImmediatePriority,Ti=o.unstable_UserBlockingPriority,Oi=o.unstable_NormalPriority,Pi=o.unstable_LowPriority,xi=o.unstable_IdlePriority,Ai={},Ni=o.unstable_shouldYield,Ri=void 0!==Ii?Ii:function(){},Di=null,ki=null,Ui=!1,Li=wi(),Mi=1e4>Li?wi:function(){return wi()-Li};function ji(){switch(Ei()){case Si:return 99;case Ti:return 98;case Oi:return 97;case Pi:return 96;case xi:return 95;default:throw Error(a(332))}}function Fi(e){switch(e){case 99:return Si;case 98:return Ti;case 97:return Oi;case 96:return Pi;case 95:return xi;default:throw Error(a(332))}}function Bi(e,t){return e=Fi(e),bi(e,t)}function zi(e,t,n){return e=Fi(e),_i(e,t,n)}function Hi(e){return null===Di?(Di=[e],ki=_i(Si,Vi)):Di.push(e),Ai}function Wi(){if(null!==ki){var e=ki;ki=null,Ci(e)}Vi()}function Vi(){if(!Ui&&null!==Di){Ui=!0;var e=0;try{var t=Di;Bi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Di=null}catch(n){throw null!==Di&&(Di=Di.slice(e+1)),_i(Si,Wi),n}finally{Ui=!1}}}function Zi(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function qi(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Ki={current:null},Gi=null,Yi=null,Qi=null;function Xi(){Qi=Yi=Gi=null}function Ji(e){var t=Ki.current;ai(Ki),e.type._context._currentValue=t}function $i(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function eo(e,t){Gi=e,Qi=Yi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Pa=!0),e.firstContext=null)}function to(e,t){if(Qi!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Qi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Yi){if(null===Gi)throw Error(a(308));Yi=t,Gi.dependencies={expirationTime:0,firstContext:t,responders:null}}else Yi=Yi.next=t;return e._currentValue}var no=!1;function ro(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function io(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function oo(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function ao(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function so(e,t){var n=e.alternate;null!==n&&io(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function co(e,t,n,r){var o=e.updateQueue;no=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var c=a.next;a.next=s.next,s.next=c}a=s,o.shared.pending=null,null!==(c=e.alternate)&&null!==(c=c.updateQueue)&&(c.baseQueue=s)}if(null!==a){c=a.next;var u=o.baseState,l=0,d=null,p=null,f=null;if(null!==c)for(var h=c;;){if((s=h.expirationTime)<r){var m={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===f?(p=f=m,d=u):f=f.next=m,s>l&&(l=s)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),rc(s,h.suspenseConfig);e:{var g=e,v=h;switch(s=t,m=n,v.tag){case 1:if("function"===typeof(g=v.payload)){u=g.call(m,u,s);break e}u=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null===(s="function"===typeof(g=v.payload)?g.call(m,u,s):g)||void 0===s)break e;u=i({},u,s);break e;case 2:no=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[h]:s.push(h))}if(null===(h=h.next)||h===c){if(null===(s=o.shared.pending))break;h=a.next=s.next,s.next=c,o.baseQueue=a=s,o.shared.pending=null}}null===f?d=u:f.next=p,o.baseState=d,o.baseQueue=f,ic(l),e.expirationTime=l,e.memoizedState=u}}function uo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!==typeof r)throw Error(a(191,r));r.call(i)}}}var lo=Q.ReactCurrentBatchConfig,po=(new r.Component).refs;function fo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var ho={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Xe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Vs(),i=lo.suspense;(i=oo(r=Zs(r,e,i),i)).payload=t,void 0!==n&&null!==n&&(i.callback=n),ao(e,i),qs(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Vs(),i=lo.suspense;(i=oo(r=Zs(r,e,i),i)).tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),ao(e,i),qs(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Vs(),r=lo.suspense;(r=oo(n=Zs(n,e,r),r)).tag=2,void 0!==t&&null!==t&&(r.callback=t),ao(e,r),qs(e,n)}};function mo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||!Mr(n,r)||!Mr(i,o)}function go(e,t,n){var r=!1,i=ci,o=t.contextType;return"object"===typeof o&&null!==o?o=to(o):(i=fi(t)?di:ui.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?pi(e,i):ci),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ho,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function vo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ho.enqueueReplaceState(t,t.state,null)}function yo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=po,ro(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=to(o):(o=fi(t)?di:ui.current,i.context=pi(e,o)),co(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(fo(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ho.enqueueReplaceState(i,i.state,null),co(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.effectTag|=4)}var bo=Array.isArray;function _o(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===po&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Co(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Io(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ec(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=Oc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=_o(e,t,n),r.return=e,r):((r=Sc(n.type,n.key,n.props,null,e.mode,r)).ref=_o(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Pc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Tc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function p(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Oc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Sc(t.type,t.key,t.props,null,e.mode,n)).ref=_o(e,null,t),n.return=e,n;case te:return(t=Pc(t,e.mode,n)).return=e,t}if(bo(t)||me(t))return(t=Tc(t,e.mode,n,null)).return=e,t;Co(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:c(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===i?n.type===ne?d(e,t,n.props.children,r,i):u(e,t,n,r):null;case te:return n.key===i?l(e,t,n,r):null}if(bo(n)||me(n))return null!==i?null:d(e,t,n,r,null);Co(e,n)}return null}function h(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?d(t,e,r.props.children,i,r.key):u(t,e,r,i);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(bo(r)||me(r))return d(t,e=e.get(n)||null,r,i,null);Co(t,r)}return null}function m(i,a,s,c){for(var u=null,l=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],c);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),a=o(v,a,m),null===l?u=v:l.sibling=v,l=v,d=g}if(m===s.length)return n(i,d),u;if(null===d){for(;m<s.length;m++)null!==(d=p(i,s[m],c))&&(a=o(d,a,m),null===l?u=d:l.sibling=d,l=d);return u}for(d=r(i,d);m<s.length;m++)null!==(g=h(d,i,m,s[m],c))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===l?u=g:l.sibling=g,l=g);return e&&d.forEach((function(e){return t(i,e)})),u}function g(i,s,c,u){var l=me(c);if("function"!==typeof l)throw Error(a(150));if(null==(c=l.call(c)))throw Error(a(151));for(var d=l=null,m=s,g=s=0,v=null,y=c.next();null!==m&&!y.done;g++,y=c.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,u);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?l=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),l;if(null===m){for(;!y.done;g++,y=c.next())null!==(y=p(i,y.value,u))&&(s=o(y,s,g),null===d?l=y:d.sibling=y,d=y);return l}for(m=r(i,m);!y.done;g++,y=c.next())null!==(y=h(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?l=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),l}return function(e,r,o,c){var u="object"===typeof o&&null!==o&&o.type===ne&&null===o.key;u&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case ee:e:{for(l=o.key,u=r;null!==u;){if(u.key===l){switch(u.tag){case 7:if(o.type===ne){n(e,u.sibling),(r=i(u,o.props.children)).return=e,e=r;break e}break;default:if(u.elementType===o.type){n(e,u.sibling),(r=i(u,o.props)).ref=_o(e,u,o),r.return=e,e=r;break e}}n(e,u);break}t(e,u),u=u.sibling}o.type===ne?((r=Tc(o.props.children,e.mode,c,o.key)).return=e,e=r):((c=Sc(o.type,o.key,o.props,null,e.mode,c)).ref=_o(e,r,o),c.return=e,e=c)}return s(e);case te:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Pc(o,e.mode,c)).return=e,e=r}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Oc(o,e.mode,c)).return=e,e=r),s(e);if(bo(o))return m(e,r,o,c);if(me(o))return g(e,r,o,c);if(l&&Co(e,o),"undefined"===typeof o&&!u)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var wo=Io(!0),Eo=Io(!1),So={},To={current:So},Oo={current:So},Po={current:So};function xo(e){if(e===So)throw Error(a(174));return e}function Ao(e,t){switch(si(Po,t),si(Oo,e),si(To,So),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ue(null,"");break;default:t=Ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ai(To),si(To,t)}function No(){ai(To),ai(Oo),ai(Po)}function Ro(e){xo(Po.current);var t=xo(To.current),n=Ue(t,e.type);t!==n&&(si(Oo,e),si(To,n))}function Do(e){Oo.current===e&&(ai(To),ai(Oo))}var ko={current:0};function Uo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Lo(e,t){return{responder:e,props:t}}var Mo=Q.ReactCurrentDispatcher,jo=Q.ReactCurrentBatchConfig,Fo=0,Bo=null,zo=null,Ho=null,Wo=!1;function Vo(){throw Error(a(321))}function Zo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function qo(e,t,n,r,i,o){if(Fo=o,Bo=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Mo.current=null===e||null===e.memoizedState?ma:ga,e=n(r,i),t.expirationTime===Fo){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Ho=zo=null,t.updateQueue=null,Mo.current=va,e=n(r,i)}while(t.expirationTime===Fo)}if(Mo.current=ha,t=null!==zo&&null!==zo.next,Fo=0,Ho=zo=Bo=null,Wo=!1,t)throw Error(a(300));return e}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ho?Bo.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function Go(){if(null===zo){var e=Bo.alternate;e=null!==e?e.memoizedState:null}else e=zo.next;var t=null===Ho?Bo.memoizedState:Ho.next;if(null!==t)Ho=t,zo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(zo=e).memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},null===Ho?Bo.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function Yo(e,t){return"function"===typeof t?t(e):t}function Qo(e){var t=Go(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=zo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var c=s=o=null,u=i;do{var l=u.expirationTime;if(l<Fo){var d={expirationTime:u.expirationTime,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===c?(s=c=d,o=r):c=c.next=d,l>Bo.expirationTime&&(Bo.expirationTime=l,ic(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),rc(l,u.suspenseConfig),r=u.eagerReducer===e?u.eagerState:e(r,u.action);u=u.next}while(null!==u&&u!==i);null===c?o=r:c.next=s,Ur(r,t.memoizedState)||(Pa=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Xo(e){var t=Go(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Ur(o,t.memoizedState)||(Pa=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Jo(e){var t=Ko();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:e}).dispatch=fa.bind(null,Bo,e),[t.memoizedState,e]}function $o(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Bo.updateQueue)?(t={lastEffect:null},Bo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ea(){return Go().memoizedState}function ta(e,t,n,r){var i=Ko();Bo.effectTag|=e,i.memoizedState=$o(1|t,n,void 0,void 0===r?null:r)}function na(e,t,n,r){var i=Go();r=void 0===r?null:r;var o=void 0;if(null!==zo){var a=zo.memoizedState;if(o=a.destroy,null!==r&&Zo(r,a.deps))return void $o(t,n,o,r)}Bo.effectTag|=e,i.memoizedState=$o(1|t,n,o,r)}function ra(e,t){return ta(516,4,e,t)}function ia(e,t){return na(516,4,e,t)}function oa(e,t){return na(4,2,e,t)}function aa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function sa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,na(4,2,aa.bind(null,t,e),n)}function ca(){}function ua(e,t){return Ko().memoizedState=[e,void 0===t?null:t],e}function la(e,t){var n=Go();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function da(e,t){var n=Go();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pa(e,t,n){var r=ji();Bi(98>r?98:r,(function(){e(!0)})),Bi(97<r?97:r,(function(){var r=jo.suspense;jo.suspense=void 0===t?null:t;try{e(!1),n()}finally{jo.suspense=r}}))}function fa(e,t,n){var r=Vs(),i=lo.suspense;i={expirationTime:r=Zs(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===Bo||null!==o&&o===Bo)Wo=!0,i.expirationTime=Fo,Bo.expirationTime=Fo;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,Ur(s,a))return}catch(c){}qs(e,r)}}var ha={readContext:to,useCallback:Vo,useContext:Vo,useEffect:Vo,useImperativeHandle:Vo,useLayoutEffect:Vo,useMemo:Vo,useReducer:Vo,useRef:Vo,useState:Vo,useDebugValue:Vo,useResponder:Vo,useDeferredValue:Vo,useTransition:Vo},ma={readContext:to,useCallback:ua,useContext:to,useEffect:ra,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ta(4,2,aa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ta(4,2,e,t)},useMemo:function(e,t){var n=Ko();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ko();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=fa.bind(null,Bo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ko().memoizedState=e},useState:Jo,useDebugValue:ca,useResponder:Lo,useDeferredValue:function(e,t){var n=Jo(e),r=n[0],i=n[1];return ra((function(){var n=jo.suspense;jo.suspense=void 0===t?null:t;try{i(e)}finally{jo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Jo(!1),n=t[0];return t=t[1],[ua(pa.bind(null,t,e),[t,e]),n]}},ga={readContext:to,useCallback:la,useContext:to,useEffect:ia,useImperativeHandle:sa,useLayoutEffect:oa,useMemo:da,useReducer:Qo,useRef:ea,useState:function(){return Qo(Yo)},useDebugValue:ca,useResponder:Lo,useDeferredValue:function(e,t){var n=Qo(Yo),r=n[0],i=n[1];return ia((function(){var n=jo.suspense;jo.suspense=void 0===t?null:t;try{i(e)}finally{jo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Qo(Yo),n=t[0];return t=t[1],[la(pa.bind(null,t,e),[t,e]),n]}},va={readContext:to,useCallback:la,useContext:to,useEffect:ia,useImperativeHandle:sa,useLayoutEffect:oa,useMemo:da,useReducer:Xo,useRef:ea,useState:function(){return Xo(Yo)},useDebugValue:ca,useResponder:Lo,useDeferredValue:function(e,t){var n=Xo(Yo),r=n[0],i=n[1];return ia((function(){var n=jo.suspense;jo.suspense=void 0===t?null:t;try{i(e)}finally{jo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Xo(Yo),n=t[0];return t=t[1],[la(pa.bind(null,t,e),[t,e]),n]}},ya=null,ba=null,_a=!1;function Ca(e,t){var n=Ic(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ia(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function wa(e){if(_a){var t=ba;if(t){var n=t;if(!Ia(e,t)){if(!(t=bn(n.nextSibling))||!Ia(e,t))return e.effectTag=-1025&e.effectTag|2,_a=!1,void(ya=e);Ca(ya,n)}ya=e,ba=bn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,_a=!1,ya=e}}function Ea(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ya=e}function Sa(e){if(e!==ya)return!1;if(!_a)return Ea(e),_a=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!gn(t,e.memoizedProps))for(t=ba;t;)Ca(e,t),t=bn(t.nextSibling);if(Ea(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ba=bn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ba=null}}else ba=ya?bn(e.stateNode.nextSibling):null;return!0}function Ta(){ba=ya=null,_a=!1}var Oa=Q.ReactCurrentOwner,Pa=!1;function xa(e,t,n,r){t.child=null===e?Eo(t,null,n,r):wo(t,e.child,n,r)}function Aa(e,t,n,r,i){n=n.render;var o=t.ref;return eo(t,i),r=qo(e,t,n,r,o,i),null===e||Pa?(t.effectTag|=1,xa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),qa(e,t,i))}function Na(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||wc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Sc(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ra(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Mr)(i,r)&&e.ref===t.ref)?qa(e,t,o):(t.effectTag|=1,(e=Ec(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ra(e,t,n,r,i,o){return null!==e&&Mr(e.memoizedProps,r)&&e.ref===t.ref&&(Pa=!1,i<o)?(t.expirationTime=e.expirationTime,qa(e,t,o)):ka(e,t,n,r,o)}function Da(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function ka(e,t,n,r,i){var o=fi(n)?di:ui.current;return o=pi(t,o),eo(t,i),n=qo(e,t,n,r,o,i),null===e||Pa?(t.effectTag|=1,xa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),qa(e,t,i))}function Ua(e,t,n,r,i){if(fi(n)){var o=!0;vi(t)}else o=!1;if(eo(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),go(t,n,r),yo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,u=n.contextType;u="object"===typeof u&&null!==u?to(u):pi(t,u=fi(n)?di:ui.current);var l=n.getDerivedStateFromProps,d="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||c!==u)&&vo(t,a,r,u),no=!1;var p=t.memoizedState;a.state=p,co(t,r,a,i),c=t.memoizedState,s!==r||p!==c||li.current||no?("function"===typeof l&&(fo(t,n,l,r),c=t.memoizedState),(s=no||mo(t,n,s,r,p,c,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.effectTag|=4)):("function"===typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,io(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:qi(t.type,s),c=a.context,u="object"===typeof(u=n.contextType)&&null!==u?to(u):pi(t,u=fi(n)?di:ui.current),(d="function"===typeof(l=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||c!==u)&&vo(t,a,r,u),no=!1,c=t.memoizedState,a.state=c,co(t,r,a,i),p=t.memoizedState,s!==r||c!==p||li.current||no?("function"===typeof l&&(fo(t,n,l,r),p=t.memoizedState),(l=no||mo(t,n,s,r,c,p,u))?(d||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof a.componentDidUpdate&&(t.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=l):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return La(e,t,n,r,o,i)}function La(e,t,n,r,i,o){Da(e,t);var a=0!==(64&t.effectTag);if(!r&&!a)return i&&yi(t,n,!1),qa(e,t,o);r=t.stateNode,Oa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=wo(t,e.child,null,o),t.child=wo(t,null,s,o)):xa(e,t,s,o),t.memoizedState=r.state,i&&yi(t,n,!0),t.child}function Ma(e){var t=e.stateNode;t.pendingContext?mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&mi(0,t.context,!1),Ao(e,t.containerInfo)}var ja,Fa,Ba,za={dehydrated:null,retryTime:0};function Ha(e,t,n){var r,i=t.mode,o=t.pendingProps,a=ko.current,s=!1;if((r=0!==(64&t.effectTag))||(r=0!==(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),si(ko,1&a),null===e){if(void 0!==o.fallback&&wa(t),s){if(s=o.fallback,(o=Tc(null,i,0,null)).return=t,0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Tc(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=za,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Eo(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=Ec(e,e.pendingProps)).return=t,0===(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Ec(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=za,t.child=n,i}return n=wo(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Tc(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Tc(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=za,t.child=o,n}return t.memoizedState=null,t.child=wo(t,e,o.children,n)}function Wa(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),$i(e.return,t)}function Va(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Za(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(xa(e,t,r.children,n),0!==(2&(r=ko.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!==(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Wa(e,n);else if(19===e.tag)Wa(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(si(ko,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Uo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Va(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Uo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Va(t,!0,n,null,o,t.lastEffect);break;case"together":Va(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function qa(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&ic(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ec(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ec(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ka(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ga(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return fi(t.type)&&hi(),null;case 3:return No(),ai(li),ai(ui),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Sa(t)||(t.effectTag|=4),null;case 5:Do(t),n=xo(Po.current);var o=t.type;if(null!==e&&null!=t.stateNode)Fa(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=xo(To.current),Sa(t)){r=t.stateNode,o=t.type;var s=t.memoizedProps;switch(r[In]=t,r[wn]=s,o){case"iframe":case"object":case"embed":Zt("load",r);break;case"video":case"audio":for(e=0;e<Ge.length;e++)Zt(Ge[e],r);break;case"source":Zt("error",r);break;case"img":case"image":case"link":Zt("error",r),Zt("load",r);break;case"form":Zt("reset",r),Zt("submit",r);break;case"details":Zt("toggle",r);break;case"input":we(r,s),Zt("invalid",r),an(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Zt("invalid",r),an(n,"onChange");break;case"textarea":Ne(r,s),Zt("invalid",r),an(n,"onChange")}for(var c in nn(o,s),e=null,s)if(s.hasOwnProperty(c)){var u=s[c];"children"===c?"string"===typeof u?r.textContent!==u&&(e=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(e=["children",""+u]):E.hasOwnProperty(c)&&null!=u&&an(n,c)}switch(o){case"input":_e(r),Te(r,s,!0);break;case"textarea":_e(r),De(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=sn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(c=9===n.nodeType?n:n.ownerDocument,e===on&&(e=ke(o)),e===on?"script"===o?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(o,{is:r.is}):(e=c.createElement(o),"select"===o&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,o),e[In]=t,e[wn]=r,ja(e,t),t.stateNode=e,c=rn(o,r),o){case"iframe":case"object":case"embed":Zt("load",e),u=r;break;case"video":case"audio":for(u=0;u<Ge.length;u++)Zt(Ge[u],e);u=r;break;case"source":Zt("error",e),u=r;break;case"img":case"image":case"link":Zt("error",e),Zt("load",e),u=r;break;case"form":Zt("reset",e),Zt("submit",e),u=r;break;case"details":Zt("toggle",e),u=r;break;case"input":we(e,r),u=Ie(e,r),Zt("invalid",e),an(n,"onChange");break;case"option":u=Pe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},u=i({},r,{value:void 0}),Zt("invalid",e),an(n,"onChange");break;case"textarea":Ne(e,r),u=Ae(e,r),Zt("invalid",e),an(n,"onChange");break;default:u=r}nn(o,u);var l=u;for(s in l)if(l.hasOwnProperty(s)){var d=l[s];"style"===s?en(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&Me(e,d):"children"===s?"string"===typeof d?("textarea"!==o||""!==d)&&je(e,d):"number"===typeof d&&je(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(E.hasOwnProperty(s)?null!=d&&an(n,s):null!=d&&X(e,s,d,c))}switch(o){case"input":_e(e),Te(e,r,!1);break;case"textarea":_e(e),De(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ye(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?xe(e,!!r.multiple,n,!1):null!=r.defaultValue&&xe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof u.onClick&&(e.onclick=sn)}mn(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ba(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=xo(Po.current),xo(To.current),Sa(t)?(n=t.stateNode,r=t.memoizedProps,n[In]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[In]=t,t.stateNode=n)}return null;case 13:return ai(ko),r=t.memoizedState,0!==(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Sa(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=o,o.nextEffect=s):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&ko.current)?Ss===ys&&(Ss=bs):(Ss!==ys&&Ss!==bs||(Ss=_s),0!==As&&null!==Is&&(Nc(Is,Es),Rc(Is,As)))),(n||r)&&(t.effectTag|=4),null);case 4:return No(),null;case 10:return Ji(t),null;case 17:return fi(t.type)&&hi(),null;case 19:if(ai(ko),null===(r=t.memoizedState))return null;if(o=0!==(64&t.effectTag),null===(s=r.rendering)){if(o)Ka(r,!1);else if(Ss!==ys||null!==e&&0!==(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Uo(s))){for(t.effectTag|=64,Ka(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,s=e.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return si(ko,1&ko.current|2),t.child}s=s.sibling}}else{if(!o)if(null!==(e=Uo(s))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Ka(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Mi()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,Ka(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Mi()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Mi(),n.sibling=null,t=ko.current,si(ko,o?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Ya(e){switch(e.tag){case 1:fi(e.type)&&hi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(No(),ai(li),ai(ui),0!==(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Do(e),null;case 13:return ai(ko),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ai(ko),null;case 4:return No(),null;case 10:return Ji(e),null;default:return null}}function Qa(e,t){return{value:e,source:t,stack:ve(t)}}ja=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Fa=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,c,u=t.stateNode;switch(xo(To.current),e=null,n){case"input":a=Ie(u,a),r=Ie(u,r),e=[];break;case"option":a=Pe(u,a),r=Pe(u,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=Ae(u,a),r=Ae(u,r),e=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(u.onclick=sn)}for(s in nn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(c in u=a[s])u.hasOwnProperty(c)&&(n||(n={}),n[c]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(E.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(u=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==u&&(null!=l||null!=u))if("style"===s)if(u){for(c in u)!u.hasOwnProperty(c)||l&&l.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in l)l.hasOwnProperty(c)&&u[c]!==l[c]&&(n||(n={}),n[c]=l[c])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(e=e||[]).push(s,l)):"children"===s?u===l||"string"!==typeof l&&"number"!==typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(E.hasOwnProperty(s)?(null!=l&&an(o,s),e||u===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},Ba=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Xa="function"===typeof WeakSet?WeakSet:Set;function Ja(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ve(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(i){setTimeout((function(){throw i}))}}function $a(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){gc(e,n)}else t.current=null}function es(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:qi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ts(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function ns(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ns(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:qi(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&uo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}uo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&mn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function is(e,t,n){switch("function"===typeof _c&&_c(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Bi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(o){gc(i,o)}}e=e.next}while(e!==r)}))}break;case 1:$a(t),"function"===typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){gc(e,n)}}(t,n);break;case 5:$a(t);break;case 4:cs(e,t,n)}}function os(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&os(t)}function as(e){return 5===e.tag||3===e.tag||4===e.tag}function ss(e){e:{for(var t=e.return;null!==t;){if(as(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(je(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||as(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=sn));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function cs(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var c=e,u=o,l=n,d=u;;)if(is(c,d,l),null!==d.child&&4!==d.tag)d.child.return=d,d=d.child;else{if(d===u)break e;for(;null===d.sibling;){if(null===d.return||d.return===u)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}i?(c=r,u=o.stateNode,8===c.nodeType?c.parentNode.removeChild(u):c.removeChild(u)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(is(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function us(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void ts(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[wn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Ee(n,r),rn(e,i),t=rn(e,r),i=0;i<o.length;i+=2){var s=o[i],c=o[i+1];"style"===s?en(n,c):"dangerouslySetInnerHTML"===s?Me(n,c):"children"===s?je(n,c):X(n,s,c,t)}switch(e){case"input":Se(n,r);break;case"textarea":Re(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?xe(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?xe(n,!!r.multiple,r.defaultValue,!0):xe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,kt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Rs=Mi()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"===typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=void 0!==(i=e.memoizedProps.style)&&null!==i&&i.hasOwnProperty("display")?i.display:null,o.style.display=$t("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void ls(t);case 19:return void ls(t);case 17:return}throw Error(a(163))}function ls(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xa),t.forEach((function(t){var r=yc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ds="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=oo(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ks||(ks=!0,Us=r),Ja(e,t)},n}function fs(e,t,n){(n=oo(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return Ja(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Ls?Ls=new Set([this]):Ls.add(this),Ja(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var hs,ms=Math.ceil,gs=Q.ReactCurrentDispatcher,vs=Q.ReactCurrentOwner,ys=0,bs=3,_s=4,Cs=0,Is=null,ws=null,Es=0,Ss=ys,Ts=null,Os=1073741823,Ps=1073741823,xs=null,As=0,Ns=!1,Rs=0,Ds=null,ks=!1,Us=null,Ls=null,Ms=!1,js=null,Fs=90,Bs=null,zs=0,Hs=null,Ws=0;function Vs(){return 0!==(48&Cs)?1073741821-(Mi()/10|0):0!==Ws?Ws:Ws=1073741821-(Mi()/10|0)}function Zs(e,t,n){if(0===(2&(t=t.mode)))return 1073741823;var r=ji();if(0===(4&t))return 99===r?1073741823:1073741822;if(0!==(16&Cs))return Es;if(null!==n)e=Zi(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Zi(e,150,100);break;case 97:case 96:e=Zi(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Is&&e===Es&&--e,e}function qs(e,t){if(50<zs)throw zs=0,Hs=null,Error(a(185));if(null!==(e=Ks(e,t))){var n=ji();1073741823===t?0!==(8&Cs)&&0===(48&Cs)?Xs(e):(Ys(e),0===Cs&&Wi()):Ys(e),0===(4&Cs)||98!==n&&99!==n||(null===Bs?Bs=new Map([[e,t]]):(void 0===(n=Bs.get(e))||n>t)&&Bs.set(e,t))}}function Ks(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Is===i&&(ic(t),Ss===_s&&Nc(i,Es)),Rc(i,t)),i}function Gs(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Ac(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Ys(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Hi(Xs.bind(null,e));else{var t=Gs(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Vs();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==Ai&&Ci(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Hi(Xs.bind(null,e)):zi(r,Qs.bind(null,e),{timeout:10*(1073741821-t)-Mi()}),e.callbackNode=t}}}function Qs(e,t){if(Ws=0,t)return Dc(e,t=Vs()),Ys(e),null;var n=Gs(e);if(0!==n){if(t=e.callbackNode,0!==(48&Cs))throw Error(a(327));if(fc(),e===Is&&n===Es||ec(e,n),null!==ws){var r=Cs;Cs|=16;for(var i=nc();;)try{ac();break}catch(c){tc(e,c)}if(Xi(),Cs=r,gs.current=i,1===Ss)throw t=Ts,ec(e,n),Nc(e,n),Ys(e),t;if(null===ws)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ss,Is=null,r){case ys:case 1:throw Error(a(345));case 2:Dc(e,2<n?2:n);break;case bs:if(Nc(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=uc(i)),1073741823===Os&&10<(i=Rs+500-Mi())){if(Ns){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,ec(e,n);break}}if(0!==(o=Gs(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=vn(lc.bind(null,e),i);break}lc(e);break;case _s:if(Nc(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=uc(i)),Ns&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,ec(e,n);break}if(0!==(i=Gs(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ps?r=10*(1073741821-Ps)-Mi():1073741823===Os?r=0:(r=10*(1073741821-Os)-5e3,0>(r=(i=Mi())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ms(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=vn(lc.bind(null,e),r);break}lc(e);break;case 5:if(1073741823!==Os&&null!==xs){o=Os;var s=xs;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Mi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Nc(e,n),e.timeoutHandle=vn(lc.bind(null,e),r);break}}lc(e);break;default:throw Error(a(329))}if(Ys(e),e.callbackNode===t)return Qs.bind(null,e)}}return null}function Xs(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!==(48&Cs))throw Error(a(327));if(fc(),e===Is&&t===Es||ec(e,t),null!==ws){var n=Cs;Cs|=16;for(var r=nc();;)try{oc();break}catch(i){tc(e,i)}if(Xi(),Cs=n,gs.current=r,1===Ss)throw n=Ts,ec(e,t),Nc(e,t),Ys(e),n;if(null!==ws)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Is=null,lc(e),Ys(e)}return null}function Js(e,t){var n=Cs;Cs|=1;try{return e(t)}finally{0===(Cs=n)&&Wi()}}function $s(e,t){var n=Cs;Cs&=-2,Cs|=8;try{return e(t)}finally{0===(Cs=n)&&Wi()}}function ec(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,yn(n)),null!==ws)for(n=ws.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&hi();break;case 3:No(),ai(li),ai(ui);break;case 5:Do(r);break;case 4:No();break;case 13:case 19:ai(ko);break;case 10:Ji(r)}n=n.return}Is=e,ws=Ec(e.current,null),Es=t,Ss=ys,Ts=null,Ps=Os=1073741823,xs=null,As=0,Ns=!1}function tc(e,t){for(;;){try{if(Xi(),Mo.current=ha,Wo)for(var n=Bo.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Fo=0,Ho=zo=Bo=null,Wo=!1,null===ws||null===ws.return)return Ss=1,Ts=t,ws=null;e:{var i=e,o=ws.return,a=ws,s=t;if(t=Es,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var c=s;if(0===(2&a.mode)){var u=a.alternate;u?(a.updateQueue=u.updateQueue,a.memoizedState=u.memoizedState,a.expirationTime=u.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!==(1&ko.current),d=o;do{var p;if(p=13===d.tag){var f=d.memoizedState;if(null!==f)p=null!==f.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var m=d.updateQueue;if(null===m){var g=new Set;g.add(c),d.updateQueue=g}else m.add(c);if(0===(2&d.mode)){if(d.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=oo(1073741823,null);v.tag=2,ao(a,v)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=i.pingCache;if(null===y?(y=i.pingCache=new ds,s=new Set,y.set(c,s)):void 0===(s=y.get(c))&&(s=new Set,y.set(c,s)),!s.has(a)){s.add(a);var b=vc.bind(null,i,c,a);c.then(b,b)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);s=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ve(a))}5!==Ss&&(Ss=2),s=Qa(s,a),d=o;do{switch(d.tag){case 3:c=s,d.effectTag|=4096,d.expirationTime=t,so(d,ps(d,c,t));break e;case 1:c=s;var _=d.type,C=d.stateNode;if(0===(64&d.effectTag)&&("function"===typeof _.getDerivedStateFromError||null!==C&&"function"===typeof C.componentDidCatch&&(null===Ls||!Ls.has(C)))){d.effectTag|=4096,d.expirationTime=t,so(d,fs(d,c,t));break e}}d=d.return}while(null!==d)}ws=cc(ws)}catch(I){t=I;continue}break}}function nc(){var e=gs.current;return gs.current=ha,null===e?ha:e}function rc(e,t){e<Os&&2<e&&(Os=e),null!==t&&e<Ps&&2<e&&(Ps=e,xs=t)}function ic(e){e>As&&(As=e)}function oc(){for(;null!==ws;)ws=sc(ws)}function ac(){for(;null!==ws&&!Ni();)ws=sc(ws)}function sc(e){var t=hs(e.alternate,e,Es);return e.memoizedProps=e.pendingProps,null===t&&(t=cc(e)),vs.current=null,t}function cc(e){ws=e;do{var t=ws.alternate;if(e=ws.return,0===(2048&ws.effectTag)){if(t=Ga(t,ws,Es),1===Es||1!==ws.childExpirationTime){for(var n=0,r=ws.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}ws.childExpirationTime=n}if(null!==t)return t;null!==e&&0===(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=ws.firstEffect),null!==ws.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=ws.firstEffect),e.lastEffect=ws.lastEffect),1<ws.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=ws:e.firstEffect=ws,e.lastEffect=ws))}else{if(null!==(t=Ya(ws)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=ws.sibling))return t;ws=e}while(null!==ws);return Ss===ys&&(Ss=5),null}function uc(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function lc(e){var t=ji();return Bi(99,dc.bind(null,e,t)),null}function dc(e,t){do{fc()}while(null!==js);if(0!==(48&Cs))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=uc(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Is&&(ws=Is=null,Es=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Cs;Cs|=32,vs.current=null,fn=Vt;var s=dn();if(pn(s)){if("selectionStart"in s)var c={start:s.selectionStart,end:s.selectionEnd};else e:{var u=(c=(c=s.ownerDocument)&&c.defaultView||window).getSelection&&c.getSelection();if(u&&0!==u.rangeCount){c=u.anchorNode;var l=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{c.nodeType,d.nodeType}catch(T){c=null;break e}var p=0,f=-1,h=-1,m=0,g=0,v=s,y=null;t:for(;;){for(var b;v!==c||0!==l&&3!==v.nodeType||(f=p+l),v!==d||0!==u&&3!==v.nodeType||(h=p+u),3===v.nodeType&&(p+=v.nodeValue.length),null!==(b=v.firstChild);)y=v,v=b;for(;;){if(v===s)break t;if(y===c&&++m===l&&(f=p),y===d&&++g===u&&(h=p),null!==(b=v.nextSibling))break;y=(v=y).parentNode}v=b}c=-1===f||-1===h?null:{start:f,end:h}}else c=null}c=c||{start:0,end:0}}else c=null;hn={activeElementDetached:null,focusedElem:s,selectionRange:c},Vt=!1,Ds=i;do{try{pc()}catch(T){if(null===Ds)throw Error(a(330));gc(Ds,T),Ds=Ds.nextEffect}}while(null!==Ds);Ds=i;do{try{for(s=e,c=t;null!==Ds;){var _=Ds.effectTag;if(16&_&&je(Ds.stateNode,""),128&_){var C=Ds.alternate;if(null!==C){var I=C.ref;null!==I&&("function"===typeof I?I(null):I.current=null)}}switch(1038&_){case 2:ss(Ds),Ds.effectTag&=-3;break;case 6:ss(Ds),Ds.effectTag&=-3,us(Ds.alternate,Ds);break;case 1024:Ds.effectTag&=-1025;break;case 1028:Ds.effectTag&=-1025,us(Ds.alternate,Ds);break;case 4:us(Ds.alternate,Ds);break;case 8:cs(s,l=Ds,c),os(l)}Ds=Ds.nextEffect}}catch(T){if(null===Ds)throw Error(a(330));gc(Ds,T),Ds=Ds.nextEffect}}while(null!==Ds);if(I=hn,C=dn(),_=I.focusedElem,c=I.selectionRange,C!==_&&_&&_.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(_.ownerDocument.documentElement,_)){null!==c&&pn(_)&&(C=c.start,void 0===(I=c.end)&&(I=C),"selectionStart"in _?(_.selectionStart=C,_.selectionEnd=Math.min(I,_.value.length)):(I=(C=_.ownerDocument||document)&&C.defaultView||window).getSelection&&(I=I.getSelection(),l=_.textContent.length,s=Math.min(c.start,l),c=void 0===c.end?s:Math.min(c.end,l),!I.extend&&s>c&&(l=c,c=s,s=l),l=ln(_,s),d=ln(_,c),l&&d&&(1!==I.rangeCount||I.anchorNode!==l.node||I.anchorOffset!==l.offset||I.focusNode!==d.node||I.focusOffset!==d.offset)&&((C=C.createRange()).setStart(l.node,l.offset),I.removeAllRanges(),s>c?(I.addRange(C),I.extend(d.node,d.offset)):(C.setEnd(d.node,d.offset),I.addRange(C))))),C=[];for(I=_;I=I.parentNode;)1===I.nodeType&&C.push({element:I,left:I.scrollLeft,top:I.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_<C.length;_++)(I=C[_]).element.scrollLeft=I.left,I.element.scrollTop=I.top}Vt=!!fn,hn=fn=null,e.current=n,Ds=i;do{try{for(_=e;null!==Ds;){var w=Ds.effectTag;if(36&w&&rs(_,Ds.alternate,Ds),128&w){C=void 0;var E=Ds.ref;if(null!==E){var S=Ds.stateNode;switch(Ds.tag){case 5:C=S;break;default:C=S}"function"===typeof E?E(C):E.current=C}}Ds=Ds.nextEffect}}catch(T){if(null===Ds)throw Error(a(330));gc(Ds,T),Ds=Ds.nextEffect}}while(null!==Ds);Ds=null,Ri(),Cs=o}else e.current=n;if(Ms)Ms=!1,js=e,Fs=t;else for(Ds=i;null!==Ds;)t=Ds.nextEffect,Ds.nextEffect=null,Ds=t;if(0===(t=e.firstPendingTime)&&(Ls=null),1073741823===t?e===Hs?zs++:(zs=0,Hs=e):zs=0,"function"===typeof bc&&bc(n.stateNode,r),Ys(e),ks)throw ks=!1,e=Us,Us=null,e;return 0!==(8&Cs)||Wi(),null}function pc(){for(;null!==Ds;){var e=Ds.effectTag;0!==(256&e)&&es(Ds.alternate,Ds),0===(512&e)||Ms||(Ms=!0,zi(97,(function(){return fc(),null}))),Ds=Ds.nextEffect}}function fc(){if(90!==Fs){var e=97<Fs?97:Fs;return Fs=90,Bi(e,hc)}}function hc(){if(null===js)return!1;var e=js;if(js=null,0!==(48&Cs))throw Error(a(331));var t=Cs;for(Cs|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!==(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:ts(5,n),ns(5,n)}}catch(r){if(null===e)throw Error(a(330));gc(e,r)}n=e.nextEffect,e.nextEffect=null,e=n}return Cs=t,Wi(),!0}function mc(e,t,n){ao(e,t=ps(e,t=Qa(n,t),1073741823)),null!==(e=Ks(e,1073741823))&&Ys(e)}function gc(e,t){if(3===e.tag)mc(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){mc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ls||!Ls.has(r))){ao(n,e=fs(n,e=Qa(t,e),1073741823)),null!==(n=Ks(n,1073741823))&&Ys(n);break}}n=n.return}}function vc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Is===e&&Es===n?Ss===_s||Ss===bs&&1073741823===Os&&Mi()-Rs<500?ec(e,Es):Ns=!0:Ac(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Ys(e)))}function yc(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Zs(t=Vs(),e,null)),null!==(e=Ks(e,t))&&Ys(e)}hs=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||li.current)Pa=!0;else{if(r<n){switch(Pa=!1,t.tag){case 3:Ma(t),Ta();break;case 5:if(Ro(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:fi(t.type)&&vi(t);break;case 4:Ao(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,i=t.type._context,si(Ki,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Ha(e,t,n):(si(ko,1&ko.current),null!==(t=qa(e,t,n))?t.sibling:null);si(ko,1&ko.current);break;case 19:if(r=t.childExpirationTime>=n,0!==(64&e.effectTag)){if(r)return Za(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),si(ko,ko.current),!r)return null}return qa(e,t,n)}Pa=!1}}else Pa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=pi(t,ui.current),eo(t,n),i=qo(null,t,r,e,i,n),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,fi(r)){var o=!0;vi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ro(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&fo(t,r,s,e),i.updater=ho,t.stateNode=i,i._reactInternalFiber=t,yo(t,r,e,n),t=La(null,t,r,!0,o,n)}else t.tag=0,xa(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"===typeof e)return wc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===ce)return 11;if(e===de)return 14}return 2}(i),e=qi(i,e),o){case 0:t=ka(null,t,i,e,n);break e;case 1:t=Ua(null,t,i,e,n);break e;case 11:t=Aa(null,t,i,e,n);break e;case 14:t=Na(null,t,i,qi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,ka(e,t,r,i=t.elementType===r?i:qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ua(e,t,r,i=t.elementType===r?i:qi(r,i),n);case 3:if(Ma(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,io(e,t),co(t,r,null,n),(r=t.memoizedState.element)===i)Ta(),t=qa(e,t,n);else{if((i=t.stateNode.hydrate)&&(ba=bn(t.stateNode.containerInfo.firstChild),ya=t,i=_a=!0),i)for(n=Eo(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else xa(e,t,r,n),Ta();t=t.child}return t;case 5:return Ro(t),null===e&&wa(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,gn(r,i)?s=null:null!==o&&gn(r,o)&&(t.effectTag|=16),Da(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(xa(e,t,s,n),t=t.child),t;case 6:return null===e&&wa(t),null;case 13:return Ha(e,t,n);case 4:return Ao(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=wo(t,null,r,n):xa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Aa(e,t,r,i=t.elementType===r?i:qi(r,i),n);case 7:return xa(e,t,t.pendingProps,n),t.child;case 8:case 12:return xa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var c=t.type._context;if(si(Ki,c._currentValue),c._currentValue=o,null!==s)if(c=s.value,0===(o=Ur(c,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(c,o):1073741823))){if(s.children===i.children&&!li.current){t=qa(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var u=c.dependencies;if(null!==u){s=c.child;for(var l=u.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===c.tag&&((l=oo(n,null)).tag=2,ao(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),$i(c.return,n),u.expirationTime<n&&(u.expirationTime=n);break}l=l.next}}else s=10===c.tag&&c.type===t.type?null:c.child;if(null!==s)s.return=c;else for(s=c;null!==s;){if(s===t){s=null;break}if(null!==(c=s.sibling)){c.return=s.return,s=c;break}s=s.return}c=s}xa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,eo(t,n),r=r(i=to(i,o.unstable_observedBits)),t.effectTag|=1,xa(e,t,r,n),t.child;case 14:return o=qi(i=t.type,t.pendingProps),Na(e,t,i,o=qi(i.type,o),r,n);case 15:return Ra(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,fi(r)?(e=!0,vi(t)):e=!1,eo(t,n),go(t,r,i),yo(t,r,i,n),La(null,t,r,!0,e,n);case 19:return Za(e,t,n)}throw Error(a(156,t.tag))};var bc=null,_c=null;function Cc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Ic(e,t,n,r){return new Cc(e,t,n,r)}function wc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ec(e,t){var n=e.alternate;return null===n?((n=Ic(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Sc(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)wc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case ne:return Tc(n.children,i,o,t);case se:s=8,i|=7;break;case re:s=8,i|=1;break;case ie:return(e=Ic(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=o,e;case ue:return(e=Ic(13,n,t,i)).type=ue,e.elementType=ue,e.expirationTime=o,e;case le:return(e=Ic(19,n,t,i)).elementType=le,e.expirationTime=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case oe:s=10;break e;case ae:s=9;break e;case ce:s=11;break e;case de:s=14;break e;case pe:s=16,r=null;break e;case fe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ic(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function Tc(e,t,n,r){return(e=Ic(7,e,r,t)).expirationTime=n,e}function Oc(e,t,n){return(e=Ic(6,e,null,t)).expirationTime=n,e}function Pc(e,t,n){return(t=Ic(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xc(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Ac(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Nc(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Rc(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Dc(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function kc(e,t,n,r){var i=t.current,o=Vs(),s=lo.suspense;o=Zs(o,i,s);e:if(n){t:{if(Xe(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(fi(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(a(171))}if(1===n.tag){var u=n.type;if(fi(u)){n=gi(n,u,c);break e}}n=c}else n=ci;return null===t.context?t.context=n:t.pendingContext=n,(t=oo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ao(i,t),qs(i,o),o}function Uc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Lc(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Mc(e,t){Lc(e,t),(e=e.alternate)&&Lc(e,t)}function jc(e,t,n){var r=new xc(e,t,n=null!=n&&!0===n.hydrate),i=Ic(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,ro(i),e[En]=r.current,n&&0!==t&&function(e,t){var n=Qe(t);Et.forEach((function(e){pt(e,t,n)})),St.forEach((function(e){pt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Fc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Bc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Uc(a);s.call(e)}}kc(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new jc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var c=i;i=function(){var e=Uc(a);c.call(e)}}$s((function(){kc(t,a,e,i)}))}return Uc(a)}function zc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Hc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Fc(t))throw Error(a(200));return zc(e,t,null,n)}jc.prototype.render=function(e){kc(e,this._internalRoot,null,null)},jc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;kc(null,e,null,(function(){t[En]=null}))},ft=function(e){if(13===e.tag){var t=Zi(Vs(),150,100);qs(e,t),Mc(e,t)}},ht=function(e){13===e.tag&&(qs(e,3),Mc(e,3))},mt=function(e){if(13===e.tag){var t=Vs();qs(e,t=Zs(t,e,null)),Mc(e,t)}},P=function(e,t,n){switch(t){case"input":if(Se(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Pn(r);if(!i)throw Error(a(90));Ce(r),Se(r,i)}}}break;case"textarea":Re(e,n);break;case"select":null!=(t=n.value)&&xe(e,!!n.multiple,t,!1)}},k=Js,U=function(e,t,n,r,i){var o=Cs;Cs|=4;try{return Bi(98,e.bind(null,t,n,r,i))}finally{0===(Cs=o)&&Wi()}},L=function(){0===(49&Cs)&&(function(){if(null!==Bs){var e=Bs;Bs=null,e.forEach((function(e,t){Dc(t,e),Ys(t)})),Wi()}}(),fc())},M=function(e,t){var n=Cs;Cs|=2;try{return e(t)}finally{0===(Cs=n)&&Wi()}};var Wc={Events:[Tn,On,Pn,T,w,Un,function(e){nt(e,kn)},R,D,Yt,ot,fc,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;!function(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);bc=function(e){try{t.onCommitFiberRoot(n,e,void 0,64===(64&e.current.effectTag))}catch(r){}},_c=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}}(i({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=et(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:Sn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wc,t.createPortal=Hc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=et(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!==(48&Cs))throw Error(a(187));var n=Cs;Cs|=1;try{return Bi(99,e.bind(null,t))}finally{Cs=n,Wi()}},t.hydrate=function(e,t,n){if(!Fc(t))throw Error(a(200));return Bc(null,e,t,!0,n)},t.render=function(e,t,n){if(!Fc(t))throw Error(a(200));return Bc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Fc(e))throw Error(a(40));return!!e._reactRootContainer&&($s((function(){Bc(null,null,e,!1,(function(){e._reactRootContainer=null,e[En]=null}))})),!0)},t.unstable_batchedUpdates=Js,t.unstable_createPortal=function(e,t){return Hc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Fc(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Bc(e,t,n,!1,r)},t.version="16.14.0"},function(e,t,n){"use strict";e.exports=n(578)},function(e,t,n){"use strict";var r,i,o,a,s;if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,u=null,l=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(n){throw setTimeout(l,0),n}},d=Date.now();t.unstable_now=function(){return Date.now()-d},r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(l,0))},i=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,f=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!==typeof console){var g=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof p&&"function"===typeof p.now)t.unstable_now=function(){return p.now()};else{var v=f.now();t.unstable_now=function(){return f.now()-v}}var y=!1,b=null,_=-1,C=5,I=0;a=function(){return t.unstable_now()>=I},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):C=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,E=w.port2;w.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();I=e+C;try{b(!0,e)?E.postMessage(null):(y=!1,b=null)}catch(n){throw E.postMessage(null),n}}else y=!1},r=function(e){b=e,y||(y=!0,E.postMessage(null))},i=function(e,n){_=h((function(){e(t.unstable_now())}),n)},o=function(){m(_),_=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<P(i,t)))break e;e[r]=t,e[n]=i,n=r}}function T(e){return void 0===(e=e[0])?null:e}function O(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,c=e[s];if(void 0!==a&&0>P(a,n))void 0!==c&&0>P(c,a)?(e[r]=c,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==c&&0>P(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],A=[],N=1,R=null,D=3,k=!1,U=!1,L=!1;function M(e){for(var t=T(A);null!==t;){if(null===t.callback)O(A);else{if(!(t.startTime<=e))break;O(A),t.sortIndex=t.expirationTime,S(x,t)}t=T(A)}}function j(e){if(L=!1,M(e),!U)if(null!==T(x))U=!0,r(F);else{var t=T(A);null!==t&&i(j,t.startTime-e)}}function F(e,n){U=!1,L&&(L=!1,o()),k=!0;var r=D;try{for(M(n),R=T(x);null!==R&&(!(R.expirationTime>n)||e&&!a());){var s=R.callback;if(null!==s){R.callback=null,D=R.priorityLevel;var c=s(R.expirationTime<=n);n=t.unstable_now(),"function"===typeof c?R.callback=c:R===T(x)&&O(x),M(n)}else O(x);R=T(x)}if(null!==R)var u=!0;else{var l=T(A);null!==l&&i(j,l.startTime-n),u=!1}return u}finally{R=null,D=r,k=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){U||k||(U=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_getFirstCallbackNode=function(){return T(x)},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"===typeof a&&null!==a){var c=a.delay;c="number"===typeof c&&0<c?s+c:s,a="number"===typeof a.timeout?a.timeout:B(e)}else a=B(e),c=s;return e={id:N++,callback:n,priorityLevel:e,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>s?(e.sortIndex=c,S(A,e),null===T(x)&&e===T(A)&&(L?o():L=!0,i(j,c-s))):(e.sortIndex=a,S(x,e),U||k||(U=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();M(e);var n=T(x);return n!==R&&null!==R&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<R.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}}},function(e,t,n){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function a(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function s(e){t=!1}function c(){document.addEventListener("mousemove",u),document.addEventListener("mousedown",u),document.addEventListener("mouseup",u),document.addEventListener("pointermove",u),document.addEventListener("pointerdown",u),document.addEventListener("pointerup",u),document.addEventListener("touchmove",u),document.addEventListener("touchstart",u),document.addEventListener("touchend",u)}function u(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",u),document.removeEventListener("pointermove",u),document.removeEventListener("pointerdown",u),document.removeEventListener("pointerup",u),document.removeEventListener("touchmove",u),document.removeEventListener("touchstart",u),document.removeEventListener("touchend",u))}document.addEventListener("keydown",(function(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&a(e.activeElement),t=!0)}),!0),document.addEventListener("mousedown",s,!0),document.addEventListener("pointerdown",s,!0),document.addEventListener("touchstart",s,!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),c())}),!0),c(),e.addEventListener("focus",(function(e){o(e.target)&&(t||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!i[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(e.target))&&a(e.target)}),!0),e.addEventListener("blur",(function(e){var t;o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1}),100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))}),!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!==typeof window&&"undefined"!==typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(n){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!==typeof document&&e(document)}()},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1296);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=""===e?"":Object(r.c)(e).href;return globalThis.open(n,t.target,["noopener","noreferrer"].concat(t.features||[]).join(","))}},function(e,t,n){"use strict";(function(e,n,r){var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}!function(e){e.Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical"}(a||(a={})),function(e){e.fromString=function(t){switch(t){case"debug":return e.Debug;case"info":return e.Info;case"warn":case"warning":return e.Warning;case"error":return e.Error;case"fatal":return e.Fatal;case"critical":return e.Critical;case"log":default:return e.Log}}}(a||(a={})),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.Invalid="invalid",e.Failed="failed"}(s||(s={})),function(e){e.fromHttpCode=function(t){return t>=200&&t<300?e.Success:429===t?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(s||(s={}));var d=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){return e.__proto__=t,e}:function(e,t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n]);return e}),p=function(e){function t(t){var n=this.constructor,r=e.call(this,t)||this;return r.message=t,r.name=n.prototype.constructor.name,d(r,n.prototype),r}return o(t,e),t}(Error);function f(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return I(e,Error)}}function h(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)}function m(e){return"[object DOMError]"===Object.prototype.toString.call(e)}function g(e){return"[object String]"===Object.prototype.toString.call(e)}function v(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function y(e){return"[object Object]"===Object.prototype.toString.call(e)}function b(e){return"undefined"!==typeof Event&&I(e,Event)}function _(e){return"undefined"!==typeof Element&&I(e,Element)}function C(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function I(e,t){try{return e instanceof t}catch(n){return!1}}function w(e,t){return void 0===t&&(t=0),"string"!==typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function E(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var i=e[r];try{n.push(String(i))}catch(o){n.push("[value cannot be serialized]")}}return n.join(t)}function S(e,t){return!!g(e)&&(n=t,"[object RegExp]"===Object.prototype.toString.call(n)?t.test(e):"string"===typeof t&&-1!==e.indexOf(t));var n}function T(){return"[object process]"===Object.prototype.toString.call("undefined"!==typeof e?e:0)}var O={};function P(){return T()?n:"undefined"!==typeof window?window:"undefined"!==typeof self?self:O}function x(){var e=P(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function A(e){if(!e)return{};var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function N(e){if(e.message)return e.message;if(e.exception&&e.exception.values&&e.exception.values[0]){var t=e.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||e.event_id||"<unknown>"}return e.event_id||"<unknown>"}function R(e){var t=P();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log","assert"].forEach((function(e){e in t.console&&n[e].__sentry_original__&&(r[e]=n[e],n[e]=n[e].__sentry_original__)}));var i=e();return Object.keys(r).forEach((function(e){n[e]=r[e]})),i}function D(e,t,n){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].value=e.exception.values[0].value||t||"",e.exception.values[0].type=e.exception.values[0].type||n||"Error"}function k(e,t){void 0===t&&(t={});try{e.exception.values[0].mechanism=e.exception.values[0].mechanism||{},Object.keys(t).forEach((function(n){e.exception.values[0].mechanism[n]=t[n]}))}catch(n){}}function U(e){try{for(var t=e,n=[],r=0,i=0,o=" > ".length,a=void 0;t&&r++<5&&!("html"===(a=L(t))||r>1&&i+n.length*o+a.length>=80);)n.push(a),i+=a.length,t=t.parentNode;return n.reverse().join(" > ")}catch(s){return"<unknown>"}}function L(e){var t,n,r,i,o,a=e,s=[];if(!a||!a.tagName)return"";if(s.push(a.tagName.toLowerCase()),a.id&&s.push("#"+a.id),(t=a.className)&&g(t))for(n=t.split(/\s+/),o=0;o<n.length;o++)s.push("."+n[o]);var c=["type","name","title","alt"];for(o=0;o<c.length;o++)r=c[o],(i=a.getAttribute(r))&&s.push("["+r+'="'+i+'"]');return s.join("")}var M=Date.now(),j=0,F={now:function(){var e=Date.now()-M;return e<j&&(e=j),j=e,e},timeOrigin:M},B=function(){if(T())try{return("perf_hooks",r.require("perf_hooks")).performance}catch(e){return F}return P().performance&&void 0===performance.timeOrigin&&(performance.timeOrigin=performance.timing&&performance.timing.navigationStart||M),P().performance||F}();function z(){return(B.timeOrigin+B.now())/1e3}function H(e,t){if(!t)return 6e4;var n=parseInt(""+t,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(""+t);return isNaN(r)?6e4:r-e}function W(e){try{return e&&"function"===typeof e&&e.name||"<anonymous>"}catch(t){return"<anonymous>"}}var V=P(),Z="Sentry Logger ",q=function(){function e(){this._enabled=!1}return e.prototype.disable=function(){this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&R((function(){V.console.log(Z+"[Log]: "+e.join(" "))}))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&R((function(){V.console.warn(Z+"[Warn]: "+e.join(" "))}))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&R((function(){V.console.error(Z+"[Error]: "+e.join(" "))}))},e}();V.__SENTRY__=V.__SENTRY__||{};var K,G=V.__SENTRY__.logger||(V.__SENTRY__.logger=new q),Y=function(){function e(){this._hasWeakSet="function"===typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return e.prototype.memoize=function(e){if(this._hasWeakSet)return!!this._inner.has(e)||(this._inner.add(e),!1);for(var t=0;t<this._inner.length;t++)if(this._inner[t]===e)return!0;return this._inner.push(e),!1},e.prototype.unmemoize=function(e){if(this._hasWeakSet)this._inner.delete(e);else for(var t=0;t<this._inner.length;t++)if(this._inner[t]===e){this._inner.splice(t,1);break}},e}();function Q(e,t,n){if(t in e){var r=e[t],i=n(r);if("function"===typeof i)try{i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry_original__:{enumerable:!1,value:r}})}catch(o){}e[t]=i}}function X(e){if(f(e)){var t=e,n={message:t.message,name:t.name,stack:t.stack};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}if(b(e)){var i=e,o={};o.type=i.type;try{o.target=_(i.target)?U(i.target):Object.prototype.toString.call(i.target)}catch(a){o.target="<unknown>"}try{o.currentTarget=_(i.currentTarget)?U(i.currentTarget):Object.prototype.toString.call(i.currentTarget)}catch(a){o.currentTarget="<unknown>"}for(var r in"undefined"!==typeof CustomEvent&&I(e,CustomEvent)&&(o.detail=i.detail),i)Object.prototype.hasOwnProperty.call(i,r)&&(o[r]=i);return o}return e}function J(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r,i=ee(e,t);return r=i,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(r))>n?J(e,t-1,n):i}function $(e,t){return"domain"===t&&e&&"object"===typeof e&&e._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof n&&e===n?"[Global]":"undefined"!==typeof window&&e===window?"[Window]":"undefined"!==typeof document&&e===document?"[Document]":y(r=e)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r?"[SyntheticEvent]":"number"===typeof e&&e!==e?"[NaN]":void 0===e?"[undefined]":"function"===typeof e?"[Function: "+W(e)+"]":e;var r}function ee(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return function e(t,n,r,i){if(void 0===r&&(r=1/0),void 0===i&&(i=new Y),0===r)return function(e){var t=Object.prototype.toString.call(e);if("string"===typeof e)return e;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=$(e);return v(n)?n:t}(n);if(null!==n&&void 0!==n&&"function"===typeof n.toJSON)return n.toJSON();var o=$(n,t);if(v(o))return o;var a=X(n),s=Array.isArray(n)?[]:{};if(i.memoize(n))return"[Circular ~]";for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=e(c,a[c],r-1,i));return i.unmemoize(n),s}(e,n,t)})))}catch(n){return"**non-serializable**"}}function te(e,t){void 0===t&&(t=40);var n=Object.keys(X(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return w(n[0],t);for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:w(i,t)}return""}!function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(K||(K={}));var ne=function(){function e(e){var t=this;this._state=K.PENDING,this._handlers=[],this._resolve=function(e){t._setResult(K.RESOLVED,e)},this._reject=function(e){t._setResult(K.REJECTED,e)},this._setResult=function(e,n){t._state===K.PENDING&&(C(n)?n.then(t._resolve,t._reject):(t._state=e,t._value=n,t._executeHandlers()))},this._attachHandler=function(e){t._handlers=t._handlers.concat(e),t._executeHandlers()},this._executeHandlers=function(){if(t._state!==K.PENDING){var e=t._handlers.slice();t._handlers=[],e.forEach((function(e){e.done||(t._state===K.RESOLVED&&e.onfulfilled&&e.onfulfilled(t._value),t._state===K.REJECTED&&e.onrejected&&e.onrejected(t._value),e.done=!0)}))}};try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}return e.prototype.toString=function(){return"[object SyncPromise]"},e.resolve=function(t){return new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(n,r){if(Array.isArray(t))if(0!==t.length){var i=t.length,o=[];t.forEach((function(t,a){e.resolve(t).then((function(e){o[a]=e,0===(i-=1)&&n(o)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},e.prototype.then=function(t,n){var r=this;return new e((function(e,i){r._attachHandler({done:!1,onfulfilled:function(n){if(t)try{return void e(t(n))}catch(r){return void i(r)}else e(n)},onrejected:function(t){if(n)try{return void e(n(t))}catch(r){return void i(r)}else i(t)}})}))},e.prototype.catch=function(e){return this.then((function(e){return e}),e)},e.prototype.finally=function(t){var n=this;return new e((function(e,r){var i,o;return n.then((function(e){o=!1,i=e,t&&t()}),(function(e){o=!0,i=e,t&&t()})).then((function(){o?r(i):e(i)}))}))},e}(),re=function(){function e(e){this._limit=e,this._buffer=[]}return e.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},e.prototype.add=function(e){var t=this;return this.isReady()?(-1===this._buffer.indexOf(e)&&this._buffer.push(e),e.then((function(){return t.remove(e)})).then(null,(function(){return t.remove(e).then(null,(function(){}))})),e):ne.reject(new p("Not adding Promise due to buffer limit reached."))},e.prototype.remove=function(e){return this._buffer.splice(this._buffer.indexOf(e),1)[0]},e.prototype.length=function(){return this._buffer.length},e.prototype.drain=function(e){var t=this;return new ne((function(n){var r=setTimeout((function(){e&&e>0&&n(!1)}),e);ne.all(t._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},e}();function ie(){if(!("fetch"in P()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function oe(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ae(){if(!ie())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}}var se,ce=P(),ue={},le={};function de(e){e&&"string"===typeof e.type&&"function"===typeof e.callback&&(ue[e.type]=ue[e.type]||[],ue[e.type].push(e.callback),function(e){if(!le[e])switch(le[e]=!0,e){case"console":"console"in ce&&["debug","info","warn","error","log","assert"].forEach((function(e){e in ce.console&&Q(ce.console,e,(function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];pe("console",{args:n,level:e}),t&&Function.prototype.apply.call(t,ce.console,n)}}))}));break;case"dom":"document"in ce&&(ce.document.addEventListener("click",ye("click",pe.bind(null,"dom")),!1),ce.document.addEventListener("keypress",be(pe.bind(null,"dom")),!1),["EventTarget","Node"].forEach((function(e){var t=ce[e]&&ce[e].prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&(Q(t,"addEventListener",(function(e){return function(t,n,r){return n&&n.handleEvent?("click"===t&&Q(n,"handleEvent",(function(e){return function(t){return ye("click",pe.bind(null,"dom"))(t),e.call(this,t)}})),"keypress"===t&&Q(n,"handleEvent",(function(e){return function(t){return be(pe.bind(null,"dom"))(t),e.call(this,t)}}))):("click"===t&&ye("click",pe.bind(null,"dom"),!0)(this),"keypress"===t&&be(pe.bind(null,"dom"))(this)),e.call(this,t,n,r)}})),Q(t,"removeEventListener",(function(e){return function(t,n,r){var i=n;try{i=i&&(i.__sentry_wrapped__||i)}catch(o){}return e.call(this,t,i,r)}})))})));break;case"xhr":!function(){if("XMLHttpRequest"in ce){var e=XMLHttpRequest.prototype;Q(e,"open",(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[1];return this.__sentry_xhr__={method:g(t[0])?t[0].toUpperCase():t[0],url:t[1]},g(r)&&"POST"===this.__sentry_xhr__.method&&r.match(/sentry_key/)&&(this.__sentry_own_request__=!0),e.apply(this,t)}})),Q(e,"send",(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this,i={args:t,startTimestamp:Date.now(),xhr:r};return pe("xhr",c({},i)),r.addEventListener("readystatechange",(function(){if(4===r.readyState){try{r.__sentry_xhr__&&(r.__sentry_xhr__.status_code=r.status)}catch(e){}pe("xhr",c({},i,{endTimestamp:Date.now()}))}})),e.apply(this,t)}}))}}();break;case"fetch":(function(){if(!ie())return!1;var e=P();if(oe(e.fetch))return!0;var t=!1,n=e.document;if(n&&"function"===typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=oe(r.contentWindow.fetch)),n.head.removeChild(r)}catch(i){G.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t})()&&Q(ce,"fetch",(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r={args:t,fetchData:{method:fe(t),url:he(t)},startTimestamp:Date.now()};return pe("fetch",c({},r)),e.apply(ce,t).then((function(e){return pe("fetch",c({},r,{endTimestamp:Date.now(),response:e})),e}),(function(e){throw pe("fetch",c({},r,{endTimestamp:Date.now(),error:e})),e}))}}));break;case"history":!function(){if(function(){var e=P(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}()){var e=ce.onpopstate;ce.onpopstate=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=ce.location.href,i=se;if(se=r,pe("history",{from:i,to:r}),e)return e.apply(this,t)},Q(ce.history,"pushState",t),Q(ce.history,"replaceState",t)}function t(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length>2?t[2]:void 0;if(r){var i=se,o=String(r);se=o,pe("history",{from:i,to:o})}return e.apply(this,t)}}}();break;case"error":_e=ce.onerror,ce.onerror=function(e,t,n,r,i){return pe("error",{column:r,error:i,line:n,msg:e,url:t}),!!_e&&_e.apply(this,arguments)};break;case"unhandledrejection":Ce=ce.onunhandledrejection,ce.onunhandledrejection=function(e){return pe("unhandledrejection",e),!Ce||Ce.apply(this,arguments)};break;default:G.warn("unknown instrumentation type:",e)}}(e.type))}function pe(e,t){var n,r;if(e&&ue[e])try{for(var i=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(ue[e]||[]),o=i.next();!o.done;o=i.next()){var a=o.value;try{a(t)}catch(s){G.error("Error while triggering instrumentation handler.\nType: "+e+"\nName: "+W(a)+"\nError: "+s)}}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function fe(e){return void 0===e&&(e=[]),"Request"in ce&&I(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function he(e){return void 0===e&&(e=[]),"string"===typeof e[0]?e[0]:"Request"in ce&&I(e[0],Request)?e[0].url:String(e[0])}var me,ge,ve=0;function ye(e,t,n){return void 0===n&&(n=!1),function(r){me=void 0,r&&ge!==r&&(ge=r,ve&&clearTimeout(ve),n?ve=setTimeout((function(){t({event:r,name:e})})):t({event:r,name:e}))}}function be(e){return function(t){var n;try{n=t.target}catch(i){return}var r=n&&n.tagName;r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)&&(me||ye("input",e)(t),clearTimeout(me),me=setTimeout((function(){me=void 0}),1e3))}}var _e=null,Ce=null,Ie=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,we=function(){function e(e){"string"===typeof e?this._fromString(e):this._fromComponents(e),this._validate()}return e.prototype.toString=function(e){void 0===e&&(e=!1);var t=this,n=t.host,r=t.path,i=t.pass,o=t.port,a=t.projectId;return t.protocol+"://"+t.user+(e&&i?":"+i:"")+"@"+n+(o?":"+o:"")+"/"+(r?r+"/":r)+a},e.prototype._fromString=function(e){var t=Ie.exec(e);if(!t)throw new p("Invalid Dsn");var n=u(t.slice(1),6),r=n[0],i=n[1],o=n[2],a=void 0===o?"":o,s=n[3],c=n[4],l=void 0===c?"":c,d="",f=n[5],h=f.split("/");h.length>1&&(d=h.slice(0,-1).join("/"),f=h.pop()),this._fromComponents({host:s,pass:a,path:d,projectId:f,port:l,protocol:r,user:i})},e.prototype._fromComponents=function(e){this.protocol=e.protocol,this.user=e.user,this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},e.prototype._validate=function(){var e=this;if(["protocol","user","host","projectId"].forEach((function(t){if(!e[t])throw new p("Invalid Dsn")})),"http"!==this.protocol&&"https"!==this.protocol)throw new p("Invalid Dsn");if(this.port&&isNaN(parseInt(this.port,10)))throw new p("Invalid Dsn")},e}(),Ee=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._context={}}return e.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},e.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout((function(){e._scopeListeners.forEach((function(t){t(e)})),e._notifyingListeners=!1})))},e.prototype._notifyEventProcessors=function(e,t,n,r){var i=this;return void 0===r&&(r=0),new ne((function(o,a){var s=e[r];if(null===t||"function"!==typeof s)o(t);else{var u=s(c({},t),n);C(u)?u.then((function(t){return i._notifyEventProcessors(e,t,n,r+1).then(o)})).then(null,a):i._notifyEventProcessors(e,u,n,r+1).then(o).then(null,a)}}))},e.prototype.setUser=function(e){return this._user=e||{},this._notifyScopeListeners(),this},e.prototype.setTags=function(e){return this._tags=c({},this._tags,e),this._notifyScopeListeners(),this},e.prototype.setTag=function(e,t){var n;return this._tags=c({},this._tags,((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(e){return this._extra=c({},this._extra,e),this._notifyScopeListeners(),this},e.prototype.setExtra=function(e,t){var n;return this._extra=c({},this._extra,((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},e.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(e){return this._transaction=e,this._span&&(this._span.transaction=e),this._notifyScopeListeners(),this},e.prototype.setContext=function(e,t){var n;return this._context=c({},this._context,((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.clone=function(t){var n=new e;return t&&(n._breadcrumbs=l(t._breadcrumbs),n._tags=c({},t._tags),n._extra=c({},t._extra),n._context=c({},t._context),n._user=t._user,n._level=t._level,n._span=t._span,n._transaction=t._transaction,n._fingerprint=t._fingerprint,n._eventProcessors=l(t._eventProcessors)),n},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._context={},this._level=void 0,this._transaction=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(e,t){var n=c({timestamp:z()},e);return this._breadcrumbs=void 0!==t&&t>=0?l(this._breadcrumbs,[n]).slice(-t):l(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e.prototype.applyToEvent=function(e,t){return this._extra&&Object.keys(this._extra).length&&(e.extra=c({},this._extra,e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=c({},this._tags,e.tags)),this._user&&Object.keys(this._user).length&&(e.user=c({},this._user,e.user)),this._context&&Object.keys(this._context).length&&(e.contexts=c({},this._context,e.contexts)),this._level&&(e.level=this._level),this._transaction&&(e.transaction=this._transaction),this._span&&(e.contexts=c({trace:this._span.getTraceContext()},e.contexts)),this._applyFingerprint(e),e.breadcrumbs=l(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(l(Se(),this._eventProcessors),e,t)},e}();function Se(){var e=P();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function Te(e){Se().push(e)}var Oe=function(){function e(e,t,n){void 0===t&&(t=new Ee),void 0===n&&(n=3),this._version=n,this._stack=[],this._stack.push({client:e,scope:t})}return e.prototype._invokeClient=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.getStackTop();i&&i.client&&i.client[e]&&(t=i.client)[e].apply(t,l(n,[i.scope]))},e.prototype.isOlderThan=function(e){return this._version<e},e.prototype.bindClient=function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()},e.prototype.pushScope=function(){var e=this.getStack(),t=e.length>0?e[e.length-1].scope:void 0,n=Ee.clone(t);return this.getStack().push({client:this.getClient(),scope:n}),n},e.prototype.popScope=function(){return void 0!==this.getStack().pop()},e.prototype.withScope=function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(e,t){var n=this._lastEventId=x(),r=t;if(!t){var i=void 0;try{throw new Error("Sentry syntheticException")}catch(e){i=e}r={originalException:e,syntheticException:i}}return this._invokeClient("captureException",e,c({},r,{event_id:n})),n},e.prototype.captureMessage=function(e,t,n){var r=this._lastEventId=x(),i=n;if(!n){var o=void 0;try{throw new Error(e)}catch(a){o=a}i={originalException:e,syntheticException:o}}return this._invokeClient("captureMessage",e,t,c({},i,{event_id:r})),r},e.prototype.captureEvent=function(e,t){var n=this._lastEventId=x();return this._invokeClient("captureEvent",e,c({},t,{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(e,t){var n=this.getStackTop();if(n.scope&&n.client){var r=n.client.getOptions&&n.client.getOptions()||{},i=r.beforeBreadcrumb,o=void 0===i?null:i,a=r.maxBreadcrumbs,s=void 0===a?100:a;if(!(s<=0)){var u=z(),l=c({timestamp:u},e),d=o?R((function(){return o(l,t)})):l;null!==d&&n.scope.addBreadcrumb(d,Math.min(s,100))}}},e.prototype.setUser=function(e){var t=this.getStackTop();t.scope&&t.scope.setUser(e)},e.prototype.setTags=function(e){var t=this.getStackTop();t.scope&&t.scope.setTags(e)},e.prototype.setExtras=function(e){var t=this.getStackTop();t.scope&&t.scope.setExtras(e)},e.prototype.setTag=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setTag(e,t)},e.prototype.setExtra=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setExtra(e,t)},e.prototype.setContext=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setContext(e,t)},e.prototype.configureScope=function(e){var t=this.getStackTop();t.scope&&t.client&&e(t.scope)},e.prototype.run=function(e){var t=xe(this);try{e(this)}finally{xe(t)}},e.prototype.getIntegration=function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return G.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},e.prototype.startSpan=function(e,t){return void 0===t&&(t=!1),this._callExtensionMethod("startSpan",e,t)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype._callExtensionMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Pe(),i=r.__SENTRY__;if(i&&i.extensions&&"function"===typeof i.extensions[e])return i.extensions[e].apply(this,t);G.warn("Extension method "+e+" couldn't be found, doing nothing.")},e}();function Pe(){var e=P();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function xe(e){var t=Pe(),n=Re(t);return De(t,e),n}function Ae(){var e=Pe();return Ne(e)&&!Re(e).isOlderThan(3)||De(e,new Oe),T()?function(e){try{var t=Pe().__SENTRY__;if(!t||!t.extensions||!t.extensions.domain)return Re(e);var n=t.extensions.domain.active;if(!n)return Re(e);if(!Ne(n)||Re(n).isOlderThan(3)){var r=Re(e).getStackTop();De(n,new Oe(r.client,Ee.clone(r.scope)))}return Re(n)}catch(i){return Re(e)}}(e):Re(e)}function Ne(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Re(e){return e&&e.__SENTRY__&&e.__SENTRY__.hub||(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=new Oe),e.__SENTRY__.hub}function De(e,t){return!!e&&(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=t,!0)}function ke(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Ae();if(r&&r[e])return r[e].apply(r,l(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}function Ue(e){var t;try{throw new Error("Sentry syntheticException")}catch(e){t=e}return ke("captureException",e,{originalException:e,syntheticException:t})}function Le(e){ke("withScope",e)}var Me=function(){function e(e){this.dsn=e,this._dsnObject=new we(e)}return e.prototype.getDsn=function(){return this._dsnObject},e.prototype.getStoreEndpoint=function(){return""+this._getBaseUrl()+this.getStoreEndpointPath()},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var e,t={sentry_key:this._dsnObject.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+(e=t,Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&"))},e.prototype._getBaseUrl=function(){var e=this._dsnObject,t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n},e.prototype.getStoreEndpointPath=function(){var e=this._dsnObject;return(e.path?"/"+e.path:"")+"/api/"+e.projectId+"/store/"},e.prototype.getRequestHeaders=function(e,t){var n=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+e+"/"+t),r.push("sentry_key="+n.user),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},e.prototype.getReportDialogEndpoint=function(e){void 0===e&&(e={});var t=this._dsnObject,n=this._getBaseUrl()+(t.path?"/"+t.path:"")+"/api/embed/error-page/",r=[];for(var i in r.push("dsn="+t.toString()),e)if("user"===i){if(!e.user)continue;e.user.name&&r.push("name="+encodeURIComponent(e.user.name)),e.user.email&&r.push("email="+encodeURIComponent(e.user.email))}else r.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return r.length?n+"?"+r.join("&"):n},e}(),je=[];var Fe,Be=function(){function e(e,t){this._integrations={},this._processing=!1,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=new we(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this,i=t&&t.event_id;return this._processing=!0,this._getBackend().eventFromException(e,t).then((function(e){return r._processEvent(e,t,n)})).then((function(e){i=e&&e.event_id,r._processing=!1})).then(null,(function(e){G.error(e),r._processing=!1})),i},e.prototype.captureMessage=function(e,t,n,r){var i=this,o=n&&n.event_id;return this._processing=!0,(v(e)?this._getBackend().eventFromMessage(""+e,t,n):this._getBackend().eventFromException(e,n)).then((function(e){return i._processEvent(e,n,r)})).then((function(e){o=e&&e.event_id,i._processing=!1})).then(null,(function(e){G.error(e),i._processing=!1})),o},e.prototype.captureEvent=function(e,t,n){var r=this,i=t&&t.event_id;return this._processing=!0,this._processEvent(e,t,n).then((function(e){i=e&&e.event_id,r._processing=!1})).then(null,(function(e){G.error(e),r._processing=!1})),i},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.flush=function(e){var t=this;return this._isClientProcessing(e).then((function(n){return clearInterval(n.interval),t._getBackend().getTransport().close(e).then((function(e){return n.ready&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=function(e){var t={};return function(e){var t=e.defaultIntegrations&&l(e.defaultIntegrations)||[],n=e.integrations,r=[];if(Array.isArray(n)){var i=n.map((function(e){return e.name})),o=[];t.forEach((function(e){-1===i.indexOf(e.name)&&-1===o.indexOf(e.name)&&(r.push(e),o.push(e.name))})),n.forEach((function(e){-1===o.indexOf(e.name)&&(r.push(e),o.push(e.name))}))}else"function"===typeof n?(r=n(t),r=Array.isArray(r)?r:[r]):r=l(t);var a=r.map((function(e){return e.name}));return-1!==a.indexOf("Debug")&&r.push.apply(r,l(r.splice(a.indexOf("Debug"),1))),r}(e).forEach((function(e){t[e.name]=e,function(e){-1===je.indexOf(e.name)&&(e.setupOnce(Te,Ae),je.push(e.name),G.log("Integration installed: "+e.name))}(e)})),t}(this._options))},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return G.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._isClientProcessing=function(e){var t=this;return new ne((function(n){var r=0,i=0;clearInterval(i),i=setInterval((function(){t._processing?(r+=1,e&&r>=e&&n({interval:i,ready:!1})):n({interval:i,ready:!0})}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this,i=this.getOptions(),o=i.environment,a=i.release,s=i.dist,u=i.maxValueLength,l=void 0===u?250:u,d=i.normalizeDepth,p=void 0===d?3:d,f=c({},e);void 0===f.environment&&void 0!==o&&(f.environment=o),void 0===f.release&&void 0!==a&&(f.release=a),void 0===f.dist&&void 0!==s&&(f.dist=s),f.message&&(f.message=w(f.message,l));var h=f.exception&&f.exception.values&&f.exception.values[0];h&&h.value&&(h.value=w(h.value,l));var m=f.request;m&&m.url&&(m.url=w(m.url,l)),void 0===f.event_id&&(f.event_id=n&&n.event_id?n.event_id:x()),this._addIntegrations(f.sdk);var g=ne.resolve(f);return t&&(g=t.applyToEvent(f,n)),g.then((function(e){return"number"===typeof p&&p>0?r._normalizeEvent(e,p):e}))},e.prototype._normalizeEvent=function(e,t){return e?c({},e,e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return c({},e,e.data&&{data:ee(e.data,t)})}))},e.user&&{user:ee(e.user,t)},e.contexts&&{contexts:ee(e.contexts,t)},e.extra&&{extra:ee(e.extra,t)}):null},e.prototype._addIntegrations=function(e){var t=Object.keys(this._integrations);e&&t.length>0&&(e.integrations=t)},e.prototype._processEvent=function(e,t,n){var r=this,i=this.getOptions(),o=i.beforeSend,a=i.sampleRate;return this._isEnabled()?"number"===typeof a&&Math.random()>a?ne.reject("This event has been sampled, will not send event."):new ne((function(i,a){r._prepareEvent(e,n,t).then((function(e){if(null!==e){var n=e;if(t&&t.data&&!0===t.data.__sentry__||!o)return r._getBackend().sendEvent(n),void i(n);var s=o(e,t);if("undefined"===typeof s)G.error("`beforeSend` method has to return `null` or a valid event.");else if(C(s))r._handleAsyncBeforeSend(s,i,a);else{if(null===(n=s))return G.log("`beforeSend` returned `null`, will not send event."),void i(null);r._getBackend().sendEvent(n),i(n)}}else a("An event processor returned null, will not send event.")})).then(null,(function(e){r.captureException(e,{data:{__sentry__:!0},originalException:e}),a("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))})):ne.reject("SDK not enabled, will not send event.")},e.prototype._handleAsyncBeforeSend=function(e,t,n){var r=this;e.then((function(e){null!==e?(r._getBackend().sendEvent(e),t(e)):n("`beforeSend` returned `null`, will not send event.")})).then(null,(function(e){n("beforeSend rejected with "+e)}))},e}(),ze=function(){function e(){}return e.prototype.sendEvent=function(e){return ne.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:s.Skipped})},e.prototype.close=function(e){return ne.resolve(!0)},e}(),He=function(){function e(e){this._options=e,this._options.dsn||G.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype._setupTransport=function(){return new ze},e.prototype.eventFromException=function(e,t){throw new p("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new p("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){G.error("Error while sending event: "+e)}))},e.prototype.getTransport=function(){return this._transport},e}(),We=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){Fe=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.__sentry_original__||this;return Fe.apply(n,e)}},e.id="FunctionToString",e}(),Ve=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Ze=function(){function e(t){void 0===t&&(t={}),this._options=t,this.name=e.id}return e.prototype.setupOnce=function(){Te((function(t){var n=Ae();if(!n)return t;var r=n.getIntegration(e);if(r){var i=n.getClient(),o=i?i.getOptions():{},a=r._mergeOptions(o);if(r._shouldDropEvent(t,a))return null}return t}))},e.prototype._shouldDropEvent=function(e,t){return this._isSentryError(e,t)?(G.warn("Event dropped due to being internal Sentry Error.\nEvent: "+N(e)),!0):this._isIgnoredError(e,t)?(G.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+N(e)),!0):this._isBlacklistedUrl(e,t)?(G.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: "+N(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0):!this._isWhitelistedUrl(e,t)&&(G.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: "+N(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0)},e.prototype._isSentryError=function(e,t){if(void 0===t&&(t={}),!t.ignoreInternal)return!1;try{return e&&e.exception&&e.exception.values&&e.exception.values[0]&&"SentryError"===e.exception.values[0].type||!1}catch(n){return!1}},e.prototype._isIgnoredError=function(e,t){return void 0===t&&(t={}),!(!t.ignoreErrors||!t.ignoreErrors.length)&&this._getPossibleEventMessages(e).some((function(e){return t.ignoreErrors.some((function(t){return S(e,t)}))}))},e.prototype._isBlacklistedUrl=function(e,t){if(void 0===t&&(t={}),!t.blacklistUrls||!t.blacklistUrls.length)return!1;var n=this._getEventFilterUrl(e);return!!n&&t.blacklistUrls.some((function(e){return S(n,e)}))},e.prototype._isWhitelistedUrl=function(e,t){if(void 0===t&&(t={}),!t.whitelistUrls||!t.whitelistUrls.length)return!0;var n=this._getEventFilterUrl(e);return!n||t.whitelistUrls.some((function(e){return S(n,e)}))},e.prototype._mergeOptions=function(e){return void 0===e&&(e={}),{blacklistUrls:l(this._options.blacklistUrls||[],e.blacklistUrls||[]),ignoreErrors:l(this._options.ignoreErrors||[],e.ignoreErrors||[],Ve),ignoreInternal:"undefined"===typeof this._options.ignoreInternal||this._options.ignoreInternal,whitelistUrls:l(this._options.whitelistUrls||[],e.whitelistUrls||[])}},e.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,i=t.value,o=void 0===i?"":i;return[""+o,r+": "+o]}catch(a){return G.error("Cannot extract message for event "+N(e)),[]}return[]},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var t=e.stacktrace.frames;return t&&t[t.length-1].filename||null}if(e.exception){var n=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return n&&n[n.length-1].filename||null}return null}catch(r){return G.error("Cannot extract url for event "+N(e)),null}},e.id="InboundFilters",e}(),qe=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ke=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,Ge=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Ye=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Qe=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Xe(e){var t=null,n=e&&e.framesToPop;try{if(t=function(e){if(!e||!e.stacktrace)return null;for(var t,n=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=e.stacktrace.split("\n"),o=[],a=0;a<i.length;a+=2){var s=null;(t=n.exec(i[a]))?s={url:t[2],func:t[3],args:[],line:+t[1],column:null}:(t=r.exec(i[a]))&&(s={url:t[6],func:t[3]||t[4],args:t[5]?t[5].split(","):[],line:+t[1],column:+t[2]}),s&&(!s.func&&s.line&&(s.func="?"),o.push(s))}return o.length?{message:$e(e),name:e.name,stack:o}:null}(e))return Je(t,n)}catch(r){}try{if(t=function(e){if(!e||!e.stack)return null;for(var t,n,r,i=[],o=e.stack.split("\n"),a=0;a<o.length;++a){if(n=qe.exec(o[a])){var s=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(t=Qe.exec(n[2]))&&(n[2]=t[1],n[3]=t[2],n[4]=t[3]),r={url:n[2]&&0===n[2].indexOf("address at ")?n[2].substr("address at ".length):n[2],func:n[1]||"?",args:s?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=Ge.exec(o[a]))r={url:n[2],func:n[1]||"?",args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=Ke.exec(o[a])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(t=Ye.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]=""):0!==a||n[5]||void 0===e.columnNumber||(i[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func="?"),i.push(r)}return i.length?{message:$e(e),name:e.name,stack:i}:null}(e))return Je(t,n)}catch(r){}return{message:$e(e),name:e&&e.name,stack:[],failed:!0}}function Je(e,t){try{return c({},e,{stack:e.stack.slice(t)})}catch(n){return e}}function $e(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function et(e){var t=nt(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function tt(e){return{exception:{values:[et(e)]}}}function nt(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.map((function(e){return{colno:null===e.column?void 0:e.column,filename:e.url||t[0].url,function:e.func||"?",in_app:!0,lineno:null===e.line?void 0:e.line}})).slice(0,50).reverse()}function rt(e,t,n){var r,i;if(void 0===n&&(n={}),h(e)&&e.error)return tt(Xe(e=e.error));if(m(e)||(i=e,"[object DOMException]"===Object.prototype.toString.call(i))){var o=e,a=o.name||(m(o)?"DOMError":"DOMException"),s=o.message?a+": "+o.message:a;return D(r=it(s,t,n),s),r}return f(e)?r=tt(Xe(e)):y(e)||b(e)?(k(r=function(e,t,n){var r={exception:{values:[{type:b(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+te(e)}]},extra:{__serialized__:J(e)}};if(t){var i=nt(Xe(t).stack);r.stacktrace={frames:i}}return r}(e,t,n.rejection),{synthetic:!0}),r):(D(r=it(e,t,n),""+e,void 0),k(r,{synthetic:!0}),r)}function it(e,t,n){void 0===n&&(n={});var r={message:e};if(n.attachStacktrace&&t){var i=nt(Xe(t).stack);r.stacktrace={frames:i}}return r}var ot=function(){function e(e){this.options=e,this._buffer=new re(30),this.url=new Me(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return e.prototype.sendEvent=function(e){throw new p("Transport Class has to implement `sendEvent` method")},e.prototype.close=function(e){return this._buffer.drain(e)},e}(),at=P(),st=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return o(t,e),t.prototype.sendEvent=function(e){var t=this;if(new Date(Date.now())<this._disabledUntil)return Promise.reject({event:e,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429});var n={body:JSON.stringify(e),method:"POST",referrerPolicy:ae()?"origin":""};return void 0!==this.options.headers&&(n.headers=this.options.headers),this._buffer.add(new ne((function(e,r){at.fetch(t.url,n).then((function(n){var i=s.fromHttpCode(n.status);if(i!==s.Success){if(i===s.RateLimit){var o=Date.now();t._disabledUntil=new Date(o+H(o,n.headers.get("Retry-After"))),G.warn("Too many requests, backing off till: "+t._disabledUntil)}r(n)}else e({status:i})})).catch(r)})))},t}(ot),ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return o(t,e),t.prototype.sendEvent=function(e){var t=this;return new Date(Date.now())<this._disabledUntil?Promise.reject({event:e,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429}):this._buffer.add(new ne((function(n,r){var i=new XMLHttpRequest;for(var o in i.onreadystatechange=function(){if(4===i.readyState){var e=s.fromHttpCode(i.status);if(e!==s.Success){if(e===s.RateLimit){var o=Date.now();t._disabledUntil=new Date(o+H(o,i.getResponseHeader("Retry-After"))),G.warn("Too many requests, backing off till: "+t._disabledUntil)}r(i)}else n({status:e})}},i.open("POST",t.url),t.options.headers)t.options.headers.hasOwnProperty(o)&&i.setRequestHeader(o,t.options.headers[o]);i.send(JSON.stringify(e))})))},t}(ot),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var t=c({},this._options.transportOptions,{dsn:this._options.dsn});return this._options.transport?new this._options.transport(t):ie()?new st(t):new ct(t)},t.prototype.eventFromException=function(e,t){var n=rt(e,t&&t.syntheticException||void 0,{attachStacktrace:this._options.attachStacktrace});return k(n,{handled:!0,type:"generic"}),n.level=a.Error,t&&t.event_id&&(n.event_id=t.event_id),ne.resolve(n)},t.prototype.eventFromMessage=function(e,t,n){void 0===t&&(t=a.Info);var r=it(e,n&&n.syntheticException||void 0,{attachStacktrace:this._options.attachStacktrace});return r.level=t,n&&n.event_id&&(r.event_id=n.event_id),ne.resolve(r)},t}(He),lt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ut,t)||this}return o(t,e),t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",t.sdk=c({},t.sdk,{name:"sentry.javascript.browser",packages:l(t.sdk&&t.sdk.packages||[],[{name:"npm:@sentry/browser",version:"5.15.5"}]),version:"5.15.5"}),e.prototype._prepareEvent.call(this,t,n,r)},t.prototype.showReportDialog=function(e){void 0===e&&(e={});var t=P().document;if(t)if(this._isEnabled()){var n=e.dsn||this.getDsn();if(e.eventId)if(n){var r=t.createElement("script");r.async=!0,r.src=new Me(n).getReportDialogEndpoint(e),e.onLoad&&(r.onload=e.onLoad),(t.head||t.body).appendChild(r)}else G.error("Missing `Dsn` option in showReportDialog call");else G.error("Missing `eventId` option in showReportDialog call")}else G.error("Trying to call showReportDialog with Sentry Client is disabled")},t}(Be),dt=0;function pt(){return dt>0}function ft(){dt+=1,setTimeout((function(){dt-=1}))}function ht(e,t,n){if(void 0===t&&(t={}),"function"!==typeof e)return e;try{if(e.__sentry__)return e;if(e.__sentry_wrapped__)return e.__sentry_wrapped__}catch(o){return e}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var i=r.map((function(e){return ht(e,t)}));return e.handleEvent?e.handleEvent.apply(this,i):e.apply(this,i)}catch(o){throw ft(),Le((function(e){e.addEventProcessor((function(e){var n=c({},e);return t.mechanism&&(D(n,void 0,void 0),k(n,t.mechanism)),n.extra=c({},n.extra,{arguments:r}),n})),Ue(o)})),o}};try{for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch(a){}e.prototype=e.prototype||{},r.prototype=e.prototype,Object.defineProperty(e,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:e}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return e.name}})}catch(a){}return r}var mt=function(){function e(t){this.name=e.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=c({onerror:!0,onunhandledrejection:!0},t)}return e.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(G.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(G.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},e.prototype._installGlobalOnErrorHandler=function(){var t=this;this._onErrorHandlerInstalled||(de({callback:function(n){var r=n.error,i=Ae(),o=i.getIntegration(e),a=r&&!0===r.__sentry_own_request__;if(o&&!pt()&&!a){var s=i.getClient(),c=v(r)?t._eventFromIncompleteOnError(n.msg,n.url,n.line,n.column):t._enhanceEventWithInitialFrame(rt(r,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),n.url,n.line,n.column);k(c,{handled:!1,type:"onerror"}),i.captureEvent(c,{originalException:r})}},type:"error"}),this._onErrorHandlerInstalled=!0)},e.prototype._installGlobalOnUnhandledRejectionHandler=function(){var t=this;this._onUnhandledRejectionHandlerInstalled||(de({callback:function(n){var r=n;try{"reason"in n?r=n.reason:"detail"in n&&"reason"in n.detail&&(r=n.detail.reason)}catch(l){}var i=Ae(),o=i.getIntegration(e),s=r&&!0===r.__sentry_own_request__;if(!o||pt()||s)return!0;var c=i.getClient(),u=v(r)?t._eventFromIncompleteRejection(r):rt(r,void 0,{attachStacktrace:c&&c.getOptions().attachStacktrace,rejection:!0});u.level=a.Error,k(u,{handled:!1,type:"onunhandledrejection"}),i.captureEvent(u,{originalException:r})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},e.prototype._eventFromIncompleteOnError=function(e,t,n,r){var i,o=h(e)?e.message:e;if(g(o)){var a=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);a&&(i=a[1],o=a[2])}var s={exception:{values:[{type:i||"Error",value:o}]}};return this._enhanceEventWithInitialFrame(s,t,n,r)},e.prototype._eventFromIncompleteRejection=function(e){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+e}]}}},e.prototype._enhanceEventWithInitialFrame=function(e,t,n,r){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].stacktrace=e.exception.values[0].stacktrace||{},e.exception.values[0].stacktrace.frames=e.exception.values[0].stacktrace.frames||[];var i=isNaN(parseInt(r,10))?void 0:r,o=isNaN(parseInt(n,10))?void 0:n,a=g(t)&&t.length>0?t:function(){try{return document.location.href}catch(e){return""}}();return 0===e.exception.values[0].stacktrace.frames.length&&e.exception.values[0].stacktrace.frames.push({colno:i,filename:a,function:"?",in_app:!0,lineno:o}),e},e.id="GlobalHandlers",e}(),gt=function(){function e(){this._ignoreOnError=0,this.name=e.id}return e.prototype._wrapTimeFunction=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0];return t[0]=ht(r,{mechanism:{data:{function:W(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}},e.prototype._wrapRAF=function(e){return function(t){return e(ht(t,{mechanism:{data:{function:"requestAnimationFrame",handler:W(e)},handled:!0,type:"instrument"}}))}},e.prototype._wrapEventTarget=function(e){var t=P(),n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Q(n,"addEventListener",(function(t){return function(n,r,i){try{"function"===typeof r.handleEvent&&(r.handleEvent=ht(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:W(r),target:e},handled:!0,type:"instrument"}}))}catch(o){}return t.call(this,n,ht(r,{mechanism:{data:{function:"addEventListener",handler:W(r),target:e},handled:!0,type:"instrument"}}),i)}})),Q(n,"removeEventListener",(function(e){return function(t,n,r){var i=n;try{i=i&&(i.__sentry_wrapped__||i)}catch(o){}return e.call(this,t,i,r)}})))},e.prototype._wrapXHR=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this,i=["onload","onerror","onprogress","onreadystatechange"];return i.forEach((function(e){e in r&&"function"===typeof r[e]&&Q(r,e,(function(t){var n={mechanism:{data:{function:e,handler:W(t)},handled:!0,type:"instrument"}};return t.__sentry_original__&&(n.mechanism.data.handler=W(t.__sentry_original__)),ht(t,n)}))})),e.apply(this,t)}},e.prototype.setupOnce=function(){this._ignoreOnError=this._ignoreOnError;var e=P();Q(e,"setTimeout",this._wrapTimeFunction.bind(this)),Q(e,"setInterval",this._wrapTimeFunction.bind(this)),Q(e,"requestAnimationFrame",this._wrapRAF.bind(this)),"XMLHttpRequest"in e&&Q(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"].forEach(this._wrapEventTarget.bind(this))},e.id="TryCatch",e}(),vt=function(){function e(t){this.name=e.id,this._options=c({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return e.prototype._consoleBreadcrumb=function(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:a.fromString(e.level),message:E(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: "+(E(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}Ae().addBreadcrumb(t,{input:e.args,level:e.level})},e.prototype._domBreadcrumb=function(e){var t;try{t=e.event.target?U(e.event.target):U(e.event)}catch(n){t="<unknown>"}0!==t.length&&Ae().addBreadcrumb({category:"ui."+e.name,message:t},{event:e.event,name:e.name})},e.prototype._xhrBreadcrumb=function(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;Ae().addBreadcrumb({category:"xhr",data:e.xhr.__sentry_xhr__,type:"http"},{xhr:e.xhr})}else this._options.sentry&&e.xhr.__sentry_own_request__&&yt(e.args[0])},e.prototype._fetchBreadcrumb=function(e){if(e.endTimestamp){var t=Ae().getClient(),n=t&&t.getDsn();if(this._options.sentry&&n){var r=new Me(n).getStoreEndpoint();if(r&&-1!==e.fetchData.url.indexOf(r)&&"POST"===e.fetchData.method&&e.args[1]&&e.args[1].body)return void yt(e.args[1].body)}e.error?Ae().addBreadcrumb({category:"fetch",data:c({},e.fetchData,{status_code:e.response.status}),level:a.Error,type:"http"},{data:e.error,input:e.args}):Ae().addBreadcrumb({category:"fetch",data:c({},e.fetchData,{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})}},e.prototype._historyBreadcrumb=function(e){var t=P(),n=e.from,r=e.to,i=A(t.location.href),o=A(n),a=A(r);o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Ae().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},e.prototype.setupOnce=function(){var e=this;this._options.console&&de({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._consoleBreadcrumb.apply(e,l(t))},type:"console"}),this._options.dom&&de({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._domBreadcrumb.apply(e,l(t))},type:"dom"}),this._options.xhr&&de({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._xhrBreadcrumb.apply(e,l(t))},type:"xhr"}),this._options.fetch&&de({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._fetchBreadcrumb.apply(e,l(t))},type:"fetch"}),this._options.history&&de({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._historyBreadcrumb.apply(e,l(t))},type:"history"})},e.id="Breadcrumbs",e}();function yt(e){try{var t=JSON.parse(e);Ae().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level||a.fromString("error"),message:N(t)},{event:t})}catch(n){G.error("Error while adding sentry type breadcrumb")}}var bt=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this._key=t.key||"cause",this._limit=t.limit||5}return e.prototype.setupOnce=function(){Te((function(t,n){var r=Ae().getIntegration(e);return r?r._handler(t,n):t}))},e.prototype._handler=function(e,t){if(!e.exception||!e.exception.values||!t||!I(t.originalException,Error))return e;var n=this._walkErrorTree(t.originalException,this._key);return e.exception.values=l(n,e.exception.values),e},e.prototype._walkErrorTree=function(e,t,n){if(void 0===n&&(n=[]),!I(e[t],Error)||n.length+1>=this._limit)return n;var r=et(Xe(e[t]));return this._walkErrorTree(e[t],t,l([r],n))},e.id="LinkedErrors",e}(),_t=P(),Ct=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){Te((function(t){if(Ae().getIntegration(e)){if(!_t.navigator||!_t.location)return t;var n=t.request||{};return n.url=n.url||_t.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=_t.navigator.userAgent,c({},t,{request:n})}return t}))},e.id="UserAgent",e}(),It=[new Ze,new We,new gt,new vt,new mt,new bt,new Ct];var wt=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,n){t((function(t){var r=n().getIntegration(e);if(r){try{if(r._shouldDropEvent(t,r._previousEvent))return null}catch(i){return r._previousEvent=t}return r._previousEvent=t}return t}))},e.prototype._shouldDropEvent=function(e,t){return!!t&&(!!this._isSameMessageEvent(e,t)||!!this._isSameExceptionEvent(e,t))},e.prototype._isSameMessageEvent=function(e,t){var n=e.message,r=t.message;return!(!n&&!r)&&!(n&&!r||!n&&r)&&n===r&&!!this._isSameFingerprint(e,t)&&!!this._isSameStacktrace(e,t)},e.prototype._getFramesFromEvent=function(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}else if(e.stacktrace)return e.stacktrace.frames},e.prototype._isSameStacktrace=function(e,t){var n=this._getFramesFromEvent(e),r=this._getFramesFromEvent(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(var i=0;i<r.length;i++){var o=r[i],a=n[i];if(o.filename!==a.filename||o.lineno!==a.lineno||o.colno!==a.colno||o.function!==a.function)return!1}return!0},e.prototype._getExceptionFromEvent=function(e){return e.exception&&e.exception.values&&e.exception.values[0]},e.prototype._isSameExceptionEvent=function(e,t){var n=this._getExceptionFromEvent(t),r=this._getExceptionFromEvent(e);return!(!n||!r)&&n.type===r.type&&n.value===r.value&&!!this._isSameFingerprint(e,t)&&!!this._isSameStacktrace(e,t)},e.prototype._isSameFingerprint=function(e,t){var n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(i){return!1}},e.id="Dedupe",e}();function Et(e){return this._options={dsn:e.dsn,headers:{"Content-Type":"application/json"}},void 0!==window.fetch?this._transport=new st(this._options):this._transport=new ct(this._options),this._transport.url=function(e){const t=new URL(e);return t.username="",t.toString()}(this._options.dsn),this}Et.prototype.close=function(e){},Et.prototype.sendEvent=function(e){var t;return e.project=(t=this._options.dsn,new URL(t).username),this._transport.sendEvent({events:[e]})};const St={transport:Et,ingestUrl:"",ingestBasePath:"/report/2/",topic:"xp_amp_web_error_log",environment:"qa",debug:!1,integrations:[],ignoreErrors:[],sampleRate:1,filterHeadless:!0};function Tt(e){const t=new URL(e.ingestUrl);return t.pathname=e.ingestBasePath+e.topic,t.username=e.projectId,t.toString()}const Ot={init(e){const t=function(e){const t=function(e,t){const n=e;return Object.keys(t).forEach(r=>{void 0===e[r]&&(n[r]=t[r])}),n}(e,St);return void 0===t.projectId&&(void 0!==t.project?t.projectId=t.project:console.warn("mt-errorkit project key is not set. Errors will be discarded.")),t.ingestUrl||(t.ingestUrl="https://xp-qa.apple.com","prod"===t.environment&&(t.ingestUrl="https://xp.apple.com")),t}(e||{}),n=[...It,...t.integrations];!1!==t.dedupe&&n.push(new wt),function(e){if(void 0===e&&(e={}),void 0===e.defaultIntegrations&&(e.defaultIntegrations=It),void 0===e.release){var t=P();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}!function(e,t){!0===t.debug&&G.enable();var n=Ae(),r=new e(t);n.bindClient(r)}(lt,e)}({dsn:Tt(t),debug:t.debug,beforeSend:e=>function(e){return"prod"===e.environment&&e.filterHeadless&&(void 0===navigator.userAgent||void 0===navigator.appVersion||void 0===navigator.plugins||void 0===navigator.languages||!0===navigator.webdriver||""===navigator.languages||0===navigator.plugins.length||/HeadlessChrome/.test(navigator.userAgent)||/headless/i.test(navigator.appVersion))}(t)?null:(e=function(e){return e.v=3,e.request&&e.request.headers&&(e.request.headers={}),e.breadcrumbs=e.breadcrumbs.filter(e=>"console"!==e.category).slice(0,10),e}(e),t.beforeSend?t.beforeSend(e):e),transport:t.transport,environment:t.environment,attachStacktrace:t.attachStacktrace,integrations:n,release:t.release,sampleRate:t.sampleRate,allowUrls:t.allowUrls,denyUrls:t.denyUrls,ignoreErrors:t.ignoreErrors})}};t.a=Ot}).call(this,n(584),n(136),n(585)(e))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,d=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||l||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1296);function i(e){var t=Object(r.c)(e);globalThis.location.href=t.href}},function(e,t,n){"use strict";function r(e){return"[object String]"===Object.prototype.toString.call(e)}function i(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function o(e){return Boolean(e&&e.then&&"function"===typeof e.then)}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}))},function(e,t,n){"use strict";(function(e,r,i){function o(){return"[object process]"===Object.prototype.toString.call("undefined"!==typeof e?e:0)}n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return h})),n(587),n(589);var a={};function s(){return o()?r:"undefined"!==typeof window?window:"undefined"!==typeof self?self:a}function c(){var e=s(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function u(e){var t=s();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log","assert"].forEach((function(e){e in t.console&&n[e].__sentry_original__&&(r[e]=n[e],n[e]=n[e].__sentry_original__)}));var i=e();return Object.keys(r).forEach((function(e){n[e]=r[e]})),i}var l=Date.now(),d=0,p={now:function(){var e=Date.now()-l;return e<d&&(e=d),d=e,e},timeOrigin:l},f=function(){if(o())try{return("perf_hooks",i.require("perf_hooks")).performance}catch(e){return p}return s().performance&&void 0===performance.timeOrigin&&(performance.timeOrigin=performance.timing&&performance.timing.navigationStart||l),s().performance||p}();function h(){return(f.timeOrigin+f.now())/1e3}}).call(this,n(584),n(136),n(585)(e))},function(e,t,n){"use strict";function r(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var i=Math.max(t-60,0);i<5&&(i=0);var o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n="'{snip} "+n),o<r&&(n+=" {snip}"),n}n.d(t,"a",(function(){return r})),n(587)},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"a",(function(){return h}));var r=n(591);function i(e){var t="function"===typeof Map?new Map:void 0;return(i=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)})(e)}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function a(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t,n){var r=typeof e;if("string"!==r){var i=null===e?e:r;throw h.from("Bad JSON root type: "+i,n)}try{var o=JSON.parse(e);return t.parse(o)}catch(a){throw h.from(a,n)}}function p(e,t,n){return f.apply(this,arguments)}function f(){return(f=l(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.json();case 3:return i=e.sent,e.abrupt("return",n.parse(i));case 7:throw e.prev=7,e.t0=e.catch(0),h.from(e.t0,r);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}var h=function(e){var t,n;function i(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"UnnamedSchema",o=arguments.length>3?arguments[3]:void 0;return(r=e.call(this,t,n)||this).schemaName=i,r.zodError=o,r.name="ParseJsonError",r.cause=n.cause,r}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),i.from=function(e,t){var n,o,a;if(e instanceof r.ZodError){n=e;var s=e.flatten(),c=s.formErrors,u=s.fieldErrors;c.length>0?(o="Bad form",a=c):(o="Bad keys",a=Object.entries(u).map((function(e){return e[0]+": "+e[1]})))}else e instanceof SyntaxError?(o="Bad JSON",a=[e.message]):(o="Bad stuff",a=[e]);var l=a.length>1?"\n":" ";return new i([t+": "+o+":"].concat(a).join(l),{cause:e},t,n)},i}(i(Error))},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.nullable=t.null=t.never=t.nativeEnum=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.date=t.codegen=t.boolean=t.bigint=t.array=t.any=t.ZodVoid=t.ZodUnknown=t.ZodUnion=t.ZodUndefined=t.ZodTuple=t.ZodTransformer=t.ZodString=t.ZodRecord=t.ZodPromise=t.ZodParsedType=t.ZodOptional=t.ZodObject=t.ZodNumber=t.ZodNullable=t.ZodNull=t.ZodNever=t.ZodNativeEnum=t.ZodLiteral=t.ZodLazy=t.ZodIntersection=t.ZodFunction=t.ZodEnum=t.ZodDate=t.ZodCodeGenerator=t.ZodBoolean=t.ZodBigInt=t.ZodArray=t.ZodAny=t.ZodTypes=t.ZodSchema=t.Schema=t.ZodType=t.custom=void 0,t.late=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.string=t.record=t.promise=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=void 0;var o=n(592);Object.defineProperty(t,"ZodType",{enumerable:!0,get:function(){return o.ZodType}}),Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return o.ZodType}}),Object.defineProperty(t,"ZodSchema",{enumerable:!0,get:function(){return o.ZodType}});var a=n(600);Object.defineProperty(t,"ZodAny",{enumerable:!0,get:function(){return a.ZodAny}});var s=n(601);Object.defineProperty(t,"ZodArray",{enumerable:!0,get:function(){return s.ZodArray}});var c=n(602);Object.defineProperty(t,"ZodBigInt",{enumerable:!0,get:function(){return c.ZodBigInt}});var u=n(603);Object.defineProperty(t,"ZodBoolean",{enumerable:!0,get:function(){return u.ZodBoolean}});var l=n(604);Object.defineProperty(t,"ZodDate",{enumerable:!0,get:function(){return l.ZodDate}});var d=n(605);Object.defineProperty(t,"ZodEnum",{enumerable:!0,get:function(){return d.ZodEnum}});var p=n(606);Object.defineProperty(t,"ZodFunction",{enumerable:!0,get:function(){return p.ZodFunction}});var f=n(609);Object.defineProperty(t,"ZodIntersection",{enumerable:!0,get:function(){return f.ZodIntersection}});var h=n(610);Object.defineProperty(t,"ZodLazy",{enumerable:!0,get:function(){return h.ZodLazy}});var m=n(611);Object.defineProperty(t,"ZodLiteral",{enumerable:!0,get:function(){return m.ZodLiteral}});var g=n(612),v=n(613);Object.defineProperty(t,"ZodNativeEnum",{enumerable:!0,get:function(){return v.ZodNativeEnum}});var y=n(614);Object.defineProperty(t,"ZodNever",{enumerable:!0,get:function(){return y.ZodNever}});var b=n(615);Object.defineProperty(t,"ZodNull",{enumerable:!0,get:function(){return b.ZodNull}});var _=n(616);Object.defineProperty(t,"ZodNullable",{enumerable:!0,get:function(){return _.ZodNullable}});var C=n(617);Object.defineProperty(t,"ZodNumber",{enumerable:!0,get:function(){return C.ZodNumber}});var I=n(619);Object.defineProperty(t,"ZodObject",{enumerable:!0,get:function(){return I.ZodObject}});var w=n(622);Object.defineProperty(t,"ZodOptional",{enumerable:!0,get:function(){return w.ZodOptional}});var E=n(623);Object.defineProperty(t,"ZodPromise",{enumerable:!0,get:function(){return E.ZodPromise}});var S=n(624);Object.defineProperty(t,"ZodRecord",{enumerable:!0,get:function(){return S.ZodRecord}});var T=n(625);Object.defineProperty(t,"ZodString",{enumerable:!0,get:function(){return T.ZodString}});var O=n(626);Object.defineProperty(t,"ZodTransformer",{enumerable:!0,get:function(){return O.ZodTransformer}});var P=n(607);Object.defineProperty(t,"ZodTuple",{enumerable:!0,get:function(){return P.ZodTuple}});var x=n(627);Object.defineProperty(t,"ZodUndefined",{enumerable:!0,get:function(){return x.ZodUndefined}});var A=n(628);Object.defineProperty(t,"ZodUnion",{enumerable:!0,get:function(){return A.ZodUnion}});var N=n(608);Object.defineProperty(t,"ZodUnknown",{enumerable:!0,get:function(){return N.ZodUnknown}});var R=n(629);Object.defineProperty(t,"ZodVoid",{enumerable:!0,get:function(){return R.ZodVoid}});var D=n(598);Object.defineProperty(t,"ZodParsedType",{enumerable:!0,get:function(){return D.ZodParsedType}});var k=n(599);Object.defineProperty(t,"ZodTypes",{enumerable:!0,get:function(){return k.ZodTypes}});var U=n(630);Object.defineProperty(t,"ZodCodeGenerator",{enumerable:!0,get:function(){return U.ZodCodeGenerator}});var L=T.ZodString.create;t.string=L;var M=C.ZodNumber.create;t.number=M;var j=c.ZodBigInt.create;t.bigint=j;var F=u.ZodBoolean.create;t.boolean=F;var B=l.ZodDate.create;t.date=B;var z=x.ZodUndefined.create;t.undefined=z;var H=b.ZodNull.create;t.null=H;var W=a.ZodAny.create;t.any=W;var V=N.ZodUnknown.create;t.unknown=V;var Z=y.ZodNever.create;t.never=Z;var q=R.ZodVoid.create;t.void=q;var K=s.ZodArray.create;t.array=K;var G=I.ZodObject.create;t.object=G;var Y=A.ZodUnion.create;t.union=Y;var Q=f.ZodIntersection.create;t.intersection=Q;var X=P.ZodTuple.create;t.tuple=X;var J=S.ZodRecord.create;t.record=J;var $=g.ZodMap.create;t.map=$;var ee=p.ZodFunction.create;t.function=ee;var te=h.ZodLazy.create;t.lazy=te;var ne=m.ZodLiteral.create;t.literal=ne;var re=d.ZodEnum.create;t.enum=re;var ie=v.ZodNativeEnum.create;t.nativeEnum=ie;var oe=E.ZodPromise.create;t.promise=oe;var ae=O.ZodTransformer.create;t.transformer=ae;var se=w.ZodOptional.create;t.optional=se;var ce=_.ZodNullable.create;t.nullable=ce,t.ostring=function(){return L().optional()},t.onumber=function(){return M().optional()},t.oboolean=function(){return F().optional()};var ue=U.ZodCodeGenerator.create;t.codegen=ue,t.custom=function(e,t){return e?W().refine(e,t):W()},t.instanceof=function(e,n){return void 0===n&&(n={message:"Input not instance of "+e.name}),t.custom((function(t){return t instanceof e}),n)},t.late={object:I.ZodObject.lazycreate},i(n(631),t),i(n(596),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},a=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},s=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodType=t.declareZodType=void 0;var c=n(593),u=n(596),l=n(591);t.declareZodType=function(){};var d=function(){function e(e){var t=this;this.parse=c.ZodParser(this),this.safeParse=function(e,n){try{return{success:!0,data:t.parse(e,n)}}catch(r){if(r instanceof u.ZodError)return{success:!1,error:r};throw r}},this.parseAsync=function(e,n){return i(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.parse(e,r(r({},n),{async:!0}))];case 1:return[2,t.sent()]}}))}))},this.safeParseAsync=function(e,n){return i(t,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.parseAsync(e,n)];case 1:return[2,{success:!0,data:r.sent()}];case 2:if((t=r.sent())instanceof u.ZodError)return[2,{success:!1,error:t}];throw t;case 3:return[2]}}))}))},this.spa=this.safeParseAsync,this.refine=function(e,n){return void 0===n&&(n="Invalid value."),"string"===typeof n?t._refinement((function(t,r){var i=e(t),o=function(){return r.addIssue({code:u.ZodIssueCode.custom,message:n})};return i instanceof Promise?i.then((function(e){e||o()})):i?void 0:(o(),i)})):"function"===typeof n?t._refinement((function(t,i){var o=e(t),a=function(){return i.addIssue(r({code:u.ZodIssueCode.custom},n(t)))};return o instanceof Promise?o.then((function(e){e||a()})):o?void 0:(a(),o)})):t._refinement((function(t,i){var o=e(t),a=function(){return i.addIssue(r({code:u.ZodIssueCode.custom},n))};return o instanceof Promise?o.then((function(e){e||a()})):o?void 0:(a(),o)}))},this.refinement=function(e,n){return t._refinement((function(t,r){e(t)||r.addIssue("function"===typeof n?n(t,r):n)}))},this._refinement=function(e){return new t.constructor(r(r({},t._def),{checks:s(t._def.checks||[],[{check:e}])}))},this.optional=function(){return l.ZodOptional.create(t)},this.or=this.optional,this.nullable=function(){return l.ZodNullable.create(t)},this.array=function(){return l.ZodArray.create(t)},this.isOptional=function(){return t.safeParse(void 0).success},this.isNullable=function(){return t.safeParse(null).success},this._def=e,this.is=this.is.bind(this),this.check=this.check.bind(this),this.transform=this.transform.bind(this),this.default=this.default.bind(this)}return e.prototype.is=function(e){try{return this.parse(e),!0}catch(t){return!1}},e.prototype.check=function(e){try{return this.parse(e),!0}catch(t){return!1}},e.prototype.transform=function(e,t){return t?l.ZodTransformer.create(this,e,t):l.ZodTransformer.create(this,this,e)},e.prototype.default=function(e){var t=this;return l.ZodTransformer.create(this.optional(),this,(function(n){return void 0===n?"function"===typeof e?e(t):e:n}))},e}();t.ZodType=d},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},a=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},s=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e},c=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodParser=t.getParsedType=void 0;var u=n(594),l=n(595),d=n(597),p=n(596),f=n(598),h=n(599);t.getParsedType=function(e){return"string"===typeof e?"string":"number"===typeof e?Number.isNaN(e)?"nan":"number":"boolean"===typeof e?"boolean":"bigint"===typeof e?"bigint":"symbol"===typeof e?"symbol":e instanceof Date?"date":"function"===typeof e?"function":void 0===e||"undefined"===typeof e?"undefined":"object"===typeof e?Array.isArray(e)?"array":null===e?"null":e.then&&"function"===typeof e.then&&e.catch&&"function"===typeof e.catch?"promise":e instanceof Map?"map":"object":"unknown"};var m=function(e,t,n){var i=r(r({},n),{path:s(e.path,n.path||[])}),o={data:t},a=u.defaultErrorMap===e.errorMap?{message:"Invalid value."}:u.defaultErrorMap(i,r(r({},o),{defaultError:"Invalid value."}));return r(r({},n),{path:s(e.path,n.path||[]),message:n.message||e.errorMap(i,r(r({},o),{defaultError:a.message})).message})};t.ZodParser=function(e){return function(n,g){var v,y,b,_,C,I,w,E,S,T;void 0===g&&(g={seen:[],errorMap:u.defaultErrorMap,path:[]});var O={seen:g.seen||[],path:g.path||[],errorMap:g.errorMap||u.defaultErrorMap,async:null!==(S=g.async)&&void 0!==S&&S,runAsyncValidationsInSeries:null!==(T=g.runAsyncValidationsInSeries)&&void 0!==T&&T},P=e._def,x=new d.PseudoPromise;x._default=!0;var A={input:n,output:l.INVALID};O.seen=O.seen||[];var N=new p.ZodError([]),R=function(){throw A.error=N,N},D=function(e){if(e instanceof p.ZodError)return N.addIssues(e.issues),l.INVALID;throw N},k=t.getParsedType(n);switch(P.t){case h.ZodTypes.string:k!==f.ZodParsedType.string&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.string,received:k})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.number:k!==f.ZodParsedType.number&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.number,received:k})),R()),Number.isNaN(n)&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.number,received:f.ZodParsedType.nan})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.bigint:k!==f.ZodParsedType.bigint&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.bigint,received:k})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.boolean:k!==f.ZodParsedType.boolean&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.boolean,received:k})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.undefined:k!==f.ZodParsedType.undefined&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.undefined,received:k})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.null:k!==f.ZodParsedType.null&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.null,received:k})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.any:case h.ZodTypes.unknown:x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.never:N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.never,received:k})),x=d.PseudoPromise.resolve(l.INVALID);break;case h.ZodTypes.void:k!==f.ZodParsedType.undefined&&k!==f.ZodParsedType.null&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.void,received:k})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.array:A.output=[],k!==f.ZodParsedType.array&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.array,received:k})),R()),!0===P.nonempty&&0===n.length&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.nonempty_array_is_empty})),R()),x=d.PseudoPromise.all(n.map((function(e,t){return(new d.PseudoPromise).then((function(){return P.type.parse(e,r(r({},O),{path:s(O.path,[t])}))})).catch((function(e){if(!(e instanceof p.ZodError))throw e;return N.addIssues(e.issues),l.INVALID}))})));break;case h.ZodTypes.map:k!==f.ZodParsedType.map&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.map,received:k})),R());var U=n,L=new Map;x=d.PseudoPromise.all(s(U.entries()).map((function(e,t){var n=a(e,2),i=n[0],o=n[1];return d.PseudoPromise.all([(new d.PseudoPromise).then((function(){return P.keyType.parse(i,r(r({},O),{path:s(O.path,[t,"key"])}))})).catch(D),(new d.PseudoPromise).then((function(){var e=P.valueType.parse(o,r(r({},O),{path:s(O.path,[t,"value"])}));return[i,e]})).catch(D)]).then((function(e){e[0]!==l.INVALID&&e[1]!==l.INVALID&&L.set(e[0],e[1])})).catch(D)}))).then((function(){if(!N.isEmpty)throw N})).then((function(){return L})).then((function(){return L}));break;case h.ZodTypes.object:A.output={},k!==f.ZodParsedType.object&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.object,received:k})),R());var M={},j=P.shape(),F=Object.keys(j),B=Object.keys(n),z=B.filter((function(e){return-1===F.indexOf(e)})),H=function(e){var t=F.includes(e)?j[e]:P.catchall._def.t!==h.ZodTypes.never?P.catchall:void 0;return t?"undefined"!==typeof n[e]||B.includes(e)?void(M[e]=(new d.PseudoPromise).then((function(){return t.parse(n[e],r(r({},O),{path:s(O.path,[e])}))})).catch((function(e){if(e instanceof p.ZodError){var t=e;return N.addIssues(t.issues),l.INVALID}throw e}))):(M[e]=(new d.PseudoPromise).then((function(){return t.parse(void 0,r(r({},O),{path:s(O.path,[e])}))})).then((function(e){return void 0===e?d.NOSET:e})).catch((function(t){if(!(t instanceof p.ZodError))throw t;var n=t;N.addIssues(n.issues),M[e]=d.PseudoPromise.resolve(l.INVALID)})),"continue"):"continue"};try{for(var W=c(F),V=W.next();!V.done;V=W.next())H(K=V.value)}catch(le){v={error:le}}finally{try{V&&!V.done&&(y=W.return)&&y.call(W)}finally{if(v)throw v.error}}if(P.catchall._def.t===h.ZodTypes.never)if("passthrough"===P.unknownKeys)try{for(var Z=c(z),q=Z.next();!q.done;q=Z.next()){var K=q.value;M[K]=d.PseudoPromise.resolve(n[K])}}catch(de){b={error:de}}finally{try{q&&!q.done&&(_=Z.return)&&_.call(Z)}finally{if(b)throw b.error}}else"strict"===P.unknownKeys?z.length>0&&N.addIssue(m(O,n,{code:p.ZodIssueCode.unrecognized_keys,keys:z})):"strip"===P.unknownKeys||l.util.assertNever(P.unknownKeys);else{var G=function(e){M[e]=(new d.PseudoPromise).then((function(){return P.catchall.parse(n[e],r(r({},O),{path:s(O.path,[e])}))})).catch((function(e){if(!(e instanceof p.ZodError))throw e;N.addIssues(e.issues)}))};try{for(var Y=c(z),Q=Y.next();!Q.done;Q=Y.next())G(K=Q.value)}catch(pe){C={error:pe}}finally{try{Q&&!Q.done&&(I=Y.return)&&I.call(Y)}finally{if(C)throw C.error}}}x=d.PseudoPromise.object(M).then((function(e){return Object.assign(A.output,e),A.output})).then((function(e){return N.issues.length>0?l.INVALID:e})).catch((function(e){if(e instanceof p.ZodError)return N.addIssues(e.issues),l.INVALID;throw e}));break;case h.ZodTypes.union:var X=!1,J=[];x=d.PseudoPromise.all(P.options.map((function(e,t){return(new d.PseudoPromise).then((function(){return e.parse(n,O)})).then((function(e){return X=!0,e})).catch((function(e){if(e instanceof p.ZodError)return J.push(e),l.INVALID;throw e}))}))).then((function(e){if(!X){var t=J.filter((function(e){return"invalid_type"!==e.issues[0].code}));1===t.length?N.addIssues(t[0].issues):N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_union,unionErrors:J})),R()}return e})).then((function(e){return l.util.find(e,(function(e){return e!==l.INVALID}))}));break;case h.ZodTypes.intersection:x=d.PseudoPromise.all([(new d.PseudoPromise).then((function(){return P.left.parse(n,O)})).catch(D),(new d.PseudoPromise).then((function(){return P.right.parse(n,O)})).catch(D)]).then((function(e){var i=a(e,2),o=i[0],s=i[1];if(o===l.INVALID||s===l.INVALID)return l.INVALID;var c=t.getParsedType(o),u=t.getParsedType(s);return o===s?o:c===f.ZodParsedType.object&&u===f.ZodParsedType.object?r(r({},o),s):void N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_intersection_types}))}));break;case h.ZodTypes.optional:if(k===f.ZodParsedType.undefined){x=d.PseudoPromise.resolve(void 0);break}x=(new d.PseudoPromise).then((function(){return P.innerType.parse(n,O)})).catch(D);break;case h.ZodTypes.nullable:if(k===f.ZodParsedType.null){x=d.PseudoPromise.resolve(null);break}x=(new d.PseudoPromise).then((function(){return P.innerType.parse(n,O)})).catch(D);break;case h.ZodTypes.tuple:k!==f.ZodParsedType.array&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.array,received:k})),R()),n.length>P.items.length?N.addIssue(m(O,n,{code:p.ZodIssueCode.too_big,maximum:P.items.length,inclusive:!0,type:"array"})):n.length<P.items.length&&N.addIssue(m(O,n,{code:p.ZodIssueCode.too_small,minimum:P.items.length,inclusive:!0,type:"array"}));var $=n;x=d.PseudoPromise.all($.map((function(e,t){var n=P.items[t];return(new d.PseudoPromise).then((function(){return n.parse(e,r(r({},O),{path:s(O.path,[t])}))})).catch((function(e){if(!(e instanceof p.ZodError))throw e;N.addIssues(e.issues)})).then((function(e){return e}))}))).then((function(e){return N.isEmpty||R(),e})).catch((function(e){throw e}));break;case h.ZodTypes.lazy:var ee=P.getter();x=d.PseudoPromise.resolve(ee.parse(n,O));break;case h.ZodTypes.literal:n!==P.value&&N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_literal_value,expected:P.value})),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.enum:-1===P.values.indexOf(n)&&N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_enum_value,options:P.values})),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.nativeEnum:-1===l.util.getValidEnumValues(P.values).indexOf(n)&&N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_enum_value,options:l.util.objectValues(P.values)})),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.function:k!==f.ZodParsedType.function&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.function,received:k})),R());var te=P.returns._def.t===h.ZodTypes.promise;x=d.PseudoPromise.resolve((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=(new d.PseudoPromise).then((function(){return P.args.parse(e,r(r({},O),{async:te}))})).catch((function(e){if(!(e instanceof p.ZodError))throw e;var t=new p.ZodError([]);throw t.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_arguments,argumentsError:e})),t})).then((function(e){return n.apply(void 0,s(e))})).then((function(e){return P.returns.parse(e,r(r({},O),{async:te}))})).catch((function(e){if(e instanceof p.ZodError){var t=new p.ZodError([]);throw t.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_return_type,returnTypeError:e})),t}throw e}));return te?i.getValueAsync():i.getValueSync()}));break;case h.ZodTypes.record:k!==f.ZodParsedType.object&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.object,received:k})),R());var ne={},re=function(e){ne[e]=(new d.PseudoPromise).then((function(){return P.valueType.parse(n[e],r(r({},O),{path:s(O.path,[e])}))})).catch(D)};for(var K in n)re(K);x=d.PseudoPromise.object(ne);break;case h.ZodTypes.date:n instanceof Date||(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.date,received:k})),R()),isNaN(n.getTime())&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_date})),R()),x=d.PseudoPromise.resolve(n);break;case h.ZodTypes.promise:k!==f.ZodParsedType.promise&&!0!==O.async&&(N.addIssue(m(O,n,{code:p.ZodIssueCode.invalid_type,expected:f.ZodParsedType.promise,received:k})),R());var ie=k===f.ZodParsedType.promise?n:Promise.resolve(n);x=d.PseudoPromise.resolve(ie.then((function(e){return P.type.parse(e,O)})));break;case h.ZodTypes.transformer:x=(new d.PseudoPromise).then((function(){return P.input.parse(n,O)})).then((function(e){var t=P.transformer(e);if(t instanceof Promise&&!1===O.async&&P.output._def.t!==h.ZodTypes.promise)throw new Error("You can't call .parse on a schema containing async transformations.");return t})).then((function(e){return P.output.parse(e,O)}));break;default:x=d.PseudoPromise.resolve("adsf"),l.util.assertNever(P)}if(!0===x._default)throw new Error("Result is not materialized.");N.isEmpty||R();var oe=P.checks||[],ae={addIssue:function(e){N.addIssue(m(O,n,e))},path:O.path};if(!1===O.async){var se=x.getValueSync();se===l.INVALID&&N.isEmpty&&N.addIssue(m(O,n,{code:p.ZodIssueCode.custom,message:"Invalid"})),N.isEmpty||R();try{for(var ce=c(oe),ue=ce.next();!ue.done;ue=ce.next())if(ue.value.check(se,ae)instanceof Promise)throw new Error("You can't use .parse on a schema containing async refinements. Use .parseAsync instead.")}catch(fe){w={error:fe}}finally{try{ue&&!ue.done&&(E=ce.return)&&E.call(ce)}finally{if(w)throw w.error}}return N.isEmpty||R(),se}return i(void 0,void 0,void 0,(function(){var e,t;return o(this,(function(r){switch(r.label){case 0:return[4,x.getValueAsync()];case 1:return(e=r.sent())===l.INVALID&&N.isEmpty&&N.addIssue(m(O,n,{code:p.ZodIssueCode.custom,message:"Invalid"})),N.isEmpty||R(),O.runAsyncValidationsInSeries?(t=!1,[4,oe.reduce((function(n,r){return n.then((function(){return i(void 0,void 0,void 0,(function(){var n;return o(this,(function(i){switch(i.label){case 0:return t?[3,2]:(n=N.issues.length,[4,r.check(e,ae)]);case 1:i.sent(),n<N.issues.length&&(t=!0),i.label=2;case 2:return[2]}}))}))}))}),Promise.resolve())]):[3,3];case 2:return r.sent(),[3,5];case 3:return[4,Promise.all(oe.map((function(t){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,t.check(e,ae)];case 1:return n.sent(),[2]}}))}))})))];case 4:r.sent(),r.label=5;case 5:return N.isEmpty||R(),[2,e]}}))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultErrorMap=void 0;var r=n(595),i=n(596);t.defaultErrorMap=function(e,t){var n;switch(e.code){case i.ZodIssueCode.invalid_type:n="undefined"===e.received?"Required":"Expected "+e.expected+", received "+e.received;break;case i.ZodIssueCode.nonempty_array_is_empty:n="List must contain at least one item";break;case i.ZodIssueCode.unrecognized_keys:n="Unrecognized key(s) in object: "+e.keys.map((function(e){return"'"+e+"'"})).join(", ");break;case i.ZodIssueCode.invalid_union:n="Invalid input";break;case i.ZodIssueCode.invalid_literal_value:n='Input must be "'+e.expected+'"';break;case i.ZodIssueCode.invalid_enum_value:n="Input must be one of these values: "+e.options.join(", ");break;case i.ZodIssueCode.invalid_arguments:n="Invalid function arguments";break;case i.ZodIssueCode.invalid_return_type:n="Invalid function return type";break;case i.ZodIssueCode.invalid_date:n="Invalid date";break;case i.ZodIssueCode.invalid_string:n="regex"!==e.validation?"Invalid "+e.validation:"Invalid";break;case i.ZodIssueCode.too_small:n="array"===e.type?"Should have "+(e.inclusive?"at least":"more than")+" "+e.minimum+" items":"string"===e.type?"Should be "+(e.inclusive?"at least":"over")+" "+e.minimum+" characters":"number"===e.type?"Value should be greater than "+(e.inclusive?"or equal to ":"")+e.minimum:"Invalid input";break;case i.ZodIssueCode.too_big:n="array"===e.type?"Should have "+(e.inclusive?"at most":"less than")+" "+e.maximum+" items":"string"===e.type?"Should be "+(e.inclusive?"at most":"under")+" "+e.maximum+" characters long":"number"===e.type?"Value should be less than "+(e.inclusive?"or equal to ":"")+e.maximum:"Invalid input";break;case i.ZodIssueCode.custom:n="Invalid input.";break;case i.ZodIssueCode.invalid_intersection_types:n="Intersections only support objects";break;default:n="Invalid input.",r.util.assertNever(e)}return{message:n}}},function(e,t,n){"use strict";var r,i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.INVALID=void 0,t.INVALID=Symbol("invalid_data"),(r=t.util||(t.util={})).assertNever=function(e){throw new Error},r.arrayToEnum=function(e){var t,n,r={};try{for(var o=i(e),a=o.next();!a.done;a=o.next()){var s=a.value;r[s]=s}}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},r.getValidEnumValues=function(e){var t,n,o=Object.keys(e).filter((function(t){return"number"!==typeof e[e[t]]})),a={};try{for(var s=i(o),c=s.next();!c.done;c=s.next()){var u=c.value;a[u]=e[u]}}catch(l){t={error:l}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r.getValues(a)},r.getValues=function(e){return Object.keys(e).map((function(t){return e[t]}))},r.objectValues=function(e){return Object.keys(e).map((function(t){return e[t]}))},r.find=function(e,t){var n,r;try{for(var o=i(e),a=o.next();!a.done;a=o.next()){var s=a.value;if(t(s))return s}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e},a=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;var s=n(595);t.ZodIssueCode=s.util.arrayToEnum(["invalid_type","nonempty_array_is_empty","custom","invalid_union","invalid_literal_value","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types"]),t.quotelessJson=function(e){return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")};var c=function(e){function t(t){var n=this.constructor,r=e.call(this)||this;r.issues=[],r.addIssue=function(e){r.issues=o(r.issues,[e])},r.addIssues=function(e){void 0===e&&(e=[]),r.issues=o(r.issues,e)},r.flatten=function(){var e,t,n={},i=[];try{for(var o=a(r.issues),s=o.next();!s.done;s=o.next()){var c=s.value;c.path.length>0?(n[c.path[0]]=n[c.path[0]]||[],n[c.path[0]].push(c.message)):i.push(c.message)}}catch(u){e={error:u}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return{formErrors:i,fieldErrors:n}};var i=n.prototype;return Object.setPrototypeOf(r,i),r.issues=t,r}return r(t,e),Object.defineProperty(t.prototype,"errors",{get:function(){return this.issues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return JSON.stringify(this.issues,null,2)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.issues.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formErrors",{get:function(){return this.flatten()},enumerable:!1,configurable:!0}),t.create=function(e){return new t(e)},t}(Error);t.ZodError=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},s=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.PseudoPromise=t.NOSET=void 0;var c=n(595),u=n(596);t.NOSET=Symbol("no_set");var l=function(){function e(t){var n=this;void 0===t&&(t=[]),this.all=function(e){return n.then((function(t,o){return o.async?Promise.all(e.map((function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.getValueAsync()];case 1:return[2,t.sent()];case 2:return t.sent(),[2,c.INVALID];case 3:return[2]}}))}))}))).then((function(e){return e})):e.map((function(e){return e.getValueSync()}))}))},this.then=function(t){return new e(a(n.items,[{type:"function",function:t}]))},this.catch=function(t){return new e(a(n.items,[{type:"catcher",catcher:t}]))},this.getValueSync=function(){for(var e,t=void 0,r=function(r){try{var i=n.items[r];"function"===i.type&&(t=i.function(t,{async:!1}))}catch(s){var o=n.items.findIndex((function(e,t){return"catcher"===e.type&&t>r})),a=n.items[o];if(!a||"catcher"!==a.type)throw s;r=o,t=a.catcher(s,{async:!1})}e=r},i=0;i<n.items.length;i++)r(i),i=e;return t},this.getValueAsync=function(){return r(n,void 0,void 0,(function(){var t,n,r,o,a;return i(this,(function(s){switch(s.label){case 0:t=void 0,n=function(n){var a,s,c,u;return i(this,(function(i){switch(i.label){case 0:a=r.items[n],i.label=1;case 1:return i.trys.push([1,4,,8]),"function"!==a.type?[3,3]:[4,a.function(t,{async:!0})];case 2:t=i.sent(),i.label=3;case 3:return[3,8];case 4:if(s=i.sent(),c=r.items.findIndex((function(e,t){return"catcher"===e.type&&t>n})),(u=r.items[c])&&"catcher"===u.type)return[3,5];throw s;case 5:return n=c,[4,u.catcher(s,{async:!0})];case 6:t=i.sent(),i.label=7;case 7:return[3,8];case 8:if(t instanceof e)throw new Error("ASYNC: DO NOT RETURN PSEUDOPROMISE FROM FUNCTIONS");if(t instanceof Promise)throw new Error("ASYNC: DO NOT RETURN PROMISE FROM FUNCTIONS");return o=n,[2]}}))},r=this,a=0,s.label=1;case 1:return a<this.items.length?[5,n(a)]:[3,4];case 2:s.sent(),a=o,s.label=3;case 3:return a++,[3,1];case 4:return[2,t]}}))}))},this.items=t}return e.all=function(t){return(new e).all(t)},e.object=function(n){return(new e).then((function(e,o){var a,l,d={},p=new u.ZodError([]);if(o.async)return r(void 0,void 0,void 0,(function(){var e,o,a,l,f,h;return i(this,(function(m){switch(m.label){case 0:return[4,Promise.all(Object.keys(n).map((function(e){return r(void 0,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n[e].getValueAsync()];case 1:return t=i.sent(),[2,[e,t]];case 2:if((r=i.sent())instanceof u.ZodError)return p.addIssues(r.issues),[2,[e,c.INVALID]];throw r;case 3:return[2]}}))}))})))];case 1:if(e=m.sent(),!p.isEmpty)throw p;try{for(o=s(e),a=o.next();!a.done;a=o.next())(l=a.value)[1]!==t.NOSET&&(d[l[0]]=l[1])}catch(g){f={error:g}}finally{try{a&&!a.done&&(h=o.return)&&h.call(o)}finally{if(f)throw f.error}}return[2,d]}}))}));var f=Object.keys(n).map((function(e){try{return[e,n[e].getValueSync()]}catch(t){if(t instanceof u.ZodError)return p.addIssues(t.issues),[e,c.INVALID];throw t}}));if(!p.isEmpty)throw p;try{for(var h=s(f),m=h.next();!m.done;m=h.next()){var g=m.value;g[1]!==t.NOSET&&(d[g[0]]=g[1])}}catch(v){a={error:v}}finally{try{m&&!m.done&&(l=h.return)&&l.call(h)}finally{if(a)throw a.error}}return d}))},e.resolve=function(t){if(t instanceof e)throw new Error("Do not pass PseudoPromise into PseudoPromise.resolve");return(new e).then((function(){return t}))},e}();t.PseudoPromise=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZodParsedType=void 0;var r=n(595);t.ZodParsedType=r.util.arrayToEnum(["string","nan","number","integer","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map"])},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ZodTypes=void 0,(r=t.ZodTypes||(t.ZodTypes={})).string="string",r.number="number",r.bigint="bigint",r.boolean="boolean",r.date="date",r[void 0]="undefined",r.null="null",r.array="array",r.object="object",r.union="union",r.intersection="intersection",r.tuple="tuple",r.record="record",r.map="map",r.function="function",r.lazy="lazy",r.literal="literal",r.enum="enum",r.nativeEnum="nativeEnum",r.promise="promise",r.any="any",r.unknown="unknown",r.never="never",r.void="void",r.transformer="transformer",r.optional="optional",r.nullable="nullable"},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodAny=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.any})},t}(n(592).ZodType);t.ZodAny=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodNonEmptyArray=t.ZodArray=void 0;var o=n(596),a=n(599),s=n(592),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,nonempty:t._def.nonempty,type:t._def.type.toJSON()}},t.min=function(e,n){return t.refinement((function(t){return t.length>=e}),i({code:o.ZodIssueCode.too_small,type:"array",inclusive:!0,minimum:e},"string"===typeof n?{message:n}:n))},t.max=function(e,n){return t.refinement((function(t){return t.length<=e}),i({code:o.ZodIssueCode.too_big,type:"array",inclusive:!0,maximum:e},"string"===typeof n?{message:n}:n))},t.length=function(e,n){return t.min(e,{message:n}).max(e,{message:n})},t.nonempty=function(){return new u(i(i({},t._def),{nonempty:!0}))},t}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._def.type},enumerable:!1,configurable:!0}),t.create=function(e){return new t({t:a.ZodTypes.array,type:e,nonempty:!1})},t}(s.ZodType);t.ZodArray=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,type:t._def.type.toJSON()}},t.min=function(e,n){return t.refinement((function(t){return t.length>=e}),i({code:o.ZodIssueCode.too_small,minimum:e,type:"array",inclusive:!0},"string"===typeof n?{message:n}:n))},t.max=function(e,n){return t.refinement((function(t){return t.length<=e}),i({code:o.ZodIssueCode.too_big,maximum:e,type:"array",inclusive:!0},"string"===typeof n?{message:n}:n))},t.length=function(e,n){return t.min(e,{message:n}).max(e,{message:n})},t}return r(t,e),t}(s.ZodType);t.ZodNonEmptyArray=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodBigInt=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.bigint})},t}(n(592).ZodType);t.ZodBigInt=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodBoolean=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.boolean})},t}(n(592).ZodType);t.ZodBoolean=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodDate=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.date})},t}(n(592).ZodType);t.ZodDate=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodEnum=void 0;var o=n(599),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return this._def.values},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enum",{get:function(){var e,t,n={};try{for(var r=i(this._def.values),o=r.next();!o.done;o=r.next()){var a=o.value;n[a]=a}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Values",{get:function(){var e,t,n={};try{for(var r=i(this._def.values),o=r.next();!o.done;o=r.next()){var a=o.value;n[a]=a}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Enum",{get:function(){var e,t,n={};try{for(var r=i(this._def.values),o=r.next();!o.done;o=r.next()){var a=o.value;n[a]=a}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},enumerable:!1,configurable:!0}),t.create=function(e){return new t({t:o.ZodTypes.enum,values:e})},t}(n(592).ZodType);t.ZodEnum=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodFunction=void 0;var o=n(599),a=n(592),s=n(607),c=n(608),u=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.args=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new t(i(i({},n._def),{args:s.ZodTuple.create(e)}))},n.returns=function(e){return new t(i(i({},n._def),{returns:e}))},n.implement=function(e){return n.parse(e)},n.validate=n.implement,n.toJSON=function(){return{t:n._def.t,args:n._def.args.toJSON(),returns:n._def.returns.toJSON()}},n}return r(t,e),t.create=function(e,n){return new t({t:o.ZodTypes.function,args:e||s.ZodTuple.create([]),returns:n||c.ZodUnknown.create()})},t}(a.ZodType);t.ZodFunction=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodTuple=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,items:t._def.items.map((function(e){return e.toJSON()}))}},t}return r(t,e),Object.defineProperty(t.prototype,"items",{get:function(){return this._def.items},enumerable:!1,configurable:!0}),t.create=function(e){return new t({t:i.ZodTypes.tuple,items:e})},t}(n(592).ZodType);t.ZodTuple=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodUnknown=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.unknown})},t}(n(592).ZodType);t.ZodUnknown=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodIntersection=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,left:t._def.left.toJSON(),right:t._def.right.toJSON()}},t}return r(t,e),t.create=function(e,n){return new t({t:i.ZodTypes.intersection,left:e,right:n})},t}(n(592).ZodType);t.ZodIntersection=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodLazy=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){throw new Error("Can't JSONify recursive structure")},t}return r(t,e),Object.defineProperty(t.prototype,"schema",{get:function(){return this._def.getter()},enumerable:!1,configurable:!0}),t.create=function(e){return new t({t:i.ZodTypes.lazy,getter:e})},t}(n(592).ZodType);t.ZodLazy=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodLiteral=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(e){return new t({t:i.ZodTypes.literal,value:e})},t}(n(592).ZodType);t.ZodLiteral=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodMap=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,valueType:t._def.valueType.toJSON(),keyType:t._def.keyType.toJSON()}},t}return r(t,e),t.create=function(e,n){return new t({t:i.ZodTypes.map,valueType:n,keyType:e})},t}(n(592).ZodType);t.ZodMap=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodNativeEnum=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(e){return new t({t:i.ZodTypes.nativeEnum,values:e})},t}(n(592).ZodType);t.ZodNativeEnum=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodNever=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.__class="ZodNever",t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.never})},t}(n(592).ZodType);t.ZodNever=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodNull=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.null})},t}(n(592).ZodType);t.ZodNull=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodNullable=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,innerType:t._def.innerType.toJSON()}},t}return r(t,e),t.create=function(e){return e instanceof t?e:new t({t:i.ZodTypes.nullable,innerType:e})},t}(n(592).ZodType);t.ZodNullable=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodNumber=void 0;var o=n(618),a=n(596),s=n(599),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t.min=function(e,n){return t.refinement((function(t){return t>=e}),i({code:a.ZodIssueCode.too_small,minimum:e,type:"number",inclusive:!0},o.errorUtil.errToObj(n)))},t.max=function(e,n){return t.refinement((function(t){return t<=e}),i({code:a.ZodIssueCode.too_big,maximum:e,type:"number",inclusive:!0},o.errorUtil.errToObj(n)))},t.int=function(e){return t.refinement((function(e){return Number.isInteger(e)}),i({code:a.ZodIssueCode.invalid_type,expected:"integer",received:"number"},o.errorUtil.errToObj(e)))},t.positive=function(e){return t.refinement((function(e){return e>0}),i({code:a.ZodIssueCode.too_small,minimum:0,type:"number",inclusive:!1},o.errorUtil.errToObj(e)))},t.negative=function(e){return t.refinement((function(e){return e<0}),i({code:a.ZodIssueCode.too_big,maximum:0,type:"number",inclusive:!1},o.errorUtil.errToObj(e)))},t.nonpositive=function(e){return t.refinement((function(e){return e<=0}),i({code:a.ZodIssueCode.too_big,maximum:0,type:"number",inclusive:!0},o.errorUtil.errToObj(e)))},t.nonnegative=function(e){return t.refinement((function(e){return e>=0}),i({code:a.ZodIssueCode.too_small,minimum:0,type:"number",inclusive:!0},o.errorUtil.errToObj(e)))},t}return r(t,e),t.create=function(){return new t({t:s.ZodTypes.number})},t}(n(592).ZodType);t.ZodNumber=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0,(t.errorUtil||(t.errorUtil={})).errToObj=function(e){return"string"===typeof e?{message:e}:e||{}}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodObject=t.mergeObjects=void 0;var s=n(620),c=n(621),u=n(599),l=n(592),d=n(614);t.mergeObjects=function(e){return function(t){var n=s.objectUtil.mergeShapes(e._def.shape(),t._def.shape());return new h({t:u.ZodTypes.object,checks:a(e._def.checks||[],t._def.checks||[]),unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return n}})}};var p=function(e){return function(t){return new h(i(i({},e),{shape:function(){return i(i({},e.shape()),t)}}))}},f=function(e){return{t:e.t,shape:Object.assign.apply(Object,a([{}],Object.keys(e.shape()).map((function(t){var n;return(n={})[t]=e.shape()[t].toJSON(),n}))))}},h=function(e){function n(){var r=null!==e&&e.apply(this,arguments)||this;return r.toJSON=function(){return f(r._def)},r.strict=function(){return new n(i(i({},r._def),{unknownKeys:"strict"}))},r.strip=function(){return new n(i(i({},r._def),{unknownKeys:"strip"}))},r.passthrough=function(){return new n(i(i({},r._def),{unknownKeys:"passthrough"}))},r.nonstrict=r.passthrough,r.augment=p(r._def),r.extend=p(r._def),r.setKey=function(e,t){var n;return r.augment(((n={})[e]=t,n))},r.merge=t.mergeObjects(r),r.catchall=function(e){return new n(i(i({},r._def),{catchall:e}))},r.pick=function(e){var t={};return Object.keys(e).map((function(e){t[e]=r.shape[e]})),new n(i(i({},r._def),{shape:function(){return t}}))},r.omit=function(e){var t={};return Object.keys(r.shape).map((function(n){-1===Object.keys(e).indexOf(n)&&(t[n]=r.shape[n])})),new n(i(i({},r._def),{shape:function(){return t}}))},r.partial=function(){var e={};for(var t in r.shape){var o=r.shape[t];e[t]=o.isOptional()?o:o.optional()}return new n(i(i({},r._def),{shape:function(){return e}}))},r.primitives=function(){var e={};for(var t in r.shape)c.isScalar(r.shape[t])&&(e[t]=r.shape[t]);return new n(i(i({},r._def),{shape:function(){return e}}))},r.nonprimitives=function(){var e={};for(var t in r.shape)c.isScalar(r.shape[t])||(e[t]=r.shape[t]);return new n(i(i({},r._def),{shape:function(){return e}}))},r.deepPartial=function(){var e={};for(var t in r.shape){var o=r.shape[t];e[t]=o instanceof n?o.isOptional()?o:o.deepPartial().optional():o.isOptional()?o:o.optional()}return new n(i(i({},r._def),{shape:function(){return e}}))},r}return r(n,e),Object.defineProperty(n.prototype,"shape",{get:function(){return this._def.shape()},enumerable:!1,configurable:!0}),n.create=function(e){return new n({t:u.ZodTypes.object,shape:function(){return e},unknownKeys:"strip",catchall:d.ZodNever.create()})},n.lazycreate=function(e){return new n({t:u.ZodTypes.object,shape:e,unknownKeys:"strip",catchall:d.ZodNever.create()})},n}(l.ZodType);t.ZodObject=h},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.objectUtil=void 0;var o=n(591);(t.objectUtil||(t.objectUtil={})).mergeShapes=function(e,t){var n,a,s=Object.keys(e),c=Object.keys(t),u=s.filter((function(e){return-1!==c.indexOf(e)})),l={};try{for(var d=i(u),p=d.next();!p.done;p=d.next()){var f=p.value;l[f]=o.ZodIntersection.create(e[f],t[f])}}catch(h){n={error:h}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}return r(r(r({},e),t),l)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScalar=void 0;var r=n(591),i=n(595);t.isScalar=function(e,n){void 0===n&&(n={root:!0});var o=e._def,a=!1;switch(o.t){case r.ZodTypes.string:case r.ZodTypes.number:case r.ZodTypes.bigint:case r.ZodTypes.boolean:case r.ZodTypes.undefined:case r.ZodTypes.null:a=!0;break;case r.ZodTypes.any:case r.ZodTypes.unknown:case r.ZodTypes.never:case r.ZodTypes.void:a=!1;break;case r.ZodTypes.array:if(!1===n.root)return!1;a=t.isScalar(o.type,{root:!1});break;case r.ZodTypes.object:a=!1;break;case r.ZodTypes.union:a=o.options.every((function(e){return t.isScalar(e)}));break;case r.ZodTypes.intersection:a=t.isScalar(o.left)&&t.isScalar(o.right);break;case r.ZodTypes.tuple:a=o.items.every((function(e){return t.isScalar(e,{root:!1})}));break;case r.ZodTypes.lazy:a=t.isScalar(o.getter());break;case r.ZodTypes.literal:case r.ZodTypes.enum:case r.ZodTypes.nativeEnum:a=!0;break;case r.ZodTypes.function:case r.ZodTypes.record:case r.ZodTypes.map:a=!1;break;case r.ZodTypes.date:a=!0;break;case r.ZodTypes.promise:a=!1;break;case r.ZodTypes.transformer:a=t.isScalar(o.output);break;case r.ZodTypes.optional:case r.ZodTypes.nullable:a=t.isScalar(o.innerType);break;default:i.util.assertNever(o)}return a}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodOptional=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,innerType:t._def.innerType.toJSON()}},t}return r(t,e),t.create=function(e){return e instanceof t?e:new t({t:i.ZodTypes.optional,innerType:e})},t}(n(592).ZodType);t.ZodOptional=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodPromise=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,type:t._def.type.toJSON()}},t}return r(t,e),t.create=function(e){return new t({t:i.ZodTypes.promise,type:e})},t}(n(592).ZodType);t.ZodPromise=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodRecord=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,valueType:t._def.valueType.toJSON()}},t}return r(t,e),t.create=function(e){return new t({t:i.ZodTypes.record,valueType:e})},t}(n(592).ZodType);t.ZodRecord=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodString=void 0;var o=n(618),a=n(596),s=n(599),c=n(592),u=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,l=/([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}){1}/i,d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputSchema=t,t.outputSchema=t,t.toJSON=function(){return t._def},t.min=function(e,n){return t.refinement((function(t){return t.length>=e}),i({code:a.ZodIssueCode.too_small,minimum:e,type:"string",inclusive:!0},o.errorUtil.errToObj(n)))},t.max=function(e,n){return t.refinement((function(t){return t.length<=e}),i({code:a.ZodIssueCode.too_big,maximum:e,type:"string",inclusive:!0},o.errorUtil.errToObj(n)))},t._regex=function(e,n,r){return t.refinement((function(t){return e.test(t)}),i({validation:n,code:a.ZodIssueCode.invalid_string},o.errorUtil.errToObj(r)))},t.email=function(e){return t._regex(u,"email",e)},t.url=function(e){return t.refinement((function(e){try{return new URL(e),!0}catch(t){return!1}}),i({code:a.ZodIssueCode.invalid_string,validation:"url"},o.errorUtil.errToObj(e)))},t.uuid=function(e){return t._regex(l,"uuid",e)},t.regex=function(e,n){return t._regex(e,"regex",n)},t.nonempty=function(e){return t.min(1,o.errorUtil.errToObj(e))},t}return r(t,e),t.prototype.length=function(e,t){return this.min(e,t).max(e,t)},t.create=function(){return new t({t:s.ZodTypes.string,validation:{}})},t}(c.ZodType);t.ZodString=d},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodTransformer=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,left:t._def.input.toJSON(),right:t._def.output.toJSON()}},t}return r(t,e),Object.defineProperty(t.prototype,"output",{get:function(){return this._def.output},enumerable:!1,configurable:!0}),t.create=function(e,n,r){return new t({t:i.ZodTypes.transformer,input:e,output:n,transformer:r})},t.fromSchema=function(e){return new t({t:i.ZodTypes.transformer,input:e,output:e,transformer:function(e){return e}})},t}(n(592).ZodType);t.ZodTransformer=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodUndefined=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.undefined})},t}(n(592).ZodType);t.ZodUndefined=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodUnion=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return{t:t._def.t,options:t._def.options.map((function(e){return e.toJSON()}))}},t}return r(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return this._def.options},enumerable:!1,configurable:!0}),t.create=function(e){return new t({t:i.ZodTypes.union,options:e})},t}(n(592).ZodType);t.ZodUnion=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ZodVoid=void 0;var i=n(599),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toJSON=function(){return t._def},t}return r(t,e),t.create=function(){return new t({t:i.ZodTypes.void})},t}(n(592).ZodType);t.ZodVoid=o},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ZodCodeGenerator=void 0;var i=n(595),o=n(591),a=function(e){return e.isOptional()},s=function(){function e(){var e=this;this.seen=[],this.serial=0,this.randomId=function(){return"IZod"+e.serial++},this.findBySchema=function(t){return e.seen.find((function(e){return e.schema===t}))},this.findById=function(t){var n=e.seen.find((function(e){return e.id===t}));if(!n)throw new Error("Unfound ID: "+t);return n},this.dump=function(){return"\ntype Identity<T> = T;\n\n"+e.seen.map((function(e){return"type "+e.id+" = Identity<"+e.type+">;"})).join("\n\n")+"\n"},this.setType=function(t,n){var r=e.findById(t);return r.type=n,r},this.generate=function(t){var n,s,c,u,l=e.findBySchema(t);if(l)return l;var d=t._def,p=e.randomId(),f={schema:t,id:p,type:"__INCOMPLETE__"};switch(e.seen.push(f),d.t){case o.ZodTypes.string:return e.setType(p,"string");case o.ZodTypes.number:return e.setType(p,"number");case o.ZodTypes.bigint:return e.setType(p,"bigint");case o.ZodTypes.boolean:return e.setType(p,"boolean");case o.ZodTypes.date:return e.setType(p,"Date");case o.ZodTypes.undefined:return e.setType(p,"undefined");case o.ZodTypes.null:return e.setType(p,"null");case o.ZodTypes.any:return e.setType(p,"any");case o.ZodTypes.unknown:return e.setType(p,"unknown");case o.ZodTypes.never:return e.setType(p,"never");case o.ZodTypes.void:return e.setType(p,"void");case o.ZodTypes.literal:var h=d.value,m="string"===typeof h?'"'+h+'"':""+h;return e.setType(p,m);case o.ZodTypes.enum:return e.setType(p,d.values.map((function(e){return'"'+e+'"'})).join(" | "));case o.ZodTypes.object:var g=[],v=d.shape();for(var y in v){var b=v[y],_=e.generate(b),C=a(b)?"?":"";g.push(""+y+C+": "+_.id)}var I="{\n"+g.map((function(e){return"  "+e+";"})).join("\n")+"\n}";e.setType(p,""+I);break;case o.ZodTypes.tuple:var w=[];try{for(var E=r(d.items),S=E.next();!S.done;S=E.next()){var T=S.value,O=e.generate(T);w.push(O.id)}}catch(L){n={error:L}}finally{try{S&&!S.done&&(s=E.return)&&s.call(E)}finally{if(n)throw n.error}}var P="[\n"+w.map((function(e){return"  "+e+","})).join("\n")+"\n]";return e.setType(p,""+P);case o.ZodTypes.array:return e.setType(p,e.generate(d.type).id+"[]");case o.ZodTypes.function:var x=e.generate(d.args),A=e.generate(d.returns);return e.setType(p,"(...args: "+x.id+")=>"+A.id);case o.ZodTypes.promise:var N=e.generate(d.type);return e.setType(p,"Promise<"+N.id+">");case o.ZodTypes.union:var R=[];try{for(var D=r(d.options),k=D.next();!k.done;k=D.next())T=k.value,O=e.generate(T),R.push(O.id)}catch(M){c={error:M}}finally{try{k&&!k.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}return e.setType(p,R.join(" | "));case o.ZodTypes.intersection:return e.setType(p,e.generate(d.left).id+" & "+e.generate(d.right).id);case o.ZodTypes.record:return e.setType(p,"{[k:string]: "+e.generate(d.valueType).id+"}");case o.ZodTypes.transformer:return e.setType(p,e.generate(d.output).id);case o.ZodTypes.map:return e.setType(p,"Map<"+e.generate(d.keyType).id+", "+e.generate(d.valueType).id+">");case o.ZodTypes.lazy:var U=d.getter();return e.setType(p,e.generate(U).id);case o.ZodTypes.nativeEnum:return e.setType(p,"asdf");case o.ZodTypes.optional:return e.setType(p,e.generate(d.innerType).id+" | undefined");case o.ZodTypes.nullable:return e.setType(p,e.generate(d.innerType).id+" | null");default:i.util.assertNever(d)}return e.findById(p)}}return e.create=function(){return new e},e}();t.ZodCodeGenerator=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){e.exports=function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function t(n,r){function i(t,i,o){if("undefined"!==typeof document){"number"===typeof(o=e({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=t+"="+n.write(i,t)+a}}return Object.create({set:i,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},i=0;i<t.length;i++){var o=t[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=n.read(a,s),e===s)break}catch(c){}}return e?r[e]:r}},remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&e.push(a)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e){return{ok:!0,value:e}}function i(e){return{ok:!1,error:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Result=t.failure=t.success=void 0,t.success=r,t.failure=i,t.Result={success:r,failure:i}},function(e,t,n){var r=n(636),i=n(637),o=String.fromCharCode(0);function a(e){this.mode=e===Array?"array":"string",this.clear()}a.prototype.clear=function(){this.root={},this.size=0},a.prototype.set=function(e,t){for(var n,r=this.root,i=0,a=e.length;i<a;i++)r=r[n=e[i]]||(r[n]={});return o in r||this.size++,r[o]=t,this},a.prototype.update=function(e,t){for(var n,r=this.root,i=0,a=e.length;i<a;i++)r=r[n=e[i]]||(r[n]={});return o in r||this.size++,r[o]=t(r[o]),this},a.prototype.get=function(e){var t,n,r=this.root;for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return;if(o in r)return r[o]},a.prototype.delete=function(e){var t,n,r,i,a=this.root,s=null,c=null;for(r=0,i=e.length;r<i;r++){if(t=a,"undefined"===typeof(a=a[n=e[r]]))return!1;null!==s?Object.keys(a).length>1&&(s=null,c=null):Object.keys(a).length<2&&(s=t,c=n)}return o in a&&(this.size--,s?delete s[c]:delete a[o],!0)},a.prototype.has=function(e){for(var t=this.root,n=0,r=e.length;n<r;n++)if("undefined"===typeof(t=t[e[n]]))return!1;return o in t},a.prototype.find=function(e){var t,n,r="string"===typeof e,i=this.root,a=[];for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(i=i[e[t]]))return a;for(var s,c=[i],u=[e];c.length;)for(s in e=u.pop(),i=c.pop())s!==o?(c.push(i[s]),u.push(r?e+s:e.concat(s))):a.push([e,i[o]]);return a},a.prototype.values=function(e){var t,n,r=this.root,a=[];if(e)for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty();return a.push(r),new i((function(){for(var e,t,n=!1;a.length;){for(t in e=a.pop())t!==o?a.push(e[t]):n=!0;if(n)return{done:!1,value:e[o]}}return{done:!0}}))},a.prototype.prefixes=function(e){var t,n,r=this.root,a=[],s=[],c="string"===this.mode;if(e){for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty()}else e=c?"":[];return a.push(r),s.push(e),new i((function(){for(var e,t,n,r=!1;a.length;){for(n in e=a.pop(),t=s.pop(),e)n!==o?(a.push(e[n]),s.push(c?t+n:t.concat(n))):r=!0;if(r)return{done:!1,value:t}}return{done:!0}}))},a.prototype.keys=a.prototype.prefixes,a.prototype.entries=function(e){var t,n,r=this.root,a=[],s=[],c="string"===this.mode;if(e){for(t=0,n=e.length;t<n;t++)if("undefined"===typeof(r=r[e[t]]))return i.empty()}else e=c?"":[];return a.push(r),s.push(e),new i((function(){for(var e,t,n,r=!1;a.length;){for(n in e=a.pop(),t=s.pop(),e)n!==o?(a.push(e[n]),s.push(c?t+n:t.concat(n))):r=!0;if(r)return{done:!1,value:[t,e[o]]}}return{done:!0}}))},"undefined"!==typeof Symbol&&(a.prototype[Symbol.iterator]=a.prototype.entries),a.prototype.inspect=function(){for(var e,t=new Array(this.size),n=this.entries(),r=0;!(e=n.next()).done;)t[r++]=e.value;return Object.defineProperty(t,"constructor",{value:a,enumerable:!1}),t},"undefined"!==typeof Symbol&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.prototype.toJSON=function(){return this.root},a.from=function(e){var t=new a;return r(e,(function(e,n){t.set(n,e)})),t},a.SENTINEL=o,e.exports=a},function(e,t){var n="undefined"!==typeof ArrayBuffer,r="undefined"!==typeof Symbol;function i(e,t){var i,o,a,s,c;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if("function"!==typeof t)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||n&&ArrayBuffer.isView(e)||"string"===typeof e||"[object Arguments]"===e.toString())for(a=0,s=e.length;a<s;a++)t(e[a],a);else if("function"!==typeof e.forEach)if(r&&Symbol.iterator in e&&"function"!==typeof e.next&&(e=e[Symbol.iterator]()),"function"!==typeof e.next)for(o in e)e.hasOwnProperty(o)&&t(e[o],o);else for(i=e,a=0;!0!==(c=i.next()).done;)t(c.value,a),a++;else e.forEach(t)}i.forEachWithNullKeys=function(e,t){var i,o,a,s,c;if(!e)throw new Error("obliterator/forEachWithNullKeys: invalid iterable.");if("function"!==typeof t)throw new Error("obliterator/forEachWithNullKeys: expecting a callback.");if(Array.isArray(e)||n&&ArrayBuffer.isView(e)||"string"===typeof e||"[object Arguments]"===e.toString())for(a=0,s=e.length;a<s;a++)t(e[a],null);else if(e instanceof Set)e.forEach((function(e){t(e,null)}));else if("function"!==typeof e.forEach)if(r&&Symbol.iterator in e&&"function"!==typeof e.next&&(e=e[Symbol.iterator]()),"function"!==typeof e.next)for(o in e)e.hasOwnProperty(o)&&t(e[o],o);else for(i=e,a=0;!0!==(c=i.next()).done;)t(c.value,null),a++;else e.forEach(t)},e.exports=i},function(e,t){function n(e){Object.defineProperty(this,"_next",{writable:!1,enumerable:!1,value:e}),this.done=!1}n.prototype.next=function(){if(this.done)return{done:!0};var e=this._next();return e.done&&(this.done=!0),e},"undefined"!==typeof Symbol&&(n.prototype[Symbol.iterator]=function(){return this}),n.of=function(){var e=arguments,t=e.length,r=0;return new n((function(){return r>=t?{done:!0}:{done:!1,value:e[r++]}}))},n.empty=function(){var e=new n(null);return e.done=!0,e},n.is=function(e){return e instanceof n||"object"===typeof e&&null!==e&&"function"===typeof e.next},e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(572);function i(){var e=Object(r.useState)(0)[1];return Object(r.useCallback)((function(){return e((function(e){return e+1}))}),[])}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.MOUSE="MOUSE",e.TOUCH="TOUCH"}(r||(r={}))},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__14.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__13.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__15.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__136.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__135.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__134.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__17.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__16.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__127.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__126.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__52.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__51.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__50.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__41.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__23.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__24.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__21.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__20.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__46.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__45.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__44.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__43.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__49.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__48.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__47.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__42.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__25.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__26.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__22.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__27.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__19.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__18.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__12.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__130.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__129.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__128.png"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(572),i=n(686),o=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object(r.useCallback)((function(t){e.forEach((function(e){Object(i.a)(e,t)}))}),o(e))}},function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},function(e,t,n){},function(e,t,n){!function(){"use strict";var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(){if("undefined"!==typeof window){var n=Array.prototype.slice,r=Element.prototype.matches||Element.prototype.msMatchesSelector,i=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),o=function(){function o(e,n){t(this,o),this._inertManager=n,this._rootElement=e,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return e(o,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(null!==this._savedAriaHidden?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach((function(e){this._unmanageNode(e.node)}),this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(e){var t=this;u(e,(function(e){return t._visitNode(e)}));var n=document.activeElement;if(!document.body.contains(e)){for(var r=e,i=void 0;r;){if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){i=r;break}r=r.parentNode}i&&(n=i.activeElement)}e.contains(n)&&(n.blur(),n===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e;t!==this._rootElement&&t.hasAttribute("inert")&&this._adoptInertRoot(t),(r.call(t,i)||t.hasAttribute("tabindex"))&&this._manageNode(t)}}},{key:"_manageNode",value:function(e){var t=this._inertManager.register(e,this);this._managedNodes.add(t)}},{key:"_unmanageNode",value:function(e){var t=this._inertManager.deregister(e,this);t&&this._managedNodes.delete(t)}},{key:"_unmanageSubtree",value:function(e){var t=this;u(e,(function(e){return t._unmanageNode(e)}))}},{key:"_adoptInertRoot",value:function(e){var t=this._inertManager.getInertRoot(e);t||(this._inertManager.setInert(e,!0),t=this._inertManager.getInertRoot(e)),t.managedNodes.forEach((function(e){this._manageNode(e.node)}),this)}},{key:"_onMutation",value:function(e,t){e.forEach((function(e){var t=e.target;if("childList"===e.type)n.call(e.addedNodes).forEach((function(e){this._makeSubtreeUnfocusable(e)}),this),n.call(e.removedNodes).forEach((function(e){this._unmanageSubtree(e)}),this);else if("attributes"===e.type)if("tabindex"===e.attributeName)this._manageNode(t);else if(t!==this._rootElement&&"inert"===e.attributeName&&t.hasAttribute("inert")){this._adoptInertRoot(t);var r=this._inertManager.getInertRoot(t);this._managedNodes.forEach((function(e){t.contains(e.node)&&r._manageNode(e.node)}))}}),this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return null!==this._savedAriaHidden}},{key:"savedAriaHidden",set:function(e){this._savedAriaHidden=e},get:function(){return this._savedAriaHidden}}]),o}(),a=function(){function n(e,r){t(this,n),this._node=e,this._overrodeFocusMethod=!1,this._inertRoots=new Set([r]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return e(n,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var e=this._node;null!==this._savedTabIndex?e.setAttribute("tabindex",this._savedTabIndex):e.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete e.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var e=this.node;if(r.call(e,i)){if(-1===e.tabIndex&&this.hasSavedTabIndex)return;e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex),e.setAttribute("tabindex","-1"),e.nodeType===Node.ELEMENT_NODE&&(e.focus=function(){},this._overrodeFocusMethod=!0)}else e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex,e.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.add(e)}},{key:"removeInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.delete(e),0===this._inertRoots.size&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return null!==this._savedTabIndex}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(e){this._throwIfDestroyed(),this._savedTabIndex=e},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),n}(),s=function(){function i(e){if(t(this,i),!e)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=e,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),l(e.head||e.body||e.documentElement),"loading"===e.readyState?e.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return e(i,[{key:"setInert",value:function(e,t){if(t){if(this._inertRoots.has(e))return;var n=new o(e,this);if(e.setAttribute("inert",""),this._inertRoots.set(e,n),!this._document.body.contains(e))for(var r=e.parentNode;r;)11===r.nodeType&&l(r),r=r.parentNode}else{if(!this._inertRoots.has(e))return;this._inertRoots.get(e).destructor(),this._inertRoots.delete(e),e.removeAttribute("inert")}}},{key:"getInertRoot",value:function(e){return this._inertRoots.get(e)}},{key:"register",value:function(e,t){var n=this._managedNodes.get(e);return void 0!==n?n.addInertRoot(t):n=new a(e,t),this._managedNodes.set(e,n),n}},{key:"deregister",value:function(e,t){var n=this._managedNodes.get(e);return n?(n.removeInertRoot(t),n.destroyed&&this._managedNodes.delete(e),n):null}},{key:"_onDocumentLoaded",value:function(){n.call(this._document.querySelectorAll("[inert]")).forEach((function(e){this.setInert(e,!0)}),this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(e,t){var i=this;e.forEach((function(e){switch(e.type){case"childList":n.call(e.addedNodes).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=n.call(e.querySelectorAll("[inert]"));r.call(e,"[inert]")&&t.unshift(e),t.forEach((function(e){this.setInert(e,!0)}),i)}}),i);break;case"attributes":if("inert"!==e.attributeName)return;var t=e.target,o=t.hasAttribute("inert");i.setInert(t,o)}}),this)}}]),i}();if(!Element.prototype.hasOwnProperty("inert")){var c=new s(document);Object.defineProperty(Element.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(e){c.setInert(this,e)}})}}function u(e,t,n){if(e.nodeType==Node.ELEMENT_NODE){var r=e;t&&t(r);var i=r.shadowRoot;if(i)return void u(i,t,i);if("content"==r.localName){for(var o=r,a=o.getDistributedNodes?o.getDistributedNodes():[],s=0;s<a.length;s++)u(a[s],t,n);return}if("slot"==r.localName){for(var c=r,l=c.assignedNodes?c.assignedNodes({flatten:!0}):[],d=0;d<l.length;d++)u(l[d],t,n);return}}for(var p=e.firstChild;null!=p;)u(p,t,n),p=p.nextSibling}function l(e){if(!e.querySelector("style#inert-style, link#inert-style")){var t=document.createElement("style");t.setAttribute("id","inert-style"),t.textContent="\n[inert] {\n  pointer-events: none;\n  cursor: default;\n}\n\n[inert], [inert] * {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n",e.appendChild(t)}}}()}()},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(572),i=n.n(r),o=n(696),a=667;function s(){var e=Object(r.useContext)(c),t=Object(r.useContext)(u),n=Object(o.a)("screen and (max-width: "+t+"px)");return e||(n?"compact":"regular")}var c=i.a.createContext(void 0),u=i.a.createContext(a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(572);function i(e){var t=Object(r.useState)((function(){return window.matchMedia(e).matches})),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=window.matchMedia(e),n=function(){return i(t.matches)},r="addEventListener"in t;return r?t.addEventListener("change",n):t.addListener(n),i(t.matches),function(){r?t.removeEventListener("change",n):t.removeListener(n)}}),[e]),n}},function(e,t,n){},function(e,t,n){"use strict";function r(e){return null!=e&&"string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e&&"type"in e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(700),i=n(704),o=n(703),a=n(701),s=function(){function e(e){void 0===e&&(e={}),this.status=e.status||r.a.NONE,this.data=e.data,this.error=e.error}return Object.defineProperty(e.prototype,"isOK",{get:function(){return this.status===r.a.OK},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDisconnected",{get:function(){return this.status===r.a.DISCONNECTED},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCanceled",{get:function(){return this.status===r.a.CANCELED},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTimeout",{get:function(){return this.status===r.a.TIMEOUT},enumerable:!1,configurable:!0}),e.createWithOptionalData=function(t){return new e({status:r.a.OK,data:t})},e.createFromError=function(t){var n=Object(a.a)(t);return n?t instanceof Error||(n.message=JSON.stringify(t),n.stack=(new Error).stack):n={message:"No error specified",stack:(new Error).stack},new e({status:c(t),error:n})},e.deserialize=function(t){if(!t)throw new o.a("[MessagingResponse] no serialized data to deserialize");var n=new e;n.status=t.status;var r=t.data;r&&(n.data=r);var i=t.error;return i&&(n.error=i),u(n),n},e.prototype.serialize=function(){u(this);var e={status:this.status},t=this.data;t&&(e.data=t);var n=this.error;return n&&(e.error=n),e},e}();function c(e){return e&&e instanceof Error?e instanceof o.a?r.a.BAD_REQUEST:r.a.ERROR:r.a.UNDEFINED_ERROR_TYPE}function u(e){var t=e.status,n=e.error;if(t===r.a.NONE)throw new i.a("[MessagingResponse] status was never set");if(n&&t===r.a.OK)throw new i.a("[MessagingResponse] error can not be set if the status is OK")}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.NONE="NONE",e.OK="OK",e.DISCONNECTED="DISCONNECTED",e.CANCELED="CANCELED",e.BAD_REQUEST="BAD_REQUEST",e.TIMEOUT="TIMEOUT",e.ERROR="ERROR",e.UNDEFINED_ERROR_TYPE="UNDEFINED_ERROR_TYPE"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(702);function i(e){return e?{message:e.message,type:e.type,stack:function(e){if(!e||!Object(r.g)(e.stack))return null;var t=e.stack.trim().split("\n"),n=t.length;if(n>500){var i=n-500;t.splice(400,i,"\u2026 "+i+" lines truncated \u2026")}return t.join("\n")}(e),lineNumber:o(e),context:a(e.context)}:null}function o(e){if(!e)return null;if(e.lineNumber)return e.lineNumber;if(e.line)return e.line;if(Object(r.g)(e.stack)){var t=e.stack.split("\n")[1];if(Object(r.g)(t)){var n=t.split(":"),i=n[n.length-2],o=parseInt(i,10);if("number"===typeof o&&!Number.isNaN(o))return o}}return null}var a=function(e){var t="";try{var n=e&&e.toJSON&&e.toJSON()||e;t=Object(r.f)(n)?""+n:JSON.stringify(n)}catch(a){var i={};for(var o in e)i[o]=s(e,o);t=JSON.stringify(i)}return t};function s(e,t){var n=e[t];if(Object(r.f)(n))return n;var i="";try{var o=n&&n.toJSON&&n.toJSON()||n;i=Object(r.f)(o)?""+o:JSON.stringify(o)}catch(a){try{i=n+" (could not `JSON.stringify()`)"}catch(s){i="(cannot stringify value)"}}return i}},function(e,t,n){"use strict";function r(e){return"function"===typeof e}function i(e){return"number"===typeof e}function o(e){return Boolean(e&&"function"===typeof e.then)}function a(e){return null!==e&&void 0!==e}function s(e){return"object"===typeof e&&null!==e&&e.constructor===Object}function c(e){return"string"===typeof e}function u(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function l(e){if(!e)return!0;if(function(e){return!!Array.isArray(e)||!!e&&"[object Arguments]"===Object.prototype.toString.call(e)}(e)||c(e))return!e.length;if(e._isCwCollection)return!e.length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}n.d(t,"c",(function(){return r})),n.d(t,"e",(function(){return i})),n.d(t,"h",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"b",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(704),i=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(e){function t(t){var n=e.call(this,t)||this;return n.name="MessagingArgumentError",n}return i(t,e),t}(r.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="MessagingError",t.isMessagingError=!0,t}return r(t,e),t}(Error)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(703),i=function(){function e(e,t){if(!e)throw new r.a("ProtocolMetadata: no protocol name");if(!t)throw new r.a("ProtocolMetadata: Invalid list of protocol methods");this.protocolName=e,this.protocolMethodNames=t}return e.prototype.isImplementedBy=function(e){var t,n;if(!e)return!1;try{for(var r=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.protocolMethodNames),i=r.next();!i.done;i=r.next())if("function"!==typeof e[i.value])return!1}catch(o){t={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!0},e}()},function(e,t,n){"use strict";function r(){return function(e){return e}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e},o=function(){function e(e){this.listeners=[],this.callbackThisArg=e}return e.prototype.addListener=function(e){this.listeners.indexOf(e)<0&&this.listeners.push(e)},e.prototype.removeListener=function(e){var t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];r.call.apply(r,i([this.callbackThisArg],e))}},e.prototype.toJSON=function(){return this.toString()},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=function(e){throw e};function i(e,t){var n=e instanceof Error?e:new Error(e);if(t&&(n.context=t),r)return r(n);throw e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c}));var r,i=n(1297),o=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e};function s(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i.b.apply(void 0,a([e],t))}function c(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i.a.apply(void 0,a([e],t))}!function(e){e.NONE="NONE",e.LOADING="LOADING",e.LOADED="LOADED",e.RUNNING="RUNNING",e.UNLOADING="UNLOADING",e.UNLOADED="UNLOADED",e.TERMINATED="TERMINATED"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(){function e(){var t=this.constructor;this instanceof e&&(t.ensureMixinDependenciesAreMixedIn(),this.constructMixins&&this.constructMixins())}return e.ensureMixinDependenciesAreMixedIn=function(){this===e||a.has(this)||(a.add(this),Object.getPrototypeOf(this).ensureMixinDependenciesAreMixedIn(),this.hasOwnProperty("mixins")&&this.mixIn.apply(this,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(this.mixins)))},e.mixIn=function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{for(var o=i(n),a=o.next();!a.done;a=o.next()){var s=a.value;s.mixInto(this)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e}(),a=new WeakSet},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(705),i=n(712),o=n(713),a=n(706),s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=new r.a("MessagingFromChildProtocol",new Set(function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}(Array.from(i.a.protocolMethodNames),Array.from(o.a.protocolMethodNames),Object(a.a)()(["isReadyToReceiveMessages","didFinishLaunching","isReadyToTerminateDidChange","didEnd","reportNonFatalError","recordException","willUnload","wantsReload"]))))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(705),i=n(706),o=new r.a("PublishSubscribeProtocol",new Set(Object(i.a)()(["subscribeIdentifierToTopic","publishMessageOnTopicFromIdentifier","unsubscribeIdentifierFromTopic"])))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(705),i=n(706),o=new r.a("ServiceConnectionMessagingProtocol",new Set(Object(i.a)()(["registerService","probeServiceRegistration","connectToService","invokeServiceMethod"])))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(705),i=n(713),o=n(706),a=n(712),s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=new r.a("MessagingToChildProtocol",new Set(function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}(Array.from(a.a.protocolMethodNames),Array.from(i.a.protocolMethodNames),Object(o.a)()(["beginLaunching","hostingStateDidChange","openItems"]))))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.USER_LAUNCH="USER_LAUNCH",e.ITEMS_OPENED="ITEMS_OPENED"}(r||(r={}))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.USER_INITIATED="USER_INITIATED",e.UNCAUGHT_EXCEPTION="UNCAUGHT_EXCEPTION",e.LAUNCH_DEPENDENCY_UNAVAILABLE="LAUNCH_DEPENDENCY_UNAVAILABLE",e.CANNOT_LOAD_STARTUP_DATA="CANNOT_LOAD_STARTUP_DATA",e.TIMEOUT="TIMEOUT",e.MESSAGING_TIMEOUT="MESSAGING_TIMEOUT",e.DISCONNECTED="DISCONNECTED"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(702);function i(e,t){var n,i;if("object"!==typeof e)return!1;if(!t)return!1;try{for(var o=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(!Object(r.c)(e[s]))return!1}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(702),i=n(708),o=function(){function e(){this.contentType="application/json"}return e.prototype.encode=function(e){if(!Object(r.g)(e))try{e=JSON.stringify(e)}catch(t){Object(i.a)("Could not encode object to JSON.",{object:e,error:t})}return e},e.prototype.decode=function(e){if(Object(r.g)(e))try{e=JSON.parse(e)}catch(t){e=null}return e},e.sharedInstance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){var e=this,t=new Promise((function(t,n){e._reject=n,e._resolve=t}));this.then=t.then.bind(t),this.catch=t.catch.bind(t),this.finally=t.finally.bind(t)}return Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Deferred"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolve",{get:function(){return this._resolve},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reject",{get:function(){return this._reject},enumerable:!1,configurable:!0}),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1307),i=n(708),o=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"scheduledInvokeLaterMethods",{get:function(){return this._scheduledInvokeLaterMethods||(this._scheduledInvokeLaterMethods=new Map),this._scheduledInvokeLaterMethods},enumerable:!1,configurable:!0}),t.prototype.invokeLater=function(e,t,n){void 0===t&&(t=0),t<0&&Object(i.a)("millisToWaitToInvoke must be a number >= 0"),n&&!n.length&&Object(i.a)("When provided, optional methodToInvokeIdentifier must be a String with a length > 0");var r=this.scheduledInvokeLaterMethods,o=this._getScheduledInvokeLaterMethodKeyWithValidation(n||e);r.has(o)&&Object(i.a)("An invokeLater has already been scheduled for "+o);var a=setTimeout((function(){var t;r.delete(o),(t=n?e(n):e())&&"function"===typeof t.then&&t.catch((function(e){throw e}))}),t);r.set(o,a)},t.prototype.isInvokeLaterScheduled=function(e){var t=this._getScheduledInvokeLaterMethodKeyWithValidation(e);return this.scheduledInvokeLaterMethods.has(t)},t.prototype.cancelInvokeLater=function(e){var t=this._getScheduledInvokeLaterMethodKeyWithValidation(e),n=this.scheduledInvokeLaterMethods,r=n.get(t);r||Object(i.a)("No invokeLater scheduled matching the methodToInvokeOrMethodToInvokeIdentifier"),globalThis.clearTimeout(r),n.delete(t)},t.prototype.cancelInvokeLaterMethods=function(){var e=this._scheduledInvokeLaterMethods;e&&(e.forEach((function(e){return globalThis.clearTimeout(e)})),e.clear(),this._scheduledInvokeLaterMethods=void 0)},t.prototype._getScheduledInvokeLaterMethodKeyWithValidation=function(e){var t;return"function"===typeof e?t=e.toString():e&&e.length>0?t=e:Object(i.a)("methodToInvokeOrMethodToInvokeIdentifier must be a non-empty String or a Function"),t},t}(r.a)},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.PHONE="PHONE",e.TABLET="TABLET",e.DESKTOP="DESKTOP"}(r||(r={}))},function(e,t,n){},function(e,t,n){},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__29.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__125.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__124.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__123.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__122.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__121.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__120.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__119.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__118.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__117.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__116.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__115.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__114.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__113.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__112.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__111.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__110.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__109.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__108.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__107.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__106.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__105.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__104.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__103.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__102.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__101.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__100.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__99.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__98.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__97.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__96.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__95.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__94.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__93.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__92.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__91.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__90.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__89.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__88.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__87.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__86.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__85.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__84.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__83.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__82.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__81.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__80.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__79.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__78.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__77.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__76.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__75.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__74.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__73.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__72.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__71.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__70.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__69.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__68.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__67.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__66.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__65.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__64.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__63.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__62.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__61.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__60.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__59.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__58.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__57.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__56.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__40.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__39.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__38.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__37.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__36.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__35.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__34.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__33.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__32.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__31.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__30.png"},function(e,t){e.exports="/system/icloud.com/2302Hotfix226/es-mx/r$__28.png"},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(810);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);var o=n(829);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i)},function(e,t,n){"use strict";n.r(t);var r=n(811);n.d(t,"CancelledError",(function(){return r.a}));var i=n(1302);n.d(t,"QueryCache",(function(){return i.a}));var o=n(819);n.d(t,"QueryClient",(function(){return o.a}));var a=n(823);n.d(t,"QueryObserver",(function(){return a.a}));var s=n(824);n.d(t,"QueriesObserver",(function(){return s.a}));var c=n(825);n.d(t,"InfiniteQueryObserver",(function(){return c.a}));var u=n(820);n.d(t,"MutationCache",(function(){return u.a}));var l=n(826);n.d(t,"MutationObserver",(function(){return l.a}));var d=n(817);n.d(t,"setLogger",(function(){return d.b}));var p=n(818);n.d(t,"notifyManager",(function(){return p.a}));var f=n(814);n.d(t,"focusManager",(function(){return f.a}));var h=n(816);n.d(t,"onlineManager",(function(){return h.a}));var m=n(812);n.d(t,"hashQueryKey",(function(){return m.e})),n.d(t,"isError",(function(){return m.g})),n.d(t,"isCancelledError",(function(){return r.d}));var g=n(827);n.d(t,"dehydrate",(function(){return g.a})),n.d(t,"hydrate",(function(){return g.b}));var v=n(828);for(var y in v)["default","CancelledError","QueryCache","QueryClient","QueryObserver","QueriesObserver","InfiniteQueryObserver","MutationCache","MutationObserver","setLogger","notifyManager","focusManager","onlineManager","hashQueryKey","isError","isCancelledError","dehydrate","hydrate"].indexOf(y)<0&&function(e){n.d(t,e,(function(){return v[e]}))}(y)},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(814),i=n(816),o=n(812);function a(e){return Math.min(1e3*Math.pow(2,e),3e4)}function s(e){return"function"===typeof(null==e?void 0:e.cancel)}var c=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function u(e){return e instanceof c}var l=function(e){var t,n,u,l,d=this,p=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){p=!0},this.continueRetry=function(){p=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){u=e,l=t}));var f=function(t){d.isResolved||(d.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),u(t))},h=function(t){d.isResolved||(d.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),l(t))};!function u(){if(!d.isResolved){var l;try{l=e.fn()}catch(m){l=Promise.reject(m)}t=function(e){if(!d.isResolved&&(h(new c(e)),null==d.abort||d.abort(),s(l)))try{l.cancel()}catch(t){}},d.isTransportCancelable=s(l),Promise.resolve(l).then(f).catch((function(t){var s,c;if(!d.isResolved){var l=null!=(s=e.retry)?s:3,f=null!=(c=e.retryDelay)?c:a,m="function"===typeof f?f(d.failureCount,t):f,g=!0===l||"number"===typeof l&&d.failureCount<l||"function"===typeof l&&l(d.failureCount,t);!p&&g?(d.failureCount++,null==e.onFail||e.onFail(d.failureCount,t),Object(o.v)(m).then((function(){if(!r.a.isFocused()||!i.a.isOnline())return new Promise((function(t){n=t,d.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,d.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){p?h(t):u()}))):h(t)}}))}}()}},function(e,t,n){"use strict";n.d(t,"h",(function(){return i})),n.d(t,"l",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"r",(function(){return l})),n.d(t,"w",(function(){return d})),n.d(t,"p",(function(){return p})),n.d(t,"n",(function(){return f})),n.d(t,"m",(function(){return h})),n.d(t,"o",(function(){return m})),n.d(t,"k",(function(){return g})),n.d(t,"j",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"e",(function(){return b})),n.d(t,"q",(function(){return _})),n.d(t,"s",(function(){return C})),n.d(t,"u",(function(){return I})),n.d(t,"g",(function(){return T})),n.d(t,"v",(function(){return O})),n.d(t,"t",(function(){return P})),n.d(t,"d",(function(){return x}));var r=n(813),i="undefined"===typeof window;function o(){}function a(e,t){return"function"===typeof e?e(t):e}function s(e){return"number"===typeof e&&e>=0&&e!==1/0}function c(e){return Array.isArray(e)?e:[e]}function u(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))}function l(e,t,n){var r=e.slice(0);return r[t]=n,r}function d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function p(e,t,n){return S(e)?"function"===typeof t?Object(r.a)({},n,{queryKey:e,queryFn:t}):Object(r.a)({},t,{queryKey:e}):e}function f(e,t,n){return S(e)?"function"===typeof t?Object(r.a)({},n,{mutationKey:e,mutationFn:t}):Object(r.a)({},t,{mutationKey:e}):"function"===typeof e?Object(r.a)({},t,{mutationFn:e}):Object(r.a)({},e)}function h(e,t,n){return S(e)?[Object(r.a)({},t,{queryKey:e}),n]:[e||{},t]}function m(e,t){return S(e)?Object(r.a)({},t,{mutationKey:e}):e}function g(e,t){var n=e.active,r=e.exact,i=e.fetching,o=e.inactive,a=e.predicate,s=e.queryKey,c=e.stale;if(S(s))if(r){if(t.queryHash!==y(s,t.options))return!1}else if(!_(t.queryKey,s))return!1;var u=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,o);if("none"===u)return!1;if("all"!==u){var l=t.isActive();if("active"===u&&!l)return!1;if("inactive"===u&&l)return!1}return("boolean"!==typeof c||t.isStale()===c)&&("boolean"!==typeof i||t.isFetching()===i)&&!(a&&!a(t))}function v(e,t){var n=e.exact,r=e.fetching,i=e.predicate,o=e.mutationKey;if(S(o)){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(o))return!1}else if(!_(t.options.mutationKey,o))return!1}return("boolean"!==typeof r||"loading"===t.state.status===r)&&!(i&&!i(t))}function y(e,t){return((null==t?void 0:t.queryKeyHashFn)||b)(e)}function b(e){var t;return t=c(e),JSON.stringify(t,(function(e,t){return w(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function _(e,t){return function e(t,n){return t===n||typeof t===typeof n&&(!(!t||!n||"object"!==typeof t||"object"!==typeof n)&&!Object.keys(n).some((function(r){return!e(t[r],n[r])})))}(c(e),c(t))}function C(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||w(e)&&w(t)){for(var r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},s=0,c=0;c<o;c++){var u=n?c:i[c];a[u]=C(e[u],t[u]),a[u]===e[u]&&s++}return r===o&&s===r?e:a}return t}function I(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function w(e){if(!E(e))return!1;var t=e.constructor;if("undefined"===typeof t)return!0;var n=t.prototype;return!!E(n)&&!!n.hasOwnProperty("isPrototypeOf")}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"string"===typeof e||Array.isArray(e)}function T(e){return e instanceof Error}function O(e){return new Promise((function(t){setTimeout(t,e)}))}function P(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function x(){if("function"===typeof AbortController)return new AbortController}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1308),i=n(815),o=n(812),a=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.h&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}Object(r.a)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"===typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"===typeof this.focused?this.focused:"undefined"===typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(i.a))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1308),i=n(815),o=n(812),a=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.h&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}Object(r.a)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"===typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine},t}(i.a))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=console;function i(){return r}function o(e){r=e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(812),i=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):Object(r.t)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&Object(r.t)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(813),i=n(812),o=n(1302),a=n(820),s=n(814),c=n(816),u=n(818),l=n(822),d=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new o.a,this.mutationCache=e.mutationCache||new a.a,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=s.a.subscribe((function(){s.a.isFocused()&&c.a.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=c.a.subscribe((function(){s.a.isFocused()&&c.a.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=Object(i.m)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll(Object(r.a)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=Object(i.p)(e),o=this.defaultQueryOptions(r);return this.queryCache.build(this,o).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return u.a.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var i=e.queryKey;return[i,r.setQueryData(i,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=Object(i.m)(e,t)[0],r=this.queryCache;u.a.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var o=this,a=Object(i.m)(e,t,n),s=a[0],c=a[1],l=this.queryCache,d=Object(r.a)({},s,{active:!0});return u.a.batch((function(){return l.findAll(s).forEach((function(e){e.reset()})),o.refetchQueries(d,c)}))},t.cancelQueries=function(e,t,n){var r=this,o=Object(i.m)(e,t,n),a=o[0],s=o[1],c=void 0===s?{}:s;"undefined"===typeof c.revert&&(c.revert=!0);var l=u.a.batch((function(){return r.queryCache.findAll(a).map((function(e){return e.cancel(c)}))}));return Promise.all(l).then(i.l).catch(i.l)},t.invalidateQueries=function(e,t,n){var o,a,s,c=this,l=Object(i.m)(e,t,n),d=l[0],p=l[1],f=Object(r.a)({},d,{active:null==(o=null!=(a=d.refetchActive)?a:d.active)||o,inactive:null!=(s=d.refetchInactive)&&s});return u.a.batch((function(){return c.queryCache.findAll(d).forEach((function(e){e.invalidate()})),c.refetchQueries(f,p)}))},t.refetchQueries=function(e,t,n){var o=this,a=Object(i.m)(e,t,n),s=a[0],c=a[1],l=u.a.batch((function(){return o.queryCache.findAll(s).map((function(e){return e.fetch(void 0,Object(r.a)({},c,{meta:{refetchPage:null==s?void 0:s.refetchPage}}))}))})),d=Promise.all(l).then(i.l);return(null==c?void 0:c.throwOnError)||(d=d.catch(i.l)),d},t.fetchQuery=function(e,t,n){var r=Object(i.p)(e,t,n),o=this.defaultQueryOptions(r);"undefined"===typeof o.retry&&(o.retry=!1);var a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(i.l).catch(i.l)},t.fetchInfiniteQuery=function(e,t,n){var r=Object(i.p)(e,t,n);return r.behavior=Object(l.c)(),this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(i.l).catch(i.l)},t.cancelMutations=function(){var e=this,t=u.a.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(i.l).catch(i.l)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return Object(i.e)(e)===Object(i.e)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return Object(i.q)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return Object(i.e)(e)===Object(i.e)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return Object(i.q)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=Object(r.a)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=Object(i.f)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:Object(r.a)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1308),i=n(818),o=n(821),a=n(812),s=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}Object(r.a)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new o.a({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;i.a.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return"undefined"===typeof e.exact&&(e.exact=!0),this.mutations.find((function(t){return Object(a.j)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return Object(a.j)(e,t)}))},n.notify=function(e){var t=this;i.a.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return i.a.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(a.l)}))}),Promise.resolve())}))},t}(n(815).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(813),i=n(817),o=n(818),a=n(811),s=n(812),c=function(){function e(e){this.options=Object(r.a)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(s.l).catch(s.l)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),Object(i.a)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new a.b({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return Object(r.a)({},e,{failureCount:e.failureCount+1});case"pause":return Object(r.a)({},e,{isPaused:!0});case"continue":return Object(r.a)({},e,{isPaused:!1});case"loading":return Object(r.a)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return Object(r.a)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return Object(r.a)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return Object(r.a)({},e,t.state);default:return e}}(this.state,e),o.a.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function u(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(811),i=n(812);function o(){return{onFetch:function(e){e.fetchFn=function(){var t,n,o,c,u,l,d,p=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,f=null==(o=e.fetchOptions)||null==(c=o.meta)?void 0:c.fetchMore,h=null==f?void 0:f.pageParam,m="forward"===(null==f?void 0:f.direction),g="backward"===(null==f?void 0:f.direction),v=(null==(u=e.state.data)?void 0:u.pages)||[],y=(null==(l=e.state.data)?void 0:l.pageParams)||[],b=Object(i.d)(),_=null==b?void 0:b.signal,C=y,I=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},E=function(e,t,n,r){return C=r?[t].concat(C):[].concat(C,[t]),r?[n].concat(e):[].concat(e,[n])},S=function(t,n,i,o){if(I)return Promise.reject("Cancelled");if("undefined"===typeof i&&!n&&t.length)return Promise.resolve(t);var a={queryKey:e.queryKey,signal:_,pageParam:i,meta:e.meta},s=w(a),c=Promise.resolve(s).then((function(e){return E(t,i,e,o)}));return Object(r.c)(s)&&(c.cancel=s.cancel),c};if(v.length)if(m){var T="undefined"!==typeof h,O=T?h:a(e.options,v);d=S(v,T,O)}else if(g){var P="undefined"!==typeof h,x=P?h:s(e.options,v);d=S(v,P,x,!0)}else!function(){C=[];var t="undefined"===typeof e.options.getNextPageParam,n=!p||!v[0]||p(v[0],0,v);d=n?S([],t,y[0]):Promise.resolve(E([],y[0],v[0]));for(var r=function(n){d=d.then((function(r){if(!p||!v[n]||p(v[n],n,v)){var i=t?y[n]:a(e.options,r);return S(r,t,i)}return Promise.resolve(E(r,y[n],v[n]))}))},i=1;i<v.length;i++)r(i)}();else d=S([]);var A=d.then((function(e){return{pages:e,pageParams:C}}));return A.cancel=function(){I=!0,null==b||b.abort(),Object(r.c)(d)&&d.cancel()},A}}}}function a(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function s(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function c(e,t){if(e.getNextPageParam&&Array.isArray(t)){var n=a(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}function u(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){var n=s(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(813),i=n(1308),o=n(812),a=n(818),s=n(814),c=n(815),u=n(817),l=n(811),d=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.previousSelectError=null,r.bindMethods(),r.setOptions(n),r}Object(i.a)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),p(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return e=this.currentQuery,!1!==(t=this.options).enabled&&("always"===t.refetchOnReconnect||!1!==t.refetchOnReconnect&&h(e,t));var e,t},n.shouldFetchOnWindowFocus=function(){return e=this.currentQuery,!1!==(t=this.options).enabled&&("always"===t.refetchOnWindowFocus||!1!==t.refetchOnWindowFocus&&h(e,t));var e,t},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var i=this.hasListeners();i&&f(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!i||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var o=this.computeRefetchInterval();!i||this.currentQuery===r&&this.options.enabled===n.enabled&&o===this.currentRefetchInterval||this.updateRefetchInterval(o)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},i=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return i(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&i("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var i=t.subscribe((function(t){t.isFetching||(i(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch(Object(r.a)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(o.l)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!o.h&&!this.currentResult.isStale&&Object(o.i)(this.options.staleTime)){var t=Object(o.w)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"===typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!o.h&&!1!==this.options.enabled&&Object(o.i)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||s.a.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0},n.clearRefetchInterval=function(){clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0},n.createResult=function(e,t){var n,r=this.currentQuery,i=this.options,a=this.currentResult,s=this.currentResultState,c=this.currentResultOptions,l=e!==r,d=l?e.state:this.currentQueryInitialState,m=l?this.currentResult:this.previousQueryResult,g=e.state,v=g.dataUpdatedAt,y=g.error,b=g.errorUpdatedAt,_=g.isFetching,C=g.status,I=!1,w=!1;if(t.optimisticResults){var E=this.hasListeners(),S=!E&&p(e,t),T=E&&f(e,r,t,i);(S||T)&&(_=!0,v||(C="loading"))}if(t.keepPreviousData&&!g.dataUpdateCount&&(null==m?void 0:m.isSuccess)&&"error"!==C)n=m.data,v=m.dataUpdatedAt,C=m.status,I=!0;else if(t.select&&"undefined"!==typeof g.data){var O;if(a&&g.data===(null==s?void 0:s.data)&&t.select===(null==(O=this.previousSelect)?void 0:O.fn)&&!this.previousSelectError)n=this.previousSelect.result;else try{n=t.select(g.data),!1!==t.structuralSharing&&(n=Object(o.s)(null==a?void 0:a.data,n)),this.previousSelect={fn:t.select,result:n},this.previousSelectError=null}catch(x){Object(u.a)().error(x),y=x,this.previousSelectError=x,b=Date.now(),C="error"}}else n=g.data;if("undefined"!==typeof t.placeholderData&&"undefined"===typeof n&&("loading"===C||"idle"===C)){var P;if((null==a?void 0:a.isPlaceholderData)&&t.placeholderData===(null==c?void 0:c.placeholderData))P=a.data;else if(P="function"===typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&"undefined"!==typeof P)try{P=t.select(P),!1!==t.structuralSharing&&(P=Object(o.s)(null==a?void 0:a.data,P)),this.previousSelectError=null}catch(x){Object(u.a)().error(x),y=x,this.previousSelectError=x,b=Date.now(),C="error"}"undefined"!==typeof P&&(C="success",n=P,w=!0)}return{status:C,isLoading:"loading"===C,isSuccess:"success"===C,isError:"error"===C,isIdle:"idle"===C,data:n,dataUpdatedAt:v,error:y,errorUpdatedAt:b,failureCount:g.fetchFailureCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:_,isRefetching:_&&"loading"!==C,isLoadingError:"error"===C&&0===g.dataUpdatedAt,isPlaceholderData:w,isPreviousData:I,isRefetchError:"error"===C&&0!==g.dataUpdatedAt,isStale:h(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,i=n.notifyOnChangePropsExclusions;if(!r&&!i)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var o="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,a=e[r]!==t[r],s=null==o?void 0:o.some((function(e){return e===n})),c=null==i?void 0:i.some((function(e){return e===n}));return a&&!c&&(!o||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Object(o.u)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify(Object(r.a)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||Object(l.d)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;a.a.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(c.a);function p(e,t){return function(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||function(e,t){return!1!==t.enabled&&e.state.dataUpdatedAt>0&&("always"===t.refetchOnMount||!1!==t.refetchOnMount&&h(e,t))}(e,t)}function f(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return e.isStaleByTime(t.staleTime)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1308),i=n(812),o=n(818),a=n(823),s=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.queries=[],r.result=[],r.observers=[],r.observersMap={},n&&r.setQueries(n),r}Object(r.a)(t,e);var n=t.prototype;return n.onSubscribe=function(){var e=this;1===this.listeners.length&&this.observers.forEach((function(t){t.subscribe((function(n){e.onUpdate(t,n)}))}))},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.destroy=function(){this.listeners=[],this.observers.forEach((function(e){e.destroy()}))},n.setQueries=function(e,t){this.queries=e,this.updateObservers(t)},n.getCurrentResult=function(){return this.result},n.getOptimisticResult=function(e){return this.findMatchingObservers(e).map((function(e){return e.observer.getOptimisticResult(e.defaultedQueryOptions)}))},n.findMatchingObservers=function(e){var t=this,n=this.observers,r=e.map((function(e){return t.client.defaultQueryObserverOptions(e)})),i=r.flatMap((function(e){var t=n.find((function(t){return t.options.queryHash===e.queryHash}));return null!=t?[{defaultedQueryOptions:e,observer:t}]:[]})),o=i.map((function(e){return e.defaultedQueryOptions.queryHash})),a=r.filter((function(e){return!o.includes(e.queryHash)})),s=n.filter((function(e){return!i.some((function(t){return t.observer===e}))})),c=a.map((function(e,n){if(e.keepPreviousData){var r=s[n];if(void 0!==r)return{defaultedQueryOptions:e,observer:r}}return{defaultedQueryOptions:e,observer:t.getObserver(e)}}));return i.concat(c).sort((function(e,t){return r.indexOf(e.defaultedQueryOptions)-r.indexOf(t.defaultedQueryOptions)}))},n.getObserver=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.observersMap[t.queryHash];return null!=n?n:new a.a(this.client,t)},n.updateObservers=function(e){var t=this;o.a.batch((function(){var n=t.observers,r=t.findMatchingObservers(t.queries);r.forEach((function(t){return t.observer.setOptions(t.defaultedQueryOptions,e)}));var o=r.map((function(e){return e.observer})),a=Object.fromEntries(o.map((function(e){return[e.options.queryHash,e]}))),s=o.map((function(e){return e.getCurrentResult()})),c=o.some((function(e,t){return e!==n[t]}));(n.length!==o.length||c)&&(t.observers=o,t.observersMap=a,t.result=s,t.hasListeners()&&(Object(i.a)(n,o).forEach((function(e){e.destroy()})),Object(i.a)(o,n).forEach((function(e){e.subscribe((function(n){t.onUpdate(e,n)}))})),t.notify()))}))},n.onUpdate=function(e,t){var n=this.observers.indexOf(e);-1!==n&&(this.result=Object(i.r)(this.result,n,t),this.notify())},n.notify=function(){var e=this;o.a.batch((function(){e.listeners.forEach((function(t){t(e.result)}))}))},t}(n(815).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(813),i=n(1308),o=n(823),a=n(822),s=function(e){function t(t,n){return e.call(this,t,n)||this}Object(i.a)(t,e);var n=t.prototype;return n.bindMethods=function(){e.prototype.bindMethods.call(this),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)},n.setOptions=function(t,n){e.prototype.setOptions.call(this,Object(r.a)({},t,{behavior:Object(a.c)()}),n)},n.getOptimisticResult=function(t){return t.behavior=Object(a.c)(),e.prototype.getOptimisticResult.call(this,t)},n.fetchNextPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"forward",pageParam:null==e?void 0:e.pageParam}}})},n.fetchPreviousPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"backward",pageParam:null==e?void 0:e.pageParam}}})},n.createResult=function(t,n){var i,o,s,c,u,l,d=t.state,p=e.prototype.createResult.call(this,t,n);return Object(r.a)({},p,{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Object(a.a)(n,null==(i=d.data)?void 0:i.pages),hasPreviousPage:Object(a.b)(n,null==(o=d.data)?void 0:o.pages),isFetchingNextPage:d.isFetching&&"forward"===(null==(s=d.fetchMeta)||null==(c=s.fetchMore)?void 0:c.direction),isFetchingPreviousPage:d.isFetching&&"backward"===(null==(u=d.fetchMeta)||null==(l=u.fetchMore)?void 0:l.direction)})},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(813),i=n(1308),o=n(821),a=n(818),s=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}Object(i.a)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Object(r.a)({},this.options,{variables:"undefined"!==typeof e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:Object(o.b)(),t=Object(r.a)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;a.a.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(815).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(813);function i(e){return e.state.isPaused}function o(e){return"success"===e.state.status}function a(e,t){var n,r,a=[],s=[];if(!1!==(null==(n=t=t||{})?void 0:n.dehydrateMutations)){var c=t.shouldDehydrateMutation||i;e.getMutationCache().getAll().forEach((function(e){c(e)&&a.push(function(e){return{mutationKey:e.options.mutationKey,state:e.state}}(e))}))}if(!1!==(null==(r=t)?void 0:r.dehydrateQueries)){var u=t.shouldDehydrateQuery||o;e.getQueryCache().getAll().forEach((function(e){u(e)&&s.push(function(e){return{state:e.state,queryKey:e.queryKey,queryHash:e.queryHash}}(e))}))}return{mutations:a,queries:s}}function s(e,t,n){if("object"===typeof t&&null!==t){var i=e.getMutationCache(),o=e.getQueryCache(),a=t.mutations||[],s=t.queries||[];a.forEach((function(t){var o;i.build(e,Object(r.a)({},null==n||null==(o=n.defaultOptions)?void 0:o.mutations,{mutationKey:t.mutationKey}),t.state)})),s.forEach((function(t){var i,a=o.get(t.queryHash);a?a.state.dataUpdatedAt<t.state.dataUpdatedAt&&a.setState(t.state):o.build(e,Object(r.a)({},null==n||null==(i=n.defaultOptions)?void 0:i.queries,{queryKey:t.queryKey,queryHash:t.queryHash}),t.state)}))}}},function(e,t){},function(e,t,n){"use strict";n.r(t),n(1303),n(1304);var r=n(830);n.d(t,"QueryClientProvider",(function(){return r.a})),n.d(t,"useQueryClient",(function(){return r.b}));var i=n(831);n.d(t,"QueryErrorResetBoundary",(function(){return i.a})),n.d(t,"useQueryErrorResetBoundary",(function(){return i.b}));var o=n(832);n.d(t,"useIsFetching",(function(){return o.a}));var a=n(833);n.d(t,"useIsMutating",(function(){return a.a}));var s=n(834);n.d(t,"useMutation",(function(){return s.a}));var c=n(836);n.d(t,"useQuery",(function(){return c.a}));var u=n(838);n.d(t,"useQueries",(function(){return u.a}));var l=n(839);n.d(t,"useInfiniteQuery",(function(){return l.a}));var d=n(840);n.d(t,"useHydrate",(function(){return d.b})),n.d(t,"Hydrate",(function(){return d.a}));var p=n(841);for(var f in p)["default","QueryClientProvider","useQueryClient","QueryErrorResetBoundary","useQueryErrorResetBoundary","useIsFetching","useIsMutating","useMutation","useQuery","useQueries","useInfiniteQuery","useHydrate","Hydrate"].indexOf(f)<0&&function(e){n.d(t,e,(function(){return p[e]}))}(f)},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n(572),i=n.n(r),o=i.a.createContext(void 0),a=i.a.createContext(!1);function s(e){return e&&"undefined"!==typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=o),window.ReactQueryClientContext):o}var c=function(){var e=i.a.useContext(s(i.a.useContext(a)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},u=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,o=e.children;i.a.useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var c=s(r);return i.a.createElement(a.Provider,{value:r},i.a.createElement(c.Provider,{value:t},o))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(572),i=n.n(r);function o(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var a=i.a.createContext(o()),s=function(){return i.a.useContext(a)},c=function(e){var t=e.children,n=i.a.useMemo((function(){return o()}),[]);return i.a.createElement(a.Provider,{value:n},"function"===typeof t?t(n):t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(572),i=n.n(r),o=n(818),a=n(812),s=n(830),c=function(e,t,n,r){var i=e.isFetching(t);n!==i&&r(i)};function u(e,t){var n=i.a.useRef(!1),r=Object(s.b)(),u=Object(a.m)(e,t)[0],l=i.a.useState(r.isFetching(u)),d=l[0],p=l[1],f=i.a.useRef(u);f.current=u;var h=i.a.useRef(d);return h.current=d,i.a.useEffect((function(){n.current=!0,c(r,f.current,h.current,p);var e=r.getQueryCache().subscribe(o.a.batchCalls((function(){n.current&&c(r,f.current,h.current,p)})));return function(){n.current=!1,e()}}),[r]),d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(572),i=n.n(r),o=n(818),a=n(812),s=n(830);function c(e,t){var n=i.a.useRef(!1),r=Object(a.o)(e,t),c=Object(s.b)(),u=i.a.useState(c.isMutating(r)),l=u[0],d=u[1],p=i.a.useRef(r);p.current=r;var f=i.a.useRef(l);return f.current=l,i.a.useEffect((function(){n.current=!0;var e=c.getMutationCache().subscribe(o.a.batchCalls((function(){if(n.current){var e=c.isMutating(p.current);f.current!==e&&d(e)}})));return function(){n.current=!1,e()}}),[c]),l}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(813),i=n(572),o=n.n(i),a=n(818),s=n(812),c=n(826),u=n(830),l=n(835);function d(e,t,n){var i=o.a.useRef(!1),d=o.a.useState(0)[1],p=Object(s.n)(e,t,n),f=Object(u.b)(),h=o.a.useRef();h.current?h.current.setOptions(p):h.current=new c.a(f,p);var m=h.current.getCurrentResult();o.a.useEffect((function(){i.current=!0;var e=h.current.subscribe(a.a.batchCalls((function(){i.current&&d((function(e){return e+1}))})));return function(){i.current=!1,e()}}),[]);var g=o.a.useCallback((function(e,t){h.current.mutate(e,t).catch(s.l)}),[]);if(m.error&&Object(l.a)(void 0,h.current.options.useErrorBoundary,[m.error]))throw m.error;return Object(r.a)({},m,{mutate:g,mutateAsync:m.mutate})}},function(e,t,n){"use strict";function r(e,t,n){return"function"===typeof t?t.apply(void 0,n):"boolean"===typeof t?t:!!e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(823),i=n(812),o=n(837);function a(e,t,n){var a=Object(i.p)(e,t,n);return Object(o.a)(a,r.a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(572),i=n.n(r),o=n(818),a=n(831),s=n(830),c=n(835);function u(e,t){var n=i.a.useRef(!1),r=i.a.useState(0)[1],u=Object(s.b)(),l=Object(a.b)(),d=u.defaultQueryObserverOptions(e);d.optimisticResults=!0,d.onError&&(d.onError=o.a.batchCalls(d.onError)),d.onSuccess&&(d.onSuccess=o.a.batchCalls(d.onSuccess)),d.onSettled&&(d.onSettled=o.a.batchCalls(d.onSettled)),d.suspense&&("number"!==typeof d.staleTime&&(d.staleTime=1e3),0===d.cacheTime&&(d.cacheTime=1)),(d.suspense||d.useErrorBoundary)&&(l.isReset()||(d.retryOnMount=!1));var p=i.a.useState((function(){return new t(u,d)}))[0],f=p.getOptimisticResult(d);if(i.a.useEffect((function(){n.current=!0,l.clearReset();var e=p.subscribe(o.a.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return p.updateResult(),function(){n.current=!1,e()}}),[l,p]),i.a.useEffect((function(){p.setOptions(d,{listeners:!1})}),[d,p]),d.suspense&&f.isLoading)throw p.fetchOptimistic(d).then((function(e){var t=e.data;null==d.onSuccess||d.onSuccess(t),null==d.onSettled||d.onSettled(t,null)})).catch((function(e){l.clearReset(),null==d.onError||d.onError(e),null==d.onSettled||d.onSettled(void 0,e)}));if(f.isError&&!l.isReset()&&!f.isFetching&&Object(c.a)(d.suspense,d.useErrorBoundary,[f.error,p.getCurrentQuery()]))throw f.error;return"tracked"===d.notifyOnChangeProps&&(f=p.trackResult(f,d)),f}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(572),i=n.n(r),o=n(818),a=n(824),s=n(830);function c(e){var t=i.a.useRef(!1),n=i.a.useState(0)[1],c=Object(s.b)(),u=Object(r.useMemo)((function(){return e.map((function(e){var t=c.defaultQueryObserverOptions(e);return t.optimisticResults=!0,t}))}),[e,c]),l=i.a.useState((function(){return new a.a(c,u)}))[0],d=l.getOptimisticResult(u);return i.a.useEffect((function(){t.current=!0;var e=l.subscribe(o.a.batchCalls((function(){t.current&&n((function(e){return e+1}))})));return function(){t.current=!1,e()}}),[l]),i.a.useEffect((function(){l.setQueries(u,{listeners:!1})}),[u,l]),d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(825),i=n(812),o=n(837);function a(e,t,n){var a=Object(i.p)(e,t,n);return Object(o.a)(a,r.a)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(572),i=n.n(r),o=n(827),a=n(830);function s(e,t){var n=Object(a.b)(),r=i.a.useRef(t);r.current=t,i.a.useMemo((function(){e&&Object(o.b)(n,e,r.current)}),[n,e])}var c=function(e){var t=e.children,n=e.options;return s(e.state,n),t}},function(e,t){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRecentDriveDocs=void 0;var r=n(863);Object.defineProperty(t,"useRecentDriveDocs",{enumerable:!0,get:function(){return r.useRecentDriveDocs}})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.useRecentDriveDocs=t.mergeResult=t.parseResponse=t.WAIT_TIME_MILLIS=t.DRIVE_SLOW_NUM=t.DRIVE_FAST_NUM=t.TILE_ITEM_NUM=void 0;var a=n(572),s=n(809),c=n(864),u=n(865),l=n(634),d=n(1291);function p(e,t){var n=e.safeParse(t);if("error"in n)throw new c.BadResponseError(n.error);return n.data}t.TILE_ITEM_NUM=6,t.DRIVE_FAST_NUM=30,t.DRIVE_SLOW_NUM=50,t.WAIT_TIME_MILLIS=5e3,t.parseResponse=p;var f=function(e,t){return r(void 0,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,e(t)];case 1:return n=r.sent(),[2,p(u.recentDriveDocumentsResponseSchema,n)]}}))}))},h=function(e,t,n){return r(void 0,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,e(t,n)];case 1:return r=i.sent(),[2,p(u.recentDriveDocumentsChangesSchema,r)]}}))}))};t.mergeResult=function(e,t){var n=new Set(t.map((function(e){return e.drivewsid})));return o(o([],t,!0),e.filter((function(e){return!n.has(e.drivewsid)})),!0)},t.useRecentDriveDocs=function(e,n){var c,p,m,g,v,y=this;void 0===n&&(n=3e4);var b=e.mode,_=e.fetchRecents,C=e.getChanges,I=(0,a.useState)(!1),w=I[0],E=I[1],S=(0,a.useState)(!1),T=S[0],O=S[1],P=(0,a.useState)(void 0),x=P[0],A=P[1],N=(0,a.useState)(!1),R=N[0],D=N[1],k=(0,a.useState)([]),U=k[0],L=k[1],M=(0,d.useIsMounted)();(0,a.useEffect)((function(){"tile"===b?(M()&&O(!0),setTimeout((function(){M()&&E(!0)}),t.WAIT_TIME_MILLIS)):"app"===b&&M()&&E(!0)}),[b,M]);var j=(0,s.useQuery)("icloud-drive-slow-res",(function(){return f(_,t.DRIVE_SLOW_NUM)}),{retry:!1,enabled:w,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),F=void 0!==j.data,B=j.data;(0,a.useEffect)((function(){void 0!==B&&(A(B.continuationMarker),D(!0),L((function(e){return 0===e.length&&0!==B.documents.length?o([],B.documents,!0):e})))}),[B]),(0,a.useEffect)((function(){var e=null;return M()&&R&&(e=setInterval((function(){return r(y,void 0,void 0,(function(){var e,n,o=this;return i(this,(function(a){switch(a.label){case 0:return[4,h(C,t.DRIVE_SLOW_NUM,x)];case 1:return(e=a.sent())&&((0,u.isRecentChangesStatusCodeResponse)(e)?205===e.statusCode&&r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,f(_,t.DRIVE_SLOW_NUM)];case 1:return e=n.sent(),L(e.documents),A(e.continuationMarker),[2]}}))})):(e.continuationMarker&&A(e.continuationMarker),e.documents&&(n=(0,t.mergeResult)(U,e.documents),L(n)))),[2]}}))}))}),n)),function(){null!==e&&clearInterval(e)}}),[R,M,x,C,n,U,_]);var z=(0,s.useQuery)("icloud-drive-tile-res",(function(){return f(_,t.TILE_ITEM_NUM)}),{retry:!1,enabled:T,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),H=void 0!==z.data,W=(0,s.useQuery)("icloud-drive-fast-res",(function(){return f(_,t.DRIVE_FAST_NUM)}),{retry:!1,enabled:w,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),V=void 0!==W.data;return(0,a.useMemo)((function(){var e=function(){M()&&E(!0)},t={result:(0,l.success)({recents:[],isPartial:!0}),appIsLaunching:e};if(0!==U.length)return t.result=(0,l.success)({recents:U,isPartial:!1}),t;if(F)return t.result=(0,l.success)({recents:j.data.documents,isPartial:!1}),t;if(V)return t.result=(0,l.success)({recents:W.data.documents,isPartial:"MORE_AVAILABLE"===W.data.status}),t;if(H)return t.result=(0,l.success)({recents:z.data.documents,isPartial:"MORE_AVAILABLE"===z.data.status}),t;var n={result:(0,l.failure)("Get recent docs failed"),userRequestedRetry:function(){return z.refetch},appIsLaunching:e};return z.isError?(n.result=(0,l.failure)(JSON.stringify(z.error)),n):W.isError?(n.result=(0,l.failure)(JSON.stringify(W.error)),n):j.isError?(n.result=(0,l.failure)(JSON.stringify(j.error)),n):{result:void 0,appIsLaunching:e}}),[M,F,V,H,null===(c=W.data)||void 0===c?void 0:c.status,null===(p=z.data)||void 0===p?void 0:p.status,null===(m=j.data)||void 0===m?void 0:m.documents,null===(g=W.data)||void 0===g?void 0:g.documents,null===(v=z.data)||void 0===v?void 0:v.documents,z.isError,W.isError,j.isError,z.error,W.error,j.error,z.refetch,U])}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.BadResponseError=t.NetworkError=t.NotSupportedError=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(Error);t.NotSupportedError=i;var o=function(e){function t(t){var n=e.call(this,t.statusText)||this;return n.response=t,n}return r(t,e),t}(Error);t.NetworkError=o;var a=function(e){function t(t){var n=e.call(this,t.message)||this;return n.zodError=t,n}return r(t,e),t}(Error);t.BadResponseError=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.favoriteDriveDocumentsResponseSchema=t.recentDriveDocumentsChangesSchema=t.isRecentChangesStatusCodeResponse=t.recentChangesStatusCodeResponseSchema=t.recentDriveDocumentsResponseSchema=t.driveFolderSchema=t.driveFileSchema=void 0;var a=o(n(591)),s=a.object({zoneName:a.string(),ownerRecordName:a.string()}),c=a.object({shareName:a.string(),recordName:a.string(),zoneID:s}),u=a.object({firstName:a.string(),lastName:a.string(),ownerRecordName:a.string()});t.driveFileSchema=a.object({docwsid:a.string(),drivewsid:a.string(),parentId:a.string(),zone:a.string(),type:a.literal("FILE"),shortGuid:a.string().optional(),shortGUID:a.string().optional(),isChainedToParent:a.boolean(),name:a.string(),etag:a.string(),size:a.number(),dateModified:a.string(),dateChanged:a.string(),extension:a.string().optional(),shareID:c.optional(),share:a.union([a.literal("FROM_ME"),a.literal("TO_ME")]).optional(),owner:u.optional(),lastOpenTime:a.string().optional()}),t.driveFolderSchema=a.object({docwsid:a.string(),drivewsid:a.string(),parentId:a.string(),zone:a.string(),type:a.literal("FOLDER"),shortGuid:a.string().optional(),isChainedToParent:a.boolean(),name:a.string(),etag:a.string(),assetQuota:a.number(),fileCount:a.number(),shareCount:a.number(),shareAliasCount:a.number(),directChildrenCount:a.number(),shareID:c.optional(),share:a.union([a.literal("FROM_ME"),a.literal("TO_ME")]).optional(),owner:u.optional()}),t.recentDriveDocumentsResponseSchema=a.object({continuationMarker:a.string().optional(),documents:a.array(t.driveFileSchema),status:a.union([a.literal("CONSISTENT"),a.literal("MORE_AVAILABLE")])}),t.recentChangesStatusCodeResponseSchema=a.object({statusCode:a.number()}),t.isRecentChangesStatusCodeResponse=function(e){return void 0!==e.statusCode},t.recentDriveDocumentsChangesSchema=a.union([a.object({continuationMarker:a.string().optional(),documents:a.array(t.driveFileSchema),status:a.union([a.literal("CONSISTENT"),a.literal("MORE_AVAILABLE")]).optional()}),t.recentChangesStatusCodeResponseSchema]),t.favoriteDriveDocumentsResponseSchema=a.object({continuationMarker:a.string().optional(),documents:a.array(t.driveFolderSchema),status:a.union([a.literal("CONSISTENT"),a.literal("MORE_AVAILABLE")])})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(572);function i(e){var t=e.children,n=e.interpolations,i=Object.entries(n).sort((function(e,t){var n=e[0];return t[0].length-n.length})).reduce((function(e,n){var r=n[0],i=n[1];if(-1===t.indexOf(r))throw'Unable to interpolate. Match not found for "'+r+'" in string: "'+t+'"';return e.reduce((function(e,t){if("string"===typeof t){var n=t.split(r);n.forEach((function(t,o){""!==t&&e.push(t),o<n.length-1&&e.push({value:i,key:r+"-"+o})}))}else e.push(t);return e}),[])}),[t]);return r.createElement(r.Fragment,null,i.map((function(e){if("string"===typeof e)return e;var t=e.value,n=e.key;return r.isValidElement(t)?r.cloneElement(t,{key:null===t.key?n:t.key}):t})))}},function(e,t,n){"use strict";function r(e){if(null==e)return"[missing node]";if("string"===typeof e||"boolean"===typeof e||"number"===typeof e)return"[text node]";var t=e;return"function"===typeof t.type?t.type.displayName||t.type.name:"string"===typeof t.type?t.type:"symbol"===typeof t.type&&"Symbol(react.fragment)"===t.type.toString()?"React.Fragment":"[unknown node]"}n.d(t,"a",(function(){return r}))},function(e,t,n){!function(t){"use strict";function n(e){function t(){return Ee<Se}function n(){return Ee}function i(e){Ee=e}function o(){Ee=0,Se=we.length}function a(e,t){return{name:e,tokens:t||"",semantic:t||"",children:[]}}function s(e,t){var n;return null===t?null:((n=a(e)).tokens=t.tokens,n.semantic=t.semantic,n.children.push(t),n)}function c(e,t){return null!==t&&(e.tokens+=t.tokens,e.semantic+=t.semantic),e.children.push(t),e}function u(e){var n;return t()&&e(n=we[Ee])?(Ee+=1,a("token",n)):null}function l(){return null}function d(e){return function(){return s("literal",u((function(t){return t===e})))}}function p(){var e=arguments;return function(){var t,r,o,s;for(s=n(),r=a("and"),t=0;t<e.length;t+=1){if(null===(o=e[t]()))return i(s),null;c(r,o)}return r}}function f(){var e=arguments;return function(){var t,r,o;for(o=n(),t=0;t<e.length;t+=1){if(null!==(r=e[t]()))return r;i(o)}return null}}function h(e){return function(){var t,r;return r=n(),null!==(t=e())?t:(i(r),a("opt"))}}function m(e){return function(){var t=e();return null!==t&&(t.semantic=""),t}}function g(e){return function(){var t=e();return null!==t&&t.semantic.length>0&&(t.semantic=" "),t}}function v(e,t){return function(){var r,o,s,u,l;for(u=n(),r=a("star"),s=0,l=void 0===t?0:t;null!==(o=e());)s+=1,c(r,o);return s>=l?r:(i(u),null)}}function y(e){return e.charCodeAt(0)>=128}function b(){return s("cr",d("\r")())}function _(){return s("crlf",p(b,w)())}function C(){return s("dquote",d('"')())}function I(){return s("htab",d("\t")())}function w(){return s("lf",d("\n")())}function E(){return s("sp",d(" ")())}function S(){return s("vchar",u((function(t){var n=t.charCodeAt(0),r=33<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r})))}function T(){return s("wsp",f(E,I)())}function O(){var e=s("quoted-pair",f(p(d("\\"),f(S,T)),ie)());return null===e?null:(e.semantic=e.semantic[1],e)}function P(){return s("fws",f(ae,p(h(p(v(T),m(_))),v(T,1)))())}function x(){return s("ctext",f((function(){return u((function(t){var n=t.charCodeAt(0),r=33<=n&&n<=39||42<=n&&n<=91||93<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r}))}),ne)())}function A(){return s("ccontent",f(x,O,N)())}function N(){return s("comment",p(d("("),v(p(h(P),A)),h(P),d(")"))())}function R(){return s("cfws",f(p(v(p(h(P),N),1),h(P)),P)())}function D(){return s("atext",u((function(t){var n="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(n=n||y(t)),n})))}function k(){return s("atom",p(g(h(R)),v(D,1),g(h(R)))())}function U(){var e,t;return null===(e=s("dot-atom-text",v(D,1)()))||null!==(t=v(p(d("."),v(D,1)))())&&c(e,t),e}function L(){return s("dot-atom",p(m(h(R)),U,m(h(R)))())}function M(){return s("qtext",f((function(){return u((function(t){var n=t.charCodeAt(0),r=33===n||35<=n&&n<=91||93<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r}))}),re)())}function j(){return s("qcontent",f(M,O)())}function F(){return s("quoted-string",p(m(h(R)),m(C),v(p(h(g(P)),j)),h(m(P)),m(C),m(h(R)))())}function B(){return s("word",f(k,F)())}function z(){return s("address",f(H,Z)())}function H(){return s("mailbox",f(W,ee)())}function W(){return s("name-addr",p(h(q),V)())}function V(){return s("angle-addr",f(p(m(h(R)),d("<"),ee,d(">"),m(h(R))),se)())}function Z(){return s("group",p(q,d(":"),h(Y),d(";"),m(h(R)))())}function q(){return s("display-name",function(){var e=s("phrase",f(oe,v(B,1))());return null!==e&&(e.semantic=e.semantic.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")),e}())}function K(){return s("mailbox-list",f(p(H,v(p(d(","),H))),le)())}function G(){return s("address-list",f(p(z,v(p(d(e.addressListSeparator),z))),de)())}function Y(){return s("group-list",f(K,m(R),pe)())}function Q(){return s("local-part",f(fe,L,F)())}function X(){return s("dtext",f((function(){return u((function(t){var n=t.charCodeAt(0),r=33<=n&&n<=90||94<=n&&n<=126;return e.rfc6532&&(r=r||y(t)),r}))}),me)())}function J(){return s("domain-literal",p(m(h(R)),d("["),v(p(h(P),X)),h(P),d("]"),m(h(R)))())}function $(){return s("domain",function(){var t=f(he,L,J)();return e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)}())}function ee(){return s("addr-spec",p(Q,d("@"),$)())}function te(){return e.strict?null:s("obs-NO-WS-CTL",u((function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t})))}function ne(){return e.strict?null:s("obs-ctext",te())}function re(){return e.strict?null:s("obs-qtext",te())}function ie(){return e.strict?null:s("obs-qp",p(d("\\"),f(d("\0"),te,w,b))())}function oe(){return e.strict?null:s("obs-phrase",p(B,v(f(B,d("."),e.atInDisplayName?d("@"):l,e.commaInDisplayName?d(","):l,g(R))))())}function ae(){return e.strict?null:s("obs-FWS",v(p(m(h(_)),T),1)())}function se(){return e.strict?null:s("obs-angle-addr",p(m(h(R)),d("<"),ce,ee,d(">"),m(h(R)))())}function ce(){return e.strict?null:s("obs-route",p(ue,d(":"))())}function ue(){return e.strict?null:s("obs-domain-list",p(v(f(m(R),d(","))),d("@"),$,v(p(d(","),m(h(R)),h(p(d("@"),$)))))())}function le(){return e.strict?null:s("obs-mbox-list",p(v(p(m(h(R)),d(","))),H,v(p(d(","),h(p(H,m(R))))))())}function de(){return e.strict?null:s("obs-addr-list",p(v(p(m(h(R)),d(","))),z,v(p(d(","),h(p(z,m(R))))))())}function pe(){return e.strict?null:s("obs-group-list",p(v(p(m(h(R)),d(",")),1),m(h(R)))())}function fe(){return e.strict?null:s("obs-local-part",p(B,v(p(d("."),B)))())}function he(){return e.strict?null:s("obs-domain",p(k,v(p(d("."),k)))())}function me(){return e.strict?null:s("obs-dtext",f(te,O)())}function ge(e,t){var n,r,i;if(null===t||void 0===t)return null;for(r=[t];r.length>0;){if((i=r.pop()).name===e)return i;for(n=i.children.length-1;n>=0;n-=1)r.push(i.children[n])}return null}function ve(e,t){var n,r,i,o,a;if(null===t||void 0===t)return null;for(r=[t],o=[],a={},n=0;n<e.length;n+=1)a[e[n]]=!0;for(;r.length>0;)if((i=r.pop()).name in a)o.push(i);else for(n=i.children.length-1;n>=0;n-=1)r.push(i.children[n]);return o}function ye(t){var n,r,i,o,a;if(null===t)return null;for(n=[],r=ve(["group","mailbox"],t),i=0;i<r.length;i+=1)"group"===(o=r[i]).name?n.push(be(o)):"mailbox"===o.name&&n.push(_e(o));return a={ast:t,addresses:n},e.simple&&(a=function(e){var t;if(e&&e.addresses)for(t=0;t<e.addresses.length;t+=1)delete e.addresses[t].node;return e}(a)),e.oneResult?function(t){return t?!e.partial&&t.addresses.length>1?null:t.addresses&&t.addresses[0]:null}(a):e.simple?a&&a.addresses:a}function be(e){var t,n=ge("display-name",e),r=[],i=ve(["mailbox"],e);for(t=0;t<i.length;t+=1)r.push(_e(i[t]));return{node:e,parts:{name:n},type:e.name,name:Ce(n),addresses:r}}function _e(e){var t=ge("display-name",e),n=ge("addr-spec",e),r=function(e,t){var n,r,i,o;if(null===t||void 0===t)return null;for(r=[t],o=[];r.length>0;)for("cfws"===(i=r.pop()).name&&o.push(i),n=i.children.length-1;n>=0;n-=1)r.push(i.children[n]);return o}(0,e),i=ve(["comment"],e),o=ge("local-part",n),a=ge("domain",n);return{node:e,parts:{name:t,address:n,local:o,domain:a,comments:r},type:e.name,name:Ce(t),address:Ce(n),local:Ce(o),domain:Ce(a),comments:Ie(i),groupName:Ce(e.groupName)}}function Ce(e){return null!==e&&void 0!==e?e.semantic:null}function Ie(e){var t="";if(e)for(var n=0;n<e.length;n+=1)t+=Ce(e[n]);return t}var we,Ee,Se,Te,Oe;if(null===(e=r(e,{})))return null;if(we=e.input,Oe={address:z,"address-list":G,"angle-addr":V,from:function(){return s("from",f(K,G)())},group:Z,mailbox:H,"mailbox-list":K,"reply-to":function(){return s("reply-to",G())},sender:function(){return s("sender",f(H,z)())}}[e.startAt]||G,!e.strict){if(o(),e.strict=!0,Te=Oe(we),e.partial||!t())return ye(Te);e.strict=!1}return o(),Te=Oe(we),!e.partial&&t()?null:ye(Te)}function r(e,t){function n(e){return"[object String]"===Object.prototype.toString.call(e)}function r(e){return null===e||void 0===e}var i,o;if(n(e))e={input:e};else if(!function(e){return e===Object(e)}(e))return null;if(!n(e.input))return null;if(!t)return null;for(o in i={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1,commaInDisplayName:!1,addressListSeparator:","})r(e[o])&&(e[o]=r(t[o])?i[o]:t[o]);return e}n.parseOneAddress=function(e){return n(r(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"address-list"}))},n.parseAddressList=function(e){return n(r(e,{rfc6532:!0,simple:!0,startAt:"address-list"}))},n.parseFrom=function(e){return n(r(e,{rfc6532:!0,simple:!0,startAt:"from"}))},n.parseSender=function(e){return n(r(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"sender"}))},n.parseReplyTo=function(e){return n(r(e,{rfc6532:!0,simple:!0,startAt:"reply-to"}))},"undefined"!==typeof e.exports?e.exports=n:t.emailAddresses=n}(this)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r,i,o;i=[n(888)],void 0===(o="function"===typeof(r=function(e){"use strict";var t=function(e,n,i){if("undefined"===typeof e&&(e=t.DEFAULT_CAPACITY),"undefined"===typeof n&&(n=t.DEFAULT_ENDIAN),"undefined"===typeof i&&(i=t.DEFAULT_NOASSERT),!i){if((e|=0)<0)throw RangeError("Illegal capacity");n=!!n,i=!!i}this.buffer=0===e?r:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=n,this.noAssert=i};t.VERSION="5.0.1",t.LITTLE_ENDIAN=!0,t.BIG_ENDIAN=!1,t.DEFAULT_CAPACITY=16,t.DEFAULT_ENDIAN=t.BIG_ENDIAN,t.DEFAULT_NOASSERT=!1,t.Long=e||null;var n=t.prototype;n.__isByteBuffer__,Object.defineProperty(n,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var r=new ArrayBuffer(0),i=String.fromCharCode;function o(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function a(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+i.apply(String,e);e.length+arguments.length>1024&&(t.push(i.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function s(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+d],d+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)}function c(e,t,n,r,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,d=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+f]=255&a,f+=h,a/=256,u-=8);e[n+f-h]|=128*m}t.accessor=function(){return Uint8Array},t.allocate=function(e,n,r){return new t(e,n,r)},t.concat=function(e,n,r,i){"boolean"!==typeof n&&"string"===typeof n||(i=r,r=n,n=void 0);for(var o,a=0,s=0,c=e.length;s<c;++s)t.isByteBuffer(e[s])||(e[s]=t.wrap(e[s],n)),(o=e[s].limit-e[s].offset)>0&&(a+=o);if(0===a)return new t(0,r,i);var u,l=new t(a,r,i);for(s=0;s<c;)(o=(u=e[s++]).limit-u.offset)<=0||(l.view.set(u.view.subarray(u.offset,u.limit),l.offset),l.offset+=o);return l.limit=l.offset,l.offset=0,l},t.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},t.type=function(){return ArrayBuffer},t.wrap=function(e,r,i,o){if("string"!==typeof r&&(o=i,i=r,r=void 0),"string"===typeof e)switch("undefined"===typeof r&&(r="utf8"),r){case"base64":return t.fromBase64(e,i);case"hex":return t.fromHex(e,i);case"binary":return t.fromBinary(e,i);case"utf8":return t.fromUTF8(e,i);case"debug":return t.fromDebug(e,i);default:throw Error("Unsupported encoding: "+r)}if(null===e||"object"!==typeof e)throw TypeError("Illegal buffer");var a;if(t.isByteBuffer(e))return(a=n.clone.call(e)).markedOffset=-1,a;if(e instanceof Uint8Array)a=new t(0,i,o),e.length>0&&(a.buffer=e.buffer,a.offset=e.byteOffset,a.limit=e.byteOffset+e.byteLength,a.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)a=new t(0,i,o),e.byteLength>0&&(a.buffer=e,a.offset=0,a.limit=e.byteLength,a.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(a=new t(e.length,i,o)).limit=e.length;for(var s=0;s<e.length;++s)a.view[s]=e[s]}return a},n.writeBitSet=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,i=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)r=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(r,t++);if(s<o){var c=0;for(r=0;s<o;)r|=(1&!!e[s++])<<c++;this.writeByte(r,t++)}return n?(this.offset=t,this):t-i},n.readBitSet=function(e){var t="undefined"===typeof e;t&&(e=this.offset);var n,r=this.readVarint32(e),i=r.value,o=i>>3,a=0,s=[];for(e+=r.length;o--;)n=this.readByte(e++),s[a++]=!!(1&n),s[a++]=!!(2&n),s[a++]=!!(4&n),s[a++]=!!(8&n),s[a++]=!!(16&n),s[a++]=!!(32&n),s[a++]=!!(64&n),s[a++]=!!(128&n);if(a<i){var c=0;for(n=this.readByte(e++);a<i;)s[a++]=!!(n>>c++&1)}return t&&(this.offset=e),s},n.readBytes=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var r=this.slice(t,t+e);return n&&(this.offset+=e),r},n.writeBytes=n.append,n.writeInt8=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=1,this.view[t]=e,n&&(this.offset+=1),this},n.writeByte=n.writeInt8,n.readInt8=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=this.view[e];return 128===(128&n)&&(n=-(255-n+1)),t&&(this.offset+=1),n},n.readByte=n.readInt8,n.writeUint8=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=1,this.view[t]=e,n&&(this.offset+=1),this},n.writeUInt8=n.writeUint8,n.readUint8=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=this.view[e];return t&&(this.offset+=1),n},n.readUInt8=n.readUint8,n.writeInt16=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},n.writeShort=n.writeInt16,n.readInt16=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),32768===(32768&n)&&(n=-(65535-n+1)),t&&(this.offset+=2),n},n.readShort=n.readInt16,n.writeUint16=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},n.writeUInt16=n.writeUint16,n.readUint16=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),t&&(this.offset+=2),n},n.readUInt16=n.readUint16,n.writeInt32=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},n.writeInt=n.writeInt32,n.readInt32=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),n|=0,t&&(this.offset+=4),n},n.readInt=n.readInt32,n.writeUint32=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},n.writeUInt32=n.writeUint32,n.readUint32=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),t&&(this.offset+=4),n},n.readUInt32=n.readUint32,e&&(n.writeInt64=function(t,n){var r="undefined"===typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"===typeof t)t=e.fromNumber(t);else if("string"===typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!==typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"===typeof t?t=e.fromNumber(t):"string"===typeof t&&(t=e.fromString(t)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=t.low,a=t.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=a>>>24&255,this.view[n+2]=a>>>16&255,this.view[n+1]=a>>>8&255,this.view[n]=255&a):(this.view[n]=a>>>24&255,this.view[n+1]=a>>>16&255,this.view[n+2]=a>>>8&255,this.view[n+3]=255&a,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},n.writeLong=n.writeInt64,n.readInt64=function(t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0,t+=4,i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0,t+=4,r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0);var o=new e(r,i,!1);return n&&(this.offset+=8),o},n.readLong=n.readInt64,n.writeUint64=function(t,n){var r="undefined"===typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"===typeof t)t=e.fromNumber(t);else if("string"===typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!==typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"===typeof t?t=e.fromNumber(t):"string"===typeof t&&(t=e.fromString(t)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=t.low,a=t.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=a>>>24&255,this.view[n+2]=a>>>16&255,this.view[n+1]=a>>>8&255,this.view[n]=255&a):(this.view[n]=a>>>24&255,this.view[n+1]=a>>>16&255,this.view[n+2]=a>>>8&255,this.view[n+3]=255&a,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},n.writeUInt64=n.writeUint64,n.readUint64=function(t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0,t+=4,i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0,t+=4,r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0);var o=new e(r,i,!0);return n&&(this.offset+=8),o},n.readUInt64=n.readUint64),n.writeFloat32=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,c(this.view,e,t,this.littleEndian,23,4),n&&(this.offset+=4),this},n.writeFloat=n.writeFloat32,n.readFloat32=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=s(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),n},n.readFloat=n.readFloat32,n.writeFloat64=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=8,c(this.view,e,t,this.littleEndian,52,8),n&&(this.offset+=8),this},n.writeDouble=n.writeFloat64,n.readFloat64=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=s(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),n},n.readDouble=n.readFloat64,t.MAX_VARINT32_BYTES=5,t.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},t.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},t.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},n.writeVarint32=function(e,n){var r="undefined"===typeof n;if(r&&(n=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!==typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,o=t.calculateVarint32(e);n+=o;var a=this.buffer.byteLength;for(n>a&&this.resize((a*=2)>n?a:n),n-=o,e>>>=0;e>=128;)i=127&e|128,this.view[n++]=i,e>>>=7;return this.view[n++]=e,r?(this.offset=n,this):o},n.writeVarint32ZigZag=function(e,n){return this.writeVarint32(t.zigZagEncode32(e),n)},n.readVarint32=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n,r=0,i=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}n=this.view[e++],r<5&&(i|=(127&n)<<7*r),++r}while(0!==(128&n));return i|=0,t?(this.offset=e,i):{value:i,length:r}},n.readVarint32ZigZag=function(e){var n=this.readVarint32(e);return"object"===typeof n?n.value=t.zigZagDecode32(n.value):n=t.zigZagDecode32(n),n},e&&(t.MAX_VARINT64_BYTES=10,t.calculateVarint64=function(t){"number"===typeof t?t=e.fromNumber(t):"string"===typeof t&&(t=e.fromString(t));var n=t.toInt()>>>0,r=t.shiftRightUnsigned(28).toInt()>>>0,i=t.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==r?n<16384?n<128?1:2:n<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:i<128?9:10},t.zigZagEncode64=function(t){return"number"===typeof t?t=e.fromNumber(t,!1):"string"===typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned()},t.zigZagDecode64=function(t){return"number"===typeof t?t=e.fromNumber(t,!1):"string"===typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftRightUnsigned(1).xor(t.and(e.ONE).toSigned().negate()).toSigned()},n.writeVarint64=function(n,r){var i="undefined"===typeof r;if(i&&(r=this.offset),!this.noAssert){if("number"===typeof n)n=e.fromNumber(n);else if("string"===typeof n)n=e.fromString(n);else if(!(n&&n instanceof e))throw TypeError("Illegal value: "+n+" (not an integer or Long)");if("number"!==typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"===typeof n?n=e.fromNumber(n,!1):"string"===typeof n?n=e.fromString(n,!1):!1!==n.unsigned&&(n=n.toSigned());var o=t.calculateVarint64(n),a=n.toInt()>>>0,s=n.shiftRightUnsigned(28).toInt()>>>0,c=n.shiftRightUnsigned(56).toInt()>>>0;r+=o;var u=this.buffer.byteLength;switch(r>u&&this.resize((u*=2)>r?u:r),r-=o,o){case 10:this.view[r+9]=c>>>7&1;case 9:this.view[r+8]=9!==o?128|c:127&c;case 8:this.view[r+7]=8!==o?s>>>21|128:s>>>21&127;case 7:this.view[r+6]=7!==o?s>>>14|128:s>>>14&127;case 6:this.view[r+5]=6!==o?s>>>7|128:s>>>7&127;case 5:this.view[r+4]=5!==o?128|s:127&s;case 4:this.view[r+3]=4!==o?a>>>21|128:a>>>21&127;case 3:this.view[r+2]=3!==o?a>>>14|128:a>>>14&127;case 2:this.view[r+1]=2!==o?a>>>7|128:a>>>7&127;case 1:this.view[r]=1!==o?128|a:127&a}return i?(this.offset+=o,this):o},n.writeVarint64ZigZag=function(e,n){return this.writeVarint64(t.zigZagEncode64(e),n)},n.readVarint64=function(t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,i=0,o=0,a=0,s=0;if(i=127&(s=this.view[t++]),128&s&&(i|=(127&(s=this.view[t++]))<<7,(128&s||this.noAssert&&"undefined"===typeof s)&&(i|=(127&(s=this.view[t++]))<<14,(128&s||this.noAssert&&"undefined"===typeof s)&&(i|=(127&(s=this.view[t++]))<<21,(128&s||this.noAssert&&"undefined"===typeof s)&&(o=127&(s=this.view[t++]),(128&s||this.noAssert&&"undefined"===typeof s)&&(o|=(127&(s=this.view[t++]))<<7,(128&s||this.noAssert&&"undefined"===typeof s)&&(o|=(127&(s=this.view[t++]))<<14,(128&s||this.noAssert&&"undefined"===typeof s)&&(o|=(127&(s=this.view[t++]))<<21,(128&s||this.noAssert&&"undefined"===typeof s)&&(a=127&(s=this.view[t++]),(128&s||this.noAssert&&"undefined"===typeof s)&&(a|=(127&(s=this.view[t++]))<<7,128&s||this.noAssert&&"undefined"===typeof s))))))))))throw Error("Buffer overrun");var c=e.fromBits(i|o<<28,o>>>4|a<<24,!1);return n?(this.offset=t,c):{value:c,length:t-r}},n.readVarint64ZigZag=function(n){var r=this.readVarint64(n);return r&&r.value instanceof e?r.value=t.zigZagDecode64(r.value):r=t.zigZagDecode64(r),r}),n.writeCString=function(e,t){var n="undefined"===typeof t;n&&(t=this.offset);var r,i=e.length;if(!this.noAssert){if("string"!==typeof e)throw TypeError("Illegal str: Not a string");for(r=0;r<i;++r)if(0===e.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}i=l.calculateUTF16asUTF8(o(e))[1],t+=i+1;var a=this.buffer.byteLength;return t>a&&this.resize((a*=2)>t?a:t),t-=i+1,l.encodeUTF16toUTF8(o(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,n?(this.offset=t,this):i},n.readCString=function(e){var t="undefined"===typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n,r=e,i=-1;return l.decodeUTF8toUTF16(function(){if(0===i)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(i=this.view[e++])?null:i}.bind(this),n=a(),!0),t?(this.offset=e,n()):{string:n(),length:e-r}},n.writeIString=function(e,t){var n="undefined"===typeof t;if(n&&(t=this.offset),!this.noAssert){if("string"!==typeof e)throw TypeError("Illegal str: Not a string");if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,i=t;r=l.calculateUTF16asUTF8(o(e),this.noAssert)[1],t+=4+r;var a=this.buffer.byteLength;if(t>a&&this.resize((a*=2)>t?a:t),t-=4+r,this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r):(this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),t+=4,l.encodeUTF16toUTF8(o(e),function(e){this.view[t++]=e}.bind(this)),t!==i+4+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+r));return n?(this.offset=t,this):t-i},n.readIString=function(e){var n="undefined"===typeof e;if(n&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var r=e,i=this.readUint32(e),o=this.readUTF8String(i,t.METRICS_BYTES,e+=4);return e+=o.length,n?(this.offset=e,o.string):{string:o.string,length:e-r}},t.METRICS_CHARS="c",t.METRICS_BYTES="b",n.writeUTF8String=function(e,t){var n,r="undefined"===typeof t;if(r&&(t=this.offset),!this.noAssert){if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i=t;n=l.calculateUTF16asUTF8(o(e))[1],t+=n;var a=this.buffer.byteLength;return t>a&&this.resize((a*=2)>t?a:t),t-=n,l.encodeUTF16toUTF8(o(e),function(e){this.view[t++]=e}.bind(this)),r?(this.offset=t,this):t-i},n.writeString=n.writeUTF8String,t.calculateUTF8Chars=function(e){return l.calculateUTF16asUTF8(o(e))[0]},t.calculateUTF8Bytes=function(e){return l.calculateUTF16asUTF8(o(e))[1]},t.calculateString=t.calculateUTF8Bytes,n.readUTF8String=function(e,n,r){"number"===typeof n&&(r=n,n=void 0);var i="undefined"===typeof r;if(i&&(r=this.offset),"undefined"===typeof n&&(n=t.METRICS_CHARS),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!==typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var o,s=0,c=r;if(n===t.METRICS_CHARS){if(o=a(),l.decodeUTF8(function(){return s<e&&r<this.limit?this.view[r++]:null}.bind(this),(function(e){++s,l.UTF8toUTF16(e,o)})),s!==e)throw RangeError("Illegal range: Truncated data, "+s+" == "+e);return i?(this.offset=r,o()):{string:o(),length:r-c}}if(n===t.METRICS_BYTES){if(!this.noAssert){if("number"!==typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+e+") <= "+this.buffer.byteLength)}var u=r+e;if(l.decodeUTF8toUTF16(function(){return r<u?this.view[r++]:null}.bind(this),o=a(),this.noAssert),r!==u)throw RangeError("Illegal range: Truncated data, "+r+" == "+u);return i?(this.offset=r,o()):{string:o(),length:r-c}}throw TypeError("Unsupported metrics: "+n)},n.readString=n.readUTF8String,n.writeVString=function(e,n){var r="undefined"===typeof n;if(r&&(n=this.offset),!this.noAssert){if("string"!==typeof e)throw TypeError("Illegal str: Not a string");if("number"!==typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,a,s=n;i=l.calculateUTF16asUTF8(o(e),this.noAssert)[1],a=t.calculateVarint32(i),n+=a+i;var c=this.buffer.byteLength;if(n>c&&this.resize((c*=2)>n?c:n),n-=a+i,n+=this.writeVarint32(i,n),l.encodeUTF16toUTF8(o(e),function(e){this.view[n++]=e}.bind(this)),n!==s+i+a)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+i+a));return r?(this.offset=n,this):n-s},n.readVString=function(e){var n="undefined"===typeof e;if(n&&(e=this.offset),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,i=this.readVarint32(e),o=this.readUTF8String(i.value,t.METRICS_BYTES,e+=i.length);return e+=o.length,n?(this.offset=e,o.string):{string:o.string,length:e-r}},n.append=function(e,n,r){"number"!==typeof n&&"string"===typeof n||(r=n,n=void 0);var i="undefined"===typeof r;if(i&&(r=this.offset),!this.noAssert){if("number"!==typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}e instanceof t||(e=t.wrap(e,n));var o=e.limit-e.offset;if(o<=0)return this;r+=o;var a=this.buffer.byteLength;return r>a&&this.resize((a*=2)>r?a:r),r-=o,this.view.set(e.view.subarray(e.offset,e.limit),r),e.offset+=o,i&&(this.offset+=o),this},n.appendTo=function(e,t){return e.append(this,t),this},n.assert=function(e){return this.noAssert=!e,this},n.capacity=function(){return this.buffer.byteLength},n.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},n.clone=function(e){var n=new t(0,this.littleEndian,this.noAssert);return e?(n.buffer=new ArrayBuffer(this.buffer.byteLength),n.view=new Uint8Array(n.buffer)):(n.buffer=this.buffer,n.view=this.view),n.offset=this.offset,n.markedOffset=this.markedOffset,n.limit=this.limit,n},n.compact=function(e,t){if("undefined"===typeof e&&(e=this.offset),"undefined"===typeof t&&(t=this.limit),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var n=t-e;if(0===n)return this.buffer=r,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(n),o=new Uint8Array(i);return o.set(this.view.subarray(e,t)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},n.copy=function(e,n){if("undefined"===typeof e&&(e=this.offset),"undefined"===typeof n&&(n=this.limit),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!==typeof n||n%1!==0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,e<0||e>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+n+" <= "+this.buffer.byteLength)}if(e===n)return new t(0,this.littleEndian,this.noAssert);var r=n-e,i=new t(r,this.littleEndian,this.noAssert);return i.offset=0,i.limit=r,i.markedOffset>=0&&(i.markedOffset-=e),this.copyTo(i,0,e,n),i},n.copyTo=function(e,n,r,i){var o,a;if(!this.noAssert&&!t.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(n=(a="undefined"===typeof n)?e.offset:0|n,r=(o="undefined"===typeof r)?this.offset:0|r,i="undefined"===typeof i?this.limit:0|i,n<0||n>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+n+" <= "+e.buffer.byteLength);if(r<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var s=i-r;return 0===s?e:(e.ensureCapacity(n+s),e.view.set(this.view.subarray(r,i),n),o&&(this.offset+=s),a&&(e.offset+=s),this)},n.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},n.fill=function(e,t,n){var r="undefined"===typeof t;if(r&&(t=this.offset),"string"===typeof e&&e.length>0&&(e=e.charCodeAt(0)),"undefined"===typeof t&&(t=this.offset),"undefined"===typeof n&&(n=this.limit),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!==typeof n||n%1!==0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(t>=n)return this;for(;t<n;)this.view[t++]=e;return r&&(this.offset=t),this},n.flip=function(){return this.limit=this.offset,this.offset=0,this},n.mark=function(e){if(e="undefined"===typeof e?this.offset:e,!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},n.order=function(e){if(!this.noAssert&&"boolean"!==typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},n.LE=function(e){return this.littleEndian="undefined"===typeof e||!!e,this},n.BE=function(e){return this.littleEndian="undefined"!==typeof e&&!e,this},n.prepend=function(e,n,r){"number"!==typeof n&&"string"===typeof n||(r=n,n=void 0);var i="undefined"===typeof r;if(i&&(r=this.offset),!this.noAssert){if("number"!==typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}e instanceof t||(e=t.wrap(e,n));var o=e.limit-e.offset;if(o<=0)return this;var a=o-r;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),c=new Uint8Array(s);c.set(this.view.subarray(r,this.buffer.byteLength),o),this.buffer=s,this.view=c,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,r+=a}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),r-o),e.offset=e.limit,i&&(this.offset-=o),this},n.prependTo=function(e,t){return e.prepend(this,t),this},n.printDebug=function(e){"function"!==typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},n.remaining=function(){return this.limit-this.offset},n.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},n.resize=function(e){if(!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),n=new Uint8Array(t);n.set(this.view),this.buffer=t,this.view=n}return this},n.reverse=function(e,t){if("undefined"===typeof e&&(e=this.offset),"undefined"===typeof t&&(t=this.limit),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},n.skip=function(e){if(!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},n.slice=function(e,t){if("undefined"===typeof e&&(e=this.offset),"undefined"===typeof t&&(t=this.limit),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=e,n.limit=t,n},n.toBuffer=function(e){var t=this.offset,n=this.limit;if(!this.noAssert){if("number"!==typeof t||t%1!==0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!==typeof n||n%1!==0)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,t<0||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(!e&&0===t&&n===this.buffer.byteLength)return this.buffer;if(t===n)return r;var i=new ArrayBuffer(n-t);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(t,n),0),i},n.toArrayBuffer=n.toBuffer,n.toString=function(e,t,n){if("undefined"===typeof e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"===typeof e&&(n=t=e="utf8"),e){case"utf8":return this.toUTF8(t,n);case"base64":return this.toBase64(t,n);case"hex":return this.toHex(t,n);case"binary":return this.toBinary(t,n);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var u=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],n=[],r=0,i=t.length;r<i;++r)n[t[r]]=r;return e.encode=function(e,n){for(var r,i;null!==(r=e());)n(t[r>>2&63]),i=(3&r)<<4,null!==(r=e())?(n(t[63&((i|=r>>4&15)|r>>4&15)]),i=(15&r)<<2,null!==(r=e())?(n(t[63&(i|r>>6&3)]),n(t[63&r])):(n(t[63&i]),n(61))):(n(t[63&i]),n(61),n(61))},e.decode=function(e,t){var r,i,o;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(r=e());)if("undefined"===typeof(i=n[r])&&a(r),null!==(r=e())&&("undefined"===typeof(o=n[r])&&a(r),t(i<<2>>>0|(48&o)>>4),null!==(r=e()))){if("undefined"===typeof(i=n[r])){if(61===r)break;a(r)}if(t((15&o)<<4>>>0|(60&i)>>2),null!==(r=e())){if("undefined"===typeof(o=n[r])){if(61===r)break;a(r)}t((3&i)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();n.toBase64=function(e,t){if("undefined"===typeof e&&(e=this.offset),"undefined"===typeof t&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var n;return u.encode(function(){return e<t?this.view[e++]:null}.bind(this),n=a()),n()},t.fromBase64=function(e,n){if("string"!==typeof e)throw TypeError("str");var r=new t(e.length/4*3,n),i=0;return u.decode(o(e),(function(e){r.view[i++]=e})),r.limit=i,r},t.btoa=function(e){return t.fromBinary(e).toBase64()},t.atob=function(e){return t.fromBase64(e).toBinary()},n.toBinary=function(e,t){if("undefined"===typeof e&&(e=this.offset),"undefined"===typeof t&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var n=[],r=[];e<t;)n.push(this.view[e++]),n.length>=1024&&(r.push(String.fromCharCode.apply(String,n)),n=[]);return r.join("")+String.fromCharCode.apply(String,n)},t.fromBinary=function(e,n){if("string"!==typeof e)throw TypeError("str");for(var r,i=0,o=e.length,a=new t(o,n);i<o;){if((r=e.charCodeAt(i))>255)throw RangeError("illegal char code: "+r);a.view[i++]=r}return a.limit=o,a},n.toDebug=function(e){for(var t,n=-1,r=this.buffer.byteLength,i="",o="",a="";n<r;){if(-1!==n&&(i+=(t=this.view[n])<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(o+=t>32&&t<127?String.fromCharCode(t):".")),++n,e&&n>0&&n%16===0&&n!==r){for(;i.length<51;)i+=" ";a+=i+o+"\n",i=o=""}n===this.offset&&n===this.limit?i+=n===this.markedOffset?"!":"|":n===this.offset?i+=n===this.markedOffset?"[":"<":n===this.limit?i+=n===this.markedOffset?"]":">":i+=n===this.markedOffset?"'":e||0!==n&&n!==r?" ":""}if(e&&" "!==i){for(;i.length<51;)i+=" ";a+=i+o+"\n"}return e?a:i},t.fromDebug=function(e,n,r){for(var i,o,a=e.length,s=new t((a+1)/3|0,n,r),c=0,u=0,l=!1,d=!1,p=!1,f=!1,h=!1;c<a;){switch(i=e.charAt(c++)){case"!":if(!r){if(d||p||f){h=!0;break}d=p=f=!0}s.offset=s.markedOffset=s.limit=u,l=!1;break;case"|":if(!r){if(d||f){h=!0;break}d=f=!0}s.offset=s.limit=u,l=!1;break;case"[":if(!r){if(d||p){h=!0;break}d=p=!0}s.offset=s.markedOffset=u,l=!1;break;case"<":if(!r){if(d){h=!0;break}d=!0}s.offset=u,l=!1;break;case"]":if(!r){if(f||p){h=!0;break}f=p=!0}s.limit=s.markedOffset=u,l=!1;break;case">":if(!r){if(f){h=!0;break}f=!0}s.limit=u,l=!1;break;case"'":if(!r){if(p){h=!0;break}p=!0}s.markedOffset=u,l=!1;break;case" ":l=!1;break;default:if(!r&&l){h=!0;break}if(o=parseInt(i+e.charAt(c++),16),!r&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[u++]=o,l=!0}if(h)throw TypeError("Illegal str: Invalid symbol at "+c)}if(!r){if(!d||!f)throw TypeError("Illegal str: Missing offset or limit");if(u<s.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+u+" < "+a)}return s},n.toHex=function(e,t){if(e="undefined"===typeof e?this.offset:e,t="undefined"===typeof t?this.limit:t,!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var n,r=new Array(t-e);e<t;)(n=this.view[e++])<16?r.push("0",n.toString(16)):r.push(n.toString(16));return r.join("")},t.fromHex=function(e,n,r){if(!r){if("string"!==typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!==0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var i,o=e.length,a=new t(o/2|0,n),s=0,c=0;s<o;s+=2){if(i=parseInt(e.substring(s,s+2),16),!r&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");a.view[c++]=i}return a.limit=c,a};var l=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var n=null;for("number"===typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<128?t(127&n):n<2048?(t(n>>6&31|192),t(63&n|128)):n<65536?(t(n>>12&15|224),t(n>>6&63|128),t(63&n|128)):(t(n>>18&7|240),t(n>>12&63|128),t(n>>6&63|128),t(63&n|128)),n=null},decodeUTF8:function(e,t){for(var n,r,i,o,a=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(n=e());)if(0===(128&n))t(n);else if(192===(224&n))null===(r=e())&&a([n,r]),t((31&n)<<6|63&r);else if(224===(240&n))(null===(r=e())||null===(i=e()))&&a([n,r,i]),t((15&n)<<12|(63&r)<<6|63&i);else{if(240!==(248&n))throw RangeError("Illegal starting byte: "+n);(null===(r=e())||null===(i=e())||null===(o=e()))&&a([n,r,i,o]),t((7&n)<<18|(63&r)<<12|(63&i)<<6|63&o)}},UTF16toUTF8:function(e,t){for(var n,r=null;null!==(n=null!==r?r:e());)n>=55296&&n<=57343&&null!==(r=e())&&r>=56320&&r<=57343?(t(1024*(n-55296)+r-56320+65536),r=null):t(n);null!==r&&t(r)},UTF8toUTF16:function(e,t){var n=null;for("number"===typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<=65535?t(n):(t(55296+((n-=65536)>>10)),t(n%1024+56320)),n=null},encodeUTF16toUTF8:function(t,n){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,n)}))},decodeUTF8toUTF16:function(t,n){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,n)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,n=0;null!==(t=e());)n+=t<128?1:t<2048?2:t<65536?3:4;return n},calculateUTF16asUTF8:function(t){var n=0,r=0;return e.UTF16toUTF8(t,(function(e){++n,r+=e<128?1:e<2048?2:e<65536?3:4})),[n,r]}};return e}();return n.toUTF8=function(e,t){if("undefined"===typeof e&&(e=this.offset),"undefined"===typeof t&&(t=this.limit),!this.noAssert){if("number"!==typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!==typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n;try{l.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),n=a())}catch(r){if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return n()},t.fromUTF8=function(e,n,r){if(!r&&"string"!==typeof e)throw TypeError("Illegal str: Not a string");var i=new t(l.calculateUTF16asUTF8(o(e),!0)[1],n,r),a=0;return l.encodeUTF16toUTF8(o(e),(function(e){i.view[a++]=e})),i.limit=a,i},t})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i;void 0===(i="function"===typeof(r=function(){"use strict";function e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function t(e){return!0===(e&&e.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var n={},r={};function i(e,t){var i,o,s;return t?(s=0<=(e>>>=0)&&e<256)&&(o=r[e])?o:(i=a(e,(0|e)<0?-1:0,!0),s&&(r[e]=i),i):(s=-128<=(e|=0)&&e<128)&&(o=n[e])?o:(i=a(e,e<0?-1:0,!1),s&&(n[e]=i),i)}function o(e,t){if(isNaN(e)||!isFinite(e))return t?m:h;if(t){if(e<0)return m;if(e>=d)return _}else{if(e<=-p)return C;if(e+1>=p)return b}return e<0?o(-e,t).neg():a(e%l|0,e/l|0,t)}function a(t,n,r){return new e(t,n,r)}e.fromInt=i,e.fromNumber=o,e.fromBits=a;var s=Math.pow;function c(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return h;if("number"===typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return c(e.substring(1),t,n).neg();for(var i=o(s(n,8)),a=h,u=0;u<e.length;u+=8){var l=Math.min(8,e.length-u),d=parseInt(e.substring(u,u+l),n);if(l<8){var p=o(s(n,l));a=a.mul(p).add(o(d))}else a=(a=a.mul(i)).add(o(d))}return a.unsigned=t,a}function u(t){return t instanceof e?t:"number"===typeof t?o(t):"string"===typeof t?c(t):a(t.low,t.high,t.unsigned)}e.fromString=c,e.fromValue=u;var l=4294967296,d=l*l,p=d/2,f=i(1<<24),h=i(0);e.ZERO=h;var m=i(0,!0);e.UZERO=m;var g=i(1);e.ONE=g;var v=i(1,!0);e.UONE=v;var y=i(-1);e.NEG_ONE=y;var b=a(-1,2147483647,!1);e.MAX_VALUE=b;var _=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=_;var C=a(0,-2147483648,!1);e.MIN_VALUE=C;var I=e.prototype;return I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(C)){var t=o(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=o(s(e,6),this.unsigned),a=this,c="";;){var u=a.div(i),l=(a.sub(u.mul(i)).toInt()>>>0).toString(e);if((a=u).isZero())return l+c;for(;l.length<6;)l="0"+l;c=""+l+c}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(C)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return 1===(1&this.low)},I.isEven=function(){return 0===(1&this.low)},I.equals=function(e){return t(e)||(e=u(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&this.high===e.high&&this.low===e.low},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.compare=function(e){if(t(e)||(e=u(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(C)?C:this.not().add(g)},I.neg=I.negate,I.add=function(e){t(e)||(e=u(e));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,c=65535&e.high,l=e.low>>>16,d=0,p=0,f=0,h=0;return f+=(h+=o+(65535&e.low))>>>16,p+=(f+=i+l)>>>16,d+=(p+=r+c)>>>16,d+=n+s,a((f&=65535)<<16|(h&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},I.subtract=function(e){return t(e)||(e=u(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return h;if(t(e)||(e=u(e)),e.isZero())return h;if(this.eq(C))return e.isOdd()?C:h;if(e.eq(C))return this.isOdd()?C:h;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(f)&&e.lt(f))return o(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,c=e.high>>>16,l=65535&e.high,d=e.low>>>16,p=65535&e.low,m=0,g=0,v=0,y=0;return v+=(y+=s*p)>>>16,g+=(v+=i*p)>>>16,v&=65535,g+=(v+=s*d)>>>16,m+=(g+=r*p)>>>16,g&=65535,m+=(g+=i*d)>>>16,g&=65535,m+=(g+=s*l)>>>16,m+=n*p+r*d+i*l+s*c,a((v&=65535)<<16|(y&=65535),(m&=65535)<<16|(g&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(t(e)||(e=u(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?m:h;var n,r,i;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return m;if(e.gt(this.shru(1)))return v;i=m}else{if(this.eq(C))return e.eq(g)||e.eq(y)?C:e.eq(C)?g:(n=this.shr(1).div(e).shl(1)).eq(h)?e.isNegative()?g:y:(r=this.sub(e.mul(n)),i=n.add(r.div(e)));if(e.eq(C))return this.unsigned?m:h;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=h}for(r=this;r.gte(e);){n=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),c=a<=48?1:s(2,a-48),l=o(n),d=l.mul(e);d.isNegative()||d.gt(r);)d=(l=o(n-=c,this.unsigned)).mul(e);l.isZero()&&(l=g),i=i.add(l),r=r.sub(d)}return i},I.div=I.divide,I.modulo=function(e){return t(e)||(e=u(e)),this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.not=function(){return a(~this.low,~this.high,this.unsigned)},I.and=function(e){return t(e)||(e=u(e)),a(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return t(e)||(e=u(e)),a(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return t(e)||(e=u(e)),a(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?a(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):a(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?a(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):a(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(t(e)&&(e=e.toInt()),0===(e&=63))return this;var n=this.high;return e<32?a(this.low>>>e|n<<32-e,n>>>e,this.unsigned):a(32===e?n:n>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t]},e})?r.apply(t,[]):r)||(e.exports=i)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(890),t),i(n(1116),t),i(n(1131),t),i(n(1136),t),i(n(1140),t),i(n(1129),t),i(n(1132),t),i(n(1141),t),i(n(904),t),i(n(1130),t),i(n(1142),t),i(n(1117),t),i(n(1120),t),i(n(905),t),i(n(1123),t),i(n(1118),t),i(n(1119),t),i(n(1121),t),i(n(1122),t),i(n(1128),t),i(n(1143),t),i(n(906),t),i(n(1137),t),i(n(1126),t),i(n(1144),t),i(n(1124),t),i(n(1125),t),i(n(1138),t),i(n(1146),t),i(n(1127),t),i(n(1139),t),i(n(1145),t),i(n(1147),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRArray=void 0;var i=n(891),o=n(904),a=n(906),s=n(1138),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._delegate=null,t._document=null,t._array=null,t._contents=null,t.moveClock=!1,t}return r(t,e),Object.defineProperty(t.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delegate",{get:function(){return this._delegate},set:function(e){this._delegate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"array",{get:function(){return this._array},set:function(e){this._array!==e&&(this._array&&this._array.release(),this._array=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contents",{get:function(){return this._contents},set:function(e){this._contents!==e&&(this._contents&&this._contents.release(),this._contents=e.retain())},enumerable:!1,configurable:!0}),t.prototype.initWithDocument=function(e){var t=s.TTArray.alloc().initWithDocument(e).autorelease(),n=o.CRDictionary.alloc().initWithDocument(e).autorelease();return this.initWithTTArray_contents_document(t,n,e)},t.prototype.initWithTTArray_contents_document=function(e,t,n){return e.delegate=this,this.array=e,this.contents=t,this.document=n,this},t.prototype.free=function(){this.array.release(),this.contents.release(),this._array=null,this._contents=null,this._delegate=null,this._document=null,e.prototype.free.call(this)},t.prototype._push=function(e){return this._insert(e,this.length)},t.prototype._insert=function(e,t){return this._insertObjectWithIdentifier(e,a.CRUUID.UUID(),t)},t.prototype._insertObjectWithIdentifier=function(e,t,n){return this.array.insert(t,n),this.contents.set(t,e),t},Object.defineProperty(t.prototype,"length",{get:function(){return this.array.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"replicaUUID",{get:function(){return this.document.replica},enumerable:!1,configurable:!0}),t.prototype.get=function(e){var t=this.array.get(e);return this.contents.get(t)},t.prototype.getWithIdentifier=function(e){return this.contents.get(e)},t.prototype.push=function(e){this._push(e)},t.prototype.insert=function(e,t){this._insert(e,t)},t.prototype.pop=function(){var e=this.length;e>0&&this.delete(e-1)},t.prototype.delete=function(e){var t=this.array.get(e);t&&(this.array.delete(e),this.contents.delete(t))},t.prototype.replace=function(e,t){this.delete(e),this.insert(t,e)},t.prototype.move=function(e,t){var n=this.array.get(e);n&&(this.array.delete(e),this.array.insert(n,t),this.moveClock=!0)},t.prototype.encode=function(e){return{contents:"array",array:this.encodeAsIArray(e)}},t.prototype.encodeAsIArray=function(e){return{array:this.array.encodeAsStringArray(e),dictionary:this.contents.encodeAsDictionary(e)}},t.decodeWithArray=function(e,n){var r=o.CRDictionary.decodeWithDictionary(e,n.dictionary),i=s.TTArray.decodeWithStringArray(e,n.array);return t.alloc().initWithTTArray_contents_document(i,r,e.document).autorelease()},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new TypeError("CRArray cannot merge with non-CRArray type.");this.array.mergeWith(e.array),this.contents.mergeWith(e.contents)},t.prototype.deltaSince=function(e,n){var r=this.array.deltaSince(e,n);if(!r)return null;var i=this.contents.deltaSince(e,n);return i?t.alloc().initWithTTArray_contents_document(r,i,n).autorelease():null},t.prototype.realizeLocalChanges=function(e){this.array.realizeLocalChanges(e),this.contents.realizeLocalChanges(e),this.moveClock&&(e.unserializedReplicaClock=e.unserializedReplicaClock+1),this.moveClock=!1},Object.defineProperty(t.prototype,"tombstone",{get:function(){var e=this.array.tombstone,n=this.contents.tombstone;return t.alloc().initWithTTArray_contents_document(e,n,this.document).autorelease()},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){this.array.walkGraph(e),this.contents.walkGraph(e)},t.prototype.setDocument=function(e){this._document=e,this.array.setDocument(e),this.contents.setDocument(e)},t.prototype.addUndoCommand=function(e){this._delegate&&this._delegate.addUndoCommand(e)},Object.defineProperty(t.prototype,"wantsUndoCommands",{get:function(){return!!this._delegate&&this._delegate.wantsUndoCommands},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_description",{get:function(){var e=this.length;if(0===e)return"[]";for(var t="",n=0;n<e;++n){var r=this.array.get(n);0===n&&(t+="["),t+=this.contents.get(r).toString(),t+=n===e-1?"]":", "}return t},enumerable:!1,configurable:!0}),t}(i.Refcounted);t.CRArray=c,c.initializeRefcounted()},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(892)),r(n(893)),r(n(894)),r(n(895)),r(n(896)),r(n(897)),r(n(899)),r(n(900)),r(n(902)),r(n(898)),r(n(903))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(893);function i(e,t){var n;return e instanceof Error?n=e:(e&&(e=r.fmt(e,t)),n=new Error(e)),n.context=t,n}t.createFatalError=i,t.fatalError=function(e,t){throw i(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(892),i=/\s/g;t.fmt=function(e,t){return e.replace(/%\{(.*?)\}/g,(function(n,o){if(!t)throw new Error("Cannot use named parameters with `fmt` without a data object. String: '"+e+"'");return function(e,t,n){var o,a,s=(e=e.replace(i,"")).indexOf(":");s>-1&&(o=e.substr(s+1),e=e.substr(0,s)),a=t[e];var c=t[e+"Formatter"];return c?a=c(a,o):o&&r.fatalError("fmt() was given a formatting string, but key '"+e+"' has no formatter.",{string:n}),a}(o,t,e)}))}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(895),a=n(898),s=function(e){function t(){return e.call(this)||this}var n;return r(t,e),n=t,t.prototype.return=function(e){var t=this.getPow2Length(e.length);e.length=t,this.getPow2Pool(t).return(e)},t.prototype.bytesPerElement=function(){return 4},t.prototype.arrayPoolResetArray=function(e,t){var n=t.length;t.length=0,t.length=n},t.prototype.arrayPoolNewArray=function(e,t){var n=[];return n.length=t,n},t.create=function(){return new n},n=i([a.sealed],t)}(o.ArrayByLengthPoolBase);t.ArrayByLengthPool=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(896),i=function(){function e(){this._arraysByLength=new Map}return e.prototype.borrow=function(e){var t=this.getPow2Length(e);return this.getPow2Pool(t).borrow(t)},e.prototype.drainByLength=function(e){var t=this.getPow2Length(e),n=this._arraysByLength.get(t);n&&(n.drain(),this._arraysByLength.delete(t))},e.prototype.drainAll=function(){for(var e,t=this._arraysByLength[Symbol.iterator]();!(e=t.next()).done;)e.value[1].drain();this._arraysByLength.clear()},e.prototype.getPow2Length=function(e){return e<2||e<2?2:1<<Math.ceil(Math.log2(e))},e.prototype.getPow2Pool=function(e){var t=this._arraysByLength.get(e);return t||(t=new r.ArrayPool(this),this._arraysByLength.set(e,t)),t},e}();t.ArrayByLengthPoolBase=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(897),a=n(898),s=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this)||this;return n.delegate=t,n}var n;return r(t,e),n=t,t.prototype.arrayPoolResetArray=function(e){var t=this.delegate;if(t&&t.arrayPoolResetArray)t.arrayPoolResetArray(this,e);else if(Array.isArray(e)){var n=e.length;e.length=0,e.length=n}},t.prototype.arrayPoolNewArray=function(e){if(this.delegate)return this.delegate.arrayPoolNewArray(this,e);var t=[];return t.length=e,t},t.booleanArrays=new n,t.numberArrays=new n,t.stringArrays=new n,t.symbolArrays=new n,i([a.sealed],t)}(o.ArrayPoolBase);t.ArrayPool=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.freeCount=0,this._pool=[]}return e.prototype.borrow=function(e){if(this.freeCount>0){var t=this._pool[--this.freeCount];return this.arrayPoolResetArray(t),t}return this.arrayPoolNewArray(e)},e.prototype.return=function(e){this._pool[this.freeCount++]=e},e.prototype.drain=function(){this._pool.length=0,this.freeCount=0},e}();t.ArrayPoolBase=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sealed=function(e){function t(){Object.seal(e),Object.seal(e.prototype)}var n=e;if(e.initializeRefcounted){var r=n.initializeRefcounted;n.initializeRefcounted=function(){r.apply(e),t()}}else if(e.initializePooled){var i=n.initializePooled;n.initializePooled=function(){i.apply(e),t()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG=!1,t.setDEBUG=function(e){void 0===e&&(e=!0),t.DEBUG=e},t.DEBUG_OPTS={trackActiveInstances:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(899),i=n(901);function o(e){var t=e;return t.dbg_activeInstances=new i.Set,t.dbg_activeInstanceCount=0,t.pool=[],t.freeCount=0,t.drain=function(){t.pool.length=0,t.freeCount=0},t.alloc=function(){var n;return t.freeCount>0?((n=t.pool[--t.freeCount]).isFreed=!1,n.instanceInit(),r.DEBUG&&(++t.dbg_activeInstanceCount,r.DEBUG_OPTS.trackActiveInstances&&t.dbg_activeInstances.add(n)),n):((n=new e).instanceInit(),r.DEBUG&&(++t.dbg_activeInstanceCount,r.DEBUG_OPTS.trackActiveInstances&&t.dbg_activeInstances.add(n)),n)},t.slowAllocAndInit=function(e){var n=t.alloc();return e(n),n},t.slowAllocAndInitWith=function(e){var n=t.alloc();for(var r in e)n[r]=e[r];return n},t.free=function(e){var n=e;if(n.isFreed)throw new Error("Instance of '"+this.name+"' has already been freed.");n.isFreed=!0,t.pool[t.freeCount++]=e,r.DEBUG&&(--t.dbg_activeInstanceCount,r.DEBUG_OPTS.trackActiveInstances&&t.dbg_activeInstances.remove(e))},t.prototype.isFreed=!1,Object.getPrototypeOf(t)===Function.prototype&&(t.prototype.instanceInit||(t.prototype.instanceInit=function(){})),t}function a(e){var n=e;if(o(e),Object.getPrototypeOf(n)===Function.prototype){var r=n.prototype.free;n.prototype.free=r?function(){r.call(this),this.constructor.free(this)}:function(){this.constructor.free(this)}}return t.dbg_pooledClasses.push(n),n}t.dbg_pooledClasses=[],t.makePooledWithoutFree=o,t.makePooled=a,t.pooled=function(){return function(e){a(e)}};var s=function(){function e(){this.isFreed=!1}return e.prototype.free=function(){this.constructor.free(this)},e.alloc_own=function(){return this.alloc()},e.initializePooled=function(){a(this)},e.prototype.instanceInit=function(){},e}();t.Pooled=s,t.dbg_pooledActiveInstanceCounts=function(e){void 0===e&&(e=[]);for(var n=new Map,r=0,i=0===e.length?t.dbg_pooledClasses:t.dbg_pooledClasses.filter((function(t){return-1===e.indexOf(t)}));r<i.length;r++){var o=i[r];n.set(o,o.dbg_activeInstanceCount)}return n},t.dbg_pooledActiveInstanceCountDifferences=function(e,n){void 0===n&&(n=[]);for(var r=new Map,i=0,o=0===n.length?t.dbg_pooledClasses:t.dbg_pooledClasses.filter((function(e){return-1===n.indexOf(e)}));i<o.length;i++){var a=o[i],s=e.get(a);void 0!==s?a.dbg_activeInstanceCount!==s&&r.set(a,a.dbg_activeInstanceCount-s):r.set(a,a.dbg_activeInstanceCount)}return r},t.dbg_pooledActiveInstances=function(){for(var e=new Map,n=0,r=t.dbg_pooledClasses;n<r.length;n++){var i=r[n];e.set(i,i.dbg_activeInstances.toArray())}return e},t.dbg_pooledActiveInstancesAdded=function(e){for(var n=new Map,r=function(t){var r=e.get(t);if(void 0!==r){var i=t.dbg_activeInstances.toArray().filter((function(e){return-1===r.indexOf(e)}));i.length>0&&n.set(t,i)}else n.set(t,t.dbg_activeInstances.toArray())},i=0,o=t.dbg_pooledClasses;i<o.length;i++)r(o[i]);return n},t.unsafePtrAsOwn=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._map=new Map}return e.prototype.add=function(e){this._map.set(e,null)},e.prototype.remove=function(e){this._map.delete(e)},e.prototype.contains=function(e){return void 0!==this._map.get(e)},e.prototype.toArray=function(){return Array.from(this._map.keys())},Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e}();t.Set=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var a=n(892),s=n(899),c=n(900),u=n(898);t.dbg_refcountedClasses=[];var l=0,d=[],p=[],f=0;function h(){g.beginAutoreleaseFrame()}function m(){g.endAutoreleaseFrame()}Date.now(),t.beginAutoreleaseFrame=h,t.endAutoreleaseFrame=m,t.invokeWithAutoreleaseFrame=function(e,t,n){h();var r=e.apply(t,n);return m(),r};var g={autorelease:function(e){return s.DEBUG,p[f]=e,f++},beginAutoreleaseFrame:function(){d[l++]=f},endAutoreleaseFrame:function(){for(var e=d[l-1];f>e;)v(--f);--l}};function v(e){var t=p[e];p[e]=null,t&&t.release()}function y(e,t){p[t]!==e&&a.fatalError("_releaseImmediately: attempted to cancel autorelease for a different object",{object:e}),v(t)}function b(){this.isFreed&&a.fatalError("Cannot retain an object that has already been disposed.",{object:this,type:this.constructor.name}),++this.refCount;var e=this._autoreleaseForTransferToken;return isNaN(e)||(this._autoreleaseForTransferToken=NaN,y(this,e)),this}function _(){var e=--this.refCount,t=this._autoreleaseForTransferToken;return isNaN(t)||(this._autoreleaseForTransferToken=NaN),e<0?a.fatalError("Cannot release an object more times than it has been retained.",{object:this,type:this.constructor.name}):0===e&&this.free(),this}function C(){return g.autorelease(this),this}function I(){return this._autoreleaseForTransferToken=g.autorelease(this),this}function w(e){var n=e,r=n.alloc;n.alloc=function(){var e=r();return e.refCount=1,e._autoreleaseForTransferToken=NaN,e},t.dbg_refcountedClasses.push(n)}t.getAutoreleaseHooks=function(){return g},t.setAutoreleaseHooks=function(e){g=i({},e)},t._releaseImmediately=y,t.retainFn=b,t.releaseFn=_,t.autoreleaseFn=C,t.autoreleaseForTransferFn=I,t.autoreleasepool=function(e){h(),e(),m()},t.makeRefcounted=function(e){var t=e;return c.makePooled(t),t.prototype.refCount=1,t.prototype.retain=b,t.prototype.release=_,t.prototype.autorelease=C,t.prototype._autoreleaseForTransfer=I,t.prototype._autoreleaseForTransferToken=NaN,w(e),t};var E=function(){function e(){this.isFreed=!1,this.refCount=1,this._autoreleaseForTransferToken=-1,this._autoreleaseForTransfer=I}return e.initializeRefcounted=function(){c.makePooledWithoutFree(this),w(this)},e.prototype.instanceInit=function(){},e.prototype.free=function(){this.constructor.free(this)},e}();t.Refcounted=E,E.prototype.retain=b,E.prototype.release=_,E.prototype.autorelease=C;var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([u.sealed],t)}(E);t.ConcreteRefcounted=S,t.dbg_refcountedActiveInstanceCounts=function(e){void 0===e&&(e=[]);for(var n=new Map,r=0,i=0===e.length?t.dbg_refcountedClasses:t.dbg_refcountedClasses.filter((function(t){return-1===e.indexOf(t)}));r<i.length;r++){var o=i[r];n.set(o,o.dbg_activeInstanceCount)}return n},t.dbg_refcountedActiveInstanceCountDifferences=function(e,n){void 0===n&&(n=[]);for(var r=new Map,i=0,o=0===n.length?t.dbg_refcountedClasses:t.dbg_refcountedClasses.filter((function(e){return-1===n.indexOf(e)}));i<o.length;i++){var a=o[i],s=e.get(a);void 0!==s?a.dbg_activeInstanceCount!==s&&r.set(a,a.dbg_activeInstanceCount-s):r.set(a,a.dbg_activeInstanceCount)}return r},t.dbg_refcountedActiveInstances=function(e){void 0===e&&(e=[]);for(var n=new Map,r=0,i=t.dbg_refcountedClasses.filter((function(t){return-1===e.indexOf(t)}));r<i.length;r++){var o=i[r];n.set(o,o.dbg_activeInstances.toArray())}return n},t.dbg_refcountedActiveInstancesAdded=function(e,n){void 0===n&&(n=[]);for(var r=new Map,i=function(t){var n=e.get(t);if(void 0!==n){var i=t.dbg_activeInstances.toArray().filter((function(e){return-1===n.indexOf(e)}));i.length>0&&r.set(t,i)}else r.set(t,t.dbg_activeInstances.toArray())},o=0,a=t.dbg_refcountedClasses.filter((function(e){return-1===n.indexOf(e)}));o<a.length;o++)i(a[o]);return r}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(895),a=n(898),s=function(e){function t(t){var n=e.call(this)||this;return n.typedArrayConstructor=t,n}var n;return r(t,e),n=t,t.prototype.return=function(e){var t=this.getPow2Length(e.length);e.length===t&&this.getPow2Pool(t).return(e)},t.prototype.bytesPerElement=function(){return this.typedArrayConstructor.BYTES_PER_ELEMENT},t.prototype.arrayPoolNewArray=function(e,t){return new this.typedArrayConstructor(t)},t.int8Arrays=new n(Int8Array),t.int16Arrays=new n(Int16Array),t.int32Arrays=new n(Int32Array),t.uint8Arrays=new n(Uint8Array),t.uint16Arrays=new n(Uint16Array),t.uint32Arrays=new n(Uint32Array),t.uint8ClampedArrays=new n(Uint8ClampedArray),t.float32Arrays=new n(Float32Array),t.float64Arrays=new n(Float64Array),i([a.sealed],t)}(o.ArrayByLengthPoolBase);t.TypedArrayByLengthPool=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRDictionary=void 0;var i=n(891),o=n(905),a=(n(1118),n(906),n(1137)),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._timestamp=null,t}return r(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this._timestamp},set:function(e){this._timestamp!==e&&(this._timestamp&&this._timestamp.release(),this._timestamp=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value&&this._value.release(),this._value=e.retain())},enumerable:!1,configurable:!0}),t.prototype.initWithValue=function(e){var t=a.CRVectorTimestamp.alloc().init().autorelease();return this.initWithValue_timestamp(e,t)},t.prototype.initWithValue_timestamp=function(e,t){return this.value=e,this.timestamp=t,this},t.prototype.free=function(){this.timestamp&&this.timestamp.release(),this.value&&this.value.release(),this._value=null,this._timestamp=null,e.prototype.free.call(this)},t.prototype.mergeWith=function(e){this.timestamp.mergeWith(e.timestamp),this.value.mergeWith(e.value)},t.prototype.toString=function(){return"<CRDictionaryElement "+this.timestamp+" "+this.value+">"},t}(i.Refcounted);function c(e){return e.UUIDString}s.initializeRefcounted();var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contents=new Map,t.removeClock=0,t._document=null,t}return r(t,e),Object.defineProperty(t.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),t.prototype.initWithDocument=function(e){return this.document=e,this},t.prototype.free=function(){this.contents.forEach((function(e,t){e[0].release(),e[1].release()})),this.contents.clear(),this.removeClock=0,this._document=null,e.prototype.free.call(this)},t.prototype.encode=function(e){return{contents:"dictionary",dictionary:this.encodeAsDictionary(e)}},t.prototype.encodeAsDictionaryWithValueCoder=function(e,t){var n=this;return{element:function(){var r=[];return n.contents.forEach((function(n,i){var o=t(n[1],n[0]);o.timestamp=n[1].timestamp.encodeIntoProtobufTimestamp(e),r.push(o)})),r}()}},t.prototype.encodeAsDictionary=function(e){return this.encodeAsDictionaryWithValueCoder(e,(function(t,n){var r=e.encodeObjectForObjectID(t.value);return{key:e.encodeObjectForObjectID(n),value:r}}))},Object.defineProperty(t.prototype,"size",{get:function(){return this.contents.size},enumerable:!1,configurable:!0}),t.decodeWithDictionary=function(e,n){return t.decodeWithDictionaryValueDecoder(e,n,(function(t){var n=t.value?e.decodeObjectForProtobufObjectID(t.value):null;return[t.key?e.decodeObjectForProtobufObjectID(t.key):null,n]}))},t.decodeWithDictionaryValueDecoder=function(e,n,r){for(var i=t.alloc().initWithDocument(e.document).autorelease(),o=0,u=n.element||[];o<u.length;o++){var l=u[o],d=r(l),p=d[0],f=d[1],h=l.timestamp?a.CRVectorTimestamp.decodeWithProtobufTimestamp(e,l.timestamp):null;if(p&&h){var m=s.alloc().initWithValue_timestamp(f,h).autorelease(),g=i.contents.get(p);g&&(g[0].autorelease(),g[1].autorelease()),i.contents.set(c(p),[p.retain(),m.retain()])}}return i},t.prototype.get=function(e){var t=this.contents.get(c(e));return void 0===t?null:t[1].value},t.prototype.set=function(e,t){if(!this.contents.has(c(e))){var n=s.alloc().initWithValue(t).autorelease(),r=this.document.replicaClock+1;n.timestamp.setClockForReplica(r,o.unserialisedReplicaID()),this.contents.set(c(e),[e.retain(),n.retain()]),this.document.setDocumentFor(e),this.document.setDocumentFor(t)}},t.prototype.delete=function(e){var t=this.contents.get(c(e));this.contents.delete(c(e)),t&&(t[0].release(),t[1].release()),this.removeClock=this.document.replicaClock+1},t.prototype.clear=function(){this.contents.forEach((function(e,t){e[0].release(),e[1].release()})),this.contents.clear(),this.removeClock=this.document.replicaClock+1},t.prototype.realizeLocalChanges=function(e){this.contents.forEach((function(t,n){var r=t[1].timestamp.clockForReplica(o.unserialisedReplicaID());r>0&&(t[1].timestamp.removeReplica(o.unserialisedReplicaID()),t[1].timestamp.setClockForReplica(r,e.replica),e.unserializedReplicaClock=e.unserializedReplicaClock>r?e.unserializedReplicaClock:r)})),this.removeClock>0&&(e.unserializedReplicaClock=e.unserializedReplicaClock>this.removeClock?e.unserializedReplicaClock:this.removeClock),this.removeClock=0},t.prototype.mergeWith=function(e){var n=this;if(!(e instanceof t))throw new TypeError("CRDictionary cannot merge with non-CRDictionary type.");var r=new Set;this.contents.forEach((function(t,n){var i=e.contents.get(n);i?t[1].mergeWith(i[1]):(t[1].timestamp.minus(e.document.version),0===t[1].timestamp.length&&r.add(n))})),r.forEach((function(e){var t=n.contents.get(e);n.contents.delete(e),t&&(t[0].release(),t[1].release())})),e.contents.forEach((function(e,t){if(!n.contents.has(t)&&n.document.version.compare(e[1].timestamp)&a.CRVectorTimestampComparison.Ascending){var r=n.contents.get(t);r&&(r[0].autorelease(),r[1].autorelease()),n.contents.set(t,[e[0].retain(),e[1].retain()])}}))},t.prototype.setDocument=function(e){this._document=e},t.prototype.deltaSince=function(e,n){var r=t.alloc().initWithDocument(n).autorelease();return this.contents.forEach((function(t,i){var o=t[1].timestamp.copy().autorelease();o.minus(e);var a=t[1].value.deltaSince(e,n),c=s.alloc().initWithValue_timestamp(a||t[1].value.tombstone,o).autorelease(),u=r.contents.get(i);u&&(u[0].autorelease(),u[1].autorelease()),r.contents.set(i,[t[0].retain(),c.retain()])})),r},t.prototype.walkGraph=function(e){this.contents.forEach((function(t,n){e(t[0]),e(t[1].value)}))},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.toString=function(){if(0===this.size)return"{}";var e="{";return this.contents.forEach((function(t,n){e+=n+": "+t[1].timestamp+" "+t[1].value+"\n"})),e+="}"},t.prototype.forEach=function(e){this.contents.forEach((function(t,n){return e(t[1].value,t[0],t[1].timestamp)}))},t}(i.Refcounted);t.CRDictionary=u,u.initializeRefcounted()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dbg_releaseUnserialisedReplicaID=t.unserialisedReplicaID=t._unserialisedReplicaID=void 0;var r=n(906);t._unserialisedReplicaID=null,t.unserialisedReplicaID=function(){return null===t._unserialisedReplicaID&&(t._unserialisedReplicaID=r.CRUUID.UUID().retain()),t._unserialisedReplicaID},t.dbg_releaseUnserialisedReplicaID=function(){t._unserialisedReplicaID&&t._unserialisedReplicaID.release(),t._unserialisedReplicaID=null}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRUUID=void 0;var i=n(907),o=n(1116),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.UUID=function(){return t.alloc().init().autorelease()},Object.defineProperty(t,"CRZero",{get:function(){return t.alloc().initWithUUIDBytes(new Uint8Array(16).fill(0)).autorelease()},enumerable:!1,configurable:!0}),t.prototype.encode=function(e){var n=e.encodeUUIDIndexFromUUID(this);return{contents:"custom",custom:{type:o.CRCoder.getTypeIndexForClass(t.decode),mapEntry:[e.encodeUInt64("UUIDIndex",n)]}}},t.decode=function(e,t){var n=e.decodeUInt64ForKey("UUIDIndex",t);return e.decodeUUIDFromUUIDIndex(n)},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new TypeError("CRUUID cannot merge with non-CRUUID type.")},t.prototype.deltaSince=function(e,t){return null},t.prototype.realizeLocalChanges=function(e){},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){},t.prototype.setDocument=function(e){},t}(i.NSUUID);t.CRUUID=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.singletons=t.UuidModule=t.Utilities=t.TopoTextProtobuf=void 0,o(n(908),t),o(n(1023),t),o(n(1095),t),o(n(1114),t),o(n(1113),t),o(n(1115),t),o(n(1096),t),o(n(1042),t),o(n(1047),t),o(n(1051),t);var s=a(n(1052));t.TopoTextProtobuf=s;var c=a(n(1054));t.Utilities=c;var u=a(n(1053));t.UuidModule=u;var l=n(1047);t.singletons={pooled:[],refcounted:[l.NSUUID.TTZero,l.TTMergeableString.unserialisedReplicaID]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataClockOps=t.asValidatedDataClock=t.MAX_DATA_CLOCK=t.MIN_DATA_CLOCK=void 0;var r=n(909);t.MIN_DATA_CLOCK=0,t.MAX_DATA_CLOCK=Math.pow(2,32)-1,t.asValidatedDataClock=function(e){return e},t.DataClockOps=new r.IntegerOps},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.singletons=t.dbg_codepoint=void 0,i(n(910),t),i(n(918),t),i(n(919),t),i(n(924),t),i(n(920),t),i(n(921),t),i(n(922),t),i(n(923),t),i(n(925),t),i(n(926),t),i(n(927),t),i(n(928),t),i(n(1014),t),i(n(1015),t),i(n(1010),t),i(n(1012),t),i(n(1016),t),i(n(1017),t),i(n(1003),t),i(n(1018),t),i(n(1011),t);var o=n(1013);Object.defineProperty(t,"dbg_codepoint",{enumerable:!0,get:function(){return o.dbg_codepoint}}),i(n(1019),t),i(n(1021),t),i(n(1020),t),i(n(929),t),i(n(1004),t),i(n(1022),t);var a=n(1004);t.singletons={pooled:[],refcounted:[a.NoOpOperation.instance]}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeDictionary=t.AttrDict=t.AttrDictBase=void 0;var a=n(911),s=n(918),c=n(919),u=n(920),l=n(921),d=n(922),p=n(923),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.dictionaryKeys=function(){return c.AttrDictKeys},t.prototype.setAttributesFrom=function(e){var t=this;for(var n in e)this.dictionaryKeys().indexOf(n)>=0&&(t=t.set(n,e[n]));return t},t.prototype.serialize=function(){var e=this.attachment,t=this.font,n=this.paragraphStyle,r=this.shadow,i={attachment:e&&e.serialize(),backgroundColor:this.backgroundColor,baselineOffset:this.baselineOffset,cursor:this.cursor,expansion:this.expansion,font:t&&t.serialize(),foregroundColor:this.foregroundColor,kern:this.kern,ligature:this.ligature,link:this.link,markedClauseSegment:this.markedClauseSegment,obliqueness:this.obliqueness,paragraphStyle:n&&n.serialize(),shadow:r&&r.serialize(),spellingState:this.spellingState,strikethroughColor:this.strikethroughColor,strikethroughStyle:this.strikethroughStyle,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,superscript:this.superscript,textEffect:this.textEffect,toolTip:this.toolTip,underlineColor:this.underlineColor,underlineStyle:this.underlineStyle,verticalGlyphForm:this.verticalGlyphForm,writingDirection:this.writingDirection};for(var o in i)null===i[o]&&delete i[o];return i},t.deserialize=function(e){var t=e,n=t.attachment,r=t.font,i=t.paragraphStyle,o=t.shadow,a=Object.assign({},e);return n&&(a.attachment=d.TextAttachmentAttribute.create(n)),r&&(a.font=s.FontAttribute.create(r)),i&&(a.paragraphStyle=u.ParagraphStyleAttribute.create(i)),o&&(a.shadow=l.ShadowAttribute.create(o)),h.create(a)},t.UnderlineStyle=p.UnderlineStyleAttribute,i([a.uniqueProperty(null,a.UniqueKind.Unique),o("design:type",Object)],t.prototype,"attachment",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"backgroundColor",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"baselineOffset",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"cursor",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"expansion",void 0),i([a.uniqueProperty(null,a.UniqueKind.Unique),o("design:type",Object)],t.prototype,"font",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"foregroundColor",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"kern",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"ligature",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"link",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"markedClauseSegment",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"obliqueness",void 0),i([a.uniqueProperty(null,a.UniqueKind.Unique),o("design:type",Object)],t.prototype,"paragraphStyle",void 0),i([a.uniqueProperty(null,a.UniqueKind.Unique),o("design:type",Object)],t.prototype,"shadow",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"spellingState",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"strikethroughColor",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"strikethroughStyle",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"strokeColor",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"strokeWidth",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"superscript",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"textEffect",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"toolTip",void 0),i([a.uniqueProperty(null,a.UniqueKind.String),o("design:type",Object)],t.prototype,"underlineColor",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"underlineStyle",void 0),i([a.uniqueProperty(null,a.UniqueKind.Boolean),o("design:type",Object)],t.prototype,"verticalGlyphForm",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"writingDirection",void 0),t}(a.Unique);t.AttrDictBase=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(f);t.AttrDict=h,h.initializeUnique(),t.AttributeDictionary=h},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(912),t),i(n(913),t),i(n(914),t),i(n(915),t),i(n(916),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUniquenessAlterationCacheRecord=void 0;var r=function(){function e(e,t,n,r){this.prev=null,this.next=null,this.cachedBy=e,this.keyIdx=t,this.uniqueID=n,this.alteration=r}return e.prototype.install=function(){var e=this.alteration._firstUniqueAlterationCacheRecord;this.next=e,e&&(e.prev=this),this.alteration._firstUniqueAlterationCacheRecord=this,(this.cachedBy._uniqueAlterationCache[this.keyIdx]=this.cachedBy._uniqueAlterationCache[this.keyIdx]||{})[this.uniqueID]=this},e.prototype.removeRecordFromAlteration=function(){this.prev?this.prev.next=this.next:this.alteration._firstUniqueAlterationCacheRecord=this.next,this.next&&(this.next.prev=this.prev)},e.prototype.removeAlterationFromCache=function(){delete this.cachedBy._uniqueAlterationCache[this.keyIdx][this.uniqueID]},e}();t.ObjectUniquenessAlterationCacheRecord=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUniquenessTrie=void 0;var r=function(){function e(e,t){this.theClass=e,this.keyCount=t,this.root={parent:null,size:0,lookup:{},alteration:null}}return e.prototype.lookUpWithUniqueIDArray=function(e,t){this.keyCount;for(var n=this.root,r=0;r<t.length;++r){var i=e[r],o=n.lookup[i];o||(o={parent:n,size:0,lookup:{},alteration:null},n.lookup[i]=o,++n.size),n=o}return n.alteration=n.alteration||this.theClass.createWithValues(e.slice(0),t.slice(0)),n.alteration},e.prototype.deleteWithUniqueIDArray=function(e){var t,n,r=this.root;for(t=0;t<e.length;++t)if(n=e[t],!(r=r.lookup[n]))return;for(r=r.parent,t=e.length;r&&r.size>0&&t>0;)n=e[--t],delete r.lookup[n],--r.size,r=r.parent},e}();t.ObjectUniquenessTrie=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractBase=void 0;t.AbstractBase=function(){}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Unique=void 0;var i=n(891),o=n(912),a=n(913),s=n(916),c=n(916);function u(e){var t="symbol"===typeof e?Symbol.keyFor(e):e;return"set"+t[0].toUpperCase()+t.substr(1)}var l=[],d=[],p=0;function f(e,t){e.length=t.length;for(var n=0,r=t.length;n<r;++n)e[n]=t[n]}var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uniqueID="",t._uniqueIDs=[],t._uniqueValues=[],t._uniqueAlterationCache=[],t._firstUniqueAlterationCacheRecord=null,t._cachedDataForOtherUniqueObjects={},t}return r(t,e),t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.uniqueID="uniqueobject"+ ++p,t._uniqueObjectCounter++},t.prototype.free=function(){var n=this.constructor;this._uniqueIDs.length===n._uniqueKeyCount&&this.constructor._uniquenessTrie.deleteWithUniqueIDArray(this._uniqueIDs);for(var r=this._firstUniqueAlterationCacheRecord;r;)r.removeAlterationFromCache(),r=r.next;for(var i=0,o=this._uniqueAlterationCache.length;i<o;++i){var a=this._uniqueAlterationCache[i];for(var s in a){var c=a[s];c&&c.removeRecordFromAlteration()}}for(var u in this._cachedDataForOtherUniqueObjects){var l=this._cachedDataForOtherUniqueObjects[u];l&&l.release()}for(var d=0,p=this.constructor._uniqueRefcountedKeys;d<p.length;d++){var f=this[u=p[d]];f&&f.release()}this._uniqueIDs.length=0,this._uniqueValues.length=0,this._cachedDataForOtherUniqueObjects={},this.uniqueID="",--t._uniqueObjectCounter,e.prototype.free.call(this)},t.prototype.cachedDataFor=function(e){return this._cachedDataForOtherUniqueObjects[e.uniqueID]},t.prototype.cacheDataFor=function(e,t){this._cachedDataForOtherUniqueObjects[e.uniqueID]=t,t.retain()},t.prototype.clearCachedDataFor=function(e){this._cachedDataForOtherUniqueObjects[e.uniqueID].release(),delete this._cachedDataForOtherUniqueObjects[e.uniqueID]},t.prototype.computeTotalCacheSize=function(){for(var e=0,t=this._uniqueAlterationCache.length,n=0;n<t;++n){var r=this._uniqueAlterationCache[n];for(var i in r)++e}return e},t.prototype.initUnique=function(e,t){this._uniqueIDs=e,this._uniqueValues=t;for(var n=this._uniqueIDs.length,r=0;r<n;++r){var i=this.constructor._uniqueKeys[r].toString(),o=t[r];this[i]=t[r],this._uniqueAlterationCache[r]={}}for(var a=0,s=this.constructor._uniqueRefcountedKeys;a<s.length;a++)(o=this[i=s[a]])&&o.retain()},t.prototype._cacheUniqueAlteration=function(e,t,n){new o.ObjectUniquenessAlterationCacheRecord(this,e,t,n).install()},t.prototype.set=function(e,t){return this[u(e)](t)},t.generateSetter=function(e,t){return function(n){var r=t(n),i=this._uniqueAlterationCache[e][r];if(void 0!==i)return i.alteration;f(l,this._uniqueIDs),f(d,this._uniqueValues),l[e]=r,d[e]=n;var o=this.constructor._uniquenessTrie.lookUpWithUniqueIDArray(l,d);return this._cacheUniqueAlteration(e,r,o),o}},t.swizzleAlloc=function(e){var n=e,r=n.alloc;n.alloc=function(){var e=r();if(!n._uniqueMetadataIsInitialized){var i=n._uniqueAccessorKeys||[],o=n._uniquePropertyKeys||[],l=i.slice().concat(o),d=0,p=l.reduce((function(e,t){return e[t.toString()]=d++,e}),{}),f=i.reduce((function(t,n){return t[n.toString()]=s.accessorDefaultValue(e,n),t}),{}),h=o.reduce((function(t,n){return t[n.toString()]=s.propertyDefaultValue(e,n),t}),f),m=i.reduce((function(t,n){return t[n.toString()]=s.accessorUniqueIDGenerator(e,n),t}),{}),g=o.reduce((function(t,n){return t[n.toString()]=s.propertyUniqueIDGenerator(e,n),t}),m);l.forEach((function(e){n.prototype[u(e)]=t.generateSetter(p[e.toString()],g[e.toString()])})),n._uniqueDefaultValues=h,n._uniqueIDGeneratorMap=g,n._uniqueKeys=l,n._uniqueRefcountedKeys=l.filter((function(t){return"Unique"===c.accessorType(e,t.toString())})).map((function(e){return e.toString()})),n._uniqueKeyIndexes=p,n._uniqueKeyCount=i.length+o.length,n._uniquenessTrie=new a.ObjectUniquenessTrie(n,n._uniqueKeyCount),n._nextUniqueID=1,n._uniqueMetadataIsInitialized=!0}return e},n.create=function(e){void 0===e&&(e={}),n._uniqueMetadataIsInitialized||n.alloc().release(),l.length=n._uniqueKeyCount,d.length=n._uniqueKeyCount;for(var t=0,r=n._uniqueKeys.length;t<r;++t){var i=n._uniqueKeys[t],o=n._uniqueKeyIndexes[i.toString()],a=n._uniqueIDGeneratorMap[i.toString()];if(e.hasOwnProperty(i)){var s=e[i.toString()];l[o]=a(s),d[o]=s}else s=n._uniqueDefaultValues[i.toString()],l[o]=a(s),d[o]=s}return n._uniquenessTrie.lookUpWithUniqueIDArray(l,d)},n.createWithValues=function(e,t){var n=this.alloc();return n.initUnique(e,t),n.autorelease()}},t.initializeUnique=function(){this.initializeRefcounted(),this._uniqueMetadataIsInitialized=!1,t.swizzleAlloc(this)},t._uniqueObjectCounter=0,t}(i.Refcounted);t.Unique=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.propertyDefaultValue=t.propertyUniqueIDGenerator=t.uniqueProperty=t.accessorDefaultValue=t.ownAccessorDefaultValue=t.accessorUniqueIDGenerator=t.accessorType=t.uniqueAccessor=t.UniqueKind=void 0,n(917);var r,i=0,o=new WeakMap;function a(e,t){return Reflect.getMetadata("_uniqueKind",e,t)}function s(e,t){var n=Object.getPrototypeOf(e);if(n){var r=Object.getOwnPropertyDescriptor(n,t);if(r){var i=r.get._uniqueDefaultValue;return void 0===i?void 0:i}}}(r=t.UniqueKind||(t.UniqueKind={})).Boolean="Boolean",r.Number="Number",r.String="String",r.Symbol="symbol",r.Object="Object",r.Unique="Unique",t.uniqueAccessor=function(e){return void 0===e&&(e=null),function(t,n,r){t.constructor._uniqueAccessorKeys?t.constructor._uniqueAccessorKeys.push(n):t.constructor._uniqueAccessorKeys=[n],r.get._uniqueDefaultValue=e}},t.accessorType=a,t.accessorUniqueIDGenerator=function(e,t){return c[a(e,t)]},t.ownAccessorDefaultValue=s,t.accessorDefaultValue=function e(t,n){var r=s(t,n);if(void 0!==r)return r;var i=Object.getPrototypeOf(t);return i?e(i,n):void 0},t.uniqueProperty=function(e,t){return void 0===e&&(e=null),function(n,r){Reflect.defineMetadata("_uniqueDefaultValue",e,n,r),Reflect.defineMetadata("_uniqueKind",t,n,r);var i=n.constructor;i._uniquePropertyKeys=(i._uniquePropertyKeys||[]).concat(r)}},t.propertyUniqueIDGenerator=function(e,t){return c[a(e,t)]||c.Object},t.propertyDefaultValue=function(e,t){var n=Reflect.getMetadata("_uniqueDefaultValue",e,t);return void 0===n?void 0:n};var c={Boolean:function(e){return null===e?-1:void 0===e?-2:!1===e?0:1},Number:function(e){return null===e?"null":void 0===e?"undefined":e.toString()},Object:function(e){if(null===e)return"uniqueobject-null";var t=o.get(e);return t||(t="uniqueID"+ ++i,o.set(e,t)),t},String:function(e){return e},symbol:function(e){return Symbol.keyFor(e)},Unique:function(e){return e?e.uniqueID:"uniqueobject-null"}}},function(e,t,n){(function(e,t){var n;!function(n){!function(r){var i="object"===typeof t?t:"object"===typeof self?self:"object"===typeof this?this:Function("return this;")(),o=a(n);function a(e,t){return function(n,r){"function"!==typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}"undefined"===typeof i.Reflect?i.Reflect=n:o=a(i.Reflect,o),function(t){var n=Object.prototype.hasOwnProperty,r="function"===typeof Symbol,i=r&&"undefined"!==typeof Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&"undefined"!==typeof Symbol.iterator?Symbol.iterator:"@@iterator",a="function"===typeof Object.create,s={__proto__:[]}instanceof Array,c=!a&&!s,u={create:a?function(){return R(Object.create(null))}:s?function(){return R({__proto__:null})}:function(){return R({})},has:c?function(e,t){return n.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return n.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),d="object"===typeof e&&e.env&&"true"===e.env.REFLECT_METADATA_USE_MAP_POLYFILL,p=d||"function"!==typeof Map||"function"!==typeof Map.prototype.entries?function(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[o]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,i)},t.prototype.entries=function(){return new n(this._keys,this._values,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[o]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function i(e,t){return t}function a(e,t){return[e,t]}}():Map,f=d||"function"!==typeof Set||"function"!==typeof Set.prototype.entries?function(){function e(){this._map=new p}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[o]=function(){return this.keys()},e}():Set,h=new(d||"function"!==typeof WeakMap?function(){var e=u.create(),t=r();return function(){function e(){this._key=r()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=r()},e}();function r(){var t;do{t="@@WeakMap@@"+a()}while(u.has(e,t));return e[t]=!0,t}function i(e,r){if(!n.call(e,t)){if(!r)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function o(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function a(){var e=(16,"function"===typeof Uint8Array?"undefined"!==typeof crypto?crypto.getRandomValues(new Uint8Array(16)):"undefined"!==typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(16)):o(new Uint8Array(16),16):o(new Array(16),16));e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",n=0;n<16;++n){var r=e[n];4!==n&&6!==n&&8!==n||(t+="-"),r<16&&(t+="0"),t+=r.toString(16).toLowerCase()}return t}}():WeakMap);function m(e,t,n){var r=h.get(e);if(C(r)){if(!n)return;r=new p,h.set(e,r)}var i=r.get(t);if(C(i)){if(!n)return;i=new p,r.set(t,i)}return i}function g(e,t,n){var r=m(t,n,!1);return!C(r)&&!!r.has(e)}function v(e,t,n){var r=m(t,n,!1);if(!C(r))return r.get(e)}function y(e,t,n,r){m(n,r,!0).set(e,t)}function b(e,t){var n=[],r=m(e,t,!1);if(C(r))return n;for(var i=function(e){var t=P(e,o);if(!T(t))throw new TypeError;var n=t.call(e);if(!w(n))throw new TypeError;return n}(r.keys()),a=0;;){var s=x(i);if(!s)return n.length=a,n;var c=s.value;try{n[a]=c}catch(u){try{A(i)}finally{throw u}}a++}}function _(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function C(e){return void 0===e}function I(e){return null===e}function w(e){return"object"===typeof e?null!==e:"function"===typeof e}function E(e){var t=function(e,t){switch(_(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n=3===t?"string":5===t?"number":"default",r=P(e,i);if(void 0!==r){var o=r.call(e,n);if(w(o))throw new TypeError;return o}return function(e,t){if("string"===t){var n=e.toString;if(T(n)&&!w(i=n.call(e)))return i;if(T(r=e.valueOf)&&!w(i=r.call(e)))return i}else{var r;if(T(r=e.valueOf)&&!w(i=r.call(e)))return i;var i,o=e.toString;if(T(o)&&!w(i=o.call(e)))return i}throw new TypeError}(e,"default"===n?"number":n)}(e,3);return"symbol"===typeof t?t:function(e){return""+e}(t)}function S(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function T(e){return"function"===typeof e}function O(e){return"function"===typeof e}function P(e,t){var n=e[t];if(void 0!==n&&null!==n){if(!T(n))throw new TypeError;return n}}function x(e){var t=e.next();return!t.done&&t}function A(e){var t=e.return;t&&t.call(e)}function N(e){var t=Object.getPrototypeOf(e);if("function"!==typeof e||e===l)return t;if(t!==l)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!==typeof i||i===e?t:i}function R(e){return e.__=void 0,delete e.__,e}t("decorate",(function(e,t,n,r){if(C(n)){if(!S(e))throw new TypeError;if(!O(t))throw new TypeError;return function(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!C(r)&&!I(r)){if(!O(r))throw new TypeError;t=r}}return t}(e,t)}if(!S(e))throw new TypeError;if(!w(t))throw new TypeError;if(!w(r)&&!C(r)&&!I(r))throw new TypeError;return I(r)&&(r=void 0),function(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!C(o)&&!I(o)){if(!w(o))throw new TypeError;r=o}}return r}(e,t,n=E(n),r)})),t("metadata",(function(e,t){return function(n,r){if(!w(n))throw new TypeError;if(!C(r)&&!function(e){switch(_(e)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;y(e,t,n,r)}})),t("defineMetadata",(function(e,t,n,r){if(!w(n))throw new TypeError;return C(r)||(r=E(r)),y(e,t,n,r)})),t("hasMetadata",(function(e,t,n){if(!w(t))throw new TypeError;return C(n)||(n=E(n)),function e(t,n,r){if(g(t,n,r))return!0;var i=N(n);return!I(i)&&e(t,i,r)}(e,t,n)})),t("hasOwnMetadata",(function(e,t,n){if(!w(t))throw new TypeError;return C(n)||(n=E(n)),g(e,t,n)})),t("getMetadata",(function(e,t,n){if(!w(t))throw new TypeError;return C(n)||(n=E(n)),function e(t,n,r){if(g(t,n,r))return v(t,n,r);var i=N(n);return I(i)?void 0:e(t,i,r)}(e,t,n)})),t("getOwnMetadata",(function(e,t,n){if(!w(t))throw new TypeError;return C(n)||(n=E(n)),v(e,t,n)})),t("getMetadataKeys",(function(e,t){if(!w(e))throw new TypeError;return C(t)||(t=E(t)),function e(t,n){var r=b(t,n),i=N(t);if(null===i)return r;var o=e(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new f,s=[],c=0,u=r;c<u.length;c++){var l=u[c];a.has(l)||(a.add(l),s.push(l))}for(var d=0,p=o;d<p.length;d++)l=p[d],a.has(l)||(a.add(l),s.push(l));return s}(e,t)})),t("getOwnMetadataKeys",(function(e,t){if(!w(e))throw new TypeError;return C(t)||(t=E(t)),b(e,t)})),t("deleteMetadata",(function(e,t,n){if(!w(t))throw new TypeError;C(n)||(n=E(n));var r=m(t,n,!1);if(C(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=h.get(t);return i.delete(n),i.size>0||h.delete(t),!0}))}(o)}()}(n||(n={}))}).call(this,n(584),n(136))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.FontAttribute=t.FontAttributeBase=void 0;var a=n(911),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.serialize=function(){return{name:this.name,size:this.size}},i([a.uniqueProperty("",a.UniqueKind.String),o("design:type",Object)],t.prototype,"name",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"size",void 0),t}(a.Unique);t.FontAttributeBase=s;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(s);t.FontAttribute=c,c.initializeUnique()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttrDictKeys=void 0,t.AttrDictKeys=["attachment","backgroundColor","baselineOffset","cursor","expansion","font","foregroundColor","kern","ligature","link","markedClauseSegment","obliqueness","paragraphStyle","shadow","spellingState","strikethroughColor","strikethroughStyle","strokeColor","strokeWidth","superscript","textEffect","toolTip","underlineColor","underlineStyle","verticalGlyphForm","writingDirection"]},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ParagraphStyleAttribute=t.ParagraphStyleAttributeBase=void 0;var a=n(911),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.serialize=function(){var e={alignment:this.alignment,firstLineHeadIndent:this.firstLineHeadIndent,headIndent:this.headIndent,tailIndent:this.tailIndent,lineHeightMultiple:this.lineHeightMultiple,maximumLineHeight:this.maximumLineHeight,lineSpacing:this.lineSpacing,paragraphSpacing:this.paragraphSpacing,paragraphSpacingBefore:this.paragraphSpacingBefore};for(var t in e)null===e[t]&&delete e[t];return e},i([a.uniqueProperty("natural",a.UniqueKind.String),o("design:type",Object)],t.prototype,"alignment",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"firstLineHeadIndent",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"headIndent",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"tailIndent",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"lineHeightMultiple",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"maximumLineHeight",void 0),i([a.uniqueProperty(null,a.UniqueKind.Number),o("design:type",Object)],t.prototype,"lineSpacing",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"paragraphSpacing",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"paragraphSpacingBefore",void 0),t}(a.Unique);t.ParagraphStyleAttributeBase=s;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(s);t.ParagraphStyleAttribute=c,c.initializeUnique()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowAttribute=void 0;var a=n(911),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.serialize=function(){return{xOffset:this.xOffset,yOffset:this.yOffset,blurRadius:this.blurRadius,color:this.color}},i([a.uniqueProperty(1,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"xOffset",void 0),i([a.uniqueProperty(1,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"yOffset",void 0),i([a.uniqueProperty(0,a.UniqueKind.Number),o("design:type",Number)],t.prototype,"blurRadius",void 0),i([a.uniqueProperty("black",a.UniqueKind.String),o("design:type",Object)],t.prototype,"color",void 0),t}(a.Unique);t.ShadowAttribute=s,s.initializeUnique()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.TextAttachmentAttribute=void 0;var a=n(911),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.serialize=function(){return{contents:this.contents}},i([a.uniqueProperty("",a.UniqueKind.String),o("design:type",Object)],t.prototype,"contents",void 0),t}(a.Unique);t.TextAttachmentAttribute=s,s.initializeUnique()},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.UnderlineStyleAttribute=void 0,(r=t.UnderlineStyleAttribute||(t.UnderlineStyleAttribute={}))[r.STYLE_NONE=0]="STYLE_NONE",r[r.STYLE_SINGLE=1]="STYLE_SINGLE",r[r.STYLE_THICK=2]="STYLE_THICK",r[r.STYLE_DOUBLE=9]="STYLE_DOUBLE",r[r.PATTERN_DOT=256]="PATTERN_DOT",r[r.PATTERN_DASH=512]="PATTERN_DASH",r[r.PATTERN_DASH_DOT=768]="PATTERN_DASH_DOT",r[r.PATTERN_DASH_DOT_DOT=1024]="PATTERN_DASH_DOT_DOT",r[r.BY_WORD=32768]="BY_WORD"},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LigatureAttribute=void 0,(r=t.LigatureAttribute||(t.LigatureAttribute={})).NO_LIGATURES="NO_LIGATURES",r.DEFAULT_LIGATURES="DEFAULT_LIGATURES",r.ALL_LIGATURES="ALL_LIGATURES"},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WritingDirectionAttribute=void 0,(r=t.WritingDirectionAttribute||(t.WritingDirectionAttribute={}))[r.Natural=-1]="Natural",r[r.leftToRight=0]="leftToRight",r[r.rightToLeft=1]="rightToLeft"},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WritingDirectionFormatAttribute=void 0,(r=t.WritingDirectionFormatAttribute||(t.WritingDirectionFormatAttribute={}))[r.EMBEDDING=0]="EMBEDDING",r[r.OVERRIDE=2]="OVERRIDE"},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributedStringSlice=void 0;var o=n(891),a=n(928),s=n(1014),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isFreeing=!1,t}return r(t,e),t.prototype.free=function(){if(!this._isFreeing){this._isFreeing=!0;try{e.prototype.free.call(this)}finally{this._isFreeing=!1}}},t.prototype.createIteratorFromUnderlying=function(e){return s.AttributedStringSliceIterator.create(this,e)},t.create=function(e,t,n){var r=this.alloc();return r.initAttributedStringSliceBase(e,t,n),r.autorelease()},i([o.sealed],t)}(a.AttributedStringSliceBase);t.AttributedStringSlice=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AttributedStringSliceBase=void 0;var i=n(929),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isaAttributedString=!0,t.isaAttributedStringObserver=!0,t.attributedStringDidAlterAttributes=function(e,n,r){var i=t.createIteratorFromUnderlying(n),o=t.createIteratorFromUnderlying(r);t.notifyObservers(i,o)},t._observers=[],t}return r(t,e),t.prototype.copyAttributesInRangeToArray=function(e,t,n,r){void 0===r&&(r=!0);var i=e.underlyingIterator,o=t.underlyingIterator;this.string.copyAttributesInRangeToArray(i,o,n,r)},t.prototype.copyCodePointsAndAttributesInRangeToArrays=function(e,t,n,r,i){void 0===i&&(i=!0);var o=e.underlyingIterator,a=t.underlyingIterator;this.string.copyCodePointsAndAttributesInRangeToArrays(o,a,n,r,i)},t.prototype.forEachWithAttributesInInUnderlyingRange=function(e,t,n){var r=this.start.distanceFromStart();this.string.forEachWithAttributesInRange(e,t,(function(e,t,o){n(e,t,i.CodePointIndexOps.subtract(o,r))}))},t.prototype.forEachWithAttributesInRange=function(e,t,n){this.forEachWithAttributesInInUnderlyingRange(e.underlyingIterator,t.underlyingIterator,n)},t.prototype.forEachWithAttributes=function(e){this.forEachWithAttributesInInUnderlyingRange(this.atStart().underlyingIterator,this.atEnd().underlyingIterator,e)},t.prototype.someWithAttributesInUnderlyingRange=function(e,t,n){if(e.isAfter(t))return!1;var r=this.start.distanceFromStart();return this.string.someWithAttributesInRange(e,t,(function(e,t,o){return n(e,t,i.CodePointIndexOps.subtract(o,r))}))},t.prototype.someWithAttributesInRange=function(e,t,n){return this.someWithAttributesInUnderlyingRange(e.underlyingIterator,t.underlyingIterator,n)},t.prototype.someWithAttributes=function(e){return this.someWithAttributesInUnderlyingRange(this.atStart().underlyingIterator,this.atEnd().underlyingIterator,e)},t.prototype.alterAttributesInRange=function(e,t,n){var r=e.underlyingIterator,i=t.underlyingIterator;return this.string.alterAttributesInRange(r,i,n)},t.prototype.addAttributeToRange=function(e,t,n,r){var i=e.underlyingIterator,o=t.underlyingIterator;return this.string.addAttributeToRange(i,o,n,r)},t.prototype.removeAttributeFromRange=function(e,t,n){var r=e.underlyingIterator,i=t.underlyingIterator;return this.string.removeAttributeFromRange(r,i,n)},t.prototype.addAttributedStringObserver=function(e){this._observers.push(e)},t.prototype.removeAttributedStringObserver=function(e){var t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)},t.prototype.underlyingStringProtocolPredicate=function(e){return i.isAttributedString(e)},t.prototype.notifyObservers=function(e,t){for(var n=0,r=this._observers.slice(0);n<r.length;n++)r[n].attributedStringDidAlterAttributes(this,e.clone(),t.clone())},t.prototype.insertStrOrCPWithAttributes=function(e,t,n,r){var o=this.start.affinity,a=this.end.affinity;this.start.affinity=i.IteratorAffinity.BEFORE,this.end.affinity=i.IteratorAffinity.AFTER;var s=e.underlyingIterator.insertWithAttributes(t,n,r);return this.start.affinity=o,this.end.affinity=a,s},t.prototype.createAttributeDictionary=function(e){return this.string.createAttributeDictionary(e)},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this._observers.length=0},t.prototype.free=function(){this.string.removeAttributedStringObserver(this),this._observers.length=0,e.prototype.free.call(this)},t.prototype.initAttributedStringSliceBase=function(t,n,r){e.prototype.initStringSliceBase.call(this,t,n,r),this.string.addAttributedStringObserver(this)},t}(n(1003).StringSliceBase);t.AttributedStringSliceBase=o},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(930),t),i(n(931),t),i(n(932),t),i(n(933),t),i(n(934),t),i(n(935),t),i(n(936),t),i(n(937),t),i(n(938),t),i(n(939),t),i(n(940),t),i(n(941),t),i(n(993),t),i(n(994),t),i(n(995),t),i(n(996),t),i(n(997),t),i(n(998),t),i(n(999),t),i(n(1e3),t),i(n(1001),t),i(n(1002),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAttributedStringSlice=void 0,t.isAttributedStringSlice=function(e){return Boolean(e&&e.isaStringSlice&&e.isaAttributedString)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAttributedStringSliceIterator=void 0,t.isAttributedStringSliceIterator=function(e){return!!e&&Boolean(e.isaStringSliceIterator&&e.isaAttributedStringIterator)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAttributedString=void 0,t.isAttributedString=function(e){return!!e&&Boolean(e.isaAttributedString)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAttributedStringIterator=void 0,t.isAttributedStringIterator=function(e){return!!e&&Boolean(e.isaAttributedStringIterator)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAttributedStringObserver=void 0,t.isAttributedStringObserver=function(e){return!!e&&Boolean(e.isaAttributedStringObserver)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReadonlyAttributedString=void 0,t.isReadonlyAttributedString=function(e){return!!e&&Boolean(e.isaAttributedString)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReadonlyAttributedStringIterator=void 0,t.isReadonlyAttributedStringIterator=function(e){return!!e&&Boolean(e.isaAttributedStringIterator)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadonlyString=t.UNDEFINED_CODEPOINT=t.CodeUnitIndexArrayOps=t.CodePointIndexArrayOps=t.IntegerArrayOps=t.CodeUnitIndexOps=t.CodeUnitCountOps=t.CodePointIndexOps=t.CodePointCountOps=t.IntegerOps=t.ZERO_CODE_UNIT_INDEX=t.ZERO_CODE_POINT_INDEX=t.MIN_CODE_UNIT_COUNT=t.MIN_CODE_POINT_COUNT=void 0;var a=n(942),s=n(972);t.MIN_CODE_POINT_COUNT=0,t.MIN_CODE_UNIT_COUNT=0,t.ZERO_CODE_POINT_INDEX=0,t.ZERO_CODE_UNIT_INDEX=0;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t){return e-t},t}(s.ComparatorBase),u=function(){function e(){this.is=new c}return e.prototype.from=function(e){return e},e.prototype.add=function(e,t){return e+t},e.prototype.incremented=function(e){return e+1},e.prototype.subtract=function(e,t){return e-t},e.prototype.decremented=function(e){return e-1},e.prototype.negate=function(e){return-e},e.prototype.isZero=function(e){return 0===e},e.prototype.min=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.min.apply(Math,e)},e.prototype.max=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e)},i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",Number)],e.prototype,"from",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number,Number]),o("design:returntype",Number)],e.prototype,"add",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",Number)],e.prototype,"incremented",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number,Number]),o("design:returntype",Number)],e.prototype,"subtract",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",Number)],e.prototype,"decremented",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",Number)],e.prototype,"negate",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",Boolean)],e.prototype,"isZero",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",Number)],e.prototype,"min",null),i([a.inline(),o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",Number)],e.prototype,"max",null),e}();t.IntegerOps=u,t.CodePointCountOps=new u,t.CodePointIndexOps=new u,t.CodeUnitCountOps=new u,t.CodeUnitIndexOps=new u;var l=function(){function e(){}return e.prototype.translate=function(e,t){for(var n=e.length,r=new Array(n),i=0;i<n;++i)r[i]=e[i]+t;return r},i([a.inline(),o("design:type",Function),o("design:paramtypes",[Array,Number]),o("design:returntype",Array)],e.prototype,"translate",null),e}();t.IntegerArrayOps=l,t.CodePointIndexArrayOps=new l,t.CodeUnitIndexArrayOps=new l,t.UNDEFINED_CODEPOINT=-1,t.isReadonlyString=function(e){return!!e&&Boolean(e.isaString)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.lintable=t.flooredMod=t.copy32=t.delayMocha=t.setUpMocha=void 0,o(n(943),t),o(n(944),t),o(n(945),t),o(n(946),t);var s=n(947);Object.defineProperty(t,"setUpMocha",{enumerable:!0,get:function(){return s.setUpMocha}}),Object.defineProperty(t,"delayMocha",{enumerable:!0,get:function(){return s.delayMocha}}),o(n(949),t),o(n(950),t),o(n(951),t),o(n(952),t),o(n(953),t),o(n(954),t),o(n(955),t),o(n(956),t),o(n(948),t),o(n(957),t);var c=n(958);Object.defineProperty(t,"copy32",{enumerable:!0,get:function(){return c.copy32}});var u=n(959);Object.defineProperty(t,"flooredMod",{enumerable:!0,get:function(){return u.flooredMod}}),o(n(960),t),o(n(961),t),o(n(962),t),o(n(963),t),o(n(964),t),o(n(965),t),o(n(966),t),o(n(967),t),o(n(968),t),n(969),o(n(970),t);var l=a(n(971));t.lintable=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyMixins=void 0,t.applyMixins=function(e,t){t.forEach((function(t){Object.getOwnPropertyNames(t.prototype).forEach((function(n){e.prototype[n]=t.prototype[n]}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyMixinsToInstance=void 0,t.applyMixinsToInstance=function(e,t){t.forEach((function(t){for(var n=t.prototype,r=0,i=Object.getOwnPropertyNames(n);r<i.length;r++){var o=i[r],a=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(e,o,a)}for(var s=new t,c=0,u=Object.getOwnPropertyNames(s);c<u.length;c++){var l=u[c];e[l]=s[l]}}))}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.spy=t.dbgFunctionInvocations=t.dbgMethodInvocations=t.stringify=void 0;var i=console,o=NaN;t.stringify=function(e){var n="unknown<"+typeof e+">";if(e instanceof UIEvent){for(var r={},i=0,o=["type","key","code","data","inputType","isTrusted"];i<o.length;i++){var a=o[i];void 0!==e[a]&&(r[a]=e[a])}e=r}else{if(Array.isArray(e))return"["+e.map(t.stringify).join(", ")+"]";if(!e||"object"!==typeof e||"function"!==typeof e.toString||-1!==[Object.prototype.toString,Array.prototype.toString].indexOf(e.toString))try{return JSON.stringify(e)}catch(s){return e?n:String(e)||JSON.stringify(e)}}try{return e.toString()}catch(s){return n}};var a={compositionStart:"red",compositionUpdate:"orange",compositionEnd:"green"},s=function(e,t,n){return e!==n[t-1]},c=[],u=function(e,n,u){for(var l=[],d=3;d<arguments.length;d++)l[d-3]=arguments[d];var p=0;e&&(e+=".");var f,h=l.pop();"object"===typeof h?f=h:(f=i,h&&l.push(h));var m=l;function g(i,a){return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var d=this||n,h=Date.now(),m=h-o;m&&m>250&&f.info(""),o=h;var g="";if(c.push(!0),s.length)try{g=s.map(t.stringify).join(", ")}catch(E){g=s.length+" arg"+(1===s.length?"":"s")}var v=a.toString(),y=u[v]||"inherit";c.pop();var b,_,C=navigator.userAgent.match(/ (Trident|Edge)/)?"":"%c",I=!c.length&&"none"!==y;I&&f.groupCollapsed(""+e+C+v+C+"("+C+g+C+")",C&&"color: "+y+";",C&&"color: inherit;",C&&"font-weight: normal;",C&&"font-weight: inherit;"),p+=1;try{b=i.call.apply(i,r([this],s))}catch(E){_=E}void 0!==b&&f.info("\u21d0",b),_&&f.error(_),I&&f.groupEnd();var w=d.dbg_anyNestingLevel||"";if(w&&f.info(w),0===--p&&(w=d.dbg_topNestingLevel||"")&&f.info(w),_)throw _;return b}}function v(e){var t=n,r=t[e],i=g(r,e);return i.undo=function(){t[e]=r},t[e]=i}function y(e){var t=Object.getOwnPropertyDescriptors(n)[e],r=g(t.get,e);return t.get=r,Object.defineProperty(n,e,t),r}if("string"===typeof u&&(m.unshift(u),u=void 0),void 0===u&&(u=a),m.length||(m=Object.keys(n).filter((function(e){return"constructor"!==e}))),m.sort(),m=m.filter(s),f!==i||!/^\/internal\/ct-tests-/.test(location.pathname)){var b=Object;if(b.entries){var _=b.entries(b.getOwnPropertyDescriptors(n)).filter((function(e){return e[0],"function"===typeof e[1].get})).reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{});for(var C in _){var I=m.indexOf(C);-1!==I&&(m.splice(I,1),y(C))}}m.forEach(v)}};t.dbgMethodInvocations=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];u.apply(void 0,r([e.name,e.prototype,t],n))},t.dbgFunctionInvocations=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];u.apply(void 0,r([e,t,n],i))},t.spy=function(e,t,n,r,o){void 0===t&&(t=e.name),void 0===n&&(n=""),void 0===r&&(r="inherit"),void 0===o&&(o=i);var a={},s={};return a[t]=e,s[t]=r,u(n,a,s,t,o),a[t]}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.focusDebug=void 0,t.focusDebug=function(e,t){if(void 0===e&&(e=1/0),void 0===t&&(t=!0),e===1/0&&!t)throw new Error("Neither declaring a poll interval or enabling event listening is a no-op!");function n(){var e=document.activeElement;e!==r&&(console.info("focus changed to:",e),r=e)}function i(e){console.group(e.type+" event fired:",e.target,e),n(),console.groupEnd()}r=document.activeElement,e!==1/0&&setInterval(n,100),t&&(window.addEventListener("focus",i,!0),window.addEventListener("blur",i,!0))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayMocha=t.setUpMocha=void 0;var r=n(948).global,i=r.mochaPhantomJS||r.mocha,o=0,a=[],s=i&&i.run,c=!1,u=!1;function l(){r.callPhantom&&i.setup({reporter:"spec",useColors:!0,timeout:1e4});var e=s.apply(i,a);r.callPhantom&&(e.on("start",(function(){r.callPhantom("mochaDidStart",{})})),e.on("end",(function(){r.callPhantom("mochaDidEnd",{failures:e.failures,total:e.total})})))}t.setUpMocha=function(){r.initMochaPhantomJS&&r.initMochaPhantomJS(),r.callPhantom&&r.callPhantom({testRunStarted:1})},t.delayMocha=function(e){o++,e.then((function(){0===--o&&c&&!u&&(u=!0,l())}))},i&&(i.run=function(){c=!0,a=Array.from(arguments),0===o?(u=!0,l()):c=!0})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.global=void 0;var n=function(){if(this)return this;if("undefined"!==typeof globalThis)return e;if("undefined"!==typeof window)return window;throw new Error("Could not compute global")}();t.global=n}).call(this,n(136))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configurePromise=t.CTPromise=t.DefaultPixelTestTimeout=void 0,t.DefaultPixelTestTimeout=6e3;var r=Promise;t.CTPromise=function(e){return new r(e)},t.CTPromise.resolve=function(e){return r.resolve(e)},t.CTPromise.reject=function(e){return r.reject(e)},t.CTPromise.race=function(e){return r.race(e)},t.CTPromise.all=function(e){return r.all(e)},t.configurePromise=function(e){r=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configureFetch=t.ctFetch=void 0;var r=n(948),i=r.global.fetch;t.ctFetch=function(){return i.apply(r.global,arguments)},t.configureFetch=function(e){i=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configureLogger=t.logger=void 0;var r={log:console.log.bind(console),warn:console.warn.bind(console),error:console.error.bind(console)};t.logger={log:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];r.log(e+t.join(" "))},warn:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];r.warn(e+t.join(" "))},error:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];r.error(e+t.join(" "))}},t.configureLogger=function(e){r=e}},function(e,t,n){"use strict";var r,i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.configureTimers=t.timers=void 0;var o=n(948),a={setTimeout:o.global.setTimeout.bind(o.global),setInterval:o.global.setInterval.bind(o.global),requestAnimationFrame:(null===(r=o.global.requestAnimationFrame)||void 0===r?void 0:r.bind(o.global))||function(e){setTimeout(e,1)}};t.timers={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return a.setTimeout.apply(a,i([e,t],n))},setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return a.setInterval.apply(a,i([e,t],n))},requestAnimationFrame:function(e){return a.requestAnimationFrame(e)}},t.configureTimers=function(e){a=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configureNow=t.now=void 0;var r,i=n(948);r=i.global.performance?function(){return i.global.performance.now()}:i.global.process.hrtime?function(){var e=i.global.process.hrtime();return 1e3*(e[0]+1e-9*e[1])}:function(){return Date.now()},t.now=function(){return r()},t.configureNow=function(e){r=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CTInvertedPromise=void 0;var r=n(949);t.CTInvertedPromise=function(){var e,t,n=new r.CTPromise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configure=void 0;var r=n(949),i=n(950),o=n(951),a=n(953),s=n(952);t.configure=function(e){e.Promise&&r.configurePromise(e.Promise),e.fetch&&i.configureFetch(e.fetch),e.logger&&o.configureLogger(e.logger),e.timers&&s.configureTimers(e.timers),e.now&&a.configureNow(e.now)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FONT_IMPRINT_MORSE=t.FONT_IMPRINT_STRING=t.MORSE=void 0,t.MORSE={A:".-",B:"-...",C:"-.-.",D:"-..",E:".",F:"..-.",G:"--.",H:"....",I:"..",J:".---",K:"-.-",L:".-..",M:"--",N:"-.",O:"---",P:".--.",Q:"--.-",R:".-.",S:"...",T:"-",U:"..-",V:"...-",W:".--",X:"-..-",Y:"-.--",Z:"--.."},t.FONT_IMPRINT_STRING="2DCRZY1S",t.FONT_IMPRINT_MORSE=t.FONT_IMPRINT_STRING.split("").map((function(e){return t.MORSE[e]})).join(" ")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringIsCJK=t.characterCodeIsCJK=void 0;var r=[[4352,4607],[11904,12031],[12032,12255],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[63744,64255],[65072,65103]];t.characterCodeIsCJK=function(e){var t,n=r;if(!e)return!1;for(var i=0,o=n.length;i<o;++i)if(e>=(t=n[i])[0]&&e<=t[1])return!0;return!1},t.stringIsCJK=function(e){if(0===(e=e.trim()).length)return!1;for(var n=0,r=e.length-1;n<=r;)if(!t.characterCodeIsCJK(e.charCodeAt(n++))||!t.characterCodeIsCJK(e.charCodeAt(r--)))return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copy32=void 0,t.copy32=function(e,t,n,r,i){for(var o=i>>2,a=i%4,s=new Uint32Array(e.buffer,e.byteOffset+t,o),c=new Uint32Array(n.buffer,n.byteOffset+r,o),u=0;u<o;++u)c[u]=s[u];var l=t+i-a,d=r+i-a;for(u=0;u<a;++u)n.setUint8(d+u,e.getUint8(l+u))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flooredMod=void 0,t.flooredMod=function(e,t){return e-t*Math.floor(e/t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.indentCode=void 0,t.indentCode=function(e,t){return e.split("\n").map((function(e){return e&&t+e||""})).join("\n").trim()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inline=void 0,t.inline=function(){return function(e,t,n){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReadonlyArray=void 0,t.isReadonlyArray=function(e){return Array.isArray(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utf16StringToCodePoints=void 0,t.utf16StringToCodePoints=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=0),n=n||0;for(var r=0;r<e.length;){var i=e.charCodeAt(r++);if(i<55296||i>57343)t[n++]=i;else{if(!(55296<=i&&i<=56319))throw new Error("Unpaired low surrogate: "+i+" ["+r+"]");var o=e.charCodeAt(r++);if(!(56320<=o&&o<=57343))throw new Error("Invalid low surrogate: "+o+" ["+r+"]");t[n++]=((1023&i)<<10)+(1023&o)+65536}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codePointsToUTF16String=void 0,t.codePointsToUTF16String=function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];if(r<65536)t+=String.fromCharCode(e[n]);else{var i=r-65536,o=55296|(1047552&i)>>10,a=56320|(1023&i)>>0;t+=String.fromCharCode(o),t+=String.fromCharCode(a)}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utf8ByteArrayToCodePoints=void 0,t.utf8ByteArrayToCodePoints=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(r<=127)t.push(r);else if(192<=r&&r<=223)t.push(((31&r)<<6)+((63&e[++n])<<0));else if(224<=r&&r<=239)t.push(((15&r)<<12)+((63&e[++n])<<6)+((63&e[++n])<<0));else{if(!(240<=r&&r<=247))continue;t.push(((7&r)<<18)+((63&e[++n])<<12)+((63&e[++n])<<6)+((63&e[++n])<<0))}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codePointsToUTF8ByteArray=void 0,t.codePointsToUTF8ByteArray=function(e){for(var t=new Uint8Array(4*e.length),n=0,r=0;r<e.length;r++){var i=e[r];if(i>=55296&&i<=56319){var o=0|e[r+1];o>=56320&&o<=57343&&(i=((1023&i)<<10)+(1023&o)+65536,r++)}i>=55296&&i<57344&&(i=65533),i<=127?t[n++]=i:i<=2047?(t[n++]=192|i>>>6&31,t[n++]=128|63&i):i<=65535?(t[n++]=224|i>>>12&15,t[n++]=128|i>>>6&63,t[n++]=128|63&i):(t[n++]=240|i>>>18&7,t[n++]=128|i>>>12&63,t[n++]=128|i>>>6&63,t[n++]=128|63&i)}return new Uint8Array(t.buffer,t.byteOffset,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0,t.debounce=function(e,t){var n,r,i=NaN;function o(){if(!n){var a=Date.now(),s=t-(a-i);s<=0?e.apply(void 0,r):n=window.setTimeout((function(){n=null,o()}),s)}}return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r=e,i=Date.now(),o()}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(948);r.global.process&&"function"===typeof e.cpuUsage&&(r.global.$assert=function(e,t){if(!e)throw new Error(t||"Assertion failed!")})}).call(this,n(584))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dbg_refcountedActiveInstances=t.assertNoMemoryLeaks=void 0;var r=n(891);function i(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);for(var n=new Map,i=0,o=r.dbg_refcountedClasses.filter((function(e){return-1===t.indexOf(e)}));i<o.length;i++){var a=o[i];n.set(a,a.dbg_activeInstances.toArray().filter((function(t){return-1===e.indexOf(t)})))}return n}t.assertNoMemoryLeaks=function(e){var t,n,o,a,s=e&&e.ignoreInstances?e.ignoreInstances.refcounted:[],c=e&&e.ignoreClasses?e.ignoreClasses.refcounted:[];beforeEach((function(){t=r.dbg_pooledActiveInstanceCounts(e&&e.ignoreClasses?e.ignoreClasses.pooled:[]),n=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);for(var n=new Map,i=function(t){var r=e.filter((function(e){return e.constructor===t})).length;n.set(t,t.dbg_activeInstanceCount-r)},o=0,a=0===t.length?r.dbg_refcountedClasses:r.dbg_refcountedClasses.filter((function(e){return-1===t.indexOf(e)}));o<a.length;o++){i(a[o])}return n}(s,c),r.DEBUG_OPTS.trackActiveInstances&&(o=r.dbg_pooledActiveInstances(),a=i(s,c)),r.beginAutoreleaseFrame()})),afterEach((function(){r.endAutoreleaseFrame();var i=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=[]);for(var i=new Map,o=function(n){var r=e.get(n);if(void 0!==r){var o=t.filter((function(e){return e.constructor===n})).length;n.dbg_activeInstanceCount-o!==r&&i.set(n,n.dbg_activeInstanceCount-o-r)}else i.set(n,n.dbg_activeInstanceCount)},a=0,s=0===n.length?r.dbg_refcountedClasses:r.dbg_refcountedClasses.filter((function(e){return-1===n.indexOf(e)}));a<s.length;a++){o(s[a])}return i}(n,s,c),u=r.dbg_pooledActiveInstanceCountDifferences(t,e&&e.ignoreClasses?e.ignoreClasses.pooled:[]);if(r.DEBUG_OPTS.trackActiveInstances&&i.size>0&&(r.dbg_pooledActiveInstancesAdded(o),function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=[]);for(var i=new Map,o=function(n){var r=e.get(n);if(void 0!==r){var o=n.dbg_activeInstances.toArray().filter((function(e){return-1===t.indexOf(e)&&-1===r.indexOf(e)}));o.length>0&&i.set(n,o)}else i.set(n,n.dbg_activeInstances.toArray())},a=0,s=r.dbg_refcountedClasses.filter((function(e){return-1===n.indexOf(e)}));a<s.length;a++){o(s[a])}}(a,s,c)),0!==i.size)throw new Error("expected refcountedCountDiffs.size ("+i.size+" to be 0!");if(r.DEBUG_OPTS.trackActiveInstances&&u.size>0&&r.dbg_pooledActiveInstancesAdded(o),0!==u.size)throw new Error("expected pooledCountDiffs.size ("+u.size+" to be 0!")}))},t.dbg_refcountedActiveInstances=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.object=t.array=t.legalNakedObjectProperty=t.identifier=t.string=t.value=void 0;var r=n(960);t.value=function(e){switch(typeof e){case"undefined":case"boolean":case"number":return String(e);case"string":return t.string(e);case"object":return Array.isArray(e)?t.array(e):e instanceof RegExp?"/"+e.source.replace(/\n/gm,"\\n")+"/"+e.flags:e&&"function"===typeof e.serialize?t.value(e.serialize()):t.object(e);default:throw new TypeError("unsupported type "+typeof e+" of "+e)}},t.string=function(e){return"'"+(e=(e=(e=(e=JSON.stringify(e)).slice(1,-1)).replace(/'/g,"\\'")).replace(/(?!\/)\\"/g,'"'))+"'"};var i=new RegExp("^(?!(?:"+["do","if","in","for","let","new","try","var","case","else","enum","eval","false","null","this","true","void","with","break","catch","class","const","super","throw","while","yield","delete","export","import","public","return","static","switch","typeof","default","extends","finally","package","private","continue","debugger","function","arguments","interface","protected","implements","instanceof"].join("|")+")$)[$A-Z_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6][$A-Z_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf60-9]*$");t.identifier=function(e){return i.test(e)?e:t.string(e)},t.legalNakedObjectProperty=function(e){return String(Number(e))===e?e:t.identifier(e)},t.array=function(e){for(var n="[",i="",o=!0,a=0,s=e;a<s.length;a++){var c=s[a],u=t.value(c);u.indexOf("\n")>-1?(i&&(i+=","),n+=i+"\n",i="    ",i+=r.indentCode(u,"    "),o=!0):(i&&(i+=","),i.length+1+u.length+1>100&&(o=!0),o?(n+=i+"\n",i="    ",o=!1):i+=" ",i+=u)}return n+(i+"\n]")},t.object=function(e){if(null===e)return"null";if("object"!==typeof e)throw new TypeError(e+" is not an object");var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(t.legalNakedObjectProperty(i)+": "+r.indentCode(t.value(e[i]),"    "));if(!n.length)return"{}";var o=n.join(", ");return o.length<46?"{ "+o+" }":"{\n    "+n.join(",\n    ")+"\n}"}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0}),r(n(973)),r(n(974)),r(n(975)),r(n(977)),r(n(978)),r(n(979)),r(n(980)),r(n(981)),r(n(982)),r(n(983)),r(n(984)),r(n(985)),r(n(986)),r(n(987)),r(n(988));var o=i(n(989));t.Testing=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberAdder=function(e,t){return e+t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberDifferenceCalculator=function(e,t){return e-t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(976);t.integerMin=r.MIN_SAFE_INTEGER},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIN_SAFE_INTEGER=-9007199254740991},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberShifter=function(e,t){return e+t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberZero=0},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.notEqualTo=function(e,t){return!this.equalTo(e,t)},e}();t.EqualityComparatorBase=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.equalTo=function(e,t){return 0===this.compare(e,t)},t.prototype.notEqualTo=function(e,t){return 0!==this.compare(e,t)},t.prototype.lessThan=function(e,t){return this.compare(e,t)<0},t.prototype.lessThanOrEqualTo=function(e,t){return this.compare(e,t)<=0},t.prototype.greaterThanOrEqualTo=function(e,t){return this.compare(e,t)>=0},t.prototype.greaterThan=function(e,t){return this.compare(e,t)>0},t.prototype.min=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=e;t.length>0;){var i=t.shift();this.lessThan(i,r)&&(r=i)}return r},t.prototype.max=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=e;t.length>0;){var i=t.shift();this.greaterThan(i,r)&&(r=i)}return r},t}(i);t.ComparatorBase=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.endPointComparator=e}return e.prototype.compare=function(e,t,n,r){var i=this.endPointComparator.compare(e,n);return 0!==i?i:this.endPointComparator.compare(t,r)},e.prototype.isOpenIntervalBefore=function(e,t,n,r){return this.endPointComparator.lessThan(t,n)},e.prototype.isClosedIntervalBefore=function(e,t,n,r){return this.endPointComparator.lessThanOrEqualTo(t,n)},e.prototype.areEqual=function(e,t,n,r){return this.isIntervalEqual(e,t,n,r)},e.prototype.isClosedIntervalAfter=function(e,t,n,r){return this.endPointComparator.greaterThanOrEqualTo(e,r)},e.prototype.isOpenIntervalAfter=function(e,t,n,r){return this.endPointComparator.greaterThan(e,r)},e.prototype.doesClosedIntervalOverlap=function(e,t,n,r){return this.endPointComparator.lessThanOrEqualTo(e,r)&&this.endPointComparator.lessThanOrEqualTo(n,t)},e.prototype.doesOpenIntervalOverlap=function(e,t,n,r){return this.endPointComparator.lessThan(e,r)&&this.endPointComparator.lessThan(n,t)},e.prototype.doesClosedIntervalEnclose=function(e,t,n,r){return this.endPointComparator.lessThanOrEqualTo(e,n)&&this.endPointComparator.greaterThanOrEqualTo(t,r)},e.prototype.isIntervalEqual=function(e,t,n,r){return this.endPointComparator.equalTo(e,n)&&this.endPointComparator.equalTo(t,r)},e}();t.IntervalComparatorBase=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(979),s=n(980),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.prototype.equalTo=function(e,t){return e===t},t.prototype.notEqualTo=function(e,t){return e!==t},t.instance=new n,i([o.sealed],t)}(a.EqualityComparatorBase);t.NumberEqualityComparator=c,t.numberComparator=function(e,t){return e-t};var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.prototype.compare=function(e,t){return e-t},t.instance=new n,i([o.sealed],t)}(a.ComparatorBase);t.NumberComparator=u;var l=function(e){function t(){return e.call(this,u.instance)||this}var n;return r(t,e),n=t,t.instance=new n,i([o.sealed],t)}(s.IntervalComparatorBase);t.NumberIntervalComparator=l,t.numberPairIntervalComparator=function(e,n){var r=t.numberComparator(e[0],n[0]);return 0!==r?r:t.numberComparator(e[1],n[1])}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.create=function(e,t){var n=this.alloc_own();return n.initPooledIntervalBase(e,t),n},i([o.sealed],t)}(n(983).PooledIntervalBase);t.PooledInterval=a,a.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.low=null,t.high=null,t}return r(t,e),t.prototype.setLow=function(e){this.low=e},t.prototype.setHigh=function(e){this.high=e},t.prototype.setLowAndHigh=function(e,t){this.low=e,this.high=t},t.prototype.instanceInit=function(){this.low=null,this.high=null,e.prototype.instanceInit.call(this)},t.prototype.initPooledIntervalBase=function(e,t){this.low=e,this.high=t},t}(n(891).Pooled);t.PooledIntervalBase=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(985),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.initPooledIntervalWithFacade=function(t,n,r){e.prototype.initPooledIntervalBaseWithFacade.call(this,t,n,r)},t.create=function(e,t,n){var r=this.alloc_own();return r.initPooledIntervalWithFacade(e,t,n),r},i([o.sealed],t)}(a.PooledIntervalBaseWithFacade);t.PooledIntervalWithFacade=s,s.initializePooled();var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.initInterval=function(t){e.prototype.initIntervalBase.call(this,t)},t.create=function(e,t){var n=this.alloc(),r=s.create(n,e,t);return n.initInterval(r),n.autorelease()},i([o.sealed],t)}(a.IntervalBase);t.Interval=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(891),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t}return r(t,e),t.prototype.initPooledIntervalBaseWithFacade=function(t,n,r){e.prototype.initPooledIntervalBase.call(this,n,r),this.facade=t},t}(n(983).PooledIntervalBase);t.PooledIntervalBaseWithFacade=o;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._pooled=null,t}return r(t,e),Object.defineProperty(t.prototype,"low",{get:function(){return this._pooled.low},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"high",{get:function(){return this._pooled.high},enumerable:!0,configurable:!0}),t.prototype.free=function(){this._pooled.free(),e.prototype.free.call(this)},t.prototype.initIntervalBase=function(e){this._pooled=e},t}(i.Refcounted);t.IntervalBase=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayIsEmpty=function(e){return 0===e.length},t.arrayHead=function(e){return e.length>0?e[0]:null},t.arrayTail=function(e){return e.length>0?e[e.length-1]:null},t.arrayEnqueue=function(e,t){e.push(t)},t.arrayDequeue=function(e){return e.shift()},t.arrayRemoveMatchingValue=function(e,t){for(var n=0,r=e.length-1;r>=0;--r)e[r]===t&&(e.splice(r,1),++n);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberArrayEquals=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;++r)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.permutations=function(e){for(var t=[],n=e.length,r=[],i=0;i<n;++i)r[i]=0;function o(t,n){var r=e[t];e[t]=e[n],e[n]=r}t.push(e.slice(0));for(var a=0;a<n;)r[a]<a?(o(a%2===0?0:r[a],a),t.push(e.slice(0)),r[a]+=1,a=0):(r[a]=0,a+=1);return t}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(990)),r(n(991)),r(n(992))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(976),o=n(979),a=n(980),s=function(){function e(e){this.n=e}return e.prototype.toJSON=function(){return{n:this.n}},e}();t.ComparableObject=s,t.comparableObjectComparator=function(e,t){return e.n-t.n};var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t){return e.n-t.n},t.instance=new t,t}(o.ComparatorBase);t.ComparableObjectComparator=c;var u=function(e){function t(){return e.call(this,c.instance)||this}return r(t,e),t.instance=new t,t}(a.IntervalComparatorBase);t.ComparableObjectIntervalComparator=u,t.comparableObjectAdder=function(e,t){return new s(e.n+t.n)},t.comparableObjectDifferenceCalculator=function(e,t){return e.n-t.n},t.comparableObjectMin=new s(i.MIN_SAFE_INTEGER),t.comparableObjectZero=new s(0)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(891),o=n(976),a=n(979),s=n(980),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.n=null,t}return r(t,e),t.create=function(e){var t=this.alloc();return t.n=e,t.autorelease()},t}(i.Refcounted);t.ComparableRefcountedObject=c,c.initializeRefcounted(),t.comparableRefcountedObjectComparator=function(e,t){return e.n-t.n};var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t){return e.n-t.n},t.instance=new t,t}(a.ComparatorBase);t.ComparableRefcountedObjectComparator=u;var l=function(e){function t(){return e.call(this,u.instance)||this}return r(t,e),t.instance=new t,t}(s.IntervalComparatorBase);t.ComparableRefcountedObjectIntervalComparator=l,t.comparableRefcountedObjectAdder=function(e,t){return c.create(e.n+t.n)},t.comparableRefcountedObjectDifferenceCalculator=function(e,t){return e.n-t.n},t.createComparableRefcountedObjectMin=function(){return c.create(o.MIN_SAFE_INTEGER)},t.createComparableRefcountedObjectZero=function(){return c.create(0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(891);t.assertNoMemoryLeaks=function(e,t){var n,i;beforeEach((function(){n=r.dbg_pooledActiveInstanceCounts(t?t.pooled:[]),i=r.dbg_refcountedActiveInstanceCounts(t?t.refcounted:[]),r.beginAutoreleaseFrame()})),afterEach((function(){r.endAutoreleaseFrame();var o=r.dbg_refcountedActiveInstanceCountDifferences(i,t?t.refcounted:[]),a=r.dbg_pooledActiveInstanceCountDifferences(n,t?t.pooled:[]);e.expect(o.size).to.equal(0),e.expect(a.size).to.equal(0)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReadonlyStringIterator=void 0,t.isReadonlyStringIterator=function(e){return!!e&&Boolean(e.isaStringIterator)}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_INSERT_AFFINITY=t.DEFAULT_ITERATOR_AFFINITY=t.IteratorAffinity=void 0,function(e){e[e.BEFORE=1]="BEFORE",e[e.AFTER=2]="AFTER"}(r=t.IteratorAffinity||(t.IteratorAffinity={})),t.DEFAULT_ITERATOR_AFFINITY=r.BEFORE,t.DEFAULT_INSERT_AFFINITY=r.AFTER},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return!!e&&Boolean(e.isaString)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStringSlice=void 0,t.isStringSlice=function(e){return!!e&&Boolean(e.isaStringSlice)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStringSliceIterator=void 0,t.isStringSliceIterator=function(e){return!!e&&Boolean(e.isaStringSliceIterator)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStringIterator=void 0,t.isStringIterator=function(e){return!!e&&Boolean(e.isaStringIterator)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStringObserver=void 0,t.isStringObserver=function(e){return!!e&&Boolean(e.isaStringObserver)}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringSliceBase=void 0;var i=n(929),o=n(1004),a=n(1010),s=(function(){function e(){}Object.defineProperty(e,"StrSliceIterBaseModule",{get:function(){return null===this._StringSliceIteratorBaseModule&&(this._StringSliceIteratorBaseModule=n(1011)),this._StringSliceIteratorBaseModule},enumerable:!1,configurable:!0}),e._StringSliceIteratorBaseModule=null}(),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isaStringObserver=!0,t._tempLength=i.MIN_CODE_POINT_COUNT,t.isaStringSlice=!0,t.underlyingStringProtocolName="IString",t.string=null,t.start=null,t.end=null,t.iterators_ofptr=[],t}return r(t,e),t.prototype.copyCodePointsInRangeToArray=function(e,t,n,r){void 0===r&&(r=!0),this.string.copyCodePointsInRangeToArray(e.underlyingIterator,t.underlyingIterator,n,r)},t.prototype.forEachInUnderlyingRange=function(e,t,n){var r=this.start.distanceFromStart();this.string.forEachInRange(e,t,(function(e,t){n(e,i.CodePointIndexOps.subtract(t,r))}))},t.prototype.forEachInRange=function(e,t,n){this.forEachInUnderlyingRange(e.underlyingIterator,t.underlyingIterator,n)},t.prototype.forEach=function(e){this.forEachInUnderlyingRange(this.start,this.end,e)},t.prototype.someInUnderlyingRange=function(e,t,n){if(e.isAfter(t))return!1;var r=this.start.distanceFromStart();return this.string.someInRange(e,t,(function(e,t){return n(e,i.CodePointIndexOps.subtract(t,r))}))},t.prototype.someInRange=function(e,t,n){return this.someInUnderlyingRange(e.underlyingIterator,t.underlyingIterator,n)},t.prototype.some=function(e){return this.someInUnderlyingRange(this.start,this.end,e)},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.length===i.MIN_CODE_POINT_COUNT},enumerable:!1,configurable:!0}),t.prototype.atStart=function(e){void 0===e&&(e=i.IteratorAffinity.BEFORE);var t=this.createIteratorFromUnderlying(this.start.clone());return t.affinity=e,t},t.prototype.atEnd=function(e){void 0===e&&(e=i.IteratorAffinity.AFTER);var t=this.createIteratorFromUnderlying(this.end.clone());return t.affinity=e,t},t.prototype.iteratorAt=function(e,t){var n=this.atStart();return n.moveBy(e),n.affinity=null!==t&&void 0!==t?t:e>n.distanceFromStart()?i.IteratorAffinity.AFTER:i.DEFAULT_ITERATOR_AFFINITY,n},t.prototype.delete=function(e,t){var n=this.string.delete(e.underlyingIterator,t.underlyingIterator);return o.StringOperationProxy.create(this,n)},t.prototype.stringWillBeginEditing=function(e){this._tempLength=this.length,this.beginEditing()},t.prototype.stringDidEndEditing=function(e){this.length=this._tempLength,this.endEditing()},t.prototype.stringDidInsertInRange=function(e,t,n){if(!n.isBefore(this.start)&&!t.isAfter(this.end)){(t.isAfter(this.start)||t.equals(this.start))&&this.end.isBefore(n)&&(this.end.release(),this.end=n.clone().retain()),t.isBefore(this.start)&&(this.start.release(),this.start=t.clone().retain()),this._updateIterators();var r=this.createIteratorFromUnderlying(t.clone()),o=this.createIteratorFromUnderlying(n.clone());this.isEditing?this._tempLength=i.CodePointCountOps.add(this._tempLength,r.distanceTo(o)):this.length=i.CodePointCountOps.add(this.length,r.distanceTo(o)),this.didInsert(r,o)}},t.prototype.stringDidDeleteAtPosition=function(e,t,n){if(!t.isAfter(this.end)&&!t.isBefore(this.start)){var r=this.end.distanceFrom(this.start),o=i.CodePointCountOps.subtract(this.isEditing?this._tempLength:this.length,r);this.isEditing?this._tempLength=r:this.length=r,this._updateIterators();var a=this.createIteratorFromUnderlying(t.clone());this.didDelete(a,o)}},t.prototype._updateIterators=function(){var e,t,n=this.iterators_ofptr,r=n.length;for(e=0;e<r;++e)(t=n[e]).underlyingIterator.equals(this.start)?(t._hasPrevious=!1,t._previousCodePoint=i.UNDEFINED_CODEPOINT):(t._hasPrevious=!0,t._previousCodePoint=null),t.underlyingIterator.equals(this.end)?(t._hasNext=!1,t._nextCodePoint=i.UNDEFINED_CODEPOINT):(t._hasNext=!0,t._nextCodePoint=null)},t.prototype.underlyingStringProtocolPredicate=function(e){return i.isString(e)},t.prototype.resliceButLeaveInvalid=function(e,t,n){void 0===n&&(n=!1);var r=null===e?this.start.clone():e,i=null===t?this.end.clone():t;this.start.reset(r),this.end.reset(i);for(var o=this.iterators_ofptr,a=o.length,s=0;s<a;++s){var c=o[s];n&&(c.underlyingIterator.isBefore(r)&&c.underlyingIterator.reset(r),c.underlyingIterator.isAfter(i)&&c.underlyingIterator.reset(i)),c.invalidate()}this.isEditing?this._tempLength=this.end.distanceFrom(this.start):this.length=this.end.distanceFrom(this.start)},t.prototype.insertStrOrCP=function(e,t,n){var r=this.start.affinity,a=this.end.affinity;this.start.affinity=i.IteratorAffinity.BEFORE,this.end.affinity=i.IteratorAffinity.AFTER;var s=e.underlyingIterator.insert(t,n);return this.start.affinity=r,this.end.affinity=a,o.StringOperationProxy.create(this,s)},t.prototype.addIterator=function(e){e.iteratorIndex=this.iterators_ofptr.length,this.iterators_ofptr.push(e)},t.prototype.removeIterator=function(e){var t=this.iterators_ofptr.length,n=this.iterators_ofptr[t-1];this.iterators_ofptr[e.iteratorIndex]=n,n.iteratorIndex=e.iteratorIndex,this.iterators_ofptr.pop()},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.string=null,this.start=null,this.end=null,this.iterators_ofptr.length=0},t.prototype.free=function(){this.end.release(),this.start.release(),this.string.removeStringObserver(this),this.string.release(),e.prototype.free.call(this)},t.prototype.initStringSliceBase=function(e,t,n){null===t&&(t=e.atStart()),null===n&&(n=e.atEnd()),this.string=e.retain(),this.start=t.retain(),this.end=n.retain(),this.length=this.end.distanceFrom(this.start),this.string.addStringObserver(this)},t}(a.StringBase));t.StringSliceBase=s},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1005),t),i(n(1006),t),i(n(1007),t),i(n(1008),t),i(n(1009),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateOperation=void 0;var o=n(891),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.subOperations=[],t._postUndoFn=null,t._postRedoFn=null,t}var n;return r(t,e),n=t,t.prototype.undo=function(){for(var e=this.subOperations.length-1;e>=0;--e)this.subOperations[e].undo();this._postUndoFn&&this._postUndoFn(this)},t.prototype.redo=function(){for(var e=0,t=this.subOperations;e<t.length;e++)t[e].redo();this._postRedoFn&&this._postRedoFn(this)},t.prototype.free=function(){for(var t=0,n=this.subOperations;t<n.length;t++)n[t].release();this.subOperations.length=0,e.prototype.free.call(this)},t.prototype.init=function(e,t,n){this._postUndoFn=t,this._postRedoFn=n;for(var r=this.subOperations,i=0,o=e;i<o.length;i++){var a=o[i];r.push(a.retain())}},t.create=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r=null);var i=n.alloc();return i.init(e,t,r),i.autorelease()},n=i([o.sealed],t)}(o.Refcounted);t.AggregateOperation=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateOperationBuilder=void 0;var o=n(891),a=n(1005),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.subOperations=[],t}return r(t,e),t.prototype.addOperation=function(e){return this.subOperations.push(e.retain()),this},t.prototype.build=function(){return a.AggregateOperation.create(this.subOperations)},t.prototype.free=function(){for(var t=0,n=this.subOperations;t<n.length;t++)n[t].release();this.subOperations.length=0,e.prototype.free.call(this)},t.create=function(){return this.alloc().autorelease()},i([o.sealed],t)}(o.Refcounted);t.AggregateOperationBuilder=s,s.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpOperation=void 0;var i=n(891),o=null,a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.undo=function(){},t.prototype.redo=function(){},t.prototype.release=function(){return e.prototype.release.call(this),this.refCount<=0&&i.fatalError("NoOpOperation should never be freed.",{}),this},t.prototype.autorelease=function(){return i.fatalError("autorelease should never be called on NoOpOperation.",{}),e.prototype.autorelease.call(this),this},Object.defineProperty(t,"instance",{get:function(){return o||(o=this.alloc())},enumerable:!1,configurable:!0}),t}(i.Refcounted);t.NoOpOperation=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringOperationBase=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.string=null,t}return r(t,e),t.prototype.free=function(){this.string.release(),e.prototype.free.call(this)},t.prototype.initStringOperationBase=function(e){this.string=e.retain()},t}(n(891).Refcounted);t.StringOperationBase=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.StringOperationProxy=void 0;var o=n(891),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._nestedOperation=null,t}return r(t,e),t.prototype.undo=function(){this._nestedOperation.undo()},t.prototype.redo=function(){this._nestedOperation.redo()},t.prototype.free=function(){this._nestedOperation.release(),e.prototype.free.call(this)},t.create=function(e,t){var n=this.alloc();return n.initStringOperationBase(e),n._nestedOperation=t.retain(),n.autorelease()},i([o.sealed],t)}(n(1008).StringOperationBase);t.StringOperationProxy=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringBase=void 0;var i=n(891),o=n(929),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isaString=!0,t.length=null,t._stringObservers=[],t._beginEditingDepth=0,t}return r(t,e),t.prototype.atStart=function(e){return void 0===e&&(e=o.IteratorAffinity.BEFORE),this.iteratorAt(0,e)},t.prototype.createIterator=function(){return this.atStart()},t.prototype.toString=function(){for(var e="",t=this.atStart();t.hasNext;)e+=globalThis.String.fromCodePoint(t.nextCodePoint),t.moveToNext();return e},t.prototype.toCodePoints=function(){var e=[];return this.copyCodePointsInRangeToArray(this.atStart(),this.atEnd(),e),e},t.prototype.copyCodePointsInRangeToArray=function(e,t,n,r){if(void 0===r&&(r=!0),r&&(n.length=0),!t.isBefore(e))for(var i=e.clone();i.hasNext&&!i.equals(t);)n.push(i.nextCodePoint),i.moveToNext()},t.prototype.forEachInRange=function(e,t,n){if(!t.isBefore(e))for(var r=e,i=0;r.hasNext&&!r.equals(t);)n(r.nextCodePoint,i),r.moveToNext(),++i},t.prototype.forEach=function(e){for(var t=this.atStart(),n=0;t.hasNext;)e(t.nextCodePoint,n),t.moveToNext(),++n},t.prototype.someInRange=function(e,t,n){if(t.isBefore(e))return!1;for(var r=e,i=0;r.hasNext&&!r.equals(t);){if(n(r.nextCodePoint,i))return!0;r.moveToNext(),++i}return!1},t.prototype.some=function(e){for(var t=this.atStart(),n=0;t.hasNext;){if(e(t.nextCodePoint,n))return!0;t.moveToNext(),++n}return!1},t.prototype.addStringObserver=function(e){this._stringObservers.push(e),this.isEditing&&e.stringWillBeginEditing(this)},t.prototype.removeStringObserver=function(e){var t=this._stringObservers.indexOf(e);if(t<0)throw new Error("Cannot remove string observer: it's not one of ours!");this._stringObservers.splice(t,1),this.isEditing&&e.stringDidEndEditing(this)},Object.defineProperty(t.prototype,"dbg_codePoints",{get:function(){return this.toCodePoints()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_string",{get:function(){return this.toString()},enumerable:!1,configurable:!0}),t.prototype.didInsert=function(e,t){for(var n=0,r=this._stringObservers.slice(0);n<r.length;n++)r[n].stringDidInsertInRange(this,e,t)},t.prototype.didDelete=function(e,t){for(var n=0,r=this._stringObservers.slice(0);n<r.length;n++)r[n].stringDidDeleteAtPosition(this,e,t)},Object.defineProperty(t.prototype,"isEditing",{get:function(){return this._beginEditingDepth>0},enumerable:!1,configurable:!0}),t.prototype.beginEditing=function(){if(this._beginEditingDepth++,1===this._beginEditingDepth)for(var e=0,t=this._stringObservers.slice(0);e<t.length;e++)t[e].stringWillBeginEditing(this)},t.prototype.endEditing=function(){if(!this.isEditing)throw new Error("Unbalanced calls to String#begin/endEditing");if(this._beginEditingDepth--,0===this._beginEditingDepth)for(var e=0,t=this._stringObservers.slice(0);e<t.length;e++)t[e].stringDidEndEditing(this)},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.length=0,this._stringObservers.length=0},t}(i.Refcounted);t.StringBase=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringSliceIteratorBase=void 0;var i=n(929),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isaStringSliceIterator=!0,t.slice=null,t.underlyingIterator=null,t.iteratorIndex=-1,t._slice=null,t._hasPrevious=null,t._hasNext=null,t._previousCodePoint=null,t._nextCodePoint=null,t}return r(t,e),Object.defineProperty(t.prototype,"nextCodePoint",{get:function(){return null===this._nextCodePoint&&(this._nextCodePoint=this.hasNext?this.underlyingIterator.nextCodePoint:i.UNDEFINED_CODEPOINT),this._nextCodePoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousCodePoint",{get:function(){return null===this._previousCodePoint&&(this._previousCodePoint=this.hasPrevious?this.underlyingIterator.previousCodePoint:i.UNDEFINED_CODEPOINT),this._previousCodePoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNext",{get:function(){return null===this._hasNext&&(this._hasNext=this.underlyingIterator.hasNext&&this.underlyingIterator.isBefore(this.slice.end)),this._hasNext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPrevious",{get:function(){return null===this._hasPrevious&&(this._hasPrevious=this.underlyingIterator.hasPrevious&&this.underlyingIterator.isAfter(this.slice.start)),this._hasPrevious},enumerable:!1,configurable:!0}),t.prototype.distanceFrom=function(e){var t=e;return this.underlyingIterator.distanceFrom(t.underlyingIterator)},t.prototype.distanceTo=function(e){var t=e;return this.underlyingIterator.distanceTo(t.underlyingIterator)},t.prototype.approximateDistanceFrom=function(e){var t=e;return this.underlyingIterator.approximateDistanceFrom(t.underlyingIterator)},t.prototype.approximateDistanceTo=function(e){var t=e;return this.underlyingIterator.approximateDistanceTo(t.underlyingIterator)},t.prototype.isBefore=function(e){var t=e;return this.underlyingIterator.isBefore(t.underlyingIterator)},t.prototype.isAfter=function(e){var t=e;return this.underlyingIterator.isAfter(t.underlyingIterator)},t.prototype.equals=function(e){var t=e;return this.underlyingIterator.equals(t.underlyingIterator)},t.prototype.compare=function(e){var t=e;return this.underlyingIterator.compare(t.underlyingIterator)},t.prototype.moveToNext=function(){this._hasPrevious=!0,this._previousCodePoint=this._nextCodePoint;var e=this.underlyingIterator;return e.moveToNext(),e.equals(this.slice.end)?(this._hasNext=!1,this._nextCodePoint=i.UNDEFINED_CODEPOINT,!1):(this._hasNext=!0,this._nextCodePoint=null,!0)},t.prototype.moveToPrevious=function(){this._hasNext=!0,this._nextCodePoint=this._previousCodePoint;var e=this.underlyingIterator;return e.moveToPrevious(),e.equals(this.slice.start)?(this._hasPrevious=!1,this._previousCodePoint=i.UNDEFINED_CODEPOINT,!1):(this._hasPrevious=!0,this._previousCodePoint=null,!0)},t.prototype.moveBy=function(e){this.underlyingIterator.moveBy(e),e>0&&this.underlyingIterator.isAfter(this.slice.end)?this.underlyingIterator.reset(this.slice.end):e<0&&this.underlyingIterator.isBefore(this.slice.start)&&this.underlyingIterator.reset(this.slice.start),this.invalidate()},Object.defineProperty(t.prototype,"affinity",{get:function(){return this.underlyingIterator.affinity},set:function(e){this.underlyingIterator.affinity=e},enumerable:!1,configurable:!0}),t.prototype.insert=function(e,t){return this._slice.insertStrOrCP(this,e,t)},t.prototype.moveForwardToCodePointMatching=function(e,t,n){if(!this.hasNext)return!1;var r=n?n.underlyingIterator:this.slice.end;return this.underlyingIterator.moveForwardToCodePointMatching(e,t,r),this.invalidate(),this.hasNext},t.prototype.moveBackwardToCodePointMatching=function(e,t,n){if(!this.hasPrevious)return!1;var r=n?n.underlyingIterator:this.slice.start;return this.underlyingIterator.moveBackwardToCodePointMatching(e,t,r),this.invalidate(),this.hasPrevious},t.prototype.moveForwardUntil=function(e,t){if(!this.hasNext)return!1;var n=t?t.underlyingIterator:this.slice.end;return this.underlyingIterator.moveForwardUntil(e,n),this.invalidate(),this.hasNext},t.prototype.moveBackwardUntil=function(e,t){if(!this.hasPrevious)return!1;var n=t?t.underlyingIterator:this.slice.start;return this.underlyingIterator.moveBackwardUntil(e,n),this.invalidate(),this.hasPrevious},t.prototype.invalidate=function(){this._hasPrevious=null,this._previousCodePoint=null,this._hasNext=null,this._nextCodePoint=null},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.slice=null,this.underlyingIterator=null,this.iteratorIndex=-1,this.invalidate()},t.prototype.free=function(){this._slice.release(),this._slice.removeIterator(this),this.underlyingIterator.release(),this.slice.release(),e.prototype.free.call(this)},t.prototype.initStringSliceIteratorBase=function(t,n){e.prototype.initStringIteratorBase.call(this,t),this.underlyingIterator=n.retain(),this.slice=t.retain(),this._slice=t.retain(),t.addIterator(this)},t}(n(1012).StringIteratorBase);t.StringSliceIteratorBase=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringIteratorBase=t.iteratorName=void 0;var i=n(891),o=n(1013),a=n(929),s={done:!1,value:a.UNDEFINED_CODEPOINT};function c(e,t){var n="?",r=t.distanceFromStart(),i=o.dbg_codepoint(t.previousCodePoint),s=o.dbg_codepoint(t.nextCodePoint);switch(t.affinity){case a.IteratorAffinity.BEFORE:n="("+i+")| "+r+" |"+s;break;case a.IteratorAffinity.AFTER:n=i+"| "+r+" |("+s+")"}return e+"<"+n+">"}t.iteratorName=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.string=null,t.isaStringIterator=!0,t}return r(t,e),t.prototype.distanceFromStart=function(){return this.distanceFrom(this.string.atStart())},t.prototype.approximateDistanceFrom=function(e){return this.distanceFrom(e)},t.prototype.approximateDistanceFromStart=function(){return this.approximateDistanceFrom(this.string.atStart())},t.prototype.approximateDistanceTo=function(e){return-this.approximateDistanceFrom(e)},t.prototype.isBefore=function(e){return this.approximateDistanceTo(e)>0},t.prototype.isAfter=function(e){return this.approximateDistanceFrom(e)>0},t.prototype.equals=function(e){return 0===this.approximateDistanceFrom(e)},t.prototype.compare=function(e){return this.equals(e)?0:this.isBefore(e)?-1:1},t.prototype.reset=function(e){this.moveBy(this.distanceTo(e))},t.prototype.next=function(){return this.hasNext?(s.value=this.nextCodePoint,s.done=!1,this.moveToNext()):(s.value=a.UNDEFINED_CODEPOINT,s.done=!0),s},t.prototype.moveForwardToCodePointMatching=function(e,t,n){switch(t){case a.IteratorAffinity.BEFORE:return this.moveForwardUntil((function(t,n){return n===e}),n);case a.IteratorAffinity.AFTER:return this.moveForwardUntil((function(t,n){return t===e}),n)}},t.prototype.moveBackwardToCodePointMatching=function(e,t,n){switch(t){case a.IteratorAffinity.BEFORE:return this.moveBackwardUntil((function(t,n){return n===e}),n);case a.IteratorAffinity.AFTER:return this.moveBackwardUntil((function(t,n){return t===e}),n)}},t.prototype.moveForwardUntil=function(e,t){for(var n=this,r=function(){return n},i=null!==t&&void 0!==t?t:this.string.atEnd();this.hasNext&&!this.equals(i);)if(this.moveToNext(),e(this.previousCodePoint,this.nextCodePoint,r))return this.hasNext;return this.hasNext},t.prototype.moveBackwardUntil=function(e,t){for(var n=this,r=function(){return n},i=null!==t&&void 0!==t?t:this.string.atStart();this.hasPrevious&&!this.equals(i);)if(this.moveToPrevious(),e(this.previousCodePoint,this.nextCodePoint,r))return this.hasPrevious;return this.hasPrevious},Object.defineProperty(t.prototype,"dbg_positionString",{get:function(){switch(this.affinity){case a.IteratorAffinity.BEFORE:return"[("+this.previousCodePoint+")| "+this.distanceFromStart()+" |"+this.nextCodePoint+"]";case a.IteratorAffinity.AFTER:return"["+this.previousCodePoint+"| "+this.distanceFromStart()+" |("+this.nextCodePoint+")]"}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_string",{get:function(){return this.string.toString()},enumerable:!1,configurable:!0}),t.prototype.initStringIteratorBase=function(e){this.string=e},t.prototype.toString=function(){return c("StringIterator",this)},t}(i.Refcounted);t.StringIteratorBase=u},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.dbg_codepoint=void 0;var i=n(941),o=((r={0:"\u2400",10:"\u240a"})[-10]="\u240c",r[i.UNDEFINED_CODEPOINT]="\u2404",r);t.dbg_codepoint=function(e){return o[e]||JSON.stringify(String.fromCodePoint(e)).slice(1,-1)}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributedStringSliceIterator=void 0;var o=n(891),a=(n(929),n(1015)),s=n(1012),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.prototype.clone=function(){return n.create(this.slice,this.underlyingIterator.clone())},t.prototype.cloneForSlice=function(e){var t=this.underlyingIterator.clone();return t.isBefore(e.start)&&t.reset(e.start),t.isAfter(e.end)&&t.reset(e.end),n.create(e,t)},t.create=function(e,t){var n=this.alloc();return n.initStringSliceIteratorBase(e,t),n.autorelease()},t.prototype.toString=function(){return s.iteratorName("AttributedStringSliceIterator",this)},n=i([o.sealed],t)}(a.AttributedStringSliceIteratorBase);t.AttributedStringSliceIterator=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AttributedStringSliceIteratorBase=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.string=null,t.isaAttributedStringIterator=!0,t.slice=null,t._string=null,t}return r(t,e),Object.defineProperty(t.prototype,"nextAttributes",{get:function(){return this.hasNext?this.underlyingIterator.nextAttributes:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousAttributes",{get:function(){return this.hasPrevious?this.underlyingIterator.previousAttributes:null},enumerable:!1,configurable:!0}),t.prototype.insertWithAttributes=function(e,t,n){return this._string.insertStrOrCPWithAttributes(this,e,t,n)},t.prototype.initStringSliceIteratorBase=function(t,n){this._string=t,e.prototype.initStringSliceIteratorBase.call(this,t,n)},t}(n(1011).StringSliceIteratorBase);t.AttributedStringSliceIteratorBase=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringIteratorEagerBase=void 0;var i=n(929),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._nextCodePoint=i.UNDEFINED_CODEPOINT,t._previousCodePoint=i.UNDEFINED_CODEPOINT,t.hasNext=!1,t.hasPrevious=!1,t}return r(t,e),Object.defineProperty(t.prototype,"nextCodePoint",{get:function(){return this._nextCodePoint},enumerable:!1,configurable:!0}),t.prototype.setNextCodePoint=function(e){this._nextCodePoint=e},Object.defineProperty(t.prototype,"previousCodePoint",{get:function(){return this._previousCodePoint},enumerable:!1,configurable:!0}),t.prototype.setPreviousCodePoint=function(e){this._previousCodePoint=e},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.hasNext=!1,this.hasPrevious=!1,this._nextCodePoint=i.UNDEFINED_CODEPOINT,this._previousCodePoint=i.UNDEFINED_CODEPOINT},t}(n(1012).StringIteratorBase);t.StringIteratorEagerBase=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.StringSlice=void 0;var o=n(891),a=n(1003),s=n(1018),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isFreeing=!1,t}return r(t,e),t.prototype.free=function(){if(!this._isFreeing){this._isFreeing=!0;try{e.prototype.free.call(this)}finally{this._isFreeing=!1}}},t.prototype.createIteratorFromUnderlying=function(e){return s.StringSliceIterator.create(this,e)},t.create=function(e,t,n){var r=this.alloc();return r.initStringSliceBase(e,t,n),r.autorelease()},i([o.sealed],t)}(a.StringSliceBase);t.StringSlice=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.StringSliceIterator=void 0;var o=n(891),a=(n(929),n(1012)),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.prototype.clone=function(){return n.create(this._slice,this.underlyingIterator.clone())},t.prototype.cloneForSlice=function(e){var t=this.underlyingIterator.clone();return t.isBefore(e.start)&&t.reset(e.start),t.isAfter(e.end)&&t.reset(e.end),n.create(e,t)},t.create=function(e,t){var n=this.alloc();return n.initStringSliceIteratorBase(e,t),n.autorelease()},t.prototype.toString=function(){return a.iteratorName("StringSliceIterator",this)},n=i([o.sealed],t)}(n(1011).StringSliceIteratorBase);t.StringSliceIterator=s,s.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributedStringIteratorIntervalComparator=t.AttributedStringIteratorComparator=void 0;var a=n(972),s=n(891),c=function(e){function t(){return e.call(this)||this}var n;return r(t,e),n=t,t.instance=new n,i([s.sealed,o("design:paramtypes",[])],t)}(n(1020).StringIteratorComparatorBase);t.AttributedStringIteratorComparator=c;var u=function(e){function t(){return e.call(this,c.instance)||this}var n;return r(t,e),n=t,t.instance=new n,i([s.sealed,o("design:paramtypes",[])],t)}(a.IntervalComparatorBase);t.AttributedStringIteratorIntervalComparator=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StringIteratorIntervalComparator=t.StringIteratorComparator=t.StringIteratorComparatorBase=void 0;var a=n(972),s=n(891),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.equalTo=function(e,t){return e.equals(t)},t.prototype.notEqualTo=function(e,t){return!e.equals(t)},t.prototype.compare=function(e,t){return e.compare(t)},t.prototype.lessThan=function(e,t){return e.isBefore(t)},t.prototype.lessThanOrEqualTo=function(e,t){return e.equals(t)||e.isBefore(t)},t.prototype.greaterThanOrEqualTo=function(e,t){return e.equals(t)||e.isAfter(t)},t.prototype.greaterThan=function(e,t){return e.isAfter(t)},t}(a.ComparatorBase);t.StringIteratorComparatorBase=c;var u=function(e){function t(){return e.call(this)||this}var n;return r(t,e),n=t,t.instance=new n,i([s.sealed,o("design:paramtypes",[])],t)}(c);t.StringIteratorComparator=u;var l=function(e){function t(){return e.call(this,u.instance)||this}var n;return r(t,e),n=t,t.instance=new n,i([s.sealed,o("design:paramtypes",[])],t)}(a.IntervalComparatorBase);t.StringIteratorIntervalComparator=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.someWithAttributes=t.someWithAttributesInRange=t.forEachWithAttributes=t.forEachWithAttributesInRange=t.copyCodePointsAndAttributesToArrays=t.copyAttributesToArray=void 0,t.copyAttributesToArray=function(e,t,n){if(n.length=0,!t.isBefore(e))for(var r=e.clone();r.hasNext&&!r.equals(t);){var i=r.nextAttributes;i&&i.retain().autorelease(),n.push(i),r.moveToNext()}},t.copyCodePointsAndAttributesToArrays=function(e,t,n,r){if(n.length=0,r.length=0,!t.isBefore(e))for(var i=e.clone();i.hasNext&&!i.equals(t);){n.push(i.nextCodePoint);var o=i.nextAttributes;o&&o.retain().autorelease(),r.push(o),i.moveToNext()}},t.forEachWithAttributesInRange=function(e,t,n){for(var r=e.clone(),i=0;r.hasNext&&!r.equals(t);)n(r.nextCodePoint,r.nextAttributes,i),r.moveToNext(),++i},t.forEachWithAttributes=function(e,t){for(var n=e.atStart(),r=0;n.hasNext;)t(n.nextCodePoint,n.nextAttributes,r),n.moveToNext(),++r},t.someWithAttributesInRange=function(e,t,n){for(var r=e.clone(),i=0;r.hasNext&&!r.equals(t);){if(n(r.nextCodePoint,r.nextAttributes,i))return!0;r.moveToNext(),++i}return!1},t.someWithAttributes=function(e,t){for(var n=e.atStart(),r=0;n.hasNext;){if(t(n.nextCodePoint,n.nextAttributes,r))return!0;n.moveToNext(),++r}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSliceOf=void 0;var r=n(927),i=n(1017),o=n(929);t.createSliceOf=function(e,t,n){var a,s;return o.isAttributedString(e)&&o.isAttributedStringIterator(t)&&o.isAttributedStringIterator(n)?o.isAttributedStringSlice(e)&&o.isAttributedStringSliceIterator(t)&&o.isAttributedStringSliceIterator(n)?((a=t?t.underlyingIterator.clone():null)&&(a.affinity=o.IteratorAffinity.BEFORE),(s=n?n.underlyingIterator.clone():null)&&(s.affinity=o.IteratorAffinity.AFTER),r.AttributedStringSlice.create(e.string,a,s)):r.AttributedStringSlice.create(e,t?t.clone():null,n?n.clone():null):o.isStringSlice(e)&&o.isStringSliceIterator(t)&&o.isStringSliceIterator(n)?((a=t?t.underlyingIterator.clone():null)&&(a.affinity=o.IteratorAffinity.BEFORE),(s=n?n.underlyingIterator.clone():null)&&(s.affinity=o.IteratorAffinity.AFTER),i.StringSlice.create(e.string,a,s)):i.StringSlice.create(e,t?t.clone():null,n?n.clone():null)}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TTAttributedString2=void 0;var s=n(909),c=n(972),u=n(1024),l=n(1042),d=n(1047),p=n(1051),f=a(n(1054)),h=n(1054),m=n(1095),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isaAttributedString=!0,t._attrStrObservers=[],t}return r(t,e),t.prototype.atStart=function(e){return void 0===e&&(e=s.IteratorAffinity.BEFORE),m.TTAttributedStringIterator2.createAtStart(this,e)},t.prototype.atEnd=function(e){return void 0===e&&(e=s.IteratorAffinity.AFTER),m.TTAttributedStringIterator2.createAtEnd(this,e)},t.prototype.iteratorAt=function(e,t){return e>this.length?m.TTAttributedStringIterator2.createAtEnd(this,t):m.TTAttributedStringIterator2.createAtLeftOfCodePointIndex(this,e,t)},t.prototype.copyAttributesInRangeToArray=function(e,n,r,i){if(void 0===i&&(i=!0),i&&(r.length=0),!n.isBefore(e)){var o=this.isMerging?this.mergeContext.currentString:this.mergeableString.attributedString,a=o.UTF16String,s=n.nextCodePointCodeUnitIndex,c=e.nextCodePointCodeUnitIndex,u=(e.nextCodePointIndex,t._reusableAttributeNodeArray);o.getAttributeNodesInRangeSorted(c,s,u);for(var l=0,d=u[0];c<s;){r.push(d.value);var p=a.charCodeAt(c);h.isLeadingSurrogate(p)&&++c,++c>=d.intervalHigh&&(d=u[++l])}}},t.prototype.copyCodePointsAndAttributesInRangeToArrays=function(e,n,r,i,o){if(void 0===o&&(o=!0),o&&(r.length=0,i.length=0),!n.isBefore(e)){var a=this.isMerging?this.mergeContext.currentString:this.mergeableString.attributedString,s=a.UTF16String,c=n.nextCodePointCodeUnitIndex,u=e.nextCodePointCodeUnitIndex,l=(e.nextCodePointIndex,t._reusableAttributeNodeArray);a.getAttributeNodesInRangeSorted(u,c,l);for(var d=0,p=l[0];u<c;){var f=s.codePointAt(u);r.push(f),i.push(p.value);var m=s.charCodeAt(u);h.isLeadingSurrogate(m)&&++u,++u>=p.intervalHigh&&(p=l[++d])}}},t.prototype.forEachWithAttributesInRange=function(e,n,r){if(!n.isBefore(e)){var i=this.isMerging?this.mergeContext.currentString:this.mergeableString.attributedString,o=i.UTF16String,a=n.nextCodePointCodeUnitIndex,s=e.nextCodePointCodeUnitIndex,c=e.nextCodePointIndex,u=t._reusableAttributeNodeArray;i.getAttributeNodesInRangeSorted(s,a,u);for(var l=0,d=u[0];s<a;){r(o.codePointAt(s),d.value,c);var p=o.charCodeAt(s);h.isLeadingSurrogate(p)&&++s,++c,++s>=d.intervalHigh&&(d=u[++l])}}},t.prototype.forEachWithAttributes=function(e){this.forEachWithAttributesInRange(this.atStart(),this.atEnd(),e)},t.prototype.someWithAttributesInRange=function(e,n,r){if(n.isBefore(e))return!1;var i=this.isMerging?this.mergeContext.currentString:this.mergeableString.attributedString,o=i.UTF16String,a=n.nextCodePointCodeUnitIndex,s=e.nextCodePointCodeUnitIndex,c=e.nextCodePointIndex,u=t._reusableAttributeNodeArray;i.getAttributeNodesInRangeSorted(s,a,u);for(var l=0,d=u[0];s<a;){if(r(o.codePointAt(s),d.value,c))return!0;var p=o.charCodeAt(s);h.isLeadingSurrogate(p)&&++s,++c,++s>=d.intervalHigh&&(d=u[++l])}return!1},t.prototype.someWithAttributes=function(e){return this.someWithAttributesInRange(this.atStart(),this.atEnd(),e)},t.prototype.alterAttributesInRange=function(e,t,n){var r=e.distanceTo(t);if(0===r)return s.NoOpOperation.instance;this.beginEditing();var i=this.mergeableString,o=d.NSMakeRange(0,1);++this._wantsUndoCommands,i.beginEditing();for(var a=e.clone(),c=0;!a.equals(t);){o.location=a.nextCodePointCodeUnitIndex;var u=i.attributedString.UTF16String.charCodeAt(o.location);if(f.isLeadingSurrogate(u)){var p=i.attributedString.UTF16String.charCodeAt(o.location+1);f.isTrailingSurrogate(p)?o.length=2:o.length=1}else o.length=1;var h=i.attributesAtIndex_effectiveRange(o.location,null);i.setAttributes_range(n(h,c),o),a.moveToNext(),++c}i.endEditing(),--this._wantsUndoCommands,this.didAlterAttributes(e,t),this.endEditing();for(var m=l.TTChangeAttributesOperation2.create(this,this._undoCommands,e.position,r),g=0,v=this._undoCommands;g<v.length;g++)v[g].release();return this._undoCommands.length=0,this.dbg_assertStringLengthIsCorrect(),m},t.prototype.addAttributeToRange=function(e,t,n,r){return this.alterAttributesInRange(e,t,(function(e){return e.set(n,r)}))},t.prototype.removeAttributeFromRange=function(e,t,n){return this.alterAttributesInRange(e,t,(function(e){return e.set(n,null)}))},t.prototype.addAttributedStringObserver=function(e){this._attrStrObservers.push(e)},t.prototype.removeAttributedStringObserver=function(e){var t=this._attrStrObservers.indexOf(e);t>=0&&this._attrStrObservers.splice(t,1)},t.prototype.didAlterAttributes=function(e,t){for(var n=0,r=this._attrStrObservers.slice(0);n<r.length;n++)r[n].attributedStringDidAlterAttributes(this,e.clone(),t.clone())},t.prototype.createAttributeDictionary=function(e){return t.createAttributeDictionary(e)},t.createAttributeDictionary=function(e){return p.TTAttrDict.create(e)},t.prototype.edited_range_changeInLength=function(t,n,r,i){if(e.prototype.edited_range_changeInLength.call(this,t,n,r,i),t===d.NSTextStorageEditedAttributes&&this._activeMergeContext){var o=this.iteratorAtCodeUnitIndex(n.location),a=this.iteratorAtCodeUnitIndex(d.NSMaxRange(n));this.didAlterAttributes(o,a),this._activeMergeContext.editEvents.push({type:"attributesAltered",start:o,end:a})}},t.prototype.insertCodePointsWithAttributeIntervals=function(e,t,n,r){var i=this;if(0===t.length)return s.NoOpOperation.instance;this.beginEditing();var o=this.mergeableString,a=e.position,c={},u=e.affinity;if(e.affinity=r,++this._wantsUndoCommands,o.beginEditing(),this.insertStringHelper(e,t,r,c),0===c.codePointCountToInsert)return o.endEditing(),this.endEditing(),--this._wantsUndoCommands,s.NoOpOperation.instance;n.inorderTreeWalk(n.root,(function(e){var t=i.iteratorAt(a+e.intervalLow),n=i.iteratorAt(a+e.intervalHigh),r=d.NSMakeRange(t.nextCodePointCodeUnitIndex,n.nextCodePointCodeUnitIndex-t.nextCodePointCodeUnitIndex);o.setAttributes_range(e.value,r)})),o.endEditing(),--this._wantsUndoCommands,e.affinity=u;for(var p=0,f=this._stringObservers.slice(0);p<f.length;p++)f[p].stringDidInsertInRange(this,c.startIter,c.endIter);this.endEditing();for(var h=l.TTInsertOperation2.create(this,this._undoCommands,a,c.codePointCountToInsert),m=0,g=this._undoCommands;m<g.length;m++)g[m].release();return this._undoCommands.length=0,this.dbg_assertStringLengthIsCorrect(),h},t.attributeIntervalsFromAttributedString=function(e){var t=u.PooledIntervalTree.create(c.NumberIntervalComparator.instance,0);if(e.length>0){for(var n=0,r=e.atStart(),i=p.TTAttrDict.createFromIAttrDict(r.nextAttributes),o=1;r.hasNext;++o){var a=p.TTAttrDict.createFromIAttrDict(r.nextAttributes);i!==a&&(t.insertInterval(n,o-1,i),n=o-1,i=a),r.moveToNext()}t.insertInterval(n,e.length,i)}return t},Object.defineProperty(t.prototype,"dbg_linearAttributesKern",{get:function(){return this._mergeableString.attributedString.dbg_linearAttributesKern},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_linearAttributesSuperscript",{get:function(){return this._mergeableString.attributedString.dbg_linearAttributesSuperscript},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_superscriptAttributes",{get:function(){return this._mergeableString.attributedString.dbg_superscriptAttributes},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=d.TTMergeableAttributedString.alloc().initWithReplicaID(d.NSUUID.UUID());this._mergeableString=e,this._mergeableString.delegate=this},t.prototype.initWithMergeableUndoString=function(t){e.prototype.initWithMergeableUndoString.call(this,t),this._mergeableString.ttAttributedString2=this},t.prototype.initWithArchive=function(e){var t=d.autorelease(d.TTMergeableAttributedString.alloc().initWithArchive_andReplicaID(e,d.NSUUID.UUID()));this.initWithMergeableUndoString(t)},t.prototype.initWithAttributedString=function(e){if(s.isAttributedString(e)){this.init();var n=e.toString();this.length=s.MIN_CODE_POINT_COUNT;var r=d.autorelease(d.NSMutableAttributedString.alloc().initWithString(n)),i=t.attributeIntervalsFromAttributedString(e);i.inorderTreeWalk(i.root,(function(e){var t=d.NSMakeRange(e.intervalLow,e.intervalHigh-e.intervalLow);r.setAttributes_range(e.value,t)})),this._mergeableString.insertAttributedString_atIndex(r,0)}else this.initWithString(e)},t.create=function(){var e=this.alloc();return e.init(),e.autorelease()},t.createWithString=function(e){var t=this.alloc();return t.initWithString(e),t.autorelease()},t.createWithAttributedString=function(e){var t=this.alloc();return t.initWithAttributedString(e),t.autorelease()},t.createWithMergeableAttributedString=function(e){var t=this.alloc();return t.initWithMergeableUndoString(e),t.autorelease()},t.createWithArchive=function(e){var t=this.alloc();return t.initWithArchive(e),t.autorelease()},t._reusableAttributeNodeArray=[],t}(n(1113).TTStringBase2);t.TTAttributedString2=g,g.initializeRefcounted()},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(1025)),r(n(1026)),r(n(1027)),r(n(1032)),r(n(1033)),r(n(1034)),r(n(1031)),r(n(1035)),r(n(1028)),r(n(1036)),r(n(1029)),r(n(1037)),r(n(1030)),r(n(1038)),r(n(1039)),r(n(1040)),r(n(1041))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.RedBlackTreeNodeColor||(t.RedBlackTreeNodeColor={}))[r.BLACK=0]="BLACK",r[r.RED=1]="RED"},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(1027),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t.treeOwner=null,t}return r(t,e),t.createSentinelNil=function(e,t){var n=this.alloc_own();return n.initPooledContiguousIntervalTreeNodeBaseSentinelNilWithFacade(e,t),n},t.create=function(e,t,n,r,i){var o=this.alloc();return o.initPooledIntervalTreeNodeBaseWithFacade(e,t,n,r,i),o},i([o.sealed],t)}(a.PooledContiguousIntervalTreeNodeBaseWithFacade);t.PooledContiguousIntervalTreeNodeWithFacade=s,s.initializePooled();var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return u.create(this.facade,e,n.high,t)._impl},t.create=function(e,t,n,r){var i=this.alloc_own();return i.initContiguousPooledIntervalTreeBaseWithFacade(e,t,n,r),i},i([o.sealed],t)}(a.PooledContiguousIntervalTreeBaseWithFacade);t.PooledContiguousIntervalTreeWithFacade=c,c.initializePooled();var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._treeOwner=null,t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"treeOwner",{get:function(){return this._treeOwner.facade},enumerable:!0,configurable:!0}),t.prototype.initIntervalTreeNode=function(t,n){e.prototype.initRedBlackTreeNodeBase.call(this,t,n)},t.createSentinelNil=function(e){var t=this.alloc(),n=s.createSentinelNil(t,e);return t.initSentinelNil(n),t.autorelease()},t.create=function(e,t,n,r){var i=this.alloc(),o=s.create(i,e._impl,t,n,r);return i.initIntervalTreeNode(e._impl,o),i.autorelease()},i([o.sealed],t)}(a.ContiguousIntervalTreeNodeBase);t.ContiguousIntervalTreeNode=u,u.initializeRefcounted();var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._impl=null,t}return r(t,e),t.prototype.initIntervalTreeBase=function(t){e.prototype.initRedBlackTreeBase.call(this,t)},t.create=function(e,t){var n=this.alloc(),r=u.createSentinelNil(t),i=c.create(n,r._impl,e,t);return n.initIntervalTreeBase(i),n.autorelease()},i([o.sealed],t)}(a.ContiguousIntervalTreeBase);t.ContiguousIntervalTree=l,l.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1028),o=n(1031),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t.treeOwner=null,t}return r(t,e),t.prototype.initPooledContiguousIntervalTreeNodeBaseSentinelNilWithFacade=function(t,n){e.prototype.initPooledContiguousIntervalTreeNodeBaseSentinelNil.call(this,n),this.facade=t},t.prototype.initPooledIntervalTreeNodeBaseWithFacade=function(t,n,r,i,o){e.prototype.initPooledContiguousIntervalTreeNodeBase.call(this,n,r,i,o),this.facade=t},t}(i.PooledContiguousIntervalTreeNodeBase);t.PooledContiguousIntervalTreeNodeBaseWithFacade=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t}return r(t,e),t.prototype.initContiguousPooledIntervalTreeBaseWithFacade=function(t,n,r,i){e.prototype.initPooledIntervalTreeBase.call(this,n,r,i),this.facade=t},t}(i.PooledContiguousIntervalTreeBase);t.PooledContiguousIntervalTreeBaseWithFacade=s;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._treeOwner=null,t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"leftThread",{get:function(){return this._impl.leftThread.facade},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rightThread",{get:function(){return this._impl.rightThread.facade},enumerable:!0,configurable:!0}),t}(o.RedBlackTreeNodeBase);t.ContiguousIntervalTreeNodeBase=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._impl=null,t}return r(t,e),t.prototype.disposeInterval=function(e,t){this._impl.disposeInterval(e,t)},t.prototype.closedSliceNodes=function(e,t,n){var r=[];this._impl.closedSliceNodes(e,t,r),n.length=0;for(var i=0,o=r.length;i<o;++i)n.push(r[i].facade)},t.prototype.predecessorNode=function(t){return e.prototype.predecessorNode.call(this,t)},t.prototype.successorNode=function(t){return e.prototype.sucessorNode.call(this,t)},t.prototype.initIntervalTreeBase=function(t){e.prototype.initRedBlackTreeBase.call(this,t)},t}(o.RedBlackTreeBase);t.ContiguousIntervalTreeBase=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1029),o=function(e){function t(){var t=e.call(this)||this;return t.treeOwner=null,t.leftThread=null,t.rightThread=null,t}return r(t,e),t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.leftThread=null,this.rightThread=null},t.prototype.initPooledContiguousIntervalTreeNodeBaseSentinelNil=function(t){e.prototype.initPooledIntervalTreeNodeBaseSentinelNil.call(this,t),this.leftThread=this,this.rightThread=this},t.prototype.initPooledContiguousIntervalTreeNodeBase=function(t,n,r,i){e.prototype.initPooledIntervalTreeNodeBase.call(this,t,n,r,i),this.leftThread=t.sentinelNil,this.rightThread=t.sentinelNil},t}(i.PooledIntervalTreeNodeBase);t.PooledContiguousIntervalTreeNodeBase=o;var a=function(e){function t(){var t=e.call(this)||this;return t._shifter=null,t._differenceCalculator=null,t._reusableNodesToInsert_ofown=[],t._reusableNodesToDispose_ofptr=[],t}return r(t,e),t.prototype.insertNode=function(t){if(this.root.isNil)return t.leftThread=this.sentinelNil,t.rightThread=this.sentinelNil,void e.prototype.insertNode.call(this,t);var n=this.minimumNode(this.root),r=this.maximumNode(this.root);if(t.isIntervalLengthZero&&this.keyComparator.lessThan(n.intervalLow,t.intervalLow)&&this.keyComparator.lessThan(t.intervalHigh,r.intervalHigh))t.free();else{var i=[];if(this.closedIntervalSearchForAll(this.root,t.intervalLow,t.intervalHigh,i),0===i.length)throw new Error("PooledContiguousIntervalTreeBase.insertNode: Node with interval "+t.intervalLow+"-"+t.intervalLow+" must be contiguous with existing nodes");var o=!1,a=this._reusableNodesToInsert_ofown;a.length=0;for(var s=0,c=i.length;s<c&&!o;++s){var u=i[s];if(u.isIntervalLengthZero)if(this.keyComparator.lessThan(t.intervalLow,u.intervalLow))this.keyComparator.equalTo(t.intervalHigh,u.intervalLow)?u.leftThread.isNil&&(t.leftThread=u.leftThread,t.rightThread=u,u.leftThread=t,a.push(t),o=!0):this.keyComparator.greaterThan(t.intervalHigh,u.intervalLow)&&(t.leftThread=u.leftThread,t.rightThread=u.rightThread,u.rightThread.leftThread=t,e.prototype.deleteNode.call(this,u).free(),a.push(t),o=!0,this.shiftNodesRightFrom(t.rightThread,this._differenceCalculator(t.intervalHigh,u.intervalHigh),a));else{if(this.keyComparator.equalTo(t.intervalHigh,u.intervalLow))return void t.free();u.leftThread.isNil?(t.leftThread=u,t.rightThread=u.rightThread,u.rightThread.leftThread=t,u.rightThread=t):(t.leftThread=u.leftThread,t.rightThread=u.rightThread,u.leftThread.rightThread=t,u.rightThread.leftThread=t,e.prototype.deleteNode.call(this,u).free()),a.push(t),o=!0,this.shiftNodesRightFrom(t.rightThread,this._differenceCalculator(t.intervalHigh,t.intervalLow),a)}else if(this.keyComparator.equalTo(t.intervalLow,u.intervalHigh)){if(this.keyComparator.equalTo(t.intervalHigh,u.intervalHigh))if(u.rightThread.isNil)t.leftThread=u,t.rightThread=u.rightThread,u.rightThread.leftThread=t,u.rightThread=t;else{if(t.isIntervalLengthZero)return void t.free();t.leftThread=u.leftThread,t.rightThread=u.rightThread,u.leftThread.rightThread=t,u.rightThread.leftThread=t,e.prototype.deleteNode.call(this,u).free()}else if(this.keyComparator.greaterThan(t.intervalHigh,u.intervalHigh)){if(!u.rightThread.isNil&&u.rightThread.isIntervalLengthZero)continue;t.leftThread=u,t.rightThread=u.rightThread,u.rightThread.leftThread=t,u.rightThread=t}a.push(t),o=!0,this.shiftNodesRightFrom(t.rightThread,this._differenceCalculator(t.intervalHigh,t.intervalLow),a)}else if(this.keyComparator.lessThan(t.intervalLow,u.intervalLow))t.leftThread=u.leftThread,t.rightThread=u,u.leftThread.rightThread=t,u.leftThread=t,a.push(t),o=!0,this.shiftNodesRightFrom(t.rightThread,this._differenceCalculator(t.intervalHigh,u.intervalLow),a);else if(this.keyComparator.equalTo(t.intervalLow,u.intervalLow)){if(t.isIntervalLengthZero&&u.leftThread.isIntervalLengthZero)return void t.free();t.leftThread=u.leftThread,t.rightThread=u,u.leftThread.rightThread=t,u.leftThread=t,a.push(t),o=!0,this.shiftNodesRightFrom(t.rightThread,this._differenceCalculator(t.intervalHigh,t.intervalLow),a)}else if(t.isIntervalLengthZero);else{var l=this.onWillInsertKeyValue(t.intervalLow,u.value,{high:u.intervalHigh});u.setIntervalHigh(t.intervalLow,!1),t.leftThread=u,t.rightThread=l,u.rightThread.leftThread=l,l.rightThread=u.rightThread,l.leftThread=t,u.rightThread=t,a.push(e.prototype.deleteNode.call(this,u)),a.push(t),o=!0,this.shiftNodesRightFrom(t.rightThread,this._differenceCalculator(t.intervalHigh,t.intervalLow),a)}}for(s=0,c=a.length;s<c;++s){var d=a[s];e.prototype.insertNode.call(this,d)}this.inorderTreeWalkWithPredecessor(this.root,(function(e,t){e.leftThread=t,t.rightThread=e}))}},t.prototype.deleteNode=function(t){var n=e.prototype.deleteNode.call(this,t);return n.left.isNil||(n.left.rightThread=n.rightThread),n.right.isNil||(n.right.leftThread=n.leftThread),n},t.prototype.disposeInterval=function(t,n){var r=this;if(!this.root.isNil){var i=[];if(this.closedIntervalSearchForAll(this.root,t,n,i),0!==i.length){this._reusableNodesToInsert_ofown.length=0,this._reusableNodesToDispose_ofptr.length=0;for(var o=0,a=i.length;o<a;++o){var s=i[o];if(this.intervalComparator.doesClosedIntervalEnclose(t,n,s.intervalLow,s.intervalHigh))this._reusableNodesToDispose_ofptr.push(s);else if(this.keyComparator.lessThan(t,s.intervalLow)&&this.keyComparator.lessThan(s.intervalLow,n)){var c=this.onWillInsertKeyValue(n,s.value,{high:s.intervalHigh});this._reusableNodesToInsert_ofown.push(c),this._reusableNodesToDispose_ofptr.push(s)}else this.keyComparator.lessThan(t,s.intervalHigh)&&this.keyComparator.lessThan(s.intervalHigh,n)&&(c=this.onWillInsertKeyValue(s.intervalLow,s.value,{high:t}),this._reusableNodesToInsert_ofown.push(c),this._reusableNodesToDispose_ofptr.push(s))}this._reusableNodesToDispose_ofptr.forEach((function(t){e.prototype.deleteNode.call(r,t).free()})),this._reusableNodesToInsert_ofown.sort((function(e,t){var n=r.keyComparator.compare(e.intervalLow,t.intervalLow);return 0!==n?n:r.keyComparator.compare(e.intervalHigh,t.intervalHigh)})),this._reusableNodesToInsert_ofown.forEach((function(t){e.prototype.insertNode.call(r,t)})),e.prototype.inorderTreeWalkWithPredecessor.call(this,this.root,(function(e,t){t.rightThread=e,e.leftThread=t})),this.minimumNode(this.root).leftThread=this.sentinelNil,this.maximumNode(this.root).rightThread=this.sentinelNil;var u=this._differenceCalculator(t,n);this.inorderTreeWalk(this.root,(function(e){r.keyComparator.greaterThanOrEqualTo(e.intervalLow,n)?(e.setIntervalLowAndHigh(r._shifter(e.intervalLow,u),r._shifter(e.intervalHigh,u),!1),r.augmentNodeUpToRoot(e)):r.keyComparator.greaterThanOrEqualTo(e.intervalHigh,n)&&(e.setIntervalHigh(r._shifter(e.intervalHigh,u),!1),r.augmentNodeUpToRoot(e))}))}}},t.prototype.closedSliceNodes=function(t,n,r){r.length=0;var i=[];this.closedIntervalSearchForAll(this.root,t,n,i);for(var o=0,a=i.length;o<a;++o){var s=i[o];if(this.intervalComparator.doesClosedIntervalEnclose(t,n,s.intervalLow,s.intervalHigh))r.push(s);else if(this.keyComparator.lessThan(s.intervalLow,t)&&this.keyComparator.lessThanOrEqualTo(s.intervalHigh,n)){if(!this.keyComparator.equalTo(t,s.intervalHigh)){var c=this.onWillInsertKeyValue(t,s.value,{high:s.intervalHigh});s.setIntervalHigh(t,!1),c.rightThread=s.rightThread,s.rightThread=c,c.leftThread=s,c.rightThread.leftThread=c,e.prototype.insertNode.call(this,c),r.push(c)}}else if(this.keyComparator.greaterThanOrEqualTo(s.intervalLow,t)&&this.keyComparator.greaterThan(s.intervalHigh,n))this.keyComparator.equalTo(s.intervalLow,n)||(c=this.onWillInsertKeyValue(s.intervalLow,s.value,{high:n}),s.setIntervalLow(n,!1),c.leftThread=s.leftThread,s.leftThread=c,c.rightThread=s,c.leftThread.rightThread=c,e.prototype.insertNode.call(this,c),r.push(c));else{var u=this.onWillInsertKeyValue(s.intervalLow,s.value,{high:t}),l=this.onWillInsertKeyValue(n,s.value,{high:s.intervalHigh});s.setIntervalLowAndHigh(t,n,!1),u.leftThread=s.leftThread,s.leftThread=u,u.rightThread=s,u.leftThread.rightThread=u,l.rightThread=s.rightThread,s.rightThread=l,l.leftThread=s,l.rightThread.leftThread=l,e.prototype.insertNode.call(this,u),e.prototype.insertNode.call(this,l),r.push(s)}}r.sort(this.nodeCompareFn.bind(this))},t.prototype.predecessorNode=function(e){return e.leftThread},t.prototype.successorNode=function(e){return e.rightThread},t.prototype.onWillInsertNode=function(t){e.prototype.onWillInsertNode.call(this,t)},t.prototype.nodeCompareFn=function(e,t){return this.intervalComparator.compare(e.intervalLow,e.intervalHigh,t.intervalLow,t.intervalHigh)},t.prototype.shiftNodesRightFrom=function(t,n,r){if(0!==n)for(var i=t;!i.isNil;)i.setIntervalLowAndHigh(this._shifter(i.intervalLow,n),this._shifter(i.intervalHigh,n),!1),r.push(e.prototype.deleteNode.call(this,i)),i=i.rightThread},t.prototype.dbg_isValid=function(){var t=e.prototype.dbg_isValid.call(this),n=this.dbg_everyNodeIsThreadedCorrectly,r=this.dbg_everyNodeIsContiguous,i=this.dbg_zeroNodesOnlyAtEnds;return t&&n&&r&&i},Object.defineProperty(t.prototype,"dbg_everyNodeIsThreadedCorrectly",{get:function(){var e=this.dbg_everyNodeLeftThreadIsCorrect,t=this.dbg_everyNodeRightThreadIsCorrect;return e&&t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_everyNodeLeftThreadIsCorrect",{get:function(){if(this.root.isNil)return!0;var e=!0,t=this.minimumNode(this.root);if(t.leftThread!==this.sentinelNil)return!1;var n=t;return this.inorderTreeWalk(this.root,(function(r){r!==t&&(e=e&&r.leftThread===n),n=r})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_everyNodeRightThreadIsCorrect",{get:function(){if(this.root.isNil)return!0;var e=!0,t=this.maximumNode(this.root);if(t.rightThread!==this.sentinelNil)return!1;var n=t;return this.reverseInorderTreeWalk(this.root,(function(r){r!==t&&(e=e&&r.rightThread===n),n=r})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_everyNodeIsContiguous",{get:function(){var e=this;if(this.root.isNil)return!0;var t=!0;return this.inorderTreeWalkWithPredecessor(this.root,(function(n,r){t=t&&e.keyComparator.equalTo(r.intervalHigh,n.intervalLow)})),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_zeroNodesOnlyAtEnds",{get:function(){var e=!0,t=this.minimumNode(this.root),n=this.maximumNode(this.root);return this.inorderTreeWalk(this.root,(function(r){r.isIntervalLengthZero&&(e=e&&(r===t||r===n))})),e},enumerable:!0,configurable:!0}),t.prototype.initPooledContiguousIntervalTreeBase=function(t,n,r,i,o){e.prototype.initPooledIntervalTreeBase.call(this,t,n,r),this._shifter=i,this._differenceCalculator=o},t}(i.PooledIntervalTreeBase);t.PooledContiguousIntervalTreeBase=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(891),o=n(1025),a=n(1030),s=function(e){function t(){var t=e.call(this)||this;return t.treeOwner=null,t.isIntervalLengthZero=null,t.max=null,t._intervalHigh=null,t}return r(t,e),Object.defineProperty(t.prototype,"intervalLow",{get:function(){return this.key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"intervalHigh",{get:function(){return this._intervalHigh},enumerable:!0,configurable:!0}),t.prototype.setKey=function(e,t){void 0===t&&(t=!0),this.key!==e&&(this.key=e,this.isIntervalLengthZero=this.treeOwner.keyComparator.equalTo(e,this._intervalHigh),t&&this.treeOwner.onNodeIntervalLowChanged(this))},t.prototype.setIntervalLow=function(e,t){void 0===t&&(t=!0),this.setKey(e,t)},t.prototype.setIntervalHigh=function(e,t){void 0===t&&(t=!0),this._intervalHigh!==e&&(this._intervalHigh=e,this.isIntervalLengthZero=this.treeOwner.keyComparator.equalTo(this.key,e),t&&this.treeOwner.onNodeIntervalHighChanged(this))},t.prototype.setIntervalLowAndHigh=function(e,t,n){void 0===n&&(n=!0),this.key=e,this._intervalHigh=t,this.isIntervalLengthZero=this.treeOwner.keyComparator.equalTo(e,t),n&&this.treeOwner.onNodeIntervalLowAndHighChanged(this)},t.prototype.setMax=function(e){this.max!==e&&(this.max=e)},t.prototype.toJSON=function(){return this.isNil?null:{low:this.keyToJSON(this.intervalLow),high:this.keyToJSON(this.intervalHigh),max:this.keyToJSON(this.max),left:this.left.isNil?null:this.left.toJSON(),right:this.right.isNil?null:this.right.toJSON(),value:this.valueToJSON(this.value),color:o.RedBlackTreeNodeColor[this.color]}},t.prototype.dbg_formattedIntervalLow=function(){return""+this.intervalLow.toString()},t.prototype.dbg_formattedIntervalHigh=function(){return""+this.intervalHigh.toString()},t.prototype.dbg_formattedMax=function(){return""+this.max.toString()},t.prototype.dbg_formattedKey=function(){return this.dbg_formattedIntervalLow()+"-"+this.dbg_formattedIntervalHigh()+"|"+this.dbg_formattedMax()},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this._intervalHigh=null,this.isIntervalLengthZero=null,this.max=null},t.prototype.initPooledIntervalTreeNodeBaseSentinelNil=function(t){e.prototype.initPooledRedBlackTreeNodeBaseSentinelNil.call(this),this.setMax(t)},t.prototype.initPooledIntervalTreeNodeBase=function(t,n,r,i){e.prototype.initPooledRedBlackTreeNodeBase.call(this,t,n,i),this._intervalHigh=r,this.isIntervalLengthZero=this.treeOwner.keyComparator.equalTo(n,r),this.setMax(r)},t}(a.PooledRedBlackTreeNodeBase);t.PooledIntervalTreeNodeBase=s;var c=function(e){function t(){var t=e.call(this)||this;return t.intervalComparator=null,t._reusableNodeStack=[],t._keyMin=null,t}return r(t,e),t.prototype.insertInterval=function(e,t,n){var r=this.onWillInsertKeyValue(e,n,{high:t});return this.insertNode(r),r},t.prototype.closedIntervalSearch=function(e,t,n){for(var r=e;!r.isNil&&!this.intervalComparator.doesClosedIntervalOverlap(t,n,r.intervalLow,r.intervalHigh);)r=!r.left.isNil&&this.keyComparator.greaterThanOrEqualTo(r.left.max,t)?r.left:r.right;return r},t.prototype.closedIntervalSearchForAll=function(e,t,n,r){r.length=0;var i=this._reusableNodeStack;for(i.length=0,i.push(e);i.length>0;){var o=i.pop();o.isNil||(this.intervalComparator.doesClosedIntervalOverlap(t,n,o.intervalLow,o.intervalHigh)&&r.push(o),this.keyComparator.lessThanOrEqualTo(t,o.left.max)&&i.push(o.left),this.keyComparator.greaterThanOrEqualTo(o.right.max,t)&&i.push(o.right))}},t.prototype.closedIntervalSearchForAllAfterEndPoint=function(e,t,n){n.length=0;var r=this._reusableNodeStack;for(r.length=0,r.push(e);r.length>0;){var i=r.pop();i.isNil||(this.keyComparator.lessThanOrEqualTo(t,i.intervalLow)&&n.push(i),this.keyComparator.lessThanOrEqualTo(t,i.left.max)&&r.push(i.left),this.keyComparator.greaterThanOrEqualTo(i.right.max,t)&&r.push(i.right))}},t.prototype.openIntervalSearchForAll=function(e,t,n,r){r.length=0;var i=this._reusableNodeStack;for(i.length=0,i.push(e);i.length>0;){var o=i.pop();o.isNil||(this.intervalComparator.doesOpenIntervalOverlap(t,n,o.intervalLow,o.intervalHigh)&&r.push(o),this.keyComparator.lessThanOrEqualTo(t,o.left.max)&&i.push(o.left),this.keyComparator.greaterThanOrEqualTo(o.right.max,t)&&i.push(o.right))}},t.prototype.onNodeKeyChanged=function(e){var t=this.deleteNode(e);t.setMax(t.intervalHigh),this.insertNode(t)},t.prototype.onNodeIntervalLowChanged=function(e){this.onNodeKeyChanged(e)},t.prototype.onNodeIntervalHighChanged=function(e){this.augmentNodeUpToRoot(e),e.left.isNil||this.keyComparator.lessThanOrEqualTo(e.left.max,e.max)||i.fatalError("This interval node is invalid.",{node:e}),e.right.isNil||this.keyComparator.lessThanOrEqualTo(e.right.max,e.max)||i.fatalError("This interval node is invalid.",{node:e}),this.keyComparator.lessThanOrEqualTo(e.intervalHigh,e.max)||i.fatalError("This interval node is invalid.",{node:e})},t.prototype.onNodeIntervalLowAndHighChanged=function(e){this.onNodeKeyChanged(e)},t.prototype.isNodeLessThan=function(e,t){return this.intervalComparator.compare(e.intervalLow,e.intervalHigh,t.intervalLow,t.intervalHigh)<0},t.prototype.augmentNodeOnInsertionPathForNode=function(e,t){e.setMax(this.keyComparator.max(e.max,t.intervalHigh))},t.prototype.augmentNodeUpToRoot=function(e){for(;!e.isNil;)e.setMax(this.keyComparator.max(e.intervalHigh,e.left.max,e.right.max)),e=e.parent},t.prototype.augmentNodesAfterRotate=function(e,t){e.setMax(t.max),t.setMax(this.keyComparator.max(t.intervalHigh,t.left.max,t.right.max))},t.prototype.onWillInsertNode=function(t){if(e.prototype.onWillInsertNode.call(this,t),this._keyComparator.compare(t.intervalLow,t.intervalHigh)>0)throw new Error("The interval being inserted into the tree is invalid.")},t.prototype.dbg_isValid=function(){var t=e.prototype.dbg_isValid.call(this),n=this.dbg_everyNodeMaxIsCorrect;return t&&n},Object.defineProperty(t.prototype,"dbg_everyNodeMaxIsCorrect",{get:function(){var e=this,t=!0;return this.postorderTreeWalk(this.root,(function(n){t=t&&e.keyComparator.equalTo(n.max,e.dbg_nodeMax(n))})),t},enumerable:!0,configurable:!0}),t.prototype.dbg_nodeMax=function(e){return e.isNil?this._keyMin:this.keyComparator.max(e.intervalHigh,this.dbg_nodeMax(e.left),this.dbg_nodeMax(e.right))},t.prototype.initPooledIntervalTreeBase=function(t,n,r,i){e.prototype.initPooledRedBlackTreeBase.call(this,t,n.endPointComparator,i),this.intervalComparator=n,this._keyMin=r},t}(a.PooledRedBlackTreeBase);t.PooledIntervalTreeBase=c},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(891),o=n(1025),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t.color=o.RedBlackTreeNodeColor.BLACK,t.parent=null,t.left=null,t.right=null,t.key=null,t.value=null,t.isNil=null,t}return r(t,e),Object.defineProperty(t.prototype,"isLeafNode",{get:function(){return this.isNil},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNonNilLeafNode",{get:function(){return!this.isNil&&this.left.isNil&&this.right.isNil},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeCount",{get:function(){return this.isNil?0:this.left.nodeCount+1+this.right.nodeCount},enumerable:!0,configurable:!0}),t.prototype.setKey=function(e,t){void 0===t&&(t=!0),this.key!==e&&(this.key=e,t&&this.treeOwner.onNodeKeyChanged(this))},t.prototype.setValue=function(e,t){void 0===t&&(t=!0),this.value!==e&&(this.value=e,t&&this.treeOwner.onNodeValueChanged(this))},t.prototype.toJSON=function(){return this.isNil?null:{key:this.keyToJSON(this.key),value:this.valueToJSON(this.value),left:this.left.isNil?null:this.left.toJSON(),right:this.right.isNil?null:this.right.toJSON(),color:o.RedBlackTreeNodeColor[this.color]}},t.prototype.keyToJSON=function(e){return e},t.prototype.valueToJSON=function(e){return e},t.prototype.keyFromJSON=function(e){return e},t.prototype.valueFromJSON=function(e){return e},t.prototype.dbg_isValid=function(){return this.color!==o.RedBlackTreeNodeColor.RED||this.left.color===o.RedBlackTreeNodeColor.BLACK&&this.right.color===o.RedBlackTreeNodeColor.BLACK},Object.defineProperty(t.prototype,"dbg_nonNilLeafNodes",{get:function(){var e=[];return this.treeOwner.inorderTreeWalk(this,(function(t){t.left.isNil&&t.right.isNil&&e.push(t)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_nonNilLeafBlackHeightToRoot",{get:function(){for(var e=this,t=0;!e.isNil;)e.color===o.RedBlackTreeNodeColor.BLACK&&(t+=1),e=e.parent;return t},enumerable:!0,configurable:!0}),t.prototype.dbg_dumpASCII=function(e){void 0===e&&(e=7);var t=function e(t){if(t){var n=e(t.left),r=e(t.right);return Math.max(n,r)+1}return 0}(this),n=[];return function o(s,c){void 0===c&&(c=0);var u=a(c);if(n[c]?n[c]=n[c]+u+i(s):n[c]=u+i(s),++c,s.left)o(s.left,c);else for(var l=c;l<t;++l)n[l]||(n[l]=""),n[l]=n[l]+a(l)+r("",e);if(s.right)o(s.right,c);else for(l=c;l<t;++l)n[l]||(n[l]=""),n[l]=n[l]+a(l)+r("",e)}(this),function(e,t){for(var n="Subtree depth: "+t+"\n\n",r="",i=0,o=e;i<o.length;i++){r=r+o[i]+"\n\n"}return n+r}(n,t);function r(e,t){if(e.length===t)return e;if(e.length>t)return e.substring(0,t);for(;e.length<t;)e+=" ";return e}function i(t){if(t.isLeafNode){var n=r("",Math.floor(e/2));return n+"X"+n}return"("+(t.color===o.RedBlackTreeNodeColor.BLACK?"B":"R")+" "+r(t.dbg_formattedKey(),e-4)+")"}function a(n){return r("",function(n){var r=Math.pow(2,n)*e,i=Math.pow(2,t)*e,o=Math.pow(2,n)+1;return Math.floor((i-r)/o)}(n))}},t.prototype.dbg_formattedKey=function(){return this.key.toString()},t.prototype.dbg_dump=function(){return{key:this.key,isaLeafNode:this.isLeafNode,color:this.color,parent:this.parent,left:this.left,right:this.right}},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.treeOwner=null,this.color=o.RedBlackTreeNodeColor.BLACK,this.parent=null,this.left=null,this.right=null,this.key=null,this.value=null,this.isNil=null},t.prototype.free=function(){this.treeOwner&&(this.left=null,this.right=null),e.prototype.free.call(this)},t.prototype.initPooledRedBlackTreeNodeBaseSentinelNil=function(){this.treeOwner=null,this.isNil=!0},t.prototype.initPooledRedBlackTreeNodeBase=function(e,t,n){var r=e.sentinelNil;this.treeOwner=e,this.parent=r,this.key=t,this.value=n,this.isNil=null===t,this.left=r,this.right=r},t.prototype.createNodeFromJSON=function(e,t){return i.fatalError("PooledRedBlackTreeBase.createNodeFromJSON is not implemented",{node:this}),null},t}(i.Pooled);t.PooledRedBlackTreeNodeBase=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.root=null,t.sentinelNil=null,t._keyComparator=null,t}return r(t,e),Object.defineProperty(t.prototype,"nodeCount",{get:function(){return this.root.nodeCount},enumerable:!0,configurable:!0}),t.prototype.insertKeyValue=function(e,t){var n=this.onWillInsertKeyValue(e,t);return this.insertNode(n),n},t.prototype.insertNode=function(e){this.onWillInsertNode(e);for(var t=this.sentinelNil,n=this.root;!n.isNil;)this.augmentNodeOnInsertionPathForNode(n,e),t=n,n=this.isNodeLessThan(e,n)?n.left:n.right;e.parent=t,t===this.sentinelNil?this.root=e:this.isNodeLessThan(e,t)?t.left=e:t.right=e,e.left=this.sentinelNil,e.right=this.sentinelNil,e.color=o.RedBlackTreeNodeColor.RED,this.insertFixup(e),this.onDidInsertNode(e)},t.prototype.deleteNode=function(e){var t=e,n=t.color,r=this.sentinelNil,a=this.sentinelNil;return e.left.isNil?(r=e.right,this.transplant(e,e.right)):e.right.isNil?(r=e.left,this.transplant(e,e.left)):(a=(t=this.minimumNode(e.right)).parent,n=t.color,r=t.right,t.parent===e?r.parent=t:(this.transplant(t,t.right),t.right=e.right,t.right.parent=t),this.transplant(e,t),t.left=e.left,t.left.parent=t,t.color=e.color),n===o.RedBlackTreeNodeColor.BLACK&&this.deleteFixup(r),this.augmentNodeUpToRoot(t),this.augmentNodeUpToRoot(a),e.left=this.sentinelNil,e.right=this.sentinelNil,this.onDidDeleteNode(e),i.unsafePtrAsOwn(e)},t.prototype.search=function(e,t){for(;!e.isNil&&!this._keyComparator.equalTo(t,e.key);)e=this._keyComparator.lessThan(t,e.key)?e.left:e.right;return e},t.prototype.nodesByKey=function(e,t,n){n.length=0,this.nodesByKeyHelper(e,t,n)},t.prototype.nodesByKeyHelper=function(e,t,n){var r=this.search(e,t);r.isNil||(n.push(r),this.nodesByKeyHelper(r.left,t,n),this.nodesByKeyHelper(r.right,t,n))},t.prototype.inorderKeys=function(e,t){t.length=0,this.inorderTreeWalk(e,(function(e){t.push(e.key)}))},t.prototype.valuesByKey=function(e,t,n){n.length=0,this.valuesByKeyHelper(e,t,n)},t.prototype.valuesByKeyHelper=function(e,t,n){var r=this.search(e,t);r.isNil||(n.push(r.value),this.valuesByKeyHelper(r.left,t,n),this.valuesByKeyHelper(r.right,t,n))},t.prototype.preorderTreeWalk=function(e,t){null===e||e.isNil||(t(e),this.preorderTreeWalk(e.left,t),this.preorderTreeWalk(e.right,t))},t.prototype.inorderTreeWalk=function(e,t){null===e||e.isNil||(this.inorderTreeWalk(e.left,t),t(e),this.inorderTreeWalk(e.right,t))},t.prototype.reverseInorderTreeWalk=function(e,t){null===e||e.isNil||(this.reverseInorderTreeWalk(e.right,t),t(e),this.reverseInorderTreeWalk(e.left,t))},t.prototype.postorderTreeWalk=function(e,t){null===e||e.isNil||(this.postorderTreeWalk(e.left,t),this.postorderTreeWalk(e.right,t),t(e))},t.prototype.inorderNodes=function(e,t){t.length=0,this.inorderTreeWalk(e,(function(e){t.push(e)}))},t.prototype.inorderTreeWalkWithPredecessor=function(e,t){if(null!==e&&!e.isNil){var n=[];this.inorderNodes(e,n);var r=n.length;if(r>=2)for(var i=n[0],o=1;o<r;++o){var a=n[o];t(a,i),i=a}}},t.prototype.minimumNode=function(e){if(!e.isNil)for(;!e.left.isNil;)e=e.left;return e},t.prototype.maximumNode=function(e){if(!e.isNil)for(;!e.right.isNil;)e=e.right;return e},t.prototype.predecessorNode=function(e){if(e.isNil)return e;if(e.left.isNil){for(var t=e.parent;!t.isNil&&e===t.left;)e=t,t=t.parent;return t}return this.maximumNode(e.left)},t.prototype.successorNode=function(e){if(e.isNil)return e;if(e.right.isNil){for(var t=e.parent;!t.isNil&&e===t.right;)e=t,t=t.parent;return t}return this.minimumNode(e.right)},t.prototype.disposeAllNodes=function(){var e=this;this.postorderTreeWalk(this.root,(function(t){t.left&&t.left.isNil,t.right&&t.right.isNil,t.left=e.sentinelNil,t.right=e.sentinelNil,e.onDidDeleteNode(t),e.disposeNode(t)})),this.root=this.sentinelNil},t.prototype.onNodeKeyChanged=function(e){this.insertNode(this.deleteNode(e))},t.prototype.onNodeValueChanged=function(e){},t.prototype.toJSON=function(){return{root:this.root.isNil?null:this.root.toJSON()}},t.prototype.isNodeLessThan=function(e,t){return this._keyComparator.lessThan(e.key,t.key)},t.prototype.augmentNodeOnInsertionPathForNode=function(e,t){},t.prototype.augmentNodeUpToRoot=function(e){},t.prototype.augmentNodesAfterRotate=function(e,t){},t.prototype.leftRotate=function(e){var t=e.right;e.right=t.left,t.left.isNil||(t.left.parent=e),t.parent=e.parent,e.parent.isNil?this.root=i.unsafePtrAsOwn(t):e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,this.augmentNodesAfterRotate(t,e)},t.prototype.rightRotate=function(e){var t=e.left;e.left=t.right,t.right.isNil||(t.right.parent=e),t.parent=e.parent,e.parent.isNil?this.root=i.unsafePtrAsOwn(t):e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,this.augmentNodesAfterRotate(t,e)},t.prototype.insertFixup=function(e){for(;e.parent.color===o.RedBlackTreeNodeColor.RED;){var t;e.parent===e.parent.parent.left?(t=e.parent.parent.right).color===o.RedBlackTreeNodeColor.RED?(e.parent.color=o.RedBlackTreeNodeColor.BLACK,t.color=o.RedBlackTreeNodeColor.BLACK,e.parent.parent.color=o.RedBlackTreeNodeColor.RED,e=e.parent.parent):e===e.parent.right?(e=e.parent,this.leftRotate(e)):(e.parent.color=o.RedBlackTreeNodeColor.BLACK,e.parent.parent.color=o.RedBlackTreeNodeColor.RED,this.rightRotate(e.parent.parent)):(t=e.parent.parent.left).color===o.RedBlackTreeNodeColor.RED?(e.parent.color=o.RedBlackTreeNodeColor.BLACK,t.color=o.RedBlackTreeNodeColor.BLACK,e.parent.parent.color=o.RedBlackTreeNodeColor.RED,e=e.parent.parent):e===e.parent.left?(e=e.parent,this.rightRotate(e)):(e.parent.color=o.RedBlackTreeNodeColor.BLACK,e.parent.parent.color=o.RedBlackTreeNodeColor.RED,this.leftRotate(e.parent.parent))}this.root.color=o.RedBlackTreeNodeColor.BLACK},t.prototype.deleteFixup=function(e){for(;e!==this.root&&e.color===o.RedBlackTreeNodeColor.BLACK;){var t;e===e.parent.left?((t=e.parent.right).color===o.RedBlackTreeNodeColor.RED&&(t.color=o.RedBlackTreeNodeColor.BLACK,e.parent.color=o.RedBlackTreeNodeColor.RED,this.leftRotate(e.parent),t=e.parent.right),t.left.color===o.RedBlackTreeNodeColor.BLACK&&t.right.color===o.RedBlackTreeNodeColor.BLACK?(t.color=o.RedBlackTreeNodeColor.RED,e=e.parent):t.right.color===o.RedBlackTreeNodeColor.BLACK?(t.left.color=o.RedBlackTreeNodeColor.BLACK,t.color=o.RedBlackTreeNodeColor.RED,this.rightRotate(t),t=e.parent.right):(t.color=e.parent.color,e.parent.color=o.RedBlackTreeNodeColor.BLACK,t.right.color=o.RedBlackTreeNodeColor.BLACK,this.leftRotate(e.parent),e=this.root)):((t=e.parent.left).color===o.RedBlackTreeNodeColor.RED&&(t.color=o.RedBlackTreeNodeColor.BLACK,e.parent.color=o.RedBlackTreeNodeColor.RED,this.rightRotate(e.parent),t=e.parent.left),t.right.color===o.RedBlackTreeNodeColor.BLACK&&t.left.color===o.RedBlackTreeNodeColor.BLACK?(t.color=o.RedBlackTreeNodeColor.RED,e=e.parent):t.left.color===o.RedBlackTreeNodeColor.BLACK?(t.right.color=o.RedBlackTreeNodeColor.BLACK,t.color=o.RedBlackTreeNodeColor.RED,this.leftRotate(t),t=e.parent.left):(t.color=e.parent.color,e.parent.color=o.RedBlackTreeNodeColor.BLACK,t.left.color=o.RedBlackTreeNodeColor.BLACK,this.rightRotate(e.parent),e=this.root))}e.color=o.RedBlackTreeNodeColor.BLACK},t.prototype.transplant=function(e,t){e.parent.isNil?this.root=i.unsafePtrAsOwn(t):e===e.parent.left?e.parent.left=t:e.parent.right=t,t.parent=e.parent},t.prototype.onWillInsertNode=function(e){},t.prototype.onDidInsertNode=function(e){},t.prototype.onDidDeleteNode=function(e){e.isNil},t.prototype.disposeNode=function(e){e.free()},Object.defineProperty(t.prototype,"keyComparator",{get:function(){return this._keyComparator},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_keys",{get:function(){var e=[];return this.inorderTreeWalk(this.root,(function(t){e.push(t.key)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_nodes",{get:function(){var e=[];return this.inorderTreeWalk(this.root,(function(t){e.push(t)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_everyNodeHasAColor",{get:function(){var e=!0;return this.inorderTreeWalk(this.root,(function(t){e=e&&(t.color===o.RedBlackTreeNodeColor.BLACK||t.color===o.RedBlackTreeNodeColor.RED)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_redNodesHaveBlackChildren",{get:function(){var e=!0;return this.inorderTreeWalk(this.root,(function(t){t.color===o.RedBlackTreeNodeColor.RED&&(e=e&&t.left.color===o.RedBlackTreeNodeColor.BLACK&&t.right.color===o.RedBlackTreeNodeColor.BLACK)})),e},enumerable:!0,configurable:!0}),t.prototype.dbg_isValid=function(){return this.root.color===o.RedBlackTreeNodeColor.BLACK&&this.dbg_everyNodeHasAColor&&this.dbg_redNodesHaveBlackChildren&&this.dbg_allSimplePathsFromEveryNodeToDescendantLeavesContainSameBlackCount},Object.defineProperty(t.prototype,"dbg_nonNilLeafNodes",{get:function(){return this.root.dbg_nonNilLeafNodes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dbg_allSimplePathsFromEveryNodeToDescendantLeavesContainSameBlackCount",{get:function(){var e=[];this.inorderTreeWalk(this.root,(function(t){e.push(t)}));for(var t=0,n=e.length;t<n;++t)for(var r=e[t].dbg_nonNilLeafNodes,i=null,o=0,a=r.length;o<a;++o){var s=r[o];if(null===i)i=s.dbg_nonNilLeafBlackHeightToRoot;else if(i!==s.dbg_nonNilLeafBlackHeightToRoot)return!1}return!0},enumerable:!0,configurable:!0}),t.prototype.free=function(){this.disposeAllNodes(),this.root=null,this.onDidDeleteNode(this.sentinelNil),this.disposeNode(this.sentinelNil),this.sentinelNil=null,this._keyComparator=null,e.prototype.free.call(this)},t.prototype.initPooledRedBlackTreeBase=function(e,t,n){var r=this;this._keyComparator=t,this.sentinelNil=e,void 0===n?(this.root=this.sentinelNil,this.onDidInsertNode(e)):(this.root=e.createNodeFromJSON(this,n.root),this.preorderTreeWalk(this.root,(function(e){return r.onDidInsertNode(e)})))},t}(i.Pooled);t.PooledRedBlackTreeBase=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(891),o=n(1030),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t.facade=null,t}return r(t,e),t.prototype.initSentinelNilWithFacadeBase=function(t){e.prototype.initPooledRedBlackTreeNodeBaseSentinelNil.call(this),this.facade=t},t.prototype.initPooledRedBlackTreeNodeWithFacadeBase=function(t,n,r,i){e.prototype.initPooledRedBlackTreeNodeBase.call(this,n,r,i),this.facade=t},t}(o.PooledRedBlackTreeNodeBase);t.PooledRedBlackTreeNodeBaseWithFacade=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t}return r(t,e),t.prototype.onDidInsertNode=function(t){t.facade.retain(),e.prototype.onDidInsertNode.call(this,t)},t.prototype.onDidDeleteNode=function(t){e.prototype.onDidDeleteNode.call(this,t),t.facade.release()},t.prototype.disposeNode=function(e){},t.prototype.initPooledRedBlackTreeFacadeBase=function(t,n,r){e.prototype.initPooledRedBlackTreeBase.call(this,n,r),this.facade=t},t}(o.PooledRedBlackTreeBase);t.PooledRedBlackTreeBaseWithFacade=s;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._treeOwner=null,t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return this._impl.key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._impl.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._impl.parent.facade},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this._impl.left.facade},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this._impl.right.facade},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLeafNode",{get:function(){return this._impl.isLeafNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNil",{get:function(){return this._impl.isNil},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNonNilLeafNode",{get:function(){return this._impl.isNonNilLeafNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeCount",{get:function(){return this._impl.nodeCount},enumerable:!0,configurable:!0}),t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this._impl=null,this._treeOwner=null},t.prototype.free=function(){this._impl.free(),e.prototype.free.call(this)},t.prototype.initSentinelNil=function(e){this._treeOwner=null,this._impl=e},t.prototype.initRedBlackTreeNodeBase=function(e,t){this._treeOwner=e,this._impl=t},t}(i.Refcounted);t.RedBlackTreeNodeBase=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"sentinelNil",{get:function(){return this._impl.sentinelNil.facade},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._impl.root.facade},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeCount",{get:function(){return this._impl.nodeCount},enumerable:!0,configurable:!0}),t.prototype.insertKeyValue=function(e,t){return this._impl.insertKeyValue(e,t).facade},t.prototype.insertNode=function(e){this._impl.insertNode(e._impl)},t.prototype.deleteNode=function(e){return e.retain(),this._impl.deleteNode(e._impl).facade.autorelease()},t.prototype.delete=function(e){var t=this._impl.search(this._impl.root,e);return t.isNil?null:(t.facade.retain(),this._impl.deleteNode(t).facade.autorelease())},t.prototype.search=function(e,t){void 0===t&&(t=null);var n=this._impl.search(t?t._impl:this._impl.root,e);return n?n.facade:null},t.prototype.minimumNode=function(e){void 0===e&&(e=null);var t=this._impl.minimumNode(e?e._impl:this._impl.root);return t?t.facade:null},t.prototype.maximumNode=function(e){void 0===e&&(e=null);var t=this._impl.maximumNode(e?e._impl:this._impl.root);return t?t.facade:null},t.prototype.predecessorNode=function(e){var t=this._impl.predecessorNode(e._impl);return t?t.facade:null},t.prototype.sucessorNode=function(e){var t=this._impl.successorNode(e._impl);return t?t.facade:null},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this._impl=null},t.prototype.free=function(){this._impl.free(),e.prototype.free.call(this)},t.prototype.initRedBlackTreeBase=function(e){this._impl=e},t}(i.Refcounted);t.RedBlackTreeBase=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(1033),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t.treeOwner=null,t}return r(t,e),t.createSentinelNil=function(e,t){var n=this.alloc_own();return n.initPooledIntervalTreeNodeBaseSentinelNilWithFacade(e,t),n},t.create=function(e,t,n,r,i){var o=this.alloc();return o.initPooledIntervalTreeNodeBaseWithFacade(e,t,n,r,i),o},i([o.sealed],t)}(a.PooledIntervalTreeNodeBaseWithFacade);t.PooledIntervalTreeNodeWithFacade=s,s.initializePooled();var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return u.create(this.facade,e,n.high,t)._impl},t.create=function(e,t,n,r){var i=this.alloc_own();return i.initPooledIntervalTreeBaseWithFacade(e,t,n,r),i},i([o.sealed],t)}(a.PooledIntervalTreeBaseWithFacade);t.PooledIntervalTreeWithFacade=c,c.initializePooled();var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._treeOwner=null,t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"treeOwner",{get:function(){return this._treeOwner.facade},enumerable:!0,configurable:!0}),t.prototype.initIntervalTreeNode=function(t,n){e.prototype.initRedBlackTreeNodeBase.call(this,t,n)},t.createSentinelNil=function(e){var t=this.alloc(),n=s.createSentinelNil(t,e);return t.initSentinelNil(n),t.autorelease()},t.create=function(e,t,n,r){var i=this.alloc(),o=s.create(i,e._impl,t,n,r);return i.initIntervalTreeNode(e._impl,o),i.autorelease()},i([o.sealed],t)}(a.IntervalTreeNodeBase);t.IntervalTreeNode=u,u.initializeRefcounted();var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._impl=null,t}return r(t,e),t.prototype.initIntervalTree=function(t){e.prototype.initIntervalTreeBase.call(this,t)},t.create=function(e,t){var n=this.alloc(),r=u.createSentinelNil(t),i=c.create(n,r._impl,e,t);return n.initIntervalTree(i),n.autorelease()},i([o.sealed],t)}(a.IntervalTreeBase);t.IntervalTree=l,l.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1029),o=n(1031),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t.treeOwner=null,t}return r(t,e),t.prototype.initPooledIntervalTreeNodeBaseSentinelNilWithFacade=function(t,n){e.prototype.initPooledIntervalTreeNodeBaseSentinelNil.call(this,n),this.facade=t},t.prototype.initPooledIntervalTreeNodeBaseWithFacade=function(t,n,r,i,o){e.prototype.initPooledIntervalTreeNodeBase.call(this,n,r,i,o),this.facade=t},t}(i.PooledIntervalTreeNodeBase);t.PooledIntervalTreeNodeBaseWithFacade=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t}return r(t,e),t.prototype.initPooledIntervalTreeBaseWithFacade=function(t,n,r,i){e.prototype.initPooledIntervalTreeBase.call(this,n,r,i),this.facade=t},t}(i.PooledIntervalTreeBase);t.PooledIntervalTreeBaseWithFacade=s;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._treeOwner=null,t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"intervalLow",{get:function(){return this._impl.intervalLow},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"intervalHigh",{get:function(){return this._impl.intervalHigh},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isIntervalLengthZero",{get:function(){return this._impl.isIntervalLengthZero},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._impl.max},enumerable:!0,configurable:!0}),t.prototype.setKey=function(e,t){return void 0===t&&(t=!0),this._impl.setKey(e,t)},t.prototype.setIntervalLow=function(e,t){return void 0===t&&(t=!0),this._impl.setIntervalLow(e,t)},t.prototype.setIntervalHigh=function(e,t){return void 0===t&&(t=!0),this._impl.setIntervalHigh(e,t)},t.prototype.setIntervalLowAndHigh=function(e,t,n){return void 0===n&&(n=!0),this._impl.setIntervalLowAndHigh(e,t,n)},t.prototype.setMax=function(e){return this._impl.setMax(e)},t.prototype.initSentinelNil=function(t){e.prototype.initSentinelNil.call(this,t)},t.prototype.initRedBlackTreeNodeBase=function(t,n){e.prototype.initRedBlackTreeNodeBase.call(this,t,n)},t}(o.RedBlackTreeNodeBase);t.IntervalTreeNodeBase=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"intervalComparator",{get:function(){return this._impl.intervalComparator},enumerable:!0,configurable:!0}),t.prototype.insertInterval=function(e,t,n){return this._impl.insertInterval(e,t,n).facade},t.prototype.closedIntervalSearch=function(e,t,n){return this._impl.closedIntervalSearch(e._impl,t,n).facade},t.prototype.closedIntervalSearchForAll=function(e,t,n,r){var i=[];this._impl.closedIntervalSearchForAll(e._impl,t,n,i),r.length=0;for(var o=0,a=i.length;o<a;++o)r.push(i[o].facade)},t.prototype.closedIntervalSearchForAllAfterEndPoint=function(e,t,n){var r=[];this._impl.closedIntervalSearchForAllAfterEndPoint(e._impl,t,r),n.length=0;for(var i=0,o=r.length;i<o;++i)n.push(r[i].facade)},t.prototype.openIntervalSearchForAll=function(e,t,n,r){var i=[];this._impl.openIntervalSearchForAll(e._impl,t,n,i),r.length=0;for(var o=0,a=i.length;o<a;++o)r.push(i[o].facade)},t.prototype.initIntervalTreeBase=function(t){e.prototype.initRedBlackTreeBase.call(this,t)},t}(o.RedBlackTreeBase);t.IntervalTreeBase=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(972),a=n(891),s=n(1031),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t.facade=null,t}return r(t,e),t.prototype.initPooledRedBlackTreeNodeWithFacade=function(t,n,r,i){e.prototype.initPooledRedBlackTreeNodeWithFacadeBase.call(this,t,n,r,i)},t.createSentinelNil=function(e){var t=this.alloc_own();return t.initSentinelNilWithFacadeBase(e),t},t.create=function(e,t,n,r){var i=this.alloc();return i.initPooledRedBlackTreeNodeWithFacade(e,t,n,r),i},i([a.sealed],t)}(s.PooledRedBlackTreeNodeBaseWithFacade);t.PooledRedBlackTreeNodeWithFacade=c,c.initializePooled();var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._treeOwner=null,t._impl=null,t}return r(t,e),Object.defineProperty(t.prototype,"treeOwner",{get:function(){return this._treeOwner.facade},enumerable:!0,configurable:!0}),t.prototype.initRedBlackTreeNode=function(t,n){e.prototype.initRedBlackTreeNodeBase.call(this,t,n)},t.createSentinelNil=function(){var e=this.alloc(),t=c.createSentinelNil(e);return e.initSentinelNil(t),e.autorelease()},t.create=function(e,t,n){var r=this.alloc(),i=c.create(r,e._impl,t,n);return r.initRedBlackTreeNode(e._impl,i),r.autorelease()},i([a.sealed],t)}(s.RedBlackTreeNodeBase);t.RedBlackTreeNode=u,u.initializeRefcounted();var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.facade=null,t}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return u.create(this.facade,e,t)._impl},t.create=function(e,t,n){var r=this.alloc_own();return r.initPooledRedBlackTreeFacadeBase(e,t,n),r},t.createNumberTree=function(e,t){return this.create(e,t,o.NumberComparator.instance)},i([a.sealed],t)}(s.PooledRedBlackTreeBaseWithFacade);t.PooledRedBlackTreeWithFacade=l,l.initializePooled();var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._impl=null,t}return r(t,e),t.prototype.initRedBlackTree=function(t){e.prototype.initRedBlackTreeBase.call(this,t)},t.create=function(e){var t=this.alloc(),n=u.createSentinelNil(),r=l.create(t,n._impl,e);return t.initRedBlackTree(r),t.autorelease()},t.createNumberRBTree=function(){return this.create(o.NumberComparator.instance)},i([a.sealed],t)}(s.RedBlackTreeBase);t.RedBlackTree=d,d.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(1028),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t}return r(t,e),t.createSentinelNil=function(e){var t=this.alloc_own();return t.initPooledContiguousIntervalTreeNodeBaseSentinelNil(e),t},t.create=function(e,t,n,r){var i=this.alloc();return i.initPooledContiguousIntervalTreeNodeBase(e,t,n,r),i},i([o.sealed],t)}(a.PooledContiguousIntervalTreeNodeBase);t.PooledContiguousIntervalTreeNode=s,s.initializePooled();var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return s.create(this,e,n.high,t)},t.create=function(e,t,n,r){var i=this.alloc_own();return i.initPooledContiguousIntervalTreeBase(s.createSentinelNil(t),e,t,n,r),i},i([o.sealed],t)}(a.PooledContiguousIntervalTreeBase);t.PooledContiguousIntervalTree=c,c.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(1025),s=n(1029),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t}var n;return r(t,e),n=t,t.prototype.createNodeFromJSON=function(e,t){var r=n.create(e,this.keyFromJSON(t.low),this.keyFromJSON(t.high),this.valueFromJSON(t.value));r.setMax(this.keyFromJSON(t.max));var i=t.color;if(r.color=a.RedBlackTreeNodeColor[i],null!==t.left){var o=this.createNodeFromJSON(e,t.left);o.parent=r,r.left=o}if(null!==t.right){var s=this.createNodeFromJSON(e,t.right);s.parent=r,r.right=s}return r},t.createSentinelNil=function(e){var t=this.alloc_own();return t.initPooledIntervalTreeNodeBaseSentinelNil(e),t},t.create=function(e,t,n,r){var i=this.alloc();return i.initPooledIntervalTreeNodeBase(e,t,n,r),i},n=i([o.sealed],t)}(s.PooledIntervalTreeNodeBase);t.PooledIntervalTreeNode=c,c.initializePooled();var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return c.create(this,e,n.high,t)},t.create=function(e,t){var n=this.alloc_own();return n.initPooledIntervalTreeBase(c.createSentinelNil(t),e,t),n},t.createFromJson=function(e,t,n){var r=this.alloc_own();return r.initPooledIntervalTreeBase(c.createSentinelNil(t),e,t,n),r},i([o.sealed],t)}(s.PooledIntervalTreeBase);t.PooledIntervalTree=u,u.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(1030),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t}return r(t,e),t.createSentinelNil=function(){var e=this.alloc_own();return e.initPooledRedBlackTreeNodeBaseSentinelNil(),e},t.create=function(e,t,n){var r=this.alloc();return r.initPooledRedBlackTreeNodeBase(e,t,n),r},i([o.sealed],t)}(a.PooledRedBlackTreeNodeBase);t.PooledRedBlackTreeNode=s,s.initializePooled();var c=function(e){function t(){var t=e.call(this)||this;return t.delegate=null,t}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return this.delegate&&this.delegate.treeWillInsertKeyValue?this.delegate.treeWillInsertKeyValue(this,e,t,n):s.create(this,e,t)},t.prototype.onWillInsertNode=function(t){e.prototype.onWillInsertNode.call(this,t),this.delegate&&this.delegate.treeWillInsertNode&&this.delegate.treeWillInsertNode(this,t)},t.prototype.onDidInsertNode=function(t){e.prototype.onDidInsertNode.call(this,t),this.delegate&&this.delegate.treeDidInsertNode&&this.delegate.treeDidInsertNode(this,t)},t.prototype.onDidDeleteNode=function(t){e.prototype.onDidDeleteNode.call(this,t),this.delegate&&this.delegate.treeDidDeleteNode&&this.delegate.treeDidDeleteNode(this,t)},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.delegate=null},t.prototype.free=function(){this.delegate=null,e.prototype.free.call(this)},t.create=function(e,t){var n=this.alloc_own();return n.initPooledRedBlackTreeBase(e,t),n},i([o.sealed],t)}(a.PooledRedBlackTreeBase);t.PooledRedBlackTree=c,c.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=n(1039),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t}return r(t,e),t.createSentinelNil=function(e){var t=this.alloc_own();return t.initPooledRefcountedEndsIntervalTreeNodeBaseSentinelNil(e),t},t.create=function(e,t,n,r){var i=this.alloc();return i.initPooledRefcountedEndsIntervalTreeNodeBase(e,t,n,r),i},i([o.sealed],t)}(a.PooledRefcountedEndsIntervalTreeNodeBase);t.PooledRefcountedEndsIntervalTreeNode=s,s.initializePooled();var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return s.create(this,e,n.high,t)},t.create=function(e,t){var n=this.alloc_own();return n.initPooledRefcountedEndsIntervalTreeBase(s.createSentinelNil(t),e,t),n},i([o.sealed],t)}(a.PooledRefcountedEndsIntervalTreeBase);t.PooledRefcountedEndsIntervalTree=c,c.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1029),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t}return r(t,e),t.prototype.setKey=function(e,t){void 0===t&&(t=!0),this.key!==e&&(this.key.release(),this.key=e.retain(),this.isIntervalLengthZero=this.treeOwner.keyComparator.equalTo(e,this._intervalHigh),t&&this.treeOwner.onNodeIntervalLowChanged(this))},t.prototype.setIntervalHigh=function(e,t){void 0===t&&(t=!0),this._intervalHigh!==e&&(this._intervalHigh.release(),this._intervalHigh=e.retain(),this.isIntervalLengthZero=this.treeOwner.keyComparator.equalTo(this.key,e),t&&this.treeOwner.onNodeIntervalHighChanged(this))},t.prototype.setIntervalLowAndHigh=function(e,t,n){void 0===n&&(n=!0),this.key!==e&&this._intervalHigh!==t?(this.key.release(),this.key=e.retain(),this._intervalHigh.release(),this._intervalHigh=t.retain(),this.isIntervalLengthZero=this.treeOwner.keyComparator.equalTo(e,t),n&&this.treeOwner.onNodeIntervalLowAndHighChanged(this)):(this.setIntervalLow(e,n),this.setIntervalHigh(t,n))},t.prototype.setMax=function(e){this.max!==e&&(this.max&&this.max.release(),this.max=e.retain())},t.prototype.free=function(){this.isNil||(this._intervalHigh.release(),this.key.release()),this.max.release(),e.prototype.free.call(this)},t.prototype.initPooledRefcountedEndsIntervalTreeNodeBaseSentinelNil=function(t){e.prototype.initPooledIntervalTreeNodeBaseSentinelNil.call(this,t)},t.prototype.initPooledRefcountedEndsIntervalTreeNodeBase=function(t,n,r,i){e.prototype.initPooledIntervalTreeNodeBase.call(this,t,n.retain(),r.retain(),i)},t}(i.PooledIntervalTreeNodeBase);t.PooledRefcountedEndsIntervalTreeNodeBase=o;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.dbg_isValid=function(){var t=e.prototype.dbg_isValid.call(this),n=this.dbg_areIntervalEndsValid();return t&&n},t.prototype.dbg_areIntervalEndsValid=function(){var e=!0;return this.postorderTreeWalk(this.root,(function(t){var n=t;e=e&&!n.intervalLow.isFreed&&!n.intervalHigh.isFreed&&!n.max.isFreed})),e},t.prototype.free=function(){this._keyMin.release(),e.prototype.free.call(this)},t.prototype.initPooledRefcountedEndsIntervalTreeBase=function(t,n,r){e.prototype.initPooledRedBlackTreeBase.call(this,t,n.endPointComparator),this.intervalComparator=n,this._keyMin=r.retain()},t}(i.PooledIntervalTreeBase);t.PooledRefcountedEndsIntervalTreeBase=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(972),o=n(1041),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t}return r(t,e),t.createSentinelNil=function(){var e=this.alloc_own();return e.initPooledSizeTreeNodeBaseSentinelNil(),e},t.create=function(e,t,n,r){var i=this.alloc_own();return i.initPooledSizeTreeNodeBase(e,t,n,r),i},t}(o.PooledSizeTreeNodeBase);t.PooledSizeTreeNode=a,a.initializePooled();var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.onWillInsertKeyValue=function(e,t,n){return a.create(this,e,t,n?n.size:0)},t.create=function(e){var t=a.createSentinelNil(),n=this.alloc_own();return n.initPooledSizeTreeBase(t,e),n},t.createNumberTree=function(){return this.create(i.NumberComparator.instance)},t}(o.PooledSizeTreeBase);t.PooledSizeTree=s,s.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1030),o=function(e){function t(){var t=e.call(this)||this;return t.treeOwner=null,t.subtreeSize=null,t.size=null,t}return r(t,e),t.prototype.setSize=function(e){this.size!==e&&(this.size=e,this.treeOwner.onNodeSizeChanged(this))},Object.defineProperty(t.prototype,"start",{get:function(){var e=0;e+=this.left.subtreeSize;for(var t=this.parent,n=this;!t.isNil;)n===t.right&&(e+=t.left.subtreeSize,e+=t.size),t=(n=t).parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.start+this.size},enumerable:!0,configurable:!0}),t.prototype.nodeAtPosition=function(e,t){for(var n=this;!n.isNil;){var r=n.left,i=t+r.subtreeSize,o=i+n.size;if(e<i){if(r.isNil)return this.treeOwner.sentinelNil;n=r}else{if(e<o)return n;var a=n.right;if(a.isNil)return this.treeOwner.sentinelNil;n=a,t=o}}return this},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.subtreeSize=null,this.size=null},t.prototype.initPooledSizeTreeNodeBaseSentinelNil=function(){e.prototype.initPooledRedBlackTreeNodeBaseSentinelNil.call(this),this.size=0,this.subtreeSize=0},t.prototype.initPooledSizeTreeNodeBase=function(t,n,r,i){e.prototype.initPooledRedBlackTreeNodeBase.call(this,t,n,r),this.size=i,this.subtreeSize=i},t}(i.PooledRedBlackTreeNodeBase);t.PooledSizeTreeNodeBase=o;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.root=null,t.sentinelNil=null,t}return r(t,e),Object.defineProperty(t.prototype,"totalSize",{get:function(){return this.root.subtreeSize},enumerable:!0,configurable:!0}),t.prototype.insertKeyValue=function(t,n){return e.prototype.insertKeyValue.call(this,t,n)},t.prototype.onNodeSizeChanged=function(e){this.augmentNodeUpToRoot(e)},t.prototype.searchNodeAtPosition=function(e){return e<0||e>=this.root.subtreeSize?this.sentinelNil:this.root.nodeAtPosition(e,0)},t.prototype.augmentNodeOnInsertionPathForNode=function(e,t){e.subtreeSize=e.subtreeSize+t.size},t.prototype.augmentNodeUpToRoot=function(e){for(;!e.isNil;)e.subtreeSize=e.size+e.left.subtreeSize+e.right.subtreeSize,e=e.parent},t.prototype.augmentNodesAfterRotate=function(e,t){e.subtreeSize=t.subtreeSize,t.subtreeSize=t.size+t.left.subtreeSize+t.right.subtreeSize},t.prototype.dbg_isValid=function(){return e.prototype.dbg_isValid.call(this)&&this.dbg_everyNodePositionIsCorrect},Object.defineProperty(t.prototype,"dbg_everyNodePositionIsCorrect",{get:function(){for(var e=this.minimumNode(this.root),t=0;!e.isNil;){if(e.start!==t)return!1;t+=e.size,e=this.successorNode(e)}return this.root.subtreeSize===t},enumerable:!0,configurable:!0}),t.prototype.initPooledSizeTreeBase=function(t,n){e.prototype.initPooledRedBlackTreeBase.call(this,t,n)},t}(i.PooledRedBlackTreeBase);t.PooledSizeTreeBase=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1043),t),i(n(1045),t),i(n(1046),t),i(n(1044),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTChangeAttributesOperation2=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.emitRedoStringEvent=function(e){this.emitAlterAttributesEvent(e)},t.prototype.emitUndoStringEvent=function(e){this.emitAlterAttributesEvent(e)},t.prototype.emitAlterAttributesEvent=function(e){var t=e.iteratorAt(this.codePointIndex),n=e.iteratorAt(this.codePointIndex+this.codePointCount);e.beginEditing(),e.didAlterAttributes(t,n),e.endEditing()},t.create=function(e,t,n,r){var i=this.alloc();return i.initWithString_undoCommands_codePointIndex_codePointCount(e,t,n,r),i.autorelease()},t}(n(1044).TTStringBase2EditOperation);t.TTChangeAttributesOperation2=i,i.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTStringBase2EditOperation=void 0;var i=n(909),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.codePointIndex=i.ZERO_CODE_POINT_INDEX,t.codePointCount=i.MIN_CODE_POINT_COUNT,t.undoCommands=[],t._redoCommands=[],t}return r(t,e),t.prototype.redo=function(){this.string.beginEditing();for(var e=0,t=this._redoCommands;e<t.length;e++)for(var n=0,r=t[e];n<r.length;n++){var i=r[n];this.string.applyRedoCommand(i)}this.emitRedoStringEvent(this.string),this.string.endEditing()},t.prototype.undo=function(){for(var e=0,t=this._redoCommands;e<t.length;e++)for(var n=0,r=t[e];n<r.length;n++)r[n].release();this._redoCommands.length=0,this.string.beginEditing();for(var i=0,o=this.undoCommands;i<o.length;i++){var a=o[i],s=[];this.string.applyUndoCommand(a,s);for(var c=0,u=s;c<u.length;c++)u[c].retain();s.reverse(),this._redoCommands.push(s)}this._redoCommands.reverse(),this.emitUndoStringEvent(this.string),this.string.endEditing()},t.prototype.emitDeleteEvent=function(e){var t=e.iteratorAt(this.codePointIndex);e.beginEditing(),e.didDelete(t,this.codePointCount),e.endEditing()},t.prototype.emitInsertEvent=function(e){var t=e.iteratorAt(this.codePointIndex),n=e.iteratorAt(this.codePointIndex+this.codePointCount);e.beginEditing(),e.didInsert(t,n),e.endEditing()},t.prototype.free=function(){for(var t=0,n=this._redoCommands;t<n.length;t++)for(var r=0,i=n[t];r<i.length;r++)i[r].release();this._redoCommands.length=0;for(var o=0,a=this.undoCommands;o<a.length;o++)a[o].release();this.undoCommands.length=0,e.prototype.free.call(this)},t.prototype.initWithString_undoCommands_codePointIndex_codePointCount=function(t,n,r,i){e.prototype.initStringOperationBase.call(this,t);for(var o=0,a=n;o<a.length;o++){var s=a[o];this.undoCommands.push(s.retain())}this.codePointIndex=r,this.codePointCount=i},t}(i.StringOperationBase);t.TTStringBase2EditOperation=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.TTDeleteOperation2=void 0;var o=n(891),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.emitRedoStringEvent=function(e){this.emitDeleteEvent(e)},t.prototype.emitUndoStringEvent=function(e){this.emitInsertEvent(e)},t.create=function(e,t,n,r){var i=this.alloc();return i.initWithString_undoCommands_codePointIndex_codePointCount(e,t,n,r),i.autorelease()},i([o.sealed],t)}(n(1044).TTStringBase2EditOperation);t.TTDeleteOperation2=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTInsertOperation2=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.emitRedoStringEvent=function(e){this.emitInsertEvent(e)},t.prototype.emitUndoStringEvent=function(e){this.emitDeleteEvent(e)},t.create=function(e,t,n,r){var i=this.alloc();return i.initWithString_undoCommands_codePointIndex_codePointCount(e,t,n,r),i.autorelease()},t}(n(1044).TTStringBase2EditOperation);t.TTInsertOperation2=i,i.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1048),t),i(n(1049),t),i(n(1055),t),i(n(1075),t),i(n(1076),t),i(n(1090),t),i(n(1093),t),i(n(1092),t),i(n(1094),t),i(n(1091),t),i(n(1080),t),i(n(1085),t),i(n(1086),t),i(n(1087),t),i(n(1088),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIN=t.rand=t.RAND_MAX=void 0,t.RAND_MAX=32768,t.rand=function(){return Math.floor(Math.random()*t.RAND_MAX)},t.MIN=Math.min},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1050),t),i(n(1069),t),i(n(1070),t),i(n(1068),t),i(n(1071),t),i(n(1067),t),i(n(1072),t),i(n(1060),t),i(n(1073),t),i(n(1061),t),i(n(1074),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NSAttributedString=t.createAttrDict=t.NSAttributedStringEnumerationLongestEffectiveRangeNotRequired=t.NSAttributedStringEnumerationReverse=t.NSAttributedStringEnumerationOptions=void 0;var s,c=n(909),u=n(1051),l=a(n(1054)),d=n(1055),p=n(1058),f=n(1059),h=n(1060),m=n(1061);!function(e){e[e.Reverse=2]="Reverse",e[e.LongestEffectiveRangeNotRequired=1048576]="LongestEffectiveRangeNotRequired"}(s=t.NSAttributedStringEnumerationOptions||(t.NSAttributedStringEnumerationOptions={})),t.NSAttributedStringEnumerationReverse=s.Reverse,t.NSAttributedStringEnumerationLongestEffectiveRangeNotRequired=s.LongestEffectiveRangeNotRequired;var g=[];t.createAttrDict=function(){return u.TTAttrDict.create()};var v=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._string=null,t._attributes=null,t}return r(i,e),i.prototype.dealloc=function(){this._attributes&&(this._attributes.free(),this._attributes=null),this._string&&(this._string.release(),this._string=null),e.prototype.dealloc.call(this)},i.prototype.isEqual=function(e){if(!(e instanceof i))return!1;if(null!==e._string&&null!==this._string){if(!e._string.isEqual(this._string))return!1}else if(0!==e.length||0!==this.length)return!1;return!0},i.prototype.copy=function(){return i.alloc().initWithAttributedString(this)},i.prototype.mutableCopy=function(){return n(1068).NSMutableAttributedString.alloc().initWithAttributedString(this)},Object.defineProperty(i.prototype,"length",{get:function(){return this._string?this._string.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"string",{get:function(){return m.NSString.stringWithString(this._string)},enumerable:!1,configurable:!0}),i.prototype.attributedSubstringFromRange=function(e){return this.substringWithRange(e)},i.prototype.substringWithRange=function(e){var t=h.NSMaxRange(e);if((e.location<0||t>this.length)&&p.throwNSRangeException({allowedRange:{start:0,end:this.length},invalidValue:e}),!this._string)return d.autorelease(i.alloc().init());var r=this._string.UTF16String.substring(e.location,t),o=n(1068),a=d.autorelease(o.NSMutableAttributedString.alloc().initWithString(r));if(!a)return a;for(var s={out:h.NSMakeRange(0,1)},c=e.location;c<t;){var u=this.attributesAtIndex_effectiveRange(c,s),l=s.out.length;s.out.location<c&&(l-=c-s.out.location);var f=Math.min(a.length,l,t-c);a.setAttributes_range(u,h.NSMakeRange(c-e.location,f)),c+=f}return a},i.prototype.attributesAtIndex_effectiveRange=function(e,t){(e<0||e>this.length)&&p.throwNSRangeException({allowedRange:{start:0,end:this.length},invalidValue:e}),g.length=0,this._attributes.leftClosedRightOpenIntervalSearchForAll(this._attributes.root,e,e+1,g);var n=g[0];return t&&(t.out=h.NSMakeRange(n.intervalLow,n.intervalHigh-n.intervalLow)),n.value},i.prototype.attributesAtIndex_longestEffectiveRange_inRange=function(e,t,n){(e<0||e>this.length)&&p.throwNSRangeException({allowedRange:{start:0,end:this.length},invalidValue:e}),(n.location<0||n.location+n.length>this.length)&&p.throwNSRangeException({allowedRange:{start:0,end:this.length-1},invalidValue:n});var r=i._reusableAttributeNodeArray;return this.getAttributeNodesInRange(e,e+1,r),t&&(t.out=h.NSMakeRange(Math.max(n.location,e),Math.min(h.NSMaxRange(n),r[0].intervalHigh-r[0].intervalLow))),r[0].value},i.prototype.getAttributeNodesInRange=function(e,t,n){n.length=0,this._attributes.leftClosedRightOpenIntervalSearchForAll(this._attributes.root,e,t,n)},i.prototype.getAttributeNodesInRangeSorted=function(e,t,n){this.getAttributeNodesInRange(e,t,n),n.sort((function(e,t){return e.intervalLow-t.intervalLow}))},i.prototype.enumerateAttributesInRange_options_usingBlock=function(e,n,r){var o=i._reusableAttributeNodeArray;this.getAttributeNodesInRange(e.location,h.NSMaxRange(e),o);var a={out:!1};function s(t){var n=Math.max(t.intervalLow,e.location),i=Math.min(t.intervalHigh,h.NSMaxRange(e));r(t.value,h.NSMakeRange(n,i-n),a)}if((n&t.NSAttributedStringEnumerationReverse)===t.NSAttributedStringEnumerationReverse)for(var c=o.length-1;c>=0&&!a.out;--c)s(o[c]);else{c=0;for(var u=o.length;c<u&&!a.out;++c)s(o[c])}},i.prototype.init=function(){var t=e.prototype.init.call(this);return t&&(t._attributes=f._PooledAttributeIntervalTree.create()),t},i.prototype.initWithString=function(e){var n=this.init();return n&&(e&&(n._string=n.createUnderlyingString(e).retain()),n._attributes.insertInterval(c.ZERO_CODE_UNIT_INDEX,n.length,t.createAttrDict())),n},i.prototype.initWithString_attributes=function(e,n){var r=this.init();return r&&(e&&(r._string=r.createUnderlyingString(e).retain()),r._attributes.insertInterval(c.ZERO_CODE_UNIT_INDEX,r.length,n||t.createAttrDict())),r},i.prototype.initWithAttributedString=function(t){var n=e.prototype.init.call(this);return n&&(t?(n._attributes=t._attributes.clone(),t._string&&(n.isMutable()?n._string=t._string.mutableCopy():n._string=t._string.copy())):n._attributes=f._PooledAttributeIntervalTree.create()),n},i.string=function(){return d.autorelease(this.alloc().init())},i.stringWithString=function(e){return d.autorelease(this.alloc().initWithString(e))},Object.defineProperty(i.prototype,"UTF16String",{get:function(){return this._string?this._string.UTF16String:""},enumerable:!1,configurable:!0}),i.prototype.codeUnitCount=function(){return this._string?this._string.codeUnitCount():c.MIN_CODE_UNIT_COUNT},i.prototype.codePointCount=function(){return this._string?this._string.codePointCount():c.MIN_CODE_POINT_COUNT},i.prototype.codeUnitIndexToCodePointIndex=function(e){return this._string?this._string.codeUnitIndexToCodePointIndex(e):c.ZERO_CODE_POINT_INDEX},i.prototype.codePointIndexToCodeUnitIndex=function(e){return this._string?this._string.codePointIndexToCodeUnitIndex(e):c.ZERO_CODE_UNIT_INDEX},i.prototype.isMutable=function(){return!1},i.prototype.createUnderlyingString=function(e){return e?m.NSString.alloc().initWithString(e).autorelease():m.NSString.alloc().init().autorelease()},i.extractUTF16String=function(e){return null===e?"":e instanceof m.NSString||e instanceof i?e.UTF16String:e},i.prototype.dbg_toJSON=function(){return{string:this.UTF16String,attributes:{nodes:this._attributes.dbg_nodes.map((function(e){return{interval:{low:e.intervalLow,high:e.intervalHigh},value:e.value.toProtobuf()}}))}}},Object.defineProperty(i.prototype,"dbg_attributes",{get:function(){for(var e=[],t=0,n=this._attributes.dbg_nodes;t<n.length;t++)for(var r=n[t],i=r.intervalHigh-r.intervalLow,o=0;o<i;++o)e.push(r.value);return e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dbg_superscriptAttributes",{get:function(){return"superscripts: "+this.dbg_attributes.map((function(e){return e.superscript})).join(", ")},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dbg_linearAttributes",{get:function(){return this._attributes.dbg_nodes.map((function(e){return e.value}))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dbg_linearAttributesKern",{get:function(){return this.dbg_linearAttributes.map((function(e){return e.kern}))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dbg_linearAttributesSuperscript",{get:function(){return this.dbg_linearAttributes.map((function(e){return e.superscript}))},enumerable:!1,configurable:!0}),i.prototype.dbg_assertAttributesValid=function(){},Object.defineProperty(i.prototype,"dbg_areAttributesValid",{get:function(){var e=this._attributes,t=!0;return 0===this.length?t=t&&0===e.nodeCount:this.length>0&&(t=(t=(t=t&&e.nodeCount>0)&&0===e.minimumNode(e.root).intervalLow)&&e.maximumNode(e.root).intervalHigh===this.length)&&e.inorderTreeWalkWithPredecessor(e.root,(function(e,n){t=t&&e.intervalLow===n.intervalHigh})),t},enumerable:!1,configurable:!0}),i.prototype.dbg_codeUnits=function(){return l.utf16StringToCodeUnits(this.UTF16String)},i.prototype.dbg_codePoints=function(){return l.utf16StringToCodePoints(this.UTF16String)},Object.defineProperty(i.prototype,"dbg_displayString",{get:function(){return this.UTF16String.replace(/\n/g,"\\n").replace(/\uFFFC/g,"\\uFFFC")},enumerable:!1,configurable:!0}),i.dbg_stringWithJSON=function(e){var t=this.alloc().init();if(t){t._string=t.createUnderlyingString(e.string);for(var n=0,r=e.attributes.nodes;n<r.length;n++){var i=r[n];t._attributes.insertInterval(i.interval.low,i.interval.high,u.TTAttrDict.createFromProtobuf(i.value))}}return d.autorelease(t)},i._reusableAttributeNodeArray=[],i}(d.NSObject);t.NSAttributedString=v,v.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},c=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.TopoTextAttributeDictionary=t.TTAttrDict=t.TTAttrDictKeys=t.TTParagraphStyleAttribute=t.ctWritingDirectionToProtobufWritingDirection=t.protobufWritingDirectionToCTWritingDirection=t.ctParagraphAlignmentToProtobufAlignment=t.protobufParagraphAlignmentToCTAlignment=t.TTFontAttribute=t.TTColorAttribute=t.TTToDoAttribute=t.TTAttachmentInfoAttribute=t.TTHashtagInfoAttribute=t.isNullOrUndefined=void 0;var u=n(909),l=s(n(1293)),d=n(911),p=s(n(1052)),f=s(n(1053));function h(e){return null===e||void 0===e}t.isNullOrUndefined=h;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.toProtobuf=function(){var e={};return h(this.objectIdentifier)||(e.objectIdentifier=this.objectIdentifier),e},t.createFromProtobuf=function(e){var t=this.create();return h(e.objectIdentifier)||(t=t.setObjectIdentifier(e.objectIdentifier)),t},a([d.uniqueProperty(null,d.UniqueKind.String),c("design:type",Object)],t.prototype,"objectIdentifier",void 0),t}(d.Unique);t.TTHashtagInfoAttribute=m,m.initializeUnique();var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.toProtobuf=function(){var e={};return h(this.attachmentIdentifier)||(e.attachmentIdentifier=this.attachmentIdentifier),h(this.typeUTI)||(e.typeUTI=this.typeUTI),e},t.createFromProtobuf=function(e){var t=this.create();return h(e.attachmentIdentifier)||(t=t.setAttachmentIdentifier(e.attachmentIdentifier)),h(e.typeUTI)||(t=t.setTypeUTI(e.typeUTI)),t},a([d.uniqueProperty(null,d.UniqueKind.String),c("design:type",Object)],t.prototype,"attachmentIdentifier",void 0),a([d.uniqueProperty(null,d.UniqueKind.String),c("design:type",Object)],t.prototype,"typeUTI",void 0),t}(d.Unique);t.TTAttachmentInfoAttribute=g,g.initializeUnique();var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.toProtobuf=function(){var e={};return h(this.toDoUUID)||(e.todoUUID=f.toBytes(this.toDoUUID)),h(this.done)||(e.done=this.done),e},t.createFromProtobuf=function(e){var t=this.create();if(!h(e.todoUUID)){var n=f.fromProtobufBuffer(e.todoUUID);t=t.setToDoUUID(n)}return h(e.done)||(t=t.setDone(Boolean(e.done))),t},a([d.uniqueProperty(null,d.UniqueKind.String),c("design:type",Object)],t.prototype,"toDoUUID",void 0),a([d.uniqueProperty(null,d.UniqueKind.Boolean),c("design:type",Object)],t.prototype,"done",void 0),t}(d.Unique);t.TTToDoAttribute=v,v.initializeUnique();var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.toProtobuf=function(){var e={};return h(this.red)||(e.red=this.red),h(this.green)||(e.green=this.green),h(this.blue)||(e.blue=this.blue),h(this.alpha)||(e.alpha=this.alpha),e},t.createFromProtobuf=function(e){var t=this.create();return h(e.red)||(t=t.setRed(e.red)),h(e.green)||(t=t.setGreen(e.green)),h(e.blue)||(t=t.setBlue(e.blue)),h(e.alpha)||(t=t.setAlpha(e.alpha)),t},a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"red",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"green",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"blue",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"alpha",void 0),t}(d.Unique);t.TTColorAttribute=y,y.initializeUnique();var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.createFromFontAttributeBase=function(e){if(e instanceof t)return e;var n=t.create();return h(e.name)||(n=n.setName(e.name)),h(e.size)||(n=n.setSize(e.size)),n},t.createFromProtobuf=function(e){var t=this.create();return h(e.name)||(t=t.setName(e.name)),h(e.pointSize)||(t=t.setSize(e.pointSize)),h(e.fontHints)||(t=t.setFontHints(e.fontHints)),t},t.toProtobuf=function(e){var n={};return h(e.name)||(n.name=e.name),h(e.size)||(n.pointSize=e.size),e instanceof t&&(h(e.fontHints)||(n.fontHints=e.fontHints)),n},a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"fontHints",void 0),t}(u.FontAttributeBase);function _(e){switch(e){case p.ParagraphStyle.Alignment.Left:return"left";case p.ParagraphStyle.Alignment.Center:return"center";case p.ParagraphStyle.Alignment.Right:return"right";case p.ParagraphStyle.Alignment.Justified:return"justified";default:return"natural"}}function C(e){switch(e){case"left":return p.ParagraphStyle.Alignment.Left;case"center":return p.ParagraphStyle.Alignment.Center;case"right":return p.ParagraphStyle.Alignment.Right;case"justified":return p.ParagraphStyle.Alignment.Justified;default:return p.ParagraphStyle.Alignment.Natural}}function I(e){switch(e){case p.AttributeRun.WritingDirection.LeftToRight:case p.AttributeRun.WritingDirection.LeftToRightOverride:return u.WritingDirectionAttribute.leftToRight;case p.AttributeRun.WritingDirection.RightToLeft:case p.AttributeRun.WritingDirection.RightToLeftOverride:return u.WritingDirectionAttribute.rightToLeft;default:return u.WritingDirectionAttribute.Natural}}function w(e){switch(e){case u.WritingDirectionAttribute.leftToRight:return p.AttributeRun.WritingDirection.LeftToRight;case u.WritingDirectionAttribute.rightToLeft:return p.AttributeRun.WritingDirection.RightToLeft;default:return p.AttributeRun.WritingDirection.NaturalDirection}}t.TTFontAttribute=b,b.initializeUnique(),t.protobufParagraphAlignmentToCTAlignment=_,t.ctParagraphAlignmentToProtobufAlignment=C,t.protobufWritingDirectionToCTWritingDirection=I,t.ctWritingDirectionToProtobufWritingDirection=w;var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.createFromParagraphStyleAttributeBase=function(e){if(e instanceof t)return e;var n=t.create();return h(e.alignment)||(n=n.setAlignment(e.alignment)),h(e.firstLineHeadIndent)||(n=n.setFirstLineHeadIndent(e.firstLineHeadIndent)),h(e.headIndent)||(n=n.setHeadIndent(e.headIndent)),h(e.tailIndent)||(n=n.setTailIndent(e.tailIndent)),h(e.lineHeightMultiple)||(n=n.setLineHeightMultiple(e.lineHeightMultiple)),h(e.maximumLineHeight)||(n=n.setMaximumLineHeight(e.maximumLineHeight)),h(e.lineSpacing)||(n=n.setLineSpacing(e.lineSpacing)),h(e.paragraphSpacing)||(n=n.setParagraphSpacing(e.paragraphSpacing)),h(e.paragraphSpacingBefore)||(n=n.setParagraphSpacingBefore(e.paragraphSpacingBefore)),n},t.createFromProtobuf=function(e){var t=this.create();return h(e.alignment)||(t=t.setAlignment(_(e.alignment))),h(e.style)||(t=t.setStyle(e.style)),h(e.writingDirection)||(t=t.setWritingDirection(I(e.writingDirection))),h(e.indent)||(t=t.setIndent(e.indent)),h(e.todo)||(t=t.setToDo(v.createFromProtobuf(e.todo))),h(e.paragraphHints)||(t=t.setParagraphHints(e.paragraphHints)),h(e.startingListItemNumber)||(t=t.setStartingListItemNumber(e.startingListItemNumber)),t},t.toProtobuf=function(e){var n={};return h(e.alignment)||(n.alignment=C(e.alignment)),e instanceof t&&(h(e.style)||(n.style=e.style),h(e.writingDirection)||(n.writingDirection=w(e.writingDirection)),h(e.indent)||(n.indent=e.indent),h(e.toDo)||(n.todo=e.toDo.toProtobuf()),h(e.paragraphHints)||(n.paragraphHints=e.paragraphHints),h(e.startingListItemNumber)||(n.startingListItemNumber=e.startingListItemNumber)),n},a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"style",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"writingDirection",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"indent",void 0),a([d.uniqueProperty(null,d.UniqueKind.Unique),c("design:type",Object)],t.prototype,"toDo",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"paragraphHints",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],t.prototype,"startingListItemNumber",void 0),t}(u.ParagraphStyleAttributeBase);t.TTParagraphStyleAttribute=E,E.initializeUnique(),t.TTAttrDictKeys=u.AttrDictKeys.concat(["fontHints","color","attachmentInfo","style","TTArrayAttachment","hashtagInfo"]);var S=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),n.prototype.dictionaryKeys=function(){return t.TTAttrDictKeys},n.prototype.toProtobuf=function(){var e={length:0};return h(this.underlineStyle)||(e.underline=this.underlineStyle),h(this.strikethroughStyle)||(e.strikethrough=this.strikethroughStyle),h(this.superscript)||(e.superscript=this.superscript),h(this.link)||(e.link=this.link),h(this.writingDirection)||(e.writingDirection=w(this.writingDirection)),h(this.paragraphStyle)||(e.paragraphStyle=E.toProtobuf(this.paragraphStyle)),h(this.font)||(e.font=b.toProtobuf(this.font)),h(this.fontHints)||(e.fontHints=this.fontHints),h(this.style)||(e.style=this.style),h(this.color)||(e.color=this.color.toProtobuf()),h(this.attachmentInfo)||(e.attachmentInfo=this.attachmentInfo.toProtobuf()),h(this.hashtagInfo)||(e.hashtagInfo=this.hashtagInfo.toProtobuf()),e},n.createFromProtobuf=function(e){var t=this.create();t=h(e.underline)?t.setUnderlineStyle(null):t.setUnderlineStyle(e.underline),t=h(e.strikethrough)?t.setStrikethroughStyle(null):t.setStrikethroughStyle(e.strikethrough),t=h(e.superscript)?t.setSuperscript(null):t.setSuperscript(e.superscript);var n=e.link&&l.safeURL(e.link);return t=n?t.setLink(n):t.setLink(null),t=h(e.writingDirection)?t.setWritingDirection(null):t.setWritingDirection(I(e.writingDirection)),t=h(e.paragraphStyle)?t.setParagraphStyle(null):t.setParagraphStyle(E.createFromProtobuf(e.paragraphStyle)),t=h(e.font)?t.setFont(null):t.setFont(b.createFromProtobuf(e.font)),t=h(e.fontHints)?t.setFontHints(null):t.setFontHints(e.fontHints),t=h(e.style)?t.setStyle(null):t.setStyle(e.style),t=h(e.color)?t.setColor(null):t.setColor(y.createFromProtobuf(e.color)),t=h(e.attachmentInfo)?t.setAttachmentInfo(null):t.setAttachmentInfo(g.createFromProtobuf(e.attachmentInfo)),h(e.hashtagInfo)?t.setHashtagInfo(null):t.setHashtagInfo(m.createFromProtobuf(e.hashtagInfo))},n.createFromIAttrDict=function(e){if(e instanceof n)return e;var t=n.create();if(!e)return t;h(e.attachment)||(t=t.setAttachment(e.attachment)),h(e.backgroundColor)||(t=t.setBackgroundColor(e.backgroundColor)),h(e.baselineOffset)||(t=t.setBaselineOffset(e.baselineOffset)),h(e.cursor)||(t=t.setCursor(e.cursor)),h(e.expansion)||(t=t.setExpansion(e.expansion)),h(e.font)||(t=t.setFont(b.createFromFontAttributeBase(e.font))),h(e.foregroundColor)||(t=t.setForegroundColor(e.foregroundColor)),h(e.kern)||(t=t.setKern(e.kern)),h(e.ligature)||(t=t.setLigature(e.ligature));var r=e.link&&l.safeURL(e.link);return r&&(t=t.setLink(r)),h(e.markedClauseSegment)||(t=t.setMarkedClauseSegment(e.markedClauseSegment)),h(e.obliqueness)||(t=t.setObliqueness(e.obliqueness)),h(e.paragraphStyle)||(t=t.setParagraphStyle(E.createFromParagraphStyleAttributeBase(e.paragraphStyle))),h(e.shadow)||(t=t.setShadow(e.shadow)),h(e.spellingState)||(t=t.setSpellingState(e.spellingState)),h(e.strikethroughColor)||(t=t.setStrikethroughColor(e.strikethroughColor)),h(e.strikethroughStyle)||(t=t.setStrikethroughStyle(e.strikethroughStyle)),h(e.strokeColor)||(t=t.setStrokeColor(e.strokeColor)),h(e.strokeWidth)||(t=t.setStrokeWidth(e.strokeWidth)),h(e.superscript)||(t=t.setSuperscript(e.superscript)),h(e.textEffect)||(t=t.setTextEffect(e.textEffect)),h(e.toolTip)||(t=t.setToolTip(e.toolTip)),h(e.underlineColor)||(t=t.setUnderlineColor(e.underlineColor)),h(e.underlineStyle)||(t=t.setUnderlineStyle(e.underlineStyle)),h(e.verticalGlyphForm)||(t=t.setVerticalGlyphForm(e.verticalGlyphForm)),h(e.writingDirection)||(t=t.setWritingDirection(e.writingDirection)),t},a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],n.prototype,"fontHints",void 0),a([d.uniqueProperty(null,d.UniqueKind.Unique),c("design:type",Object)],n.prototype,"color",void 0),a([d.uniqueProperty(null,d.UniqueKind.Number),c("design:type",Object)],n.prototype,"style",void 0),a([d.uniqueProperty(null,d.UniqueKind.Unique),c("design:type",Object)],n.prototype,"attachmentInfo",void 0),a([d.uniqueProperty(null,d.UniqueKind.String),c("design:type",Object)],n.prototype,"TTArrayAttachment",void 0),a([d.uniqueProperty(null,d.UniqueKind.Unique),c("design:type",Object)],n.prototype,"hashtagInfo",void 0),n}(u.AttrDictBase);t.TTAttrDict=S,S.initializeUnique(),t.TopoTextAttributeDictionary=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParagraphStyle=t.AttributeRun=t.Selection=void 0,function(e){var t;(t=e.Affinity||(e.Affinity={}))[t.Backward=0]="Backward",t[t.Forward=1]="Forward"}(t.Selection||(t.Selection={})),function(e){var t;(t=e.WritingDirection||(e.WritingDirection={}))[t.NaturalDirection=0]="NaturalDirection",t[t.LeftToRight=1]="LeftToRight",t[t.RightToLeft=2]="RightToLeft",t[t.LeftToRightOverride=3]="LeftToRightOverride",t[t.RightToLeftOverride=4]="RightToLeftOverride"}(t.AttributeRun||(t.AttributeRun={})),function(e){var t;(t=e.Alignment||(e.Alignment={}))[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Justified=3]="Justified",t[t.Natural=4]="Natural"}(t.ParagraphStyle||(t.ParagraphStyle={}))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.UUIDComparator=t.compare=t.fromProtobufBuffer=t.toBytes=t.fromBytes=t.fromString=t.random=t.UUID_BYTE_COUNT=void 0;var i=n(972),o=n(891);t.UUID_BYTE_COUNT=16,t.random=function(){for(var e="",t=0;t<32;++t)e+="0123456789abcdef"[Math.floor(16*Math.random())];return e};var a=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return e}(),s=function(){for(var e={},t=0;t<16;t++){var n=t.toString(16);e[n.toUpperCase()]=t,e[n.toLowerCase()]=t}return e}();function c(e){e.length!==t.UUID_BYTE_COUNT&&o.fatalError("UUIDModule.fromBytes invalid byte array",{});for(var n="",r=0;r<t.UUID_BYTE_COUNT;++r){var i=e[r];n+=a[i]}return n}function u(e){for(var n=new Uint8Array(t.UUID_BYTE_COUNT),r=0;r<t.UUID_BYTE_COUNT;++r)n[r]=(s[e[2*r]]<<4)+s[e[2*r+1]];return n}t.fromString=function(e){return c(u(e))},t.fromBytes=c,t.toBytes=u;var l=[];function d(e,t){return e<t?-1:e>t?1:0}t.fromProtobufBuffer=function(e){var n=null;if(e){var r=e;if(r.view){var i=r.view;n=c(new Uint8Array(i.buffer,i.byteOffset+r.offset,r.limit-r.offset))}else if(e.buffer)n=c(e);else{var o=function(e){if(l.length=0,e instanceof Object){var n=Object.keys(e);if(n.length!==t.UUID_BYTE_COUNT)return null;for(var r=0;r<t.UUID_BYTE_COUNT;++r){if(n[r]!==r.toString())return null;l.push(e[r])}}return new Uint8Array(l)}(e);o&&(n=c(o))}}return n},t.compare=d;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t){return d(e,t)},t.instance=new t,t}(i.ComparatorBase);t.UUIDComparator=p},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.castToSigned32bit=t.uniqueID=t.utf16StringCodePointIndexForCodeUnitIndex=t.utf16StringCodeUnitIndexForCodePointIndex=t.codePointCodeUnitCount=t.codePointsToCodeUnits=t.surrogatePairToCodePoint=t.isTrailingSurrogate=t.isLeadingSurrogate=t.isASingleCodeUnit=t.utf16StringToPooledUint16ArrayOfCodeUnits=t.utf16StringToCodeUnits=t.codeUnitsToUTF16String=t.codePointsToUTF16String=t.codePointCountInUtf16String=t.codePointCountInUtf16StringCodeUnitIndexRange=t.utf16StringToCodePoints=t.utf8ArrayBufferToCodePoints=t.stableMergeSort=t.binarySearchWithComparator=t.binarySearch=void 0;var a=o(n(942)),s=n(909),c=n(891);function u(e,t,n){for(var r=0,i=t,o=0;i<e.length&&r<n;){var a=e.charCodeAt(i);if(++i,++r,l(a))++o;else if(d(a)){var s=e.charCodeAt(i);++i,++r,p(s)&&++o}}return o}function l(e){return e<55296||e>57343}function d(e){return 55296<=e&&e<=56319}function p(e){return 56320<=e&&e<=57343}function f(e,t){return((1023&e)<<10)+(1023&t)+65536}t.binarySearch=function(e,t){var n,r,i=0,o=e.length-1;if(o<0)return-1;do{if((r=e[n=Math.floor(i/2+o/2)])>t)o=n-1;else{if(!(r<t))return n;i=n+1}}while(i<=o);return-(n+(r<t?2:1))},t.binarySearchWithComparator=function(e,t){var n,r,i=0,o=e.length-1;if(o<0)return-1;do{if((r=t(e[n=Math.floor(i/2+o/2)]))>0)o=n-1;else{if(!(r<0))return n;i=n+1}}while(i<=o);return-(n+(r<0?2:1))},t.stableMergeSort=function e(t,n){if(t.length<=1)return[].concat(t);for(var r=Math.floor(t.length/2),i=e(t.slice(0,r),n),o=e(t.slice(r,t.length),n),a=[];i.length>0&&o.length>0;)n(i[0],o[0])<=0?a.push(i.shift()):a.push(o.shift());for(;i.length>0;)a.push(i.shift());for(;o.length>0;)a.push(o.shift());return a},t.utf8ArrayBufferToCodePoints=function(e){var t=new Uint8Array(e);return a.utf8ByteArrayToCodePoints(t)},t.utf16StringToCodePoints=function(e){for(var t=[],n=0;n<e.length;){var r=e.charCodeAt(n++);if(r<55296||r>57343)t.push(r);else{if(!(55296<=r&&r<=56319))continue;var i=e.charCodeAt(n++);if(!(56320<=i&&i<=57343))continue;t.push(((1023&r)<<10)+(1023&i)+65536)}}return t},t.codePointCountInUtf16StringCodeUnitIndexRange=u,t.codePointCountInUtf16String=function(e){return u(e,0,e.length)},t.codePointsToUTF16String=a.codePointsToUTF16String,t.codeUnitsToUTF16String=function(e,t){var n="";if(e)for(var r=0,i=t||e.length;r<i;++r){var o=e[r];if(d(o)){var a=e[r+1];n+=String.fromCodePoint(f(o,a)),++r}else n+=String.fromCodePoint(o)}return n},t.utf16StringToCodeUnits=function(e){for(var t=new Array(e.length),n=0,r=e.length;n<r;++n)t[n]=e.charCodeAt(n);return t},t.utf16StringToPooledUint16ArrayOfCodeUnits=function(e){var t=c.TypedArrayByLengthPool.uint16Arrays.borrow(e.length);t.fill(-1,e.length);for(var n=0,r=e.length;n<r;++n)t[n]=e.charCodeAt(n);return t},t.isASingleCodeUnit=l,t.isLeadingSurrogate=d,t.isTrailingSurrogate=p,t.surrogatePairToCodePoint=f,t.codePointsToCodeUnits=function(e){for(var t=[],n=0,r=e.length;n<r;++n)for(var i=String.fromCodePoint(e[n]),o=0,a=i.length;o<a;++o)t.push(i.charCodeAt(o));return t},t.codePointCodeUnitCount=function(e){return String.fromCodePoint(e).length},t.utf16StringCodeUnitIndexForCodePointIndex=function(e,t){if(t<0)return-1;if(0===e.length)return s.ZERO_CODE_UNIT_INDEX;for(var n=s.ZERO_CODE_UNIT_INDEX,r=s.ZERO_CODE_POINT_INDEX;n<e.length&&r<t;)d(e.charCodeAt(n))&&++n,++n,++r;return n},t.utf16StringCodePointIndexForCodeUnitIndex=function(e,t){if(t<0)return-1;for(var n=s.ZERO_CODE_UNIT_INDEX,r=s.ZERO_CODE_POINT_INDEX;n<e.length&&s.CodeUnitIndexOps.is.lessThan(n,t);)d(e.charCodeAt(n))&&++n,++n,++r;return r},t.uniqueID=function(){var e=0,t=new WeakMap;return function(n){return t.has(n)||t.set(n,++e),t.get(n)}}(),t.castToSigned32bit=function(e){return e<<0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1056),t),i(n(1057),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YES=t.NO=void 0,t.NO=!1,t.YES=!0},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.retain=t.autorelease=t.NSObject=void 0;var i=n(891),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.copy=function(){i.fatalError("Not implemented",{})},t.prototype.mutableCopy=function(){i.fatalError("Not implemented",{})},t.prototype.isEqual=function(e){i.fatalError("Not implemented",{})},t.prototype.init=function(){return this},t.prototype.dealloc=function(){},t.new=function(){return this.alloc().init()},t.prototype.free=function(){this.dealloc(),e.prototype.free.call(this)},t}(i.Refcounted);t.NSObject=o,t.autorelease=function(e){return e?e.autorelease():null},t.retain=function(e){return e?e.retain():null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwNSRangeException=void 0;var r=n(891);t.throwNSRangeException=function(e){r.fatalError("NSRangeException",e||{})}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t._PooledAttributeIntervalTree=t._PooledAttributeIntervalTreeNode=t.CodeUnitIndexIntervalComparator=t.CodeUnitIndexComparator=void 0;var a=n(972),s=n(891),c=n(1024),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t){return e-t},i([s.sealed],t)}(a.ComparatorBase);t.CodeUnitIndexComparator=u;var l=function(e){function t(t){return e.call(this,t)||this}return r(t,e),i([s.sealed,o("design:paramtypes",[u])],t)}(a.IntervalComparatorBase);t.CodeUnitIndexIntervalComparator=l;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.treeOwner=null,t}return r(t,e),t.prototype.setValue=function(t,n){void 0===n&&(n=!0),this.value!==t&&(this.value&&this.value.release(),e.prototype.setValue.call(this,t?t.retain():null,n))},Object.defineProperty(t.prototype,"dbg_intervalAndKernString",{get:function(){return"{["+this.intervalLow+".."+this.intervalHigh+") = "+(this.value?this.value.kern:this.value)+"}"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_intervalString",{get:function(){return"["+this.intervalLow+".."+this.intervalHigh+")"},enumerable:!1,configurable:!0}),t.prototype.free=function(){this.isNil||(this.value&&this.value.release(),this.value=null,this.key=null,this._intervalHigh=null),this.max&&(this.max=null),e.prototype.free.call(this)},t.createSentinelNil=function(e){var t=this.alloc_own();return t.initPooledIntervalTreeNodeBaseSentinelNil(e),t},t.create=function(e,t,n,r){var i=this.alloc();return i.initPooledIntervalTreeNodeBase(e,t,n,r?r.retain():null),i},i([s.sealed],t)}(c.PooledIntervalTreeNodeBase);t._PooledAttributeIntervalTreeNode=d,d.initializePooled();var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._reusableNodesToInsert=[],t._reusableNodesToDispose=[],t._reusableNodesFound=[],t._shifter=null,t._differenceCalculator=null,t}var n;return r(t,e),n=t,t.prototype.closedIntervalSearchForAllEnclosed=function(e,t,n){for(var r=[],i=[e];i.length>0;){var o=i.pop();o.isNil||(this.intervalComparator.doesClosedIntervalEnclose(t,n,o.intervalLow,o.intervalHigh)&&r.push(o),this.keyComparator.lessThanOrEqualTo(t,o.left.max)&&i.push(o.left),this.keyComparator.greaterThanOrEqualTo(o.right.max,t)&&i.push(o.right))}return r},t.prototype.clone=function(){return n.createCloneOf(this)},t.prototype.disposeInterval=function(t,n){var r=this;if(!this.root.isNil){var i=[];if(this.closedIntervalSearchForAll(this.root,t,n,i),0!==i.length){this._reusableNodesToInsert.length=0,this._reusableNodesToDispose.length=0;for(var o=0,a=i.length;o<a;++o){var s=i[o];if(this.intervalComparator.doesClosedIntervalEnclose(t,n,s.intervalLow,s.intervalHigh))this._reusableNodesToDispose.push(s);else if(this.keyComparator.lessThan(t,s.intervalLow)&&this.keyComparator.lessThan(s.intervalLow,n)){var c=this.onWillInsertKeyValue(n,s.value,{high:s.intervalHigh});this._reusableNodesToInsert.push(c),this._reusableNodesToDispose.push(s)}else this.keyComparator.lessThan(t,s.intervalHigh)&&this.keyComparator.lessThan(s.intervalHigh,n)&&(c=this.onWillInsertKeyValue(s.intervalLow,s.value,{high:t}),this._reusableNodesToInsert.push(c),this._reusableNodesToDispose.push(s))}this._reusableNodesToDispose.forEach((function(t){e.prototype.deleteNode.call(r,t).free()})),this._reusableNodesToInsert.sort((function(e,t){var n=r.keyComparator.compare(e.intervalLow,t.intervalLow);return 0!==n?n:r.keyComparator.compare(e.intervalHigh,t.intervalHigh)})),this._reusableNodesToInsert.forEach((function(t){e.prototype.insertNode.call(r,t)}));var u=this._differenceCalculator(t,n);this.inorderTreeWalk(this.root,(function(e){r.keyComparator.greaterThanOrEqualTo(e.intervalLow,n)?(e.setIntervalLowAndHigh(r._shifter(e.intervalLow,u),r._shifter(e.intervalHigh,u),!1),r.augmentNodeUpToRoot(e)):r.keyComparator.greaterThanOrEqualTo(e.intervalHigh,n)&&(e.setIntervalHigh(r._shifter(e.intervalHigh,u),!1),r.augmentNodeUpToRoot(e))}))}}},t.prototype.closedSliceNodes=function(t,n,r){r.length=0;var i=[];this.closedIntervalSearchForAll(this.root,t,n,i);for(var o=0,a=i.length;o<a;++o){var s=i[o];if(this.intervalComparator.doesClosedIntervalEnclose(t,n,s.intervalLow,s.intervalHigh))r.push(s);else if(this.keyComparator.lessThan(s.intervalLow,t)&&this.keyComparator.lessThanOrEqualTo(s.intervalHigh,n)){if(!this.keyComparator.equalTo(t,s.intervalHigh)){var c=this.onWillInsertKeyValue(t,s.value,{high:s.intervalHigh});s.setIntervalHigh(t,!1),e.prototype.insertNode.call(this,c),r.push(c)}}else if(this.keyComparator.greaterThanOrEqualTo(s.intervalLow,t)&&this.keyComparator.greaterThan(s.intervalHigh,n))this.keyComparator.equalTo(s.intervalLow,n)||(c=this.onWillInsertKeyValue(s.intervalLow,s.value,{high:n}),s.setIntervalLow(n,!1),e.prototype.insertNode.call(this,c),r.push(c));else{var u=this.onWillInsertKeyValue(s.intervalLow,s.value,{high:t}),l=this.onWillInsertKeyValue(n,s.value,{high:s.intervalHigh});s.setIntervalLowAndHigh(t,n,!1),e.prototype.insertNode.call(this,u),e.prototype.insertNode.call(this,l),r.push(s)}}r.sort(this.nodeCompareFn.bind(this))},t.prototype.leftClosedRightOpenIntervalSearchForAll=function(e,t,n,r){r.length=0;var i=this._reusableNodeStack;for(i.length=0,i.push(e);i.length>0;){var o=i.pop();o.isNil||(this.doesLhsLeftClosedRightOpenIntervalOverlapClosedRhsInterval(t,n,o.intervalLow,o.intervalHigh)&&r.push(o),this.keyComparator.lessThanOrEqualTo(t,o.left.max)&&i.push(o.left),this.keyComparator.greaterThanOrEqualTo(o.right.max,t)&&i.push(o.right))}},t.prototype.doesLhsLeftClosedRightOpenIntervalOverlapClosedRhsInterval=function(e,t,n,r){return this.intervalComparator.endPointComparator.lessThan(e,r)&&this.intervalComparator.endPointComparator.lessThan(n,t)},t.prototype.mergeMatchingAdjacentNodes=function(e){var t=this.predecessorNode(e),n=this.successorNode(e);return!t.isNil&&e.value===t.value&&this.keyComparator.equalTo(t.intervalHigh,e.intervalLow)?(!n.isNil&&e.value===n.value&&this.keyComparator.equalTo(e.intervalHigh,n.intervalLow)?(t.setIntervalHigh(n.intervalHigh),this.deleteNode(n).free()):t.setIntervalHigh(e.intervalHigh),this.deleteNode(e).free(),t):!n.isNil&&e.value===n.value&&this.keyComparator.equalTo(e.intervalHigh,n.intervalLow)?(e.setIntervalHigh(n.intervalHigh),this.deleteNode(n).free(),e):e},t.prototype.mergeMatchingNodesInInterval=function(e,t){if(!this._keyComparator.equalTo(e,t)){this._reusableNodesFound.length=0,this.closedSliceNodes(e,t,this._reusableNodesFound);for(var n=0,r=this._reusableNodesFound;n<r.length;n++){var i=r[n];i.isFreed||this.mergeMatchingAdjacentNodes(i)}}},t.prototype.onWillInsertKeyValue=function(e,t,n){return d.create(this,e,n.high,t)},t.prototype.nodeCompareFn=function(e,t){return this.intervalComparator.compare(e.intervalLow,e.intervalHigh,t.intervalLow,t.intervalHigh)},Object.defineProperty(t.prototype,"dbg_intervalStrings",{get:function(){var e=[];return this.inorderNodes(this.root,e),e.map((function(e){return e.dbg_intervalString})).join(", ")},enumerable:!1,configurable:!0}),t.create=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=function(e,t){return e+t}),void 0===n&&(n=function(e,t){return e-t});var r=this.alloc_own();return r.initPooledIntervalTreeBase(d.createSentinelNil(e),new l(new u),e),r._shifter=t,r._differenceCalculator=n,r},t.createCloneOf=function(e){var t=this.alloc_own();return t.initPooledIntervalTreeBase(d.createSentinelNil(e._keyMin),new l(new u),e._keyMin),t._shifter=e._shifter,t._differenceCalculator=e._differenceCalculator,e.inorderTreeWalk(e.root,(function(e){t.insertInterval(e.intervalLow,e.intervalHigh,e.value)})),t},n=i([s.sealed],t)}(c.PooledIntervalTreeBase);t._PooledAttributeIntervalTree=p,p.initializePooled()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NSIntersectionRange=t.NSUnionRange=t.NSEqualRanges=t.NSLocationInRange=t.NSMaxRange=t.NSMakeRange=t.NSRange=void 0;var r=function(){function e(e,t){this.location=e,this.length=t}return e.prototype.clone=function(){return new e(this.location,this.length)},e}();function i(e,t){return new r(e,t)}t.NSRange=r,t.NSMakeRange=i,t.NSMaxRange=function(e){return e.location+e.length},t.NSLocationInRange=function(e,t){return!(e<t.location)&&e-t.location<t.length},t.NSEqualRanges=function(e,t){return e.location===t.location&&e.length===t.length},t.NSUnionRange=function(e,t){var n=e.location+e.length,r=t.location+t.length,o=n<r?r:n,a=e.location<t.location?e.location:t.location;return i(a,o-a)},t.NSIntersectionRange=function(e,t){var n=e.location+e.length,r=t.location+t.length,o=n<r?n:r;return t.location<=e.location&&e.location<r?i(e.location,o-e.location):e.location<=t.location&&t.location<n?i(t.location,o-t.location):i(0,0)}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NSString=t.GUARD_CODE_UNIT_INDEX=t.GUARD_CODE_POINT_INDEX=void 0;var s=n(909),c=a(n(1054)),u=n(1055),l=n(1062);t.GUARD_CODE_POINT_INDEX=-1,t.GUARD_CODE_UNIT_INDEX=-1;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._string="",t._codePointCount=s.MIN_CODE_POINT_COUNT,t._charIndexMap=null,t}return r(t,e),t.prototype.dealloc=function(){this._string="",this._charIndexMap&&(this._charIndexMap.free(),this._charIndexMap=null),e.prototype.dealloc.call(this)},t.prototype.isEqual=function(e){return e instanceof t&&e._string===this._string},t.prototype.copy=function(){return t.alloc().initWithString(this._string)},t.prototype.mutableCopy=function(){return n(1067).NSMutableString.alloc().initWithString(this._string)},Object.defineProperty(t.prototype,"length",{get:function(){return this._string.length},enumerable:!1,configurable:!0}),t.prototype.substringWithRange=function(e){var n=this._string.substring(e.location,e.location+e.length);return u.autorelease(t.alloc().initWithString(n))},t.prototype.initWithString=function(e){var n=this.init();return n&&(n._string=t.extractUTF16String(e),n.initIndexMaps()),n},t.string=function(){return u.autorelease(this.alloc().init())},t.stringWithString=function(e){return u.autorelease(this.alloc().initWithString(e))},Object.defineProperty(t.prototype,"UTF16String",{get:function(){return this._string},enumerable:!1,configurable:!0}),t.prototype.codeUnitCount=function(){return this.length},t.prototype.codePointCount=function(){return this._codePointCount},t.prototype.codeUnitIndexToCodePointIndex=function(e){return this._charIndexMap.codePointIndexFromCodeUnitIndex(e)},t.prototype.codePointIndexToCodeUnitIndex=function(e){return this._charIndexMap.codeUnitIndexFromCodePointIndex(e)},t.extractUTF16String=function(e){return null===e?"":e instanceof t?e._string:e},t.prototype.initIndexMaps=function(){this._charIndexMap=l.PooledCharIndexMap.createWithUTF16String(this._string),this._codePointCount=this._charIndexMap.totalCodePointCount()},t.prototype.dbg_codeUnits=function(){return c.utf16StringToCodeUnits(this.UTF16String)},t.prototype.dbg_codePoints=function(){return c.utf16StringToCodePoints(this.UTF16String)},Object.defineProperty(t.prototype,"dbg_displayString",{get:function(){return this.UTF16String.replace(/\n/g,"\\n").replace(/\uFFFC/g,"\\uFFFC")},enumerable:!1,configurable:!0}),t}(u.NSObject);t.NSString=d,d.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1063),t),i(n(1064),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PooledCharIndexMap=t.PooledCharIndexMapNode=t.isCodePointIndexUndefined=t.UNDEFINED_CODE_POINT_INDEX=t.UNDEFINED_CODE_UNIT_INDEX=t.isCodePointCountUndefined=void 0;var i=n(909),o=n(1024),a=n(1064);function s(e){return e===a.UNDEFINED_CODE_POINT_COUNT||isNaN(e)}t.isCodePointCountUndefined=s,t.UNDEFINED_CODE_UNIT_INDEX=void 0,t.UNDEFINED_CODE_POINT_INDEX=void 0,t.isCodePointIndexUndefined=function(e){return e===t.UNDEFINED_CODE_POINT_INDEX||isNaN(e)};var c=function(e){function t(){var t=e.call(this)||this;return t.treeOwner=null,t.subtreeCodeUnitCount=null,t.subtreeCodePointCount=a.UNDEFINED_CODE_POINT_COUNT,t.codeUnitCount=null,t.codePointCount=a.UNDEFINED_CODE_POINT_COUNT,t}return r(t,e),t.prototype.realizedCodePointCount=function(){return s(this.codePointCount)&&this.treeOwner.onRealizeNodeCodePointCount(this),this.codePointCount},t.prototype.realizedSubtreeCodePointCount=function(){return s(this.subtreeCodePointCount)&&this.treeOwner.onRealizeNodeSubtreeCodePointCount(this),isNaN(this.subtreeCodePointCount)&&this.treeOwner.onRealizeNodeSubtreeCodePointCount(this),this.subtreeCodePointCount},t.prototype.setCodePointCount=function(e){this.codePointCount!==e&&(this.codePointCount=e,this.treeOwner.onNodeCodePointCountChanged(this))},t.prototype.setCodeUnitCountAndCodePointCount=function(e,t){this.codeUnitCount===e&&this.codePointCount===t||(this.codeUnitCount=e,this.codePointCount=t,this.treeOwner.onNodeCharacterCountChanged(this))},t.prototype.codeUnitIndexLow=function(){var e=i.ZERO_CODE_UNIT_INDEX;e=i.CodeUnitIndexOps.add(e,this.left.subtreeCodeUnitCount);for(var t=this.parent,n=this;!t.isNil;)n===t.right&&(e=i.CodeUnitIndexOps.add(e,t.left.subtreeCodeUnitCount),e=i.CodeUnitIndexOps.add(e,t.codeUnitCount)),t=(n=t).parent;return e},t.prototype.codePointIndexLow=function(){var e=i.ZERO_CODE_POINT_INDEX;e=i.CodePointIndexOps.add(e,this.left.realizedSubtreeCodePointCount());for(var t=this.parent,n=this;!t.isNil;)n===t.right&&(e=i.CodePointIndexOps.add(e,t.left.realizedSubtreeCodePointCount()),e=i.CodePointIndexOps.add(e,t.realizedCodePointCount())),t=(n=t).parent;return e},t.prototype.codeUnitIndexHigh=function(){return i.CodeUnitIndexOps.add(this.codeUnitIndexLow(),this.codeUnitCount)},t.prototype.codePointIndexHigh=function(){return i.CodePointIndexOps.add(this.codePointIndexLow(),this.realizedCodePointCount())},t.prototype.codeUnitIndexHighFromLow=function(e){return i.CodeUnitIndexOps.add(e,this.codeUnitCount)},t.prototype.codePointIndexHighFromLow=function(e){return i.CodePointIndexOps.add(e,this.codePointCount)},t.prototype.nodeAtCodeUnitIndex=function(e,t){for(var n=this;!n.isNil;){var r=n.left,o=r.subtreeCodeUnitCount,a=i.CodeUnitIndexOps.add(t,o),s=n.codeUnitCount,c=i.CodeUnitIndexOps.add(a,s);if(i.CodeUnitIndexOps.is.lessThan(e,a)){if(r.isNil)return this.treeOwner.sentinelNil;n=r}else{if(i.CodeUnitIndexOps.is.lessThan(e,c))return n;var u=n.right;if(u.isNil)return this.treeOwner.sentinelNil;n=u,t=c}}return this},t.prototype.nodeAtCodePointIndex=function(e,t){for(var n=this;!n.isNil;){var r=n.left,o=r.realizedSubtreeCodePointCount(),a=i.CodePointIndexOps.add(t,o),s=n.realizedCodePointCount(),c=i.CodePointIndexOps.add(a,s);if(i.CodePointIndexOps.is.lessThan(e,a)){if(r.isNil)return this.treeOwner.sentinelNil;n=r}else{if(i.CodePointIndexOps.is.lessThan(e,c))return n;var u=n.right;if(u.isNil)return this.treeOwner.sentinelNil;n=u,t=c}}return this},t.prototype.dbg_formattedKey=function(){return this.key.dbg_arrays},t.prototype.free=function(){this.subtreeCodeUnitCount=null,this.subtreeCodePointCount=a.UNDEFINED_CODE_POINT_COUNT,this.codeUnitCount=null,this.codePointCount=a.UNDEFINED_CODE_POINT_COUNT,this.key&&(this.key.free(),this.key=null),e.prototype.free.call(this)},t.prototype.initPooledSizeTreeNodeBaseSentinelNil=function(){e.prototype.initPooledRedBlackTreeNodeBaseSentinelNil.call(this),this.subtreeCodeUnitCount=i.MIN_CODE_UNIT_COUNT,this.subtreeCodePointCount=i.MIN_CODE_POINT_COUNT,this.codeUnitCount=i.MIN_CODE_UNIT_COUNT,this.codePointCount=i.MIN_CODE_POINT_COUNT},t.prototype.initPooledSizeTreeNodeBase=function(t,n,r,i,o){e.prototype.initPooledRedBlackTreeNodeBase.call(this,t,n,r),this.subtreeCodeUnitCount=i,this.subtreeCodePointCount=o,this.codeUnitCount=i,this.codePointCount=o},t.create=function(e,t,n,r,i){var o=this.alloc();return o.initPooledSizeTreeNodeBase(e,t,n,r,i),o},t.createSentinelNil=function(){var e=this.alloc_own();return e.initPooledSizeTreeNodeBaseSentinelNil(),e},t}(o.PooledRedBlackTreeNodeBase);t.PooledCharIndexMapNode=c,c.initializePooled();var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.root=null,t.sentinelNil=null,t}return r(t,e),t.prototype.totalCodeUnitCount=function(){return this.root.subtreeCodeUnitCount},t.prototype.totalCodePointCount=function(){return this.root.realizedSubtreeCodePointCount()},t.prototype.maxCodeUnitIndex=function(){return i.CodeUnitIndexOps.from(this.root.subtreeCodeUnitCount)},t.prototype.maxCodePointIndex=function(){return i.CodePointIndexOps.from(this.root.realizedSubtreeCodePointCount())},t.prototype.codePointIndexFromCodeUnitIndex=function(e){if(e>=this.totalCodeUnitCount())return i.CodePointIndexOps.from(this.totalCodePointCount());var t=this.searchNodeAtCodeUnitIndex(e),n=i.CodeUnitIndexOps.subtract(e,t.codeUnitIndexLow());return i.CodePointIndexOps.add(t.codePointIndexLow(),t.key.codePointIndexFromCodeUnitIndex(n))},t.prototype.codeUnitIndexFromCodePointIndex=function(e){if(e>=this.totalCodePointCount())return i.CodeUnitIndexOps.from(this.totalCodeUnitCount());var t=this.searchNodeAtCodePointIndex(e),n=i.CodePointIndexOps.subtract(e,t.codePointIndexLow());return i.CodeUnitIndexOps.add(t.codeUnitIndexLow(),t.key.codeUnitIndexFromCodePointIndex(n))},t.prototype.cloneNode=function(e){var t=e.key.clone();return c.create(this,t,null,t.codeUnitCount,t.codePointCount)},t.prototype.insertCharIndexMap=function(e,t,n){var r=this,i=t;e.inorderTreeWalk(e.root,(function(e){if(e.codeUnitCount>0){var t=r.cloneNode(e);t.key.order=i,i+=n,r.insertNode(t)}}))},t.prototype.insertCharIndexMapAtCodeUnitIndex=function(e,t){var n=this.totalCodeUnitCount();if(0===n)this.insertCharIndexMap(t,1e3,1e3);else if(0===e){var r=this.minimumNode(this.root).key.order-1e3*(t.nodeCount+1);this.insertCharIndexMap(t,r,1e3)}else if(e===n){var o=this.maximumNode(this.root);1===t.nodeCount&&i.CodeUnitCountOps.add(o.codeUnitCount,t.totalCodeUnitCount())<128?(o.key.append(t.root.key),o.setCodeUnitCountAndCodePointCount(o.key.codeUnitCount,o.key.codePointCount)):this.insertCharIndexMap(t,o.key.order+1e3,1e3)}else{var a=this.searchNodeAtCodeUnitIndex(e),s=a.codeUnitIndexLow();if(e===s){var u=a.key.order,l=this.predecessorNode(a),d=(u-l.key.order)/(t.nodeCount+2);r=l.key.order+d,this.insertCharIndexMap(t,r,d)}else{a.codeUnitIndexHighFromLow(s);var p=this.successorNode(a),f=(d=((u=p.isNil?1e3*(t.nodeCount+2):p.key.order)-a.key.order)/(t.nodeCount+2),r=a.key.order+d,a.key.splitOffAtCodeUnitIndex(i.CodeUnitIndexOps.subtract(e,s)));if(a.setCodeUnitCountAndCodePointCount(a.key.codeUnitCount,a.key.codePointCount),f){var h=c.create(this,f,null,f.codeUnitCount,f.codePointCount);h.key.order=u-d,this.insertNode(h)}this.insertCharIndexMap(t,r,d)}}},t.prototype.deleteCodeUnitsInRange=function(e,t){if(0!==t){var n=this.totalCodeUnitCount();if(0!==n)if(0===e&&t>=n)this.disposeAllNodes();else{var r=this.searchNodeAtCodeUnitIndex(e),o=i.MIN_CODE_UNIT_COUNT,a=r.codeUnitIndexLow(),s=r.codeUnitIndexHighFromLow(a),c=i.CodeUnitIndexOps.min(i.CodeUnitIndexOps.subtract(s,e),i.CodeUnitIndexOps.from(t));r.key.deleteCodeUnitsInRange(i.CodeUnitIndexOps.subtract(e,a),c),r.setCodeUnitCountAndCodePointCount(r.key.codeUnitCount,r.key.codePointCount),o=i.CodeUnitCountOps.add(o,c);for(var u=this.successorNode(r);o<t;){var l=this.successorNode(u),d=i.CodeUnitCountOps.subtract(t,o),p=i.CodeUnitCountOps.min(u.codeUnitCount,d);u.codeUnitCount===p?this.disposeNode(this.deleteNode(u)):(u.key.deleteCodeUnitsInRange(i.ZERO_CODE_UNIT_INDEX,p),u.setCodeUnitCountAndCodePointCount(u.key.codeUnitCount,u.key.codePointCount)),o=i.CodeUnitCountOps.add(o,p),u=l}r.isFreed?this.conditionalMergeWithPredecessor(u):r.codeUnitCount===i.MIN_CODE_UNIT_COUNT?(this.disposeNode(this.deleteNode(r)),this.conditionalMergeWithPredecessor(u)):this.conditionalMergeWithSuccessor(r)}}},t.prototype.replaceInRangeWithCharIndexMapAtCodeUnitIndex=function(e,t,n){this.deleteCodeUnitsInRange(e,t),n.root.isNil||this.insertCharIndexMapAtCodeUnitIndex(e,n)},t.prototype.conditionalMergeWithPredecessor=function(e){var t=this.predecessorNode(e);t.isNil||i.CodeUnitCountOps.add(t.codeUnitCount,e.codeUnitCount)<128&&(t.key.append(e.key),t.setCodeUnitCountAndCodePointCount(t.key.codeUnitCount,t.key.codePointCount),this.disposeNode(this.deleteNode(e)))},t.prototype.conditionalMergeWithSuccessor=function(e){var t=this.successorNode(e);t.isNil||i.CodeUnitCountOps.add(e.codeUnitCount,t.codeUnitCount)<128&&(e.key.append(t.key),e.setCodeUnitCountAndCodePointCount(e.key.codeUnitCount,e.key.codePointCount),this.disposeNode(this.deleteNode(t)))},t.prototype.insertKeyValue=function(t,n){return e.prototype.insertKeyValue.call(this,t,n)},t.prototype.onWillInsertKeyValue=function(e,t,n){return c.create(this,e,t,i.MIN_CODE_UNIT_COUNT,i.MIN_CODE_POINT_COUNT)},t.prototype.onDidDeleteNode=function(e){},t.prototype.onNodeCodeUnitCountChanged=function(e){this.augmentNodeUpToRoot(e)},t.prototype.onNodeCodePointCountChanged=function(e){this.augmentNodeUpToRoot(e)},t.prototype.onNodeCharacterCountChanged=function(e){this.augmentNodeUpToRoot(e)},t.prototype.onRealizeNodeCodePointCount=function(e){},t.prototype.onRealizeNodeSubtreeCodePointCount=function(e){var t=this;this.postorderTreeWalk(e,(function(e){s(e.codePointCount)?t.onRealizeNodeCodePointCount(e):s(e.subtreeCodePointCount)&&t.augmentNodeUpToRoot(e)}))},t.prototype.searchNodeAtCodeUnitIndex=function(e){return e<0||i.CodeUnitIndexOps.is.greaterThanOrEqualTo(e,i.CodeUnitIndexOps.from(this.root.subtreeCodeUnitCount))?this.sentinelNil:this.root.nodeAtCodeUnitIndex(e,i.ZERO_CODE_UNIT_INDEX)},t.prototype.searchNodeAtCodePointIndex=function(e){return e<0?this.sentinelNil:this.root.nodeAtCodePointIndex(e,i.ZERO_CODE_POINT_INDEX)},t.prototype.deleteAllNodes=function(){var e=this;this.postorderTreeWalk(this.root,(function(t){t.left&&t.left.isNil,t.right&&t.right.isNil,t.left=e.sentinelNil,t.right=e.sentinelNil,e.onDidDeleteNode(t)})),this.root=this.sentinelNil},t.prototype.clone=function(){return t.createClone(this)},t.prototype.augmentNodeOnInsertionPathForNode=function(e,t){e.subtreeCodeUnitCount=e.subtreeCodeUnitCount+t.subtreeCodeUnitCount,s(e.subtreeCodePointCount)||s(t.subtreeCodePointCount)?e.subtreeCodePointCount=a.UNDEFINED_CODE_POINT_COUNT:e.subtreeCodePointCount=i.CodePointCountOps.add(e.subtreeCodePointCount,t.subtreeCodePointCount)},t.prototype.augmentNodeUpToRoot=function(e){for(;!e.isNil;)e.subtreeCodeUnitCount=i.CodeUnitCountOps.add(e.codeUnitCount,i.CodeUnitCountOps.add(e.left.subtreeCodeUnitCount,e.right.subtreeCodeUnitCount)),s(e.codePointCount)||s(e.left.subtreeCodePointCount)||s(e.right.subtreeCodePointCount)?e.subtreeCodePointCount=a.UNDEFINED_CODE_POINT_COUNT:e.subtreeCodePointCount=i.CodePointCountOps.add(e.codePointCount,i.CodePointCountOps.add(e.left.subtreeCodePointCount,e.right.subtreeCodePointCount)),e=e.parent},t.prototype.augmentNodesAfterRotate=function(e,t){e.subtreeCodeUnitCount=t.subtreeCodeUnitCount,t.subtreeCodeUnitCount=i.CodeUnitCountOps.add(t.codeUnitCount,i.CodeUnitCountOps.add(t.left.subtreeCodeUnitCount,t.right.subtreeCodeUnitCount)),e.subtreeCodePointCount=t.subtreeCodePointCount,s(t.codePointCount)||s(t.left.subtreeCodePointCount)||s(t.right.subtreeCodePointCount)?t.subtreeCodePointCount=a.UNDEFINED_CODE_POINT_COUNT:t.subtreeCodePointCount=i.CodePointCountOps.add(t.codePointCount,i.CodePointCountOps.add(t.left.subtreeCodePointCount,t.right.subtreeCodePointCount))},t.prototype.dbg_arrayNodes=function(){return this.dbg_nodes.map((function(e){return e.key.order+" ["+e.codeUnitIndexLow()+".."+e.codeUnitIndexHigh()+") cuc:"+e.codeUnitCount+" cpc:"+e.realizedCodePointCount()+" cpc:"+e.key.codePointCount+" scuc:"+e.subtreeCodeUnitCount+" scpc:"+e.realizedSubtreeCodePointCount()+" maps: "+e.key.dbg_arrays})).join("\n  --\x3e ")},t.prototype.dbg_translatedArrayNodes=function(){return this.dbg_nodes.map((function(e){return e.key.order+" ["+e.codeUnitIndexLow()+".."+e.codeUnitIndexHigh()+") cuc:"+e.codeUnitCount+" cpc:"+e.realizedCodePointCount()+" cpc:"+e.key.codePointCount+" scuc:"+e.subtreeCodeUnitCount+" scpc:"+e.realizedSubtreeCodePointCount()+" maps: "+e.key.dbg_translatedArrays})).join("\n  --\x3e ")},t.prototype.dbg_isValid=function(){return e.prototype.dbg_isValid.call(this)&&this.dbg_everyNodeIntervalIsContiguous()&&this.dbg_everyNodePositionIsCorrect()},t.prototype.dbg_everyNodeIntervalIsContiguous=function(){for(var e=this.minimumNode(this.root),t=0;!e.isNil;){if(e.codeUnitIndexLow()!==t)return!1;t=e.codeUnitIndexHigh(),e=this.successorNode(e)}return!0},t.prototype.dbg_everyNodePositionIsCorrect=function(){for(var e=this.minimumNode(this.root),t=0;!e.isNil;){if(e.codeUnitIndexLow()!==t)return!1;t+=e.codeUnitCount,e=this.successorNode(e)}return this.root.subtreeCodeUnitCount===t},t.prototype.dbg_everyNodeSizeIsCorrect=function(){return!0},t.prototype.free=function(){e.prototype.free.call(this)},t.create=function(){var e=c.createSentinelNil(),t=this.alloc();return t.initPooledRedBlackTreeBase(e,a.PooledCharIndexMapSegmentComparator.instance),t},t.createWithUTF16String=function(e){var t=c.createSentinelNil(),n=this.alloc();n.initPooledRedBlackTreeBase(t,a.PooledCharIndexMapSegmentComparator.instance);var r=a.PooledCharIndexMapSegment.createFromUTF16String(e),i=c.create(n,r,null,r.codeUnitCount,r.codePointCount);return n.insertNode(i),n},t.createClone=function(e){var t=c.createSentinelNil(),n=this.alloc();return n.initPooledRedBlackTreeBase(t,a.PooledCharIndexMapSegmentComparator.instance),n.insertCharIndexMap(e,1e3,1e3),n},t}(o.PooledRedBlackTreeBase);t.PooledCharIndexMap=u,u.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PooledCharIndexMapSegment=t.PooledCharIndexMapSegmentComparator=t.UNDEFINED_CODE_POINT_COUNT=t.GUARD_CODE_UNIT_INDEX=t.GUARD_CODE_POINT_INDEX=void 0;var c=n(909),u=n(972),l=n(891),d=s(n(1054)),p=n(1065);t.GUARD_CODE_POINT_INDEX=-1,t.GUARD_CODE_UNIT_INDEX=-1,t.UNDEFINED_CODE_POINT_COUNT=void 0;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.prototype.compare=function(e,t){return e.order-t.order},t.instance=new n,a([l.sealed],t)}(u.ComparatorBase);t.PooledCharIndexMapSegmentComparator=f;var h=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.order=0,n.codeUnitCount=c.MIN_CODE_UNIT_COUNT,n._codePointCount=t.UNDEFINED_CODE_POINT_COUNT,n._codeUnitToCodePointIndices=null,n._codePointToCodeUnitIndices=null,n}var i;return r(n,e),i=n,n.prototype.free=function(){this._codePointToCodeUnitIndices&&(this._codePointToCodeUnitIndices.free(),this._codePointToCodeUnitIndices=null),this._codeUnitToCodePointIndices&&(this._codeUnitToCodePointIndices.free(),this._codeUnitToCodePointIndices=null),this._codePointCount=t.UNDEFINED_CODE_POINT_COUNT,this.order=0,e.prototype.free.call(this)},Object.defineProperty(n.prototype,"codePointCount",{get:function(){return this._codePointCount},enumerable:!1,configurable:!0}),n.prototype.codePointIndexFromCodeUnitIndex=function(e){return this._codeUnitToCodePointIndices?e<this.codeUnitCount?this._codeUnitToCodePointIndices.getAt(e):c.CodePointIndexOps.from(this.codePointCount):c.ZERO_CODE_POINT_INDEX},n.prototype.codeUnitIndexFromCodePointIndex=function(e){return this._codePointToCodeUnitIndices?e<this.codePointCount?this._codePointToCodeUnitIndices.getAt(e):c.CodeUnitIndexOps.from(this.codeUnitCount):c.ZERO_CODE_UNIT_INDEX},n.prototype.splitOffAtCodeUnitIndex=function(e){var t=this.codePointIndexFromCodeUnitIndex(e);return this.splitOffAtCharIndices(e,t)},n.prototype.clone=function(){return i.createCloneOf(this)},n.prototype.deleteCodeUnitsInRange=function(e,t){if(0!==t&&null!==this._codePointToCodeUnitIndices&&null!==this._codeUnitToCodePointIndices){var n=this.codeUnitCount;if(0===e&&t>=n)this._codeUnitToCodePointIndices.setLength(c.MIN_CODE_UNIT_COUNT),this._codePointToCodeUnitIndices.setLength(c.MIN_CODE_POINT_COUNT),this.codeUnitCount=c.MIN_CODE_UNIT_COUNT,this._codePointCount=c.MIN_CODE_POINT_COUNT;else{var r=c.CodeUnitIndexOps.min(c.CodeUnitIndexOps.add(e,t),c.CodeUnitIndexOps.from(this.codeUnitCount)),i=this.codePointIndexFromCodeUnitIndex(e),o=this.codePointIndexFromCodeUnitIndex(r);this._codeUnitToCodePointIndices.deleteInRange(e,t),this._codePointToCodeUnitIndices.deleteInRange(i,c.CodePointCountOps.subtract(o,i)),this.codeUnitCount=c.CodeUnitCountOps.subtract(this.codeUnitCount,c.CodeUnitIndexOps.subtract(r,e)),this._codePointCount=c.CodePointCountOps.subtract(this._codePointCount,c.CodePointCountOps.subtract(o,i))}}},n.prototype.append=function(e){null!==e._codeUnitToCodePointIndices&&null!==e._codePointToCodeUnitIndices&&(null===this._codePointToCodeUnitIndices||null===this._codeUnitToCodePointIndices?(this._codeUnitToCodePointIndices=e._codeUnitToCodePointIndices.clone(),this._codePointToCodeUnitIndices=e._codePointToCodeUnitIndices.clone(),this.codeUnitCount=e.codeUnitCount,this._codePointCount=e._codePointCount):(this._codeUnitToCodePointIndices.append(e._codeUnitToCodePointIndices,c.CodePointIndexOps.from(this.codePointCount)),this._codePointToCodeUnitIndices.append(e._codePointToCodeUnitIndices,c.CodeUnitIndexOps.from(this.codeUnitCount)),this.codeUnitCount=c.CodeUnitCountOps.add(this.codeUnitCount,e.codeUnitCount),this._codePointCount=c.CodePointCountOps.add(this._codePointCount,e._codePointCount)))},n.prototype.borrowCUItoCPIArray=function(e){return l.TypedArrayByLengthPool.uint32Arrays.borrow(e)},n.prototype.borrowCPItoCUIArray=function(e){return l.TypedArrayByLengthPool.uint32Arrays.borrow(e)},n.prototype.splitOffAtCharIndices=function(e,t){if(null===this._codeUnitToCodePointIndices||null===this._codePointToCodeUnitIndices)return e>c.ZERO_CODE_UNIT_INDEX&&l.fatalError("PooledCharIndexMapSegment.splitOffAtCharIndices Split index is out of range.",{}),null;if(e===this.codeUnitCount)return null;var n=this._codeUnitToCodePointIndices.splitOffAt(e),r=this._codePointToCodeUnitIndices.splitOffAt(t);this.codeUnitCount=this._codeUnitToCodePointIndices.length,this._codePointCount=this._codePointToCodeUnitIndices.length;var o=i.alloc_own();return o._codeUnitToCodePointIndices=n,o._codePointToCodeUnitIndices=r,o.codeUnitCount=o._codeUnitToCodePointIndices.length,o._codePointCount=o._codePointToCodeUnitIndices.length,o},Object.defineProperty(n.prototype,"dbg_arrays",{get:function(){return"cui->cpi: ["+(this._codeUnitToCodePointIndices?this._codeUnitToCodePointIndices.dbg_array.join(", "):[])+"], cpi->cui: ["+(this._codePointToCodeUnitIndices?this._codePointToCodeUnitIndices.dbg_array.join(", "):[])+"]"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_translatedArrays",{get:function(){return"cui->cpi: ["+(this._codeUnitToCodePointIndices?this._codeUnitToCodePointIndices.dbg_translatedArray.join(", "):[])+"], cpi->cui: ["+(this._codePointToCodeUnitIndices?this._codePointToCodeUnitIndices.dbg_translatedArray.join(", "):[])+"]"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_isLengthValid",{get:function(){var e=this._codeUnitToCodePointIndices;if(e){if(e.length!==this.codeUnitCount)return!1;for(var t=e.dbg_array,n=0,r=e.length;n<r;++n)if(t[n]===p.GUARD_VALUE)return!1}var i=this._codePointToCodeUnitIndices;if(i&&i.length>0){if(i.length!==this.codePointCount)return!1;for(t=i.dbg_array,n=0,r=i.length;n<r;++n)if(t[n]===p.GUARD_VALUE)return!1}return!0},enumerable:!1,configurable:!0}),n.prototype.initMapsFromUTF16String=function(e){if(0===e.length)return this.codeUnitCount=c.MIN_CODE_UNIT_COUNT,void(this._codePointCount=c.MIN_CODE_POINT_COUNT);var n=e,r=n.length,i=this.borrowCUItoCPIArray(r);i.fill(t.GUARD_CODE_POINT_INDEX);var o=this.borrowCPItoCUIArray(r);o.fill(t.GUARD_CODE_UNIT_INDEX);for(var a=c.MIN_CODE_UNIT_COUNT,s=c.ZERO_CODE_UNIT_INDEX,u=c.ZERO_CODE_POINT_INDEX;s<n.length&&a<r;){o[u]=c.CodeUnitIndexOps.from(s),i[s]=c.CodePointIndexOps.from(u);var l=n.charCodeAt(s);if(++s,++a,d.isASingleCodeUnit(l))++u;else if(d.isLeadingSurrogate(l)){var f=n.charCodeAt(s);i[s]=c.CodePointIndexOps.from(u),++s,++a,d.isTrailingSurrogate(f)&&++u}}this.codeUnitCount=r,this._codePointCount=u,this._codeUnitToCodePointIndices=p.PooledArrayMap.createWithBrandedUint32Array(i,r),this._codePointToCodeUnitIndices=p.PooledArrayMap.createWithBrandedUint32Array(o,u)},n.createFromUTF16String=function(e){var t=this.alloc_own();return t.initMapsFromUTF16String(e),t},n.createCloneOf=function(e){if(e._codeUnitToCodePointIndices&&e._codePointToCodeUnitIndices){var t=e._codeUnitToCodePointIndices.clone(),n=e._codePointToCodeUnitIndices.clone(),r=this.alloc_own();return r._codeUnitToCodePointIndices=t,r._codePointToCodeUnitIndices=n,r.codeUnitCount=e.codeUnitCount,r._codePointCount=e._codePointCount,r}return this.createFromUTF16String("")},i=a([l.sealed],n)}(l.Pooled);t.PooledCharIndexMapSegment=h,h.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.PooledArrayMap=t.GUARD_VALUE=void 0;var o=n(891),a=n(1066);t.GUARD_VALUE=Math.pow(2,32)-1;var s=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._array=null,t._length=0,t._translateBy=0,t}var s;return r(n,e),s=n,Object.defineProperty(n.prototype,"capacity",{get:function(){return this._array?this._array.length:0},enumerable:!1,configurable:!0}),n.prototype.setCapacity=function(e){if(0===e)return this.switchArrayTo(null),void(this._length=0);var t=a.getPow2Length(e);if(t!==this.capacity){var n=o.TypedArrayByLengthPool.uint32Arrays.borrow(t);this._array&&n.set(this._array.subarray(0,n.length)),this._length<=t?n.fill(-1,this._length):this._length=t,this.switchArrayTo(n)}},Object.defineProperty(n.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),n.prototype.setLength=function(e){e!==this.length&&(this.setCapacity(e),this._length=e,this._array&&this._length<=this.capacity&&this._array.fill(-1,this._length))},n.prototype.getAt=function(e){return this._array[e]+this._translateBy},n.prototype.setAt=function(e,t){this._array[e]=t-this._translateBy},n.prototype.translate=function(e){this._translateBy=this._translateBy+e},n.prototype.assign=function(e){if(0!==e._length){var n=o.TypedArrayByLengthPool.uint32Arrays.borrow(e._length);n.set(e._array.subarray(0,e._length)),n.fill(t.GUARD_VALUE,e._length),this.switchArrayTo(n),this._length=e._length,this._translateBy=e._translateBy}},n.prototype.append=function(e,n){if(0!==e._length)if(0===this._length)this.assign(e);else{var r=this._length+e._length,i=o.TypedArrayByLengthPool.uint32Arrays.borrow(r);i.fill(t.GUARD_VALUE,r),i.set(this._array.subarray(0,this._length)),i.set(e._array.subarray(0,e._length),this._length);var a=e._translateBy-this._translateBy+n;if(0!==a)for(var s=this._length;s<r;++s)i[s]=i[s]+a;this.switchArrayTo(i),this._length=r}},n.prototype.splitOffAt=function(e){if(0===e)return(n=s.alloc_own())._array=this._array,n._length=this._length,n._translateBy=this._translateBy,this._array=null,this._length=0,n;if(e===this._length)return null;var n,r=this.getAt(0),i=this.getAt(e),o=this._translateBy-(i-r),a=this._length-e;return(n=s.createWithLength(a))._array.set(this._array.subarray(e,this._length)),n.capacity>a&&n._array.fill(t.GUARD_VALUE,a),n._translateBy=o,this._array.fill(t.GUARD_VALUE,e,this._length),this.setLength(e),n},n.prototype.deleteInRange=function(e,t){if(0!==t&&0!==this._length){var n=this._array,r=e+t;if(r===this._length)this.setLength(e);else{var i=n[e],o=n[r]-i,a=this._length-t;n.copyWithin(e,r,this._length),n.fill(-1,a,this._length);for(var s=e,c=e+a;s<c;++s)n[s]=n[s]-o;this.setLength(a)}}},n.prototype.clone=function(){var e=s.createWithLength(this._length);return e._array&&this._array&&this._length>0&&e._array.set(this._array.subarray(0,this._length)),e._translateBy=this._translateBy,e},n.prototype.switchArrayTo=function(e){this._array&&(this._array.fill(t.GUARD_VALUE,0,this._length),o.TypedArrayByLengthPool.uint32Arrays.return(this._array)),this._array=e},Object.defineProperty(n.prototype,"dbg_array",{get:function(){return this._array?Array.from(this._array.subarray(0,this._length)):[]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_translatedArray",{get:function(){var e=this,t=this._array?this._array.subarray(0,this._length).map((function(t){return t+e._translateBy})):[];return Array.from(t)},enumerable:!1,configurable:!0}),n.prototype.free=function(){this._array&&(this.switchArrayTo(null),this._length=0),this._translateBy=0,e.prototype.free.call(this)},n.createWithCapacity=function(e){var n=this.alloc_own();return e>0&&(n._array=o.TypedArrayByLengthPool.uint32Arrays.borrow(e),n._array.fill(t.GUARD_VALUE,0)),n._length=0,n},n.createWithLength=function(e){var n=this.alloc_own();return e>0&&(n._array=o.TypedArrayByLengthPool.uint32Arrays.borrow(e),n._array.fill(t.GUARD_VALUE,0)),n._length=e,n},n.createWithArray=function(e){var n=this.alloc_own();return e.length>0&&(n._array=o.TypedArrayByLengthPool.uint32Arrays.borrow(e.length),n._array.set(e),n._array.fill(t.GUARD_VALUE,e.length)),n._length=e.length,n},n.createWithBrandedUint32Array=function(e,t){var n=this.alloc_own();return n._array=e,n._length=t,n},s=i([o.sealed],n)}(o.Pooled);t.PooledArrayMap=s,s.initializePooled()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPow2Length=void 0,t.getPow2Length=function(e){return e<2||e<2?2:1<<Math.ceil(Math.log2(e))}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NSMutableString=void 0;var i=n(909),o=n(891),a=n(1058),s=n(1060),c=n(1061),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.appendString=function(e){null===e&&o.fatalError("NSMutableString.appendString: Cannot append null string",{}),0!==e.length&&this.insertString_atIndex(e,this.length)},t.prototype.deleteCharactersInRange=function(e){if(0!==e.length){var t=this._string;if(0!==t.length){var n=e.location,r=s.NSMaxRange(e);r>t.length&&a.throwNSRangeException({allowedRange:{start:0,end:t.length},invalidValue:e});var o=this.codeUnitIndexToCodePointIndex(n),c=this.codeUnitIndexToCodePointIndex(r),u=i.CodePointCountOps.subtract(c,o);this._string=t.slice(0,n)+t.slice(r),this._codePointCount=i.CodePointCountOps.subtract(this._codePointCount,u),this._charIndexMap.deleteCodeUnitsInRange(e.location,e.length)}}},t.prototype.insertString_atIndex=function(e,n){if(e&&0!==e.length){if("string"===typeof e&&(e=t.alloc().initWithString(e).autorelease()),null===this._charIndexMap){var r=e._charIndexMap;r&&(this._charIndexMap=r.clone())}else this._charIndexMap.insertCharIndexMapAtCodeUnitIndex(n,e._charIndexMap);var o=this._string;if((n<0||n>o.length)&&a.throwNSRangeException({allowedRange:{start:0,end:o.length},invalidValue:n}),0!==o.length){this.codePointCount(),this.codeUnitCount();var s=n,u=(this.codeUnitIndexToCodePointIndex(s),e.codeUnitCount(),e.codePointCount()),l=c.NSString.extractUTF16String(e);this._string=o.slice(0,s)+l+o.slice(s),this._codePointCount=i.CodePointCountOps.add(this._codePointCount,u)}else this._copyFromString(e)}},t.prototype.replaceCharactersInRange_withString=function(e,n){var r=this._string;if("string"===typeof n?n=t.alloc().initWithString(n).autorelease():null===n&&(n=t.alloc().initWithString("").autorelease()),null!==n&&0!==n.length)if(0!==r.length){var o=e.location,c=s.NSMaxRange(e);c>r.length&&a.throwNSRangeException({allowedRange:{start:0,end:r.length},invalidValue:e});var u=this.codeUnitIndexToCodePointIndex(o),l=this.codeUnitIndexToCodePointIndex(c),d=i.CodePointCountOps.subtract(l,u),p=n.codePointCount(),f=i.CodePointCountOps.subtract(p,d);this._string=r.slice(0,o)+n.UTF16String+r.slice(c),this._codePointCount=i.CodePointCountOps.add(this._codePointCount,f),this._charIndexMap.replaceInRangeWithCharIndexMapAtCodeUnitIndex(e.location,e.length,n._charIndexMap)}else this._copyFromString(n);else this.deleteCharactersInRange(e)},t.prototype._copyFromString=function(e){this._string=e.UTF16String,this._codePointCount=e.codePointCount(),this._charIndexMap&&this._charIndexMap.free(),this._charIndexMap=e._charIndexMap.clone()},t}(c.NSString);t.NSMutableString=u,u.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NSMutableAttributedString=void 0;var i=n(972),o=n(1058),a=n(1059),s=n(1050),c=n(1067),u=n(1060),l=n(1061),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._string=null,t}return r(t,e),t.prototype.appendAttributedString=function(e){var t=this;if(null!==e&&0!==e.length){var n=this.length;this._string?this._string.appendString(e._string):this._string=e._string.mutableCopy();var r=e._attributes;r.inorderTreeWalk(r.root,(function(e){var r=t._attributes.insertInterval(n+e.intervalLow,n+e.intervalHigh,e.value);t._attributes.mergeMatchingAdjacentNodes(r)})),this.dbg_assertAttributesValid()}},t.prototype.deleteCharactersInRange=function(e){if(0!==e.length){(e.location<0||u.NSMaxRange(e)>this.length)&&o.throwNSRangeException({allowedRange:{start:0,end:this.length},invalidValue:e}),this._string.deleteCharactersInRange(e),this._attributes.disposeInterval(e.location,e.location+e.length);var t=this._attributes.closedIntervalSearch(this._attributes.root,e.location,e.location+1);t.isNil||this._attributes.mergeMatchingAdjacentNodes(t),this.dbg_assertAttributesValid()}},t.prototype.insertAttributedString_atIndex=function(e,t){var n=this;if(null!==e&&0!==e.length){(t<0||t>this.length)&&o.throwNSRangeException({allowedRange:{start:0,end:this.length},invalidValue:t});var r=this.length;this._string?this._string.insertString_atIndex(e._string,t):this._string=e._string.mutableCopy();var i=e.length,a=[];this._attributes.closedSliceNodes(t,r,a);for(var s=0,c=a.length;s<c;++s){var u=a[s];u.setIntervalLowAndHigh(u.intervalLow+i,u.intervalHigh+i)}var l=e._attributes;l.inorderTreeWalk(l.root,(function(e){var r=n._attributes.insertInterval(t+e.intervalLow,t+e.intervalHigh,e.value);n._attributes.mergeMatchingAdjacentNodes(r)})),this.dbg_assertAttributesValid()}},t.prototype.replaceCharactersInRange_withAttributedString=function(e,t){var n=this;if(this.replaceCharactersInRange_withString(e,null===t?"":t.string),t){var r=u.NSMakeRange(0,0),i=t._attributes;i.inorderTreeWalk(i.root,(function(t){r.location=e.location+t.intervalLow,r.length=t.intervalHigh-t.intervalLow,n.setAttributes_range(t.value,r)}))}},t.prototype.replaceCharactersInRange_withString=function(e,t){(e.location<0||u.NSMaxRange(e)>this.length)&&o.throwNSRangeException({allowedRange:{start:0,end:this.length},invalidValue:e}),this._string;var n="";t&&(n=t instanceof l.NSString?t.UTF16String:t);var r=[],i=null;if(n.length>0)if(0===e.length){if(e.location-1>=0&&(r.length=0,this._attributes.leftClosedRightOpenIntervalSearchForAll(this._attributes.root,e.location-1,e.location,r),r.length>0&&(i=r[0].value.retain().autorelease())),null===i){r.length=0;var d=u.NSMaxRange(e);this._attributes.leftClosedRightOpenIntervalSearchForAll(this._attributes.root,d,d+1,r),r.length>0&&(i=r[0].value.retain().autorelease())}}else r.length=0,this._attributes.leftClosedRightOpenIntervalSearchForAll(this._attributes.root,e.location,e.location+1,r),r.length>0&&(i=r[0].value.retain().autorelease());i=i||s.createAttrDict();var p=n.length-e.length;if(p<0){this._attributes.disposeInterval(u.NSMaxRange(e)+p,u.NSMaxRange(e)),r.length=0,this._attributes.closedSliceNodes(e.location,u.NSMaxRange(e)+p,r),r.length>0&&r[0].setValue(i);for(var f=0,h=r;f<h.length;f++)(b=h[f]).isFreed||this._attributes.mergeMatchingAdjacentNodes(b)}else if(p>0){r.length=0,this._attributes.closedSliceNodes(u.NSMaxRange(e),this.length+1,r);for(var m=0,g=r;m<g.length;m++)(b=g[m]).setIntervalLowAndHigh(b.intervalLow+p,b.intervalHigh+p)}if(p>=0){r.length=0,this._attributes.closedSliceNodes(e.location,u.NSMaxRange(e),r);for(var v=0,y=r;v<y.length;v++){var b=y[v];this._attributes.deleteNode(b).free()}var _=a._PooledAttributeIntervalTreeNode.create(this._attributes,e.location,u.NSMaxRange(e)+p,i);this._attributes.insertNode(_),this._attributes.mergeMatchingAdjacentNodes(_)}this._string?this._string.replaceCharactersInRange_withString(e,t):"string"===typeof t?this._string=c.NSMutableString.alloc().initWithString(t):null===t||(this._string=c.NSMutableString.alloc().initWithString(t)),this.dbg_assertAttributesValid()},t.prototype.setAttributes_range=function(e,t){if(0!==t.length){(t.location<0||u.NSMaxRange(t)>this.length)&&o.throwNSRangeException({allowedRange:{start:0,end:this.length},invalidValue:t});var n=[];if(this._attributes.closedSliceNodes(t.location,u.NSMaxRange(t),n),e=e||s.createAttrDict(),n.length>0){for(var r=0,i=n.length;r<i;++r)(a=n[r]).setValue(e);for(r=0,i=n.length;r<i;++r){var a;(a=n[r]).isFreed||(this._attributes.mergeMatchingAdjacentNodes(a),this.dbg_assertAttributesValid())}}else{var c=this._attributes.insertInterval(t.location,u.NSMaxRange(t),e);this._attributes.mergeMatchingAdjacentNodes(c),this.dbg_assertAttributesValid()}}},t.prototype.replaceCharactersInRange_withAttributedSubstring_fromRange=function(e,t,n){var r=this,i=e.location,o=null;if(t){var a=t.string;a&&(o=a.substringWithRange(n))}this.replaceCharactersInRange_withString(e,o),t&&(t.enumerateAttributesInRange_options_usingBlock(n,s.NSAttributedStringEnumerationLongestEffectiveRangeNotRequired,(function(e,t,o){t.location=t.location-n.location+i,r.setAttributes_range(e,t)})),this._attributes.mergeMatchingNodesInInterval(e.location,e.location+Math.max(e.length,n.length)+1),this.dbg_assertAttributesValid())},t.prototype.appendAttributedSubstring_fromRange=function(e,t){null!==e&&0!==t.length&&0!==e.length&&this.replaceCharactersInRange_withAttributedSubstring_fromRange(u.NSMakeRange(this.length,0),e,t)},t.prototype.isMutable=function(){return!0},t.prototype.createUnderlyingString=function(e){return e?c.NSMutableString.alloc().initWithString(e).autorelease():c.NSMutableString.alloc().init().autorelease()},t.prototype.intervalIntersection=function(e,t,n,r){return t<n?null:i.Interval.create(Math.max(e,n),Math.min(t,r))},t}(s.NSAttributedString);t.NSMutableAttributedString=d,d.initializeRefcounted()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NSHashTable=void 0,t.NSHashTable=Set},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NSIndexSet=void 0;var i=n(972),o=n(891),a=n(1024),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._ranges=null,t}return r(t,e),t.rangeHigh=function(e){return e.location+e.length-1},t.prototype.intersectsIndexesInRange=function(e){return!this._ranges.closedIntervalSearch(this._ranges.root,e.location,t.rangeHigh(e)).isNil},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this._ranges=a.PooledIntervalTree.create(i.NumberIntervalComparator.instance,0)},t.prototype.free=function(){this._ranges.free(),this._ranges=null,e.prototype.free.call(this)},t.prototype.initWithIndexesInRange=function(e){return this._ranges.insertInterval(e.location,t.rangeHigh(e),e),this},t.indexSetWithIndexesInRange=function(e){var t=this.alloc();return t.initWithIndexesInRange(e),t.autorelease()},t}(o.Refcounted);t.NSIndexSet=s,s.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NSMutableIndexSet=void 0;var i=n(1070),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.addIndexesInRange=function(e){this._ranges.insertInterval(e.location,i.NSIndexSet.rangeHigh(e),e)},t.indexSetWithIndexesInRange=function(t){return e.indexSetWithIndexesInRange.call(this,t)},t}(i.NSIndexSet);t.NSMutableIndexSet=o,o.initializeRefcounted()},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.NSOrderedDescending=t.NSOrderedSame=t.NSOrderedAscending=t.NSComparisonResult=t.NSNotFound=t.NSIntegerMax=void 0,t.NSIntegerMax=9007199254740991,t.NSNotFound=t.NSIntegerMax,function(e){e[e.Ascending=-1]="Ascending",e[e.Same=0]="Same",e[e.Descending=1]="Descending"}(r=t.NSComparisonResult||(t.NSComparisonResult={})),t.NSOrderedAscending=r.Ascending,t.NSOrderedSame=r.Same,t.NSOrderedDescending=r.Descending},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NSSet=void 0,t.NSSet=Set},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NSUUIDComparator=t.NSUUID=void 0;var s=n(972),c=a(n(1053)),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._impl=null,t.isTTZero=!1,t}return r(t,e),t.prototype.copy=function(){return t.alloc().initWithUUIDString(this._impl)},Object.defineProperty(t.prototype,"UUIDString",{get:function(){return this._impl},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return null!==e&&this._impl===e._impl},t.isEqual=function(e,t){return null!==e&&null!==t&&e.isEqual(t)},t.prototype.dealloc=function(){this._impl=null,e.prototype.dealloc.call(this)},t.UUID=function(){return t.alloc().init().autorelease()},t.prototype.init=function(){return this.initWithUUIDString(c.random())},t.prototype.initWithUUIDString=function(e){return this._impl=e,this},t.prototype.initWithUUIDBytes=function(e){return this._impl=c.fromBytes(e),this},t.createWithUUIDBytes=function(e){return this.alloc()._impl=c.fromBytes(e),t.alloc().initWithUUIDBytes(e).autorelease()},t.createWithUUIDString=function(e){return t.alloc().initWithUUIDString(e).autorelease()},Object.defineProperty(t,"TTZero",{get:function(){return null===t._TTZero&&(t._TTZero=t.alloc().initWithUUIDBytes(new Uint8Array(16).fill(0)),t._TTZero.isTTZero=!0),t._TTZero},enumerable:!1,configurable:!0}),t.prototype.TTCompare=function(e){return this._impl===e._impl?0:this._impl<e._impl?-1:1},t.decToHexString=function(e){var t=e.toString(16);return t.length%2&&(t="0"+t),t.toUpperCase()},Object.defineProperty(t.prototype,"TTShortDescription",{get:function(){var e=c.toBytes(this._impl);return""+t.decToHexString(e[0])+t.decToHexString(e[1])},enumerable:!1,configurable:!0}),t.prototype.bytes=function(){return c.toBytes(this._impl)},t.compare=function(e,t){return e.TTCompare(t)},t.prototype.toString=function(){return this.UUIDString},t.fromProtobuf=function(e){var n=c.fromProtobufBuffer(e);return n?t.alloc().initWithUUIDString(n).autorelease():null},t._TTZero=null,t}(n(1055).NSObject);t.NSUUID=u,u.initializeRefcounted();var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t){return u.compare(e,t)},t.instance=new t,t}(s.ComparatorBase);t.NSUUIDComparator=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergeableAttributedString=t.TTAttributeNameTimestamp=t.TTPresentationAttributeNameInsertDate=t.TTPresentationAttributeNameApproxMaxItemNumber=t.TTPresentationAttributeNameItemNumber=t.TTAttributeNameParagraphStyle=t.TTAttributeNameForegroundColor=t.TTAttributeNameStrikethrough=t.TTAttributeNameUnderline=t.TTAttributeNameFontHints=t.TTAttributeNameFont=void 0;var i=n(909),o=n(1051),a=n(1049),s=n(1055),c=n(1076),u=n(1090),l=n(1091),d=n(1083),p=n(1088);t.TTAttributeNameFont="TTFont",t.TTAttributeNameFontHints="TTHints",t.TTAttributeNameUnderline="TTUnderline",t.TTAttributeNameStrikethrough="TTStrikethrough",t.TTAttributeNameForegroundColor="TTColor",t.TTAttributeNameParagraphStyle="TTStyle",t.TTPresentationAttributeNameItemNumber="TPItemNumber",t.TTPresentationAttributeNameApproxMaxItemNumber="TPMaxApproxItemNumber",t.TTPresentationAttributeNameInsertDate="TPInsertDate",t.TTAttributeNameTimestamp="TTTimestamp";var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.insertString_atIndex=function(e,t){this.replaceCharactersInRange_withString(a.NSMakeRange(t,0),e)},t.prototype.replaceCharactersInRange_withString=function(t,n){var r=null;if(this.length>0){var i=this.attributedString;r=t.length>0?i.attributesAtIndex_effectiveRange(t.location,null):t.location>0?i.attributesAtIndex_effectiveRange(t.location-1,null):i.attributesAtIndex_effectiveRange(0,null)}var o=s.autorelease(a.NSAttributedString.alloc().initWithString_attributes(n,r));e.prototype.replaceCharactersInRange_withAttributedString.call(this,t,o)},t.prototype.attributesAtIndex_effectiveRange=function(e,t){return this.attributedString.attributesAtIndex_effectiveRange(e,t)},t.prototype.setAttributes_range=function(e,t){if(0!==t.length){var n=this.attributesEqual_toRange(e,t),r=n[0];if(n[1])r||(this._attributedString.setAttributes_range(e,t),this.delegate&&this.delegate.edited_range_changeInLength(p.NSTextStorageEditedAttributes,t,i.MIN_CODE_UNIT_COUNT,i.MIN_CODE_POINT_COUNT));else{this.delegate&&this.delegate.beginEditing(),this.beginEditing();var o=[];this.getSubstrings_forCharacterRange(o,t);for(var a=0,s=o;a<s.length;a++){var c=s[a];this.setAttributes_substring(e,c)}this.endEditing(),this.delegate&&this.delegate.endEditing()}}},t.prototype.attributesEqual_toRange=function(e,t){var n,r={},i=this.attributedString.attributesAtIndex_effectiveRange(t.location,r),o=!1,s=!1;return a.NSMaxRange(r.out)<a.NSMaxRange(t)||(o=(n=this.attributesEqual_to(e,i))[0],s=n[1]),[o,s]},t.prototype.attributesEqual_to=function(e,t){var n=e===t;return[n,n]},t.prototype.setAttributes_substring=function(e,t){if(t&&!t.isTombstone){var n=this.attributesEqual_toRange(e,t.characterRange()),r=n[0],i=n[1];if(!i&&this.delegate&&this.delegate.wantsUndoCommands){var a=u.TTMergeableStringUndoAttributeCommand.create(),s=t.characterRange();this.attributedString.enumerateAttributesInRange_options_usingBlock(s,0,(function(e,n){var r=t.substringIDRange.subrange(d.TTBoundedCheckedCastNSUIntegerToUInt32(n.location-s.location),d.TTBoundedCheckedCastNSUIntegerToUInt32(n.length));a.addAttributeRange(r,e||o.TTAttrDict.create())})),this.addUndoCommand(a)}if(r||this._attributedString.setAttributes_range(e,t.characterRange()),!i){if(t.timestamp.setReplicaID(c.TTMergeableString.unserialisedReplicaID),this.delegate){var l=[],f=[t];this.getCharacterRanges_forSubstrings(l,f);for(var h=0,m=l;h<m.length;h++){var g=m[h];this.delegate.edited_range_changeInLength(p.NSTextStorageEditedAttributes,g,0,0)}}this._hasLocalChanges=!0}}},t.prototype.initWithArchive_andReplicaID_withOrderedSubstrings_timestamp=function(t,n,r,i){var s=!0,c=e.prototype.initWithArchive_andReplicaID_withOrderedSubstrings_timestamp.call(this,t,n,r,i);if(!c)return null;for(var u=t.attributeRun.length,l=0,d=a.NSMakeRange(0,c.attributedString.length),p=0;p<u;++p){var f=t.attributeRun[p],h=o.TTAttrDict.createFromProtobuf(f);if(!h||"number"!==typeof f.length){s=!1;break}var m=a.NSMakeRange(l,f.length);m=a.NSIntersectionRange(m,d),c._attributedString.setAttributes_range(h,m),l+=f.length}return l!==d.length&&(s=!1),s?c:null},t.prototype.saveDeltaSinceTimestamp_toArchive=function(t,n){var r=e.prototype.i_saveDeltasSinceTimestamp_toArchive.call(this,t,n);this.saveAttributesOfString_toArchive(r,n.out)},t.prototype.saveToArchive=function(){var t=e.prototype.saveToArchive.call(this);return this.saveAttributesOfString_toArchive(this.attributedString,t),t},t.prototype.saveAttributesOfString_toArchive=function(e,t){for(var n=0,r=a.NSMakeRange(0,e.length);n<r.length;){var i={out:a.NSMakeRange(0,e.length)},o=e.attributesAtIndex_longestEffectiveRange_inRange(n,i,r);t.attributeRun||(t.attributeRun=[]);var s=o.toProtobuf();s.length=d.TTBoundedCheckedCastNSUIntegerToUInt32(i.out.length),t.attributeRun.push(s),n+=i.out.length}},t}(l.TTMergeableUndoString);t.TTMergeableAttributedString=f,f.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergeableString=t.updateTopoIDRange=t.reusableCodeUnitIndexAndCodePointIndex=t.TTMergeableStringTimestampTypeStyle=t.TTMergeableStringTimestampTypeText=t.TTMergeableStringTimestampType=void 0;var s,c=n(942),u=n(909),l=n(891),d=n(1077),p=n(1024),f=n(908),h=a(n(1054)),m=n(1049),g=n(1055),v=n(1080),y=n(1083),b=n(1085),_=n(1086),C=n(1087),I=n(1088);!function(e){e[e.Text=0]="Text",e[e.Style=1]="Style"}(s=t.TTMergeableStringTimestampType||(t.TTMergeableStringTimestampType={})),t.TTMergeableStringTimestampTypeText=s.Text,t.TTMergeableStringTimestampTypeStyle=s.Style,t.reusableCodeUnitIndexAndCodePointIndex=[u.ZERO_CODE_UNIT_INDEX,u.ZERO_CODE_POINT_INDEX];var w=Map;function E(e){var t=e.children.length;if(t>1)for(var n=0;n<t;)e.children[n].incomingEdgeCount>1?(e.children[n].incomingEdgeCount--,e.children.splice(n,1),--t):++n}var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._minimumID=null,t.pathEnd=null,t.numberOfSeenIncomingEdges=null,t}return r(t,e),Object.defineProperty(t.prototype,"minimumID",{get:function(){return this._minimumID},set:function(e){this._minimumID!==e&&(this._minimumID&&this._minimumID.release(),this._minimumID=e.retain())},enumerable:!1,configurable:!0}),t.prototype.free=function(){this.minimumID.release(),this._minimumID=null,this.pathEnd=null,this.numberOfSeenIncomingEdges=null,e.prototype.free.call(this)},t.prototype.initWithMinimumID_pathEnd_numberOfSeenIncomingEdges=function(e,t,n){return this.minimumID=e,this.pathEnd=t,this.numberOfSeenIncomingEdges=n,this},t}(l.Refcounted);function T(e,t){!function e(t,n,r){var i=!1;if(t.incomingEdgeCount>1){var o=n.get(t);if(void 0===o)return n.set(t,t.incomingEdgeCount-1),i;if(o-=1,n.set(t,o),o>0)return i}if(i=r(t))return!0;for(;1===t.children.length&&1===t.children[0].incomingEdgeCount;)if(i=r(t=t.children[0]))return!0;for(var a=0,s=t.children;a<s.length;a++)if(e(s[a],n,r))return!0;return!1}(e,new w,t)}function O(e,t){var n=new Set,r=[];for(r.push(e),n.add(e);r.length>0;){var i=r.pop();if(t(i))break;for(var o=0,a=i.children;o<a.length;o++){var s=a[o];n.has(s)||(r.push(s),n.add(s))}}}function P(e,t){var n=new Set,r=[],i=!1;for(r.push(e),n.add(e);r.length>0;){var o=r.pop();if(i=t(o))break;for(var a=o;1===o.children.length&&1===o.children[0].incomingEdgeCount;)if((i=t(o=o.children[0]))||o===a){i=!0;break}if(i)break;for(var s=0,c=o.children;s<c.length;s++){var u=c[s];u.incomingEdgeCount<=1?r.push(u):n.has(u)||(r.push(u),n.add(u))}}}function x(e,t,n,r){if(m.NSUUID.isEqual(e.charID.replicaID,t.charID.replicaID))if(e.max().compare(t.charID)<=0||e.charID.compare(t.max())>=0)r.push(e.clone());else if(e.charID.clock<t.charID.clock){var i=e.splitPairAt(t.charID.clock-e.charID.clock);if(t.max().compare(i[1].max())<0){var o=i[1].splitAt(t.length);r.push(o)}i[1].setCharID(v.TTID.create(n.charID.replicaID,n.charID.clock)),r.push(i[0]),r.push(i[1])}else if(e.max().compare(t.max())>0)(i=e.splitPairAt(t.max().clock-e.charID.clock))[0].setCharID(v.TTID.create(n.charID.replicaID,n.charID.clock+(e.charID.clock-t.charID.clock))),r.push(i[0]),r.push(i[1]);else{var a=e.clone();a.setCharID(v.TTID.create(n.charID.replicaID,n.charID.clock+(e.charID.clock-t.charID.clock))),r.push(a)}else r.push(e.clone())}S.initializeRefcounted(),t.updateTopoIDRange=x;var A=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._replicaUUID=null,t._timestamp=null,t._replicaTextClock=f.MIN_DATA_CLOCK,t._replicaStyleClock=f.MIN_DATA_CLOCK,t._hasLocalChanges=!1,t.delegate=null,t.ttAttributedString2=null,t._objectsNeedingUpdatedRanges=null,t._attributedString=null,t._startNodes=[],t._endNodes=[],t._orderedSubstrings=[],t._unserializedClock=f.MIN_DATA_CLOCK,t._editCount=0,t._cacheInvalid=!0,t._updateRangeBlock=null,t}return r(n,e),Object.defineProperty(n.prototype,"replicaUUID",{get:function(){return this._replicaUUID},set:function(e){this._replicaUUID!==e&&(this._replicaUUID&&this._replicaUUID.release(),this._replicaUUID=e?e.retain():e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"timestamp",{get:function(){return this._timestamp},set:function(e){this._timestamp!==e&&(this._timestamp&&this._timestamp.release(),this._timestamp=e?e.retain():e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"replicaTextClock",{get:function(){return this._replicaTextClock},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"replicaStyleClock",{get:function(){return this._replicaStyleClock},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"objectsNeedingUpdatedRanges",{get:function(){return this._objectsNeedingUpdatedRanges},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributedString",{get:function(){return this._attributedString},set:function(e){this._attributedString!==e&&(this._attributedString&&this._attributedString.release(),this._attributedString=e.retain())},enumerable:!1,configurable:!0}),n.prototype.free=function(){this._updateRangeBlock=null,this._cacheInvalid=!0,this._editCount=0,this._orderedSubstrings.length=0,this._attributedString.release(),this._attributedString=null,this._unserializedClock=f.MIN_DATA_CLOCK,this._replicaUUID&&(this._replicaUUID.release(),this._replicaUUID=null);for(var t=new Set,n=0,r=this._startNodes;n<r.length;n++)P(r[n],(function(e){return t.add(e),!1}));for(var i=0,o=Array.from(t);i<o.length;i++)o[i].release();this._endNodes.length=0,this._startNodes.length=0,this._replicaStyleClock=f.MIN_DATA_CLOCK,this._replicaTextClock=f.MIN_DATA_CLOCK,this._hasLocalChanges=!1,this.delegate=null,this._orderedSubstrings.length=0,this._objectsNeedingUpdatedRanges&&(this._objectsNeedingUpdatedRanges=null),this._timestamp&&(this._timestamp.release(),this._timestamp=null),e.prototype.free.call(this)},Object.defineProperty(n,"unserialisedReplicaID",{get:function(){return null===this._unserialisedReplicaID&&(this._unserialisedReplicaID=m.NSUUID.UUID().retain()),this._unserialisedReplicaID},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"string",{get:function(){return this._attributedString},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"length",{get:function(){return this.string.length},enumerable:!1,configurable:!0}),n.prototype.insertString_atIndex=function(e,t){var n=g.autorelease(m.NSAttributedString.alloc().initWithString(e));this.insertAttributedString_atIndex(n,t)},n.prototype.replaceCharactersInRange_withString=function(e,t){this.replaceCharactersInRange_withAttributedString(e,g.autorelease(m.NSAttributedString.alloc().initWithString(t)))},n.prototype.replaceCharactersInRange_withAttributedString=function(e,t){var n=this.delegate;n&&n.beginEditing(),this.beginEditing(),this.deleteCharactersInRange(e),this.insertAttributedString_atIndex(t,e.location),this.endEditing(),n&&n.endEditing()},n.prototype.deleteCharactersInRange=function(e){if(0!==e.length){var t=[],n=[e];this.getSubstrings_forCharacterRange(t,e),this.deleteSubstrings_withCharacterRanges(t,n)}this.updateCache()},n.prototype.insertAttributedString_atIndex=function(e,t){if(e&&e.length>0){var n,r;if(0===t)n=this._startNodes[0],r=this.orderedSubstrings[1];else if(t===this.length)n=this.orderedSubstrings[this.orderedSubstrings.length-2],r=this._endNodes[0];else for(var i=0,o=y.TTBoundedCheckedCastNSUIntegerToUInt32(t);;){var a=this.orderedSubstrings[i];if(!a.isTombstone&&o<a.length){n=a,r=this.splitTopoSubstring_atIndex(n,o),this.invalidateCache();break}if(!a.isTombstone&&0===(o-=a.length)){n=a,r=this.orderedSubstrings[i+1];break}i++}this.insertAttributedString_after_before(e,n,r)}},n.prototype.beginEditing=function(){++this._editCount},n.prototype.endEditing=function(){this._editCount>0&&(--this._editCount,0===this._editCount&&this.coalesce())},n.prototype.replicaUUIDForCharacterAtIndex=function(e){for(var t=0,n=null,r=0,i=this.orderedSubstrings;r<i.length;r++){var o=i[r];if(!o.isTombstone){var a=m.NSMakeRange(t,o.substringIDRange.length);if(t+=o.substringIDRange.length,m.NSLocationInRange(e,a)){n=o.substringIDRange.charID.replicaID;break}}}return n},n.prototype.getCharIDForCharacterAtCodeUnitIndex=function(e){if(e<0)return v.TTID.createStart();if(e>=this.attributedString.length)return v.TTID.createEnd();for(var t=0,n=null,r=0,i=this.orderedSubstrings;r<i.length;r++){var o=i[r];if(!o.isTombstone){var a=m.NSMakeRange(t,o.substringIDRange.length);if(t+=o.substringIDRange.length,m.NSLocationInRange(e,a)){n=o;break}}}return n?v.TTID.create(n.substringIDRange.charID.replicaID,f.DataClockOps.add(n.substringIDRange.charID.clock,u.CodeUnitIndexOps.subtract(e,n.substringIDRange.charID.clock))):(l.fatalError("Could not convert character index to a TTID",e),null)},n.prototype.getCodePointIndexForCodeUnitIndex=function(e){return e<0?-1:0===e?u.ZERO_CODE_POINT_INDEX:e>=this.attributedString.UTF16String.length?u.CodePointIndexOps.from(this._attributedString.codePointCount()):this._attributedString.codeUnitIndexToCodePointIndex(e)},n.prototype.getFirstCodePoint=function(){return this.attributedString.UTF16String.codePointAt(0)},n.prototype.getLastCodePoint=function(){var e=this.attributedString.UTF16String,t=e.length-1,n=e.charCodeAt(t);return h.isTrailingSurrogate(n)?e.codePointAt(t-1):n},n.prototype.resetLocalReplicaClocksToTimestampValues=function(){this._replicaUUID&&(this._replicaTextClock=this._timestamp.clockForUUID_atIndex(this._replicaUUID,s.Text),this._replicaStyleClock=this._timestamp.clockForUUID_atIndex(this._replicaUUID,s.Style))},n.prototype._testSetTextTimestamp=function(e){this._replicaTextClock=e},Object.defineProperty(n.prototype,"isFragment",{get:function(){return 1!==this._startNodes.length||1!==this._endNodes.length?g.YES:this._startNodes[0].substringIDRange.charID.isEqual(v.TTID.create(m.NSUUID.TTZero,f.MIN_DATA_CLOCK))&&this._endNodes[0].substringIDRange.charID.isEqual(v.TTID.create(m.NSUUID.TTZero,f.MAX_DATA_CLOCK))?g.NO:g.YES},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"startNodes",{get:function(){return this._startNodes},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endNodes",{get:function(){return this._endNodes},enumerable:!1,configurable:!0}),n.prototype._substringCodePointCount=function(e){var t=this._attributedString.codeUnitIndexToCodePointIndex(e.firstCodeUnitIndex),n=this._attributedString.codeUnitIndexToCodePointIndex(e.endCodeUnitIndex);return u.CodePointCountOps.subtract(n,t)},n.prototype._substringUntombstonedCodePointCount=function(e){var t=this._attributedString.codeUnitIndexToCodePointIndex(e.firstCodeUnitIndex),n=this._attributedString.codeUnitIndexToCodePointIndex(e.untombstonedEndCodeUnitIndex);return u.CodePointCountOps.subtract(n,t)},n.prototype.deleteSubstrings_withCharacterRanges=function(e,t){for(var r=n.unserialisedReplicaID,i=this.delegate,o=u.MIN_CODE_POINT_COUNT,a=0,s=e;a<s.length;a++){var c=s[a];o=u.CodePointCountOps.add(o,this._substringCodePointCount(c)),c.isTombstone||(c.isTombstone=!0,c.timestamp.setReplicaID(r))}for(var l=0,d=e;l<d.length;l++)(c=d[l]).isTombstone||(c.isTombstone=!0,c.timestamp.setReplicaID(r));t.sort((function(e,t){return t.location===e.location?0:t.location<e.location?-1:1}));for(var p=0,f=t;p<f.length;p++){var h=f[p];this.attributedString.deleteCharactersInRange(h)}if(i){i.beginEditing();for(var v=t[0],y=u.MIN_CODE_UNIT_COUNT,b=0,_=t;b<_.length;b++){var C=_[b];v=m.NSUnionRange(v,C),y=u.CodeUnitCountOps.add(y,C.length)}i.edited_range_changeInLength(I.NSTextStorageEditedCharacters,v,u.CodeUnitCountOps.negate(y),u.CodePointCountOps.negate(o))}this.coalesce(),this.updateSubstringIndexes(),this._hasLocalChanges=g.YES,i&&i.endEditing()},n.prototype.insertAttributedString_after_before=function(e,t,r){var i=null,o=v.TTIDRange.create(v.TTID.create(null,f.MIN_DATA_CLOCK),0);if(e.length>0){var a=n.unserialisedReplicaID;(i=v.TTSubstring.createWithTopoID(v.TTID.create(a,this._unserializedClock),r.substringIndex,y.TTBoundedCheckedCastNSUIntegerToUInt32(e.length)).retain()).setUntombstonedCodePointCount(e.codePointCount()),i.setTimestamp(v.TTID.create(a,f.MIN_DATA_CLOCK)),this._unserializedClock=this._unserializedClock+e.length,o=i.substringIDRange.clone(),i.setOrderBetween(r,t);var s=t.children.indexOf(r);if(-1!==s?(t.children.splice(s,1,i),i.children=[r]):(i.children=t.children.slice(0),t.children=[i]),i.incomingEdgeCount=1,!this._cacheInvalid)for(var c=this.orderedSubstrings,u=0,l=c.length;u<l;++u)if(c[u]===t){c.splice(u+1,0,i);break}this.attributedString.insertAttributedString_atIndex(e,i.substringIndex);var d=this.delegate;d&&(d.beginEditing(),d.edited_range_changeInLength(I.NSTextStorageEditedCharacters,m.NSMakeRange(i.substringIndex,0),i.length,e.codePointCount())),this._updateRangeBlock=function(e,t){var n=[];x(o,e,t,n),o=n[0]},this.coalesce(),this.updateSubstringIndexes(),i.setUntombstonedCodePointCount(this._substringCodePointCount(i)),this._hasLocalChanges=g.YES,this._updateRangeBlock=null,d&&d.endEditing()}return o},n.prototype.getSubstrings_forCharacterRange=function(e,t){this.getSubstrings_inOrderedSubstrings_forCharacterRange(e,this.orderedSubstrings,t)},n.prototype.getSubstrings_inOrderedSubstrings_forCharacterRange=function(e,t,n){if(0!==n.length){for(var r=0,i=0,o=t.length;i<o;++i){var a=t[i];if(!a.isTombstone){var s=m.NSMakeRange(r,a.substringIDRange.length);if(r+=a.substringIDRange.length,m.NSMaxRange(s)<=n.location)continue;if(s.location>=m.NSMaxRange(n))break;if(s.location<n.location){var c=this.splitTopoSubstring_atIndex(a,y.TTBoundedCheckedCastNSUIntegerToUInt32(n.location-s.location));if(t.splice(i+1,0,c),i+=1,e.push(c),m.NSMaxRange(n)<m.NSMaxRange(s)){var u=this.splitTopoSubstring_atIndex(c,y.TTBoundedCheckedCastNSUIntegerToUInt32(n.length));t.splice(i+1,0,u);break}}else{if(m.NSMaxRange(s)>m.NSMaxRange(n)){c=this.splitTopoSubstring_atIndex(a,y.TTBoundedCheckedCastNSUIntegerToUInt32(m.NSMaxRange(n)-s.location)),e.push(a),t.splice(i+1,0,c);break}e.push(a)}}}this.invalidateCache()}},n.prototype.getSubstrings_forTopoIDRange=function(e,t){if(0!==t.length){for(var n=!1,r=0,i=this.orderedSubstrings;r<i.length;r++){var o=i[r],a=o.substringIDRange.clone();if(m.NSUUID.isEqual(t.charID.replicaID,a.charID.replicaID)&&!(a.max().compare(t.charID)<=0||a.charID.compare(t.max())>=0))if(a.charID.clock<t.charID.clock){var s=this.splitTopoSubstring_atIndex(o,t.charID.clock-a.charID.clock);t.max().compare(a.max())<0&&this.splitTopoSubstring_atIndex(s,t.length),e.push(s),n=g.YES}else a.max().compare(t.max())>0?(this.splitTopoSubstring_atIndex(o,t.max().clock-a.charID.clock),e.push(o),n=g.YES):e.push(o)}n&&this.invalidateCache()}},n.prototype.getCharacterRanges_forSubstrings=function(e,t){for(var n=new Set,r=0,i=t;r<i.length;r++){var o=i[r];n.add(o)}for(var a=0,s=0,c=this.orderedSubstrings;s<c.length;s++){o=c[s];var u=n.has(o),l=o.characterRangeLength;if(u){if(e.push(m.NSMakeRange(a,l)),1===n.size)break;n.delete(o)}a+=l}},n.prototype.getCharacterIndexForCharID=function(e){if(e.isEnd)return m.NSNotFound;for(var t=0,n=m.NSNotFound,r=0,i=this.orderedSubstrings;r<i.length;r++){var o=i[r],a=o.characterRangeLength,s=o.substringIDRange.charID;if(s.isEqual(e)){n=t;break}if(m.NSUUID.isEqual(s.replicaID,e.replicaID)&&s.clock<e.clock&&e.clock<o.substringIDRange.charID.clock+o.substringIDRange.length){n=t+e.clock-s.clock;break}t+=a}return n},n.prototype.splitTopoSubstring_atIndex=function(e,t){var n=e.substringIDRange.splitAt(t),r=v.TTSubstring.createWithTopoIDRange(n,e.substringIndex+(e.isTombstone?0:t)).retain();return r.isTombstone=e.isTombstone,r.setTimestamp(e.timestamp.clone()),r.children=e.children,e.children=[r],r.incomingEdgeCount=1,e.nextSubstring&&(e.nextSubstring.previousSubstring=r),r.nextSubstring=e.nextSubstring,e.nextSubstring=r,r.previousSubstring=e,r.setOrderBetween(e,r.nextSubstring),e.isTombstone||(e.setUntombstonedCodePointCount(this._substringCodePointCount(e)),r.setUntombstonedCodePointCount(this._substringCodePointCount(r))),r},n.prototype.codePointCountInCodeUnitIndexRange=function(e,t){var n=this._attributedString.codeUnitIndexToCodePointIndex(e),r=this._attributedString.codeUnitIndexToCodePointIndex(u.CodeUnitIndexOps.add(e,t));return u.CodePointCountOps.subtract(r,n)},Object.defineProperty(n.prototype,"orderedSubstrings",{get:function(){return this._cacheInvalid&&this.updateCache(),this._orderedSubstrings},enumerable:!1,configurable:!0}),n.prototype.updateCache=function(){var e=this;this._orderedSubstrings.length=0,this._cacheInvalid=!1;for(var t=null,n=0,r=0,i=this._startNodes;r<i.length;r++)T(i[r],(function(r){return e._orderedSubstrings.push(r),r.substringOrder=n,n+=v.TTSubstring.substringSpacing,t&&(t.nextSubstring=r),r.previousSubstring=t,t=r,!1}))},n.prototype.invalidateCache=function(){this._cacheInvalid=!0,this._orderedSubstrings.length=0},n.prototype.updateAttributedStringAfterMerge=function(){for(var e=g.autorelease(m.NSMutableAttributedString.alloc().init()),t=0,n=this.orderedSubstrings;t<n.length;t++){var r=n[t],i=e.length;r.isTombstone||e.appendAttributedSubstring_fromRange(this.attributedString,r.characterRange()),r.substringIndex=y.TTBoundedCheckedCastNSUIntegerToUInt32(i)}this.attributedString=e},n.prototype.updateSubstringIndexes=function(){for(var e=0,t=0,n=this.orderedSubstrings;t<n.length;t++){var r=n[t];r.substringIndex=e,r.isTombstone||(e+=r.length)}},n.prototype.coalesce=function(){var e=this;if(!(this._editCount>0||this.isFragment)){var t=this._startNodes[0],r=0,i=new Set,o=new Set,a=m.NSUUID.UUID(),s=n.unserialisedReplicaID;this.traverseUnordered((function(n){if(n===t)return!1;for(;1===n.children.length;){var c=n.children[0];if(1!==c.incomingEdgeCount)break;if(n.isTombstone!==c.isTombstone)break;if(n.substringIDRange.isSequentialWith(c.substringIDRange)&&n.timestamp.isEqual(c.timestamp))n.children=c.children.slice(0),n.substringIDRange.setLength(u.CodeUnitCountOps.add(n.substringIDRange.length,c.substringIDRange.length)),n.untombstonedCodePointCount===v.UNDEFINED_CODE_POINT_COUNT||c.untombstonedCodePointCount===v.UNDEFINED_CODE_POINT_COUNT?n.setUntombstonedCodePointCount(v.UNDEFINED_CODE_POINT_COUNT):n.setUntombstonedCodePointCount(u.CodePointCountOps.add(n.untombstonedCodePointCount,c.untombstonedCodePointCount)),o.add(c);else{if(!(m.NSUUID.isEqual(n.substringIDRange.charID.replicaID,s)&&m.NSUUID.isEqual(c.substringIDRange.charID.replicaID,s)&&n.timestamp.isEqual(c.timestamp)))break;var l=n.substringIDRange.clone();n.children=c.children.slice(0);var d=v.TTID.create(a,r),p=v.TTID.create(d.replicaID,d.clock+n.substringIDRange.length);n.setSubstringIDRange(v.TTIDRange.create(d.clone(),u.CodeUnitCountOps.add(n.substringIDRange.length,c.substringIDRange.length))),r+=n.length,e.updateTopoIDRange_toNewRangeID(l,v.TTIDRange.create(d.clone(),l.length)),e.updateTopoIDRange_toNewRangeID(c.substringIDRange,v.TTIDRange.create(p,c.substringIDRange.length)),i.add(n),o.add(c),e._hasLocalChanges=g.YES}}return!1}));for(var c=0,l=Array.from(i);c<l.length;c++){var d=l[c],p=d.substringIDRange.clone();d.substringIDRange.setCharID(v.TTID.create(s,this._unserializedClock)),this._unserializedClock=this._unserializedClock+d.length,this.updateTopoIDRange_toNewRangeID(p,d.substringIDRange)}for(var f=0,h=Array.from(o);f<h.length;f++)h[f].release();this.invalidateCache(),this.updateCache()}},n.prototype.updateTopoIDRange_toNewRangeID=function(e,t){for(var n=0,r=Array.from(this._objectsNeedingUpdatedRanges);n<r.length;n++)r[n].updateTopoIDRange_toNewRangeID(e,t);this._updateRangeBlock&&this._updateRangeBlock(e,t)},n.prototype.cleanupObjectsNeedingUpdatedRanges=function(){for(var e=new m.NSHashTable,t=0,n=Array.from(this._objectsNeedingUpdatedRanges);t<n.length;t++)(o=n[t]).hasTopoIDsThatCanChange||e.add(o);for(var r=0,i=Array.from(e);r<i.length;r++){var o=i[r];this._objectsNeedingUpdatedRanges.delete(o)}},n.prototype.generateIdsForLocalChanges=function(){this.generateIdsForLocalChangesSafeForSharedTimestamp(this.timestamp.isDocumentShared())},n.prototype.generateIdsForLocalChangesSafeForSharedTimestamp=function(e){if(this._hasLocalChanges){for(var r=this._replicaStyleClock,i=n.unserialisedReplicaID,o=g.NO,a=0,s=this.orderedSubstrings;a<s.length;a++){var c=s[a];if(m.NSUUID.isEqual(c.substringIDRange.charID.replicaID,i)){var u=v.TTIDRange.create(v.TTID.create(this._replicaUUID,this._replicaTextClock),c.substringIDRange.length);this.updateTopoIDRange_toNewRangeID(c.substringIDRange,u),c.setSubstringIDRange(u),this._replicaTextClock=this._replicaTextClock+c.substringIDRange.length,m.NSUUID.isEqual(c.timestamp.replicaID,i)&&(c.setTimestamp(v.TTID.create(this._replicaUUID,f.MIN_DATA_CLOCK)),this._replicaStyleClock=Math.max(this._replicaStyleClock,1)),o=g.YES}else if(m.NSUUID.isEqual(c.timestamp.replicaID,i)){var l=c.isTombstone,d=Math.max(c.timestamp.clock+(l?8:1),r);this._replicaStyleClock=Math.max(d+1,this._replicaStyleClock),c.setTimestamp(v.TTID.create(this._replicaUUID,d)),o=g.YES}}if(this.cleanupObjectsNeedingUpdatedRanges(),o){var p=this._replicaUUID;(!e||this._timestamp.clockForUUID_atIndex(p,t.TTMergeableStringTimestampTypeText)<this._replicaTextClock)&&this._timestamp.setClock_forUUID_atIndex(this._replicaTextClock,p,t.TTMergeableStringTimestampTypeText),(!e||this._timestamp.clockForUUID_atIndex(p,t.TTMergeableStringTimestampTypeStyle)<this._replicaStyleClock)&&this._timestamp.setClock_forUUID_atIndex(this._replicaStyleClock,p,t.TTMergeableStringTimestampTypeStyle)}this._unserializedClock=f.MIN_DATA_CLOCK,this._hasLocalChanges=g.NO}},n.prototype.canMergeString=function(e){var t=g.YES;if(this.isFragment&&(t=g.NO),t&&e.isFragment){for(var n=d.PooledOrderedSet.create(v.TTIDComparator.instance),r=0,i=e.startNodes;r<i.length;r++){var o=i[r];n.add(o.substringIDRange.last())}for(var a=0,s=e.endNodes;a<s.length;a++){var c=s[a];n.add(c.substringIDRange.charID)}for(var u=g.NO,l=0,p=this.orderedSubstrings;l<p.length;l++){for(var f=p[l],h=f.substringIDRange.charID,m=Math.max(1,f.substringIDRange.length),y=0;y<m;y++)if(n.remove(v.TTID.create(h.replicaID,h.clock+y)),0===n.size){u=g.YES;break}if(u)break}t=0===n.size,n.free()}return t},n.prototype.updateClock=function(){if(this._replicaUUID){for(var e=v.TTID.create(m.NSUUID.TTZero,f.MIN_DATA_CLOCK),t=v.TTID.create(m.NSUUID.TTZero,f.MIN_DATA_CLOCK),n=0,r=this.orderedSubstrings;n<r.length;n++){var i=r[n];!m.NSUUID.isEqual(i.substringIDRange.charID.replicaID,m.NSUUID.TTZero)&&i.substringIDRange.last().compare(e)>0&&(e=i.substringIDRange.last()),!m.NSUUID.isEqual(i.timestamp.replicaID,m.NSUUID.TTZero)&&i.timestamp.compare(t)>0&&(t=i.timestamp.clone())}e.replicaID.TTCompare(this._replicaUUID)>=0&&e.setClock(e.clock+1),t.replicaID.TTCompare(this._replicaUUID)>=0&&t.setClock(t.clock+1),this._replicaTextClock=e.clock,this._replicaStyleClock=t.clock}},n.prototype.check=function(e){if(function(e){var t=0;return P(e,(function(e){return++t,!1})),T(e,(function(e){return--t,!1})),0!==t}(this._startNodes[0]))return e&&(e.out=l.createFatalError("TTMergeableString graph has loop.",{})),g.NO;var t=p.RedBlackTree.create(m.NSUUIDComparator.instance),n=g.YES,r=null;return this.traverseUnordered((function(e){var i=e.substringIDRange.charID,o=e.substringIDRange.nsIDRange();if(0===o.length)return!1;var a=t.search(i.replicaID),s=null;if(null===a||a.isNil)s=m.NSMutableIndexSet.indexSetWithIndexesInRange(o),t.insertKeyValue(i.replicaID,s);else if(m.NSMaxRange(o)<m.NSNotFound){if((s=a.value).intersectsIndexesInRange(o))return r=l.createFatalError("TTMergeableString graph has two characters with the same id.",{}),n=g.NO,!0;s.addIndexesInRange(o)}else{var u="Index in -check ("+(i.replicaID?i.replicaID.toString():"null")+", "+o.location+"-"+m.NSMaxRange(o)+") >= NSNotFound";c.logger.error(u)}return!1})),r&&e&&(e.out=r),n},n.prototype.checkTimestampLogStyleErrors=function(e){var n=this;this.traverseUnordered((function(r){if(0===r.length)return!1;var i=r.substringIDRange.charID.replicaID,o=r.timestamp.replicaID,a=r.substringIDRange.last().clock,s=r.timestamp.clock,u=n.timestamp.clockForUUID_atIndex(i,t.TTMergeableStringTimestampTypeText),l=n.timestamp.clockForUUID_atIndex(o,t.TTMergeableStringTimestampTypeStyle);return u<=a&&n.timestamp.setClock_forUUID_atIndex(a+1,i,t.TTMergeableStringTimestampTypeText),l<=s&&(e&&c.logger.error("Style clock is too low."),n.timestamp.setClock_forUUID_atIndex(s+1,o,t.TTMergeableStringTimestampTypeStyle)),!1}))},n.prototype.dumpMergeData=function(e){},n.prototype.mergeWithString=function(e){return this.mergeWithString_mergeTimestamps(e,g.YES)},n.prototype.mergeWithString_mergeTimestamps=function(e,t){var n=e,r=this.delegate;if(r&&r.willBeginMerging&&r.willBeginMerging(),this.generateIdsForLocalChanges(),n.generateIdsForLocalChanges(),n.checkTimestampLogStyleErrors(g.NO),!this.canMergeString(n))return r&&r.didEndMerging&&r.didEndMerging(C.TTMergingResultFail),C.TTMergingResultFail;if(!(this.timestamp.compareTo(n.timestamp)&_.TTVectorTimestampComparisonAscending))return r&&r.didEndMerging&&r.didEndMerging(C.TTMergingResultNoChange),C.TTMergingResultNoChange;for(var i={},o=p.RedBlackTree.create(v.TTIDComparator.instance),a=new Set,s=new Set,d=new Set,f=new Map,h=this.attributedString.length,b=n.isFragment,w=0,E=this.orderedSubstrings;w<E.length;w++){var S=E[w];if(o.insertKeyValue(S.substringIDRange.charID,S),b)for(var T=0,P=n.startNodes;T<P.length;T++){var x=P[T];S.substringIDRange.contains(x.substringIDRange.charID)&&o.insertKeyValue(x.substringIDRange.charID,S)}}for(var A=n.orderedSubstrings,N=0;N<A.length;++N){if(S=A[N],null===(Z=o.search(S.substringIDRange.charID))||Z.isNil){i.out=l.createFatalError("Reached substring that is not in our graph.",{});break}if((q=Z.value).substringIDRange.length>S.substringIDRange.length){var R=(j=this.splitTopoSubstring_atIndex(q,S.substringIDRange.length)).substringIDRange.charID;o.insertKeyValue(R.clone(),j),void 0!==f.get(q)&&(f.set(j,f.get(q)),f.delete(q))}else q.substringIDRange.length<S.substringIDRange.length&&((j=this.splitTopoSubstring_atIndex(S,q.substringIDRange.length)).setUntombstonedCodePointCount(n._substringCodePointCount(j)),A.splice(N+1,0,j));for(var D=0,k=S.children;D<k.length;D++){var U=k[D],L=o.search(U.substringIDRange.charID),M=void 0;if(null===L||L.isNil)M=v.TTSubstring.createWithTopoSubstring(U).retain(),o.insertKeyValue(U.substringIDRange.charID,M),s.add(M),U.isTombstone||(M.substringIndex=y.TTBoundedCheckedCastNSUIntegerToUInt32(this.attributedString.length),this.attributedString.appendAttributedSubstring_fromRange(n.string,U.characterRange()));else if(!(M=L.value).substringIDRange.charID.isEqual(U.substringIDRange.charID)){var j=this.splitTopoSubstring_atIndex(M,U.substringIDRange.charID.clock-M.substringIDRange.charID.clock);o.insertKeyValue(j.substringIDRange.charID,j),M=j}var F=Z.value;-1===F.children.indexOf(M)&&(f.has(F)||f.set(F,F.children.length),F.addChild(M))}}if(this.invalidateCache(),i.out||!this.check(i)){c.logger.error("Failed to merge strings: "+i.out),c.logger.error("Failed to merge strings.");for(var B=0,z=Array.from(f);B<z.length;B++)(V=z[B])[0].children.length=V[1];O(this._startNodes[0],(function(e){return e.incomingEdgeCount=0,!1})),O(this._startNodes[0],(function(e){for(var t=0,n=e.children;t<n.length;t++)n[t].incomingEdgeCount++;return!1})),this.attributedString.replaceCharactersInRange_withString(m.NSMakeRange(h,this.attributedString.length-h),"");for(var H=0,W=Array.from(s);H<W.length;H++){var V;(V=W[H]).release()}return this.invalidateCache(),this.coalesce(),this.dumpMergeData(n),r&&r.didEndMerging&&r.didEndMerging(C.TTMergingResultFail),C.TTMergingResultFail}for(N=0;N<A.length;N++){var Z,q;S=A[N],(q=(Z=o.search(S.substringIDRange.charID)).value).timestamp.compare(S.timestamp)<0&&(!q.isTombstone&&S.isTombstone?(a.add(q),q.setUntombstonedCodePointCount(this._substringUntombstonedCodePointCount(q))):q.isTombstone&&!S.isTombstone?s.add(q):q.isTombstone||S.isTombstone||d.add(q),S.isTombstone||(q.isTombstone?(q.substringIndex=y.TTBoundedCheckedCastNSUIntegerToUInt32(this.attributedString.length),this.attributedString.appendAttributedSubstring_fromRange(n.string,S.characterRange())):this.attributedString.replaceCharactersInRange_withAttributedSubstring_fromRange(q.characterRange(),n.string,S.characterRange())),q.isTombstone=S.isTombstone,q.setTimestamp(S.timestamp))}if(this.sortSplitNodes(),this.invalidateCache(),n.invalidateCache(),this.updateAttributedStringAfterMerge(),t&&(this.timestamp.mergeWithTimestamp(n.timestamp),this.updateClock(),this.checkTimestampLogStyleErrors(g.YES)),r){r.beginEditing();for(var K=0,G=u.MIN_CODE_UNIT_COUNT,Y=u.MIN_CODE_POINT_COUNT,Q=m.NSMakeRange(0,0),X=g.NO,J=[],$=0,ee=this.orderedSubstrings;$<ee.length;$++){S=ee[$];var te=s.has(S),ne=a.has(S);te&&!S.isTombstone?(X||(Q.location=K,Q.length=0,G=u.MIN_CODE_UNIT_COUNT,Y=u.MIN_CODE_POINT_COUNT,X=g.YES),Q.length+=S.substringIDRange.length,G=u.CodeUnitCountOps.add(G,S.length),Y=u.CodePointCountOps.add(Y,S.untombstonedCodePointCount)):!te&&ne?(X||(Q.location=K,Q.length=0,G=u.MIN_CODE_UNIT_COUNT,Y=u.MIN_CODE_POINT_COUNT,X=g.YES),G=u.CodeUnitCountOps.subtract(G,S.substringIDRange.length),Y=u.CodePointCountOps.subtract(Y,S.untombstonedCodePointCount)):!te&&X&&(r.edited_range_changeInLength(I.NSTextStorageEditedCharacters,Q,G,Y),K+=G,X=g.NO),!te&&d.has(S)&&J.push(m.NSMakeRange(K,S.length)),te||S.isTombstone&&!ne||(K+=S.substringIDRange.length)}for(var re=0,ie=J;re<ie.length;re++){var oe=ie[re];r.edited_range_changeInLength(I.NSTextStorageEditedAttributes,oe,u.MIN_CODE_UNIT_COUNT,u.MIN_CODE_POINT_COUNT)}r.endEditing()}var ae=a.size>0||s.size>0||d.size>0?C.TTMergingResultUpdated:C.TTMergingResultNoChange;return r&&r.didEndMerging&&r.didEndMerging(ae),ae},n.prototype.sortSplitNodes=function(){!function e(t){for(var n=t.substringIDRange.charID.clone(),r=0,i=[],o=new Map;t&&t.children.length>0;)if(t.children.length>1&&E(t),1===t.children.length){if((t=t.children[0]).incomingEdgeCount>1){r=1;break}n=v.TTID.min(n,t.substringIDRange.charID)}else{for(var a=0,s=i;a<s.length;a++)s[a][0].release();i.length=0,o.clear();for(var c=0,u=t.children;c<u.length;c++){var l=u[c];o.set(l,1),i.push([S.alloc().initWithMinimumID_pathEnd_numberOfSeenIncomingEdges(v.TTID.create(null,f.MIN_DATA_CLOCK),l,0),l])}do{for(var d=new Map,p=0,m=Array.from(o);p<m.length;p++){var g=m[p],y=(l=g[0],g[1]);if(l.incomingEdgeCount<=y){for(var b=e(l),_=0,C=i.length;_<C;++_)i[_][0].pathEnd===l&&null!==i[_][0].minimumID.replicaID&&(b.minimumID=v.TTID.min(b.minimumID,i[_][0].minimumID));for(_=0,C=i.length;_<C;_++)i[_][0].pathEnd===l&&(i[_][0].autorelease(),i[_][0]=b.retain());n=v.TTID.min(n,b.minimumID),l=b.pathEnd,y=b.numberOfSeenIncomingEdges}var I=d.get(l);void 0===I?d.set(l,y):d.set(l,I+y)}o=d,i=h.stableMergeSort(i,(function(e,t){var n=v.TTSubstring.compare(e[0].pathEnd,t[0].pathEnd);return 0===n?e[0].minimumID.compare(t[0].minimumID):n}))}while(o.size>1);_=0;for(var w=t.children.length;_<w;++_)t.children[_]=i[_][1];var T=Array.from(o)[0];if(t=T[0],r=T[1],t.incomingEdgeCount>r)break}for(var O=0,P=i;O<P.length;O++)P[O][0].release();return i.length=0,S.alloc().initWithMinimumID_pathEnd_numberOfSeenIncomingEdges(n,t,r).autorelease()}(this._startNodes[0])},n.prototype.traverseUnordered=function(e){for(var t=0,n=this._startNodes;t<n.length;t++)P(n[t],e)},n.prototype.description=function(){return"<TTMergeableString "+h.uniqueID(this)+" = '"+this.string.UTF16String+"'>"},n.prototype.isEqual=function(e){return this.attributedString.isEqual(e.attributedString)?this.graphIsEqual(e):g.NO},n.prototype.graphIsEqual=function(e){var t=!0,n=p.RedBlackTree.create(v.TTIDComparator.instance);if(this.coalesce(),e.coalesce(),this.traverseUnordered((function(e){return n.insertKeyValue(e.substringIDRange.charID,[e,null]),!1})),e.traverseUnordered((function(e){var r=n.search(e.substringIDRange.charID);return null===r||r.isNil||!e.timestamp.isEqual(r.value[0].timestamp)?(t=!1,!0):(r.value[1]=e,!1)})),t)for(var r=0,i=n._impl.dbg_nodes;r<i.length;r++){var o=i[r],a=o.value[0],s=o.value[1];if(!a||!s){t=!1;break}var c=a.children.length;if(c!==s.children.length){t=!1;break}for(var u=0;u<c;u++)if(!a.children[u].substringIDRange.charID.isEqual(a.children[u].substringIDRange.charID)){t=!1;break}if(!t)break}return t},n.prototype.dotDescription=function(e){var n="";n+="subgraph cluster_"+e+h.uniqueID(this)+"_"+e+' {\n  rankdir="LR";\n';var r=this.isFragment?"<Fragment>":this.string.string.UTF16String;r=r.replace(/\r?\n/g,"\\n"),n+='  label="'+this._replicaUUID.TTShortDescription+"_"+e+" ("+h.castToSigned32bit(this._timestamp.clockForUUID_atIndex(this._replicaUUID,t.TTMergeableStringTimestampTypeText))+")    '"+r+"'\"\n",n+="  color=lightgrey;\n";for(var i=0,o=this.orderedSubstrings;i<o.length;i++){var a=o[i];if(-1!==this._startNodes.indexOf(a)){var s=a.substringIDRange.last();n+="  N"+e+h.uniqueID(a)+' [label="Start\\n'+s.replicaID.TTShortDescription+","+h.castToSigned32bit(s.clock)+'"]\n'}else if(-1!==this._endNodes.indexOf(a)){var c=a.substringIDRange.charID;n+="  N"+e+h.uniqueID(a)+' [label="End\\n'+c.replicaID.TTShortDescription+","+h.castToSigned32bit(c.clock)+'"]\n'}else{var u="";if(!a.isTombstone){var l=this.attributedString.string.substringWithRange(a.characterRange());l&&(u=l.UTF16String)}n+="  N"+e+h.uniqueID(a)+' [label="'+u+" "+a.substringIDRange.charID.replicaID.TTShortDescription+","+a.substringIDRange.charID.clock+"-"+(a.substringIDRange.charID.clock+a.substringIDRange.length-1)+" ("+a.timestamp.replicaID.TTShortDescription+","+h.castToSigned32bit(a.timestamp.clock)+")]\n"}for(var d=0,p=a.children;d<p.length;d++){var f=p[d];n+="  N"+e+h.uniqueID(a)+" -> N"+e+h.uniqueID(f)+"\n"}}return n+"}\n"},n.prototype.saveToArchive=function(){this.generateIdsForLocalChanges(),this.coalesce(),this.checkTimestampLogStyleErrors(g.YES);var e={};return this.saveSubstrings_archiveSet_linkSet_archivedString_toArchive(this.orderedSubstrings,null,null,null,e),e.out},n.prototype.saveSubstrings_archiveSet_linkSet_archivedString_toArchive=function(e,t,n,r,i){var o=this;i.out={string:"",substring:[],attributeRun:[]};var a=new Map;e.forEach((function(e,t){a.set(e,t)}));var s=null;if(r){var c=g.autorelease(m.NSMutableAttributedString.alloc().init());s=c}var l=this.timestamp.sortedUUIDs(),d=p.RedBlackTree.create(m.NSUUIDComparator.instance);d.insertKeyValue(m.NSUUID.TTZero,0);for(var f=0,h=l.length;f<h;++f)d.insertKeyValue(l[f],f+1);var v="";e.forEach((function(e,r){var c={charID:{},length:u.MIN_CODE_UNIT_COUNT,timestamp:{}};if(i.out.substring.push(c),c.charID.replicaID=d.search(e.substringIDRange.charID.replicaID).value,c.charID.clock=e.substringIDRange.charID.clock,!t||t.has(e)){c.timestamp.replicaID=d.search(e.timestamp.replicaID).value,c.timestamp.clock=e.timestamp.clock;var l=e.characterRange(),p=l.location,f=l.length;v+=o.attributedString.UTF16String.substr(p,f),e.isTombstone?c.tombstone=!0:s&&s.appendAttributedString(o.attributedString.attributedSubstringFromRange(e.characterRange()))}else c.timestamp.replicaID=0,c.timestamp.clock=0,c.tombstone=!0;c.length=e.substringIDRange.length;for(var h=0,m=e.children;h<m.length;h++){var g=m[h];n&&!n.has(g)||(c.child||(c.child=[]),c.child.push(a.get(g)))}})),i.out.string=v,r&&(r.out=s),this.timestamp.isDocumentShared()||(i.out.timestamp=this.timestamp.savetoArchive())},n.prototype.init=function(){return this.initWithReplicaID_asFragment(null,!1)},n.prototype.initWithReplicaID=function(e){return this.initWithReplicaID_asFragment(e,!1)},n.prototype.initWithReplicaID_asFragment=function(t,n){var r=e.prototype.init.call(this);if(r){if(r._replicaUUID=t?t.retain():null,r._unserializedClock=f.MIN_DATA_CLOCK,!n){var i=v.TTSubstring.createWithTopoID(v.TTID.create(m.NSUUID.TTZero,f.MIN_DATA_CLOCK),0,u.MIN_CODE_UNIT_COUNT).retain(),o=v.TTSubstring.createWithTopoID(v.TTID.create(m.NSUUID.TTZero,f.MAX_DATA_CLOCK),0,u.MIN_CODE_UNIT_COUNT).retain();i.children.push(o),o.incomingEdgeCount=1,i.nextSubstring=o,o.previousSubstring=i,i.substringOrder=0,o.substringOrder=v.TTSubstring.substringSpacing,r._startNodes.push(i),r._endNodes.push(o)}r.timestamp=b.TTVectorMultiTimestamp.createWithCapacity(2),r._objectsNeedingUpdatedRanges=new m.NSHashTable,r._cacheInvalid=!0,r.attributedString=m.NSMutableAttributedString.alloc().init().autorelease()}return r},n.prototype.initWithArchive_andReplicaID=function(e,t){return this.initWithArchive_andReplicaID_withOrderedSubstrings(e,t,null)},n.prototype.initWithArchive_andReplicaID_andSharedTimestamp=function(e,t,n){return this.initWithArchive_andReplicaID_withOrderedSubstrings_timestamp(e,t,null,n)},n.prototype.initWithArchive_andReplicaID_withOrderedSubstrings=function(e,t,n){return this.initWithArchive_andReplicaID_withOrderedSubstrings_timestamp(e,t,n,null)},n.prototype.initWithArchive_andReplicaID_withOrderedSubstrings_timestamp=function(e,t,n,r){var i=g.YES,o=this.initWithReplicaID_asFragment(t,g.YES);if(o){var a=null;if("string"===typeof e.string&&(a=e.string),"string"!==typeof a)return c.logger.error("Corrupt mergeable string, bad string data."),null;o.attributedString=m.NSMutableAttributedString.alloc().initWithString(a).autorelease();for(var s=e.substring.length,u=[],l=null,d=0;d<s;d++){var p=v.TTSubstring.create();p.substringOrder=d,u.push(p.retain()),l&&(l.nextSubstring=p),p.previousSubstring=l,l=p}o.timestamp=r||b.TTVectorMultiTimestamp.createWithArchive_andCapacity(e.timestamp,2);for(var f=o.timestamp.sortedUUIDs(),h=f.length,y=0,_=f;y<_.length;y++)if(_[y].isEqual(m.NSUUID.TTZero)){i=g.NO;break}var C=g.NO,I=new Set,w=0;for(d=0;d<s&&i;d++){var E=e.substring[d];if(void 0===E.charID||void 0===E.length||void 0===E.timestamp){c.logger.error("Corrupt mergeable string, substring missing component."),i=g.NO;break}var S=v.TTIDRange.create(),T=E.charID.replicaID,O=E.timestamp.replicaID;if(T>h||O>h){c.logger.error("Corrupt mergeable string, uuid index > number of uuids - loading empty string."),i=g.NO;break}if(S.charID.resetTo(T>0?f[T-1]:m.NSUUID.TTZero,E.charID.clock),S.setLength(E.length),0===T===(0===O)||void 0!==E.tombstone&&E.tombstone||(C=g.YES),u[d].timestamp.resetTo(O>0?f[O-1]:m.NSUUID.TTZero,E.timestamp.clock),u[d].substringIndex=w,void 0!==E.tombstone&&E.tombstone)u[d].isTombstone=!0;else if(w+=S.length,u[d].isTombstone=!1,S.length+u[d].substringIndex>o.attributedString.length){c.logger.error("Corrupt mergeable string, substring max > string max."),i=g.NO;break}u[d].setSubstringIDRange(S);for(var P=E.child?E.child.length:0,x=0;x<P;x++){var A=E.child[x];if(A>=s){c.logger.error("Corrupt mergeable string, child substring index > number of substrings."),i=g.NO;break}var N=u[A];u[d].addChild(N),I.add(N)}if(!i)break;I.has(u[d])||o.startNodes.push(u[d]),0===P&&o.endNodes.push(u[d])}if(w!==o.attributedString.length&&(c.logger.error("Corrupt mergeable string, length of substrings != attributedString length."),i=g.NO),i&&C&&!o.isFragment&&(c.logger.error("Corrupt mergeable string, zeroed UUID timestamp."),i=g.NO),i&&!o.isFragment)o.updateClock();else if(!i)for(o.startNodes.length=0,d=0;d<s;d++)u[d].release();n&&(n.out=u);for(var R=0,D=u;R<D.length;R++){var k=D[R],U=this.codePointCountInCodeUnitIndexRange(k.substringIndex,k.length);k.setUntombstonedCodePointCount(U)}}return i?o:null},n.prototype.i_saveDeltasSinceTimestamp_toArchive=function(e,n){this.generateIdsForLocalChanges(),this.coalesce();for(var r=[],i=new Set,o=new Set,a=0,s=this.orderedSubstrings;a<s.length;a++){var c=s[a],u=c.substringIDRange.max(),l=e.clockForUUID_atIndex(u.replicaID,t.TTMergeableStringTimestampTypeText),d=e.clockForUUID_atIndex(u.replicaID,t.TTMergeableStringTimestampTypeStyle);if(l<=u.clock||d<=c.timestamp.clock){o.add(c),i.has(c)||(r.push(c),i.add(c));for(var p=0,f=c.children;p<f.length;p++){var h=f[p];i.has(h)||(r.push(h),i.add(h))}}else for(var m=0,g=c.children;m<g.length;m++){var v=(h=g[m]).substringIDRange.max(),y=e.clockForUUID_atIndex(v.replicaID,t.TTMergeableStringTimestampTypeText),b=e.clockForUUID_atIndex(v.replicaID,t.TTMergeableStringTimestampTypeStyle);(y<=v.clock||b<=h.timestamp.clock)&&!i.has(c)&&(r.push(c),i.add(c))}}var _={};return this.saveSubstrings_archiveSet_linkSet_archivedString_toArchive(r,o,i,_,n),_.out},n.prototype.saveDeltaSinceTimestamp_toArchive=function(e,t){this.i_saveDeltasSinceTimestamp_toArchive(e,t)},n.prototype.getCodeUnitIndexForCodePointIndex=function(e){if(e<0)return-1;var t=this.attributedString.UTF16String;return 0===t.length?u.ZERO_CODE_UNIT_INDEX:e>=this._attributedString.codePointCount()?t.length:this._attributedString.codePointIndexToCodeUnitIndex(e)},Object.defineProperty(n.prototype,"dbg_linearSubstringOrderArray",{get:function(){return this._cacheInvalid?["cache invalid"]:this.orderedSubstrings.map((function(e){return e.substringOrder}))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_linearSubstringOrders",{get:function(){return this.dbg_linearSubstringOrderArray.join(", ")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_linearArray",{get:function(){var e=this;return this._cacheInvalid?["cache invalid"]:this._orderedSubstrings.map((function(t){if(t.dbg_isStart)return"start";if(t.dbg_isEnd)return"end";if(t.isTombstone)return"\u26b0\ufe0f["+t.substringIDRange.dbg_description+"],"+t.substringIDRange.length+","+t.untombstonedCodePointCount;var n=e.attributedString.string.substringWithRange(t.characterRange()),r=n?n.UTF16String.replace(/\n/g,"\\n").replace(/\uFFFC/g,"\\uFFFC"):"<ERROR>";return"["+t.substringIDRange.dbg_description+"],"+t.substringIDRange.length+","+t.untombstonedCodePointCount+' "'+r+'"'}))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_linearRender",{get:function(){return this._cacheInvalid?"cache invalid":this.dbg_linearArray.join(" --\x3e ")},enumerable:!1,configurable:!0}),n.dbg_releaseUnserialisedReplicaID=function(){n._unserialisedReplicaID&&(n._unserialisedReplicaID.release(),n._unserialisedReplicaID=null)},n._unserialisedReplicaID=null,n}(g.NSObject);t.TTMergeableString=A,A.initializeRefcounted()},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(1078)),r(n(1079))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(891),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.initPooledOrderedSet=function(t){e.prototype.initPooledOrderedSetBase.call(this,t)},t.create=function(e){var t=this.alloc_own();return t.initPooledOrderedSet(e),t},i([o.sealed],t)}(n(1079).PooledOrderedSetBase);t.PooledOrderedSet=a,a.initializePooled()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(891),o=n(1024),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.comparator=null,t._itemTree=null,t}return r(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this._itemTree.nodeCount},enumerable:!0,configurable:!0}),t.prototype.add=function(e){this._itemTree.search(this._itemTree.root,e).isNil&&this._itemTree.insertKeyValue(e,null)},t.prototype.remove=function(e){var t=this._itemTree.search(this._itemTree.root,e);t.isNil||this._itemTree.deleteNode(t).free()},t.prototype.contains=function(e){return!this._itemTree.search(this._itemTree.root,e).isNil},t.prototype.toArray=function(e){return this._itemTree.inorderKeys(this._itemTree.root,e)},t.prototype.forEach=function(e){this._itemTree.inorderTreeWalk(this._itemTree.root,(function(t){e(t.key)}))},t.prototype.forEachWithPrevious=function(e){var t=[];this._itemTree.inorderKeys(this._itemTree.root,t);var n=t.length;if(n>=2)for(var r=t[0],i=1;i<n;++i){var o=t[i];e(o,r),r=o}},t.prototype.dbg_isValid=function(){return this.dbg_everyKeyIsUniqueAndSorted},Object.defineProperty(t.prototype,"dbg_everyKeyIsUniqueAndSorted",{get:function(){var e=this,t=!0;return this._itemTree.inorderTreeWalkWithPredecessor(this._itemTree.root,(function(n,r){t=t&&e.comparator.lessThan(r.key,n.key)})),t},enumerable:!0,configurable:!0}),t.prototype.free=function(){this._itemTree.free(),e.prototype.free.call(this)},t.prototype.initPooledOrderedSetBase=function(e){this.comparator=e,this._itemTree=o.PooledRedBlackTree.create(o.PooledRedBlackTreeNode.createSentinelNil(),e)},t}(i.Pooled);t.PooledOrderedSetBase=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1081),t),i(n(1082),t),i(n(1084),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTSubstring=t.UNDEFINED_CODE_POINT_COUNT=void 0;var i=n(909),o=n(891),a=n(908),s=n(1049),c=n(1082);t.UNDEFINED_CODE_POINT_COUNT=void 0;var u=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.substringIDRange=null,t._timestamp=null,t.substringIndex=null,t.substringOrder=null,t.previousSubstring=null,t.nextSubstring=null,t.isTombstone=!1,t.children=[],t.incomingEdgeCount=0,t._untombstonedCodePointCount=i.MIN_CODE_POINT_COUNT,t}return r(n,e),Object.defineProperty(n.prototype,"timestamp",{get:function(){return this._timestamp},enumerable:!1,configurable:!0}),n.prototype.setUntombstonedCodePointCount=function(e){this._untombstonedCodePointCount=e},Object.defineProperty(n.prototype,"untombstonedCodePointCount",{get:function(){return this._untombstonedCodePointCount},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"length",{get:function(){return this.substringIDRange.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"firstCodeUnitIndex",{get:function(){return this.substringIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endCodeUnitIndex",{get:function(){var e=this.isTombstone?0:this.substringIDRange.length;return this.substringIndex+e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"untombstonedEndCodeUnitIndex",{get:function(){return this.substringIndex+this.substringIDRange.length},enumerable:!1,configurable:!0}),n.prototype.characterRange=function(){return s.NSMakeRange(this.substringIndex,this.isTombstone?0:this.substringIDRange.length)},Object.defineProperty(n.prototype,"characterRangeLength",{get:function(){return this.isTombstone?0:this.substringIDRange.length},enumerable:!1,configurable:!0}),n.prototype.addChild=function(e){this.children.push(e),e.incomingEdgeCount++},n.prototype.isStartNode=function(){return 0===this.incomingEdgeCount},n.prototype.isEndNode=function(){return 0===this.children.length},n.prototype.setSubstringIDRange=function(e){this.substringIDRange!==e&&(this.substringIDRange&&this.substringIDRange.release(),this.substringIDRange=e.retain())},n.prototype.setTimestamp=function(e){this._timestamp!==e&&(this._timestamp&&this._timestamp.release(),this._timestamp=e.retain())},n.prototype.setOrderBetween=function(e,t){this.substringOrder=t?(e.substringOrder+t.substringOrder)/2:e.substringOrder+n.substringSpacing},n.compare=function(e,t){var n=e.substringIDRange.charID,r=n.replicaID,i=t.substringIDRange.charID,o=i.replicaID;return e===t?0:0===r.TTCompare(o)?i.clock-n.clock:n.clock<i.clock||n.clock===i.clock&&s.NSUUID.compare(r,o)<0?-1:1},Object.defineProperty(n.prototype,"dbg_isStart",{get:function(){return 0===this.incomingEdgeCount},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_isEnd",{get:function(){return 0===this.children.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dbg_clock",{get:function(){return this.timestamp.clock},enumerable:!1,configurable:!0}),n.prototype.dbg_linearChildren=function(e){return void 0===e&&(e=10),0===this.children.length?this.dbg_description:this.dbg_description+" --\x3e {"+this.children.map((function(e,t){return t+": "+e.dbg_linearChildren()})).join(" --\x3e ")+"}"},Object.defineProperty(n.prototype,"dbg_description",{get:function(){return this.substringIndex+" "+this.timestamp.dbg_description+" "+this.length},enumerable:!1,configurable:!0}),n.prototype.free=function(){this.incomingEdgeCount=0,this.children.length=0,this.isTombstone=!1,this.substringIndex=null,this.substringOrder=null,this.previousSubstring=null,this.nextSubstring=null,this._timestamp&&(this._timestamp.release(),this._timestamp=null),this.substringIDRange&&(this.substringIDRange.release(),this.substringIDRange=null),this._untombstonedCodePointCount=t.UNDEFINED_CODE_POINT_COUNT,e.prototype.free.call(this)},n.create=function(){var e=this.alloc(),t=e;return e.substringIndex=0,e.substringOrder=null,e.previousSubstring=null,e.nextSubstring=null,e.isTombstone=!1,t.substringIDRange=c.TTIDRange.create().retain(),e._timestamp=c.TTID.create(null,a.MIN_DATA_CLOCK).retain(),e._untombstonedCodePointCount=i.MIN_CODE_POINT_COUNT,e.autorelease()},n.createWithTopoID=function(e,n,r){var o=this.alloc(),a=o;return o.substringIndex=n,o.substringOrder=null,o.previousSubstring=null,o.nextSubstring=null,o.isTombstone=!1,a.substringIDRange=c.TTIDRange.create(e.clone(),r).retain(),o._timestamp=e.clone().retain(),o._untombstonedCodePointCount=r===i.MIN_CODE_UNIT_COUNT?i.MIN_CODE_POINT_COUNT:t.UNDEFINED_CODE_POINT_COUNT,o.autorelease()},n.createWithTopoIDRange=function(e,n){var r=this.alloc(),o=r;return r.substringIndex=n,r.substringOrder=null,r.previousSubstring=null,r.nextSubstring=null,r.isTombstone=!1,o.substringIDRange=e.clone().retain(),r._timestamp=c.TTID.create(null,a.MIN_DATA_CLOCK).retain(),r._untombstonedCodePointCount=r.substringIDRange.length===i.MIN_CODE_UNIT_COUNT?i.MIN_CODE_POINT_COUNT:t.UNDEFINED_CODE_POINT_COUNT,r.autorelease()},n.createWithTopoSubstring=function(e){var t=this.alloc();return t.substringIDRange=e.substringIDRange.clone().retain(),t._timestamp=e.timestamp.clone().retain(),t.substringIndex=e.substringIndex,t.substringOrder=null,t.previousSubstring=null,t.nextSubstring=null,t.isTombstone=e.isTombstone,t._untombstonedCodePointCount=e._untombstonedCodePointCount,t.autorelease()},n.substringSpacing=10,n}(o.Refcounted);t.TTSubstring=u,u.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.TTIDRange=t.TTID=t.TTIDComparator=void 0;var o=n(972),a=n(891),s=n(908),c=n(1049),u=n(1083),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.prototype.compare=function(e,t){return e===t||c.NSUUID.isEqual(e.replicaID,t.replicaID)&&e.clock===t.clock?0:e.clock<t.clock||e.clock===t.clock&&c.NSUUID.compare(e.replicaID,t.replicaID)<0?-1:1},t.instance=new n,i([a.sealed],t)}(o.ComparatorBase);t.TTIDComparator=l;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.replicaID=null,t.clock=null,t}var n;return r(t,e),n=t,t.prototype.compare=function(e){return l.instance.compare(this,e)},t.prototype.add=function(e){return n.create(this.replicaID,s.asValidatedDataClock(this.clock+e))},t.prototype.reset=function(e){this.replicaID&&this.replicaID.release(),this.replicaID=e.replicaID?e.replicaID.copy():null,this.clock=e.clock},t.prototype.resetTo=function(e,t){this.replicaID&&this.replicaID.release(),this.replicaID=e?e.retain():null,this.clock=t},t.prototype.resetToStart=function(){this.replicaID&&this.replicaID.release(),this.replicaID=c.NSUUID.TTZero.retain(),this.clock=s.MIN_DATA_CLOCK},t.prototype.resetToEnd=function(){this.replicaID&&this.replicaID.release(),this.replicaID=c.NSUUID.TTZero.retain(),this.clock=s.MAX_DATA_CLOCK},t.prototype.setReplicaID=function(e){this.replicaID&&this.replicaID.release(),this.replicaID=e?e.retain():null},t.prototype.setClock=function(e){this.clock=e},t.prototype.clone=function(){return n.create(this.replicaID,this.clock)},t.prototype.isEqual=function(e){return!!(e&&this.replicaID&&e.replicaID)&&this.replicaID.isEqual(e.replicaID)&&this.clock===e.clock},t.min=function(e,t){var n=e.compare(t);return n<0?e:n>0?t:e},Object.defineProperty(t.prototype,"isStart",{get:function(){return c.NSUUID.isEqual(this.replicaID,c.NSUUID.TTZero)&&this.clock===s.MIN_DATA_CLOCK},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnd",{get:function(){return c.NSUUID.isEqual(this.replicaID,c.NSUUID.TTZero)&&this.clock===s.MAX_DATA_CLOCK},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_description",{get:function(){return this.replicaID.TTShortDescription+" "+this.clock},enumerable:!1,configurable:!0}),t.prototype.free=function(){this.replicaID&&this.replicaID.release(),e.prototype.free.call(this)},t.create=function(e,t){void 0===e&&(e=null),void 0===t&&(t=NaN);var n=this.alloc(),r=n;return r.replicaID=e?e.retain():null,r.clock=t,n.autorelease()},t.createStart=function(){return n.create(c.NSUUID.TTZero,s.MIN_DATA_CLOCK)},t.createEnd=function(){return n.create(c.NSUUID.TTZero,s.MAX_DATA_CLOCK)},n=i([a.sealed],t)}(a.Refcounted);t.TTID=d,d.initializeRefcounted();var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.charID=null,t.length=u.asTTValidatedCodeUnitCount(0),t}var n;return r(t,e),n=t,t.prototype.isSequentialWith=function(e){return c.NSUUID.isEqual(this.charID.replicaID,e.charID.replicaID)&&this.charID.clock+this.length===e.charID.clock},t.prototype.splitAt=function(e){var t=n.create(this.charID.add(e),u.asTTValidatedCodeUnitCount(this.length-e));return this.length=u.asTTValidatedCodeUnitCount(e),t},t.prototype.subrange=function(e,t){return n.create(this.charID.add(e),t)},t.prototype.splitPairAt=function(e){return[n.create(this.charID,u.asTTValidatedCodeUnitCount(e)),n.create(this.charID.add(e),u.asTTValidatedCodeUnitCount(this.length-e))]},t.prototype.nsIDRange=function(){return c.NSMakeRange(this.charID.clock,this.length)},t.prototype.contains=function(e){return c.NSUUID.isEqual(e.replicaID,this.charID.replicaID)&&this.charID.clock<=e.clock&&e.clock<s.asValidatedDataClock(this.charID.clock+this.length)},t.prototype.last=function(){var e=this.charID.clock+this.length-1,t=s.asValidatedDataClock(-1===e?s.MAX_DATA_CLOCK:e);return d.create(this.charID.replicaID,t)},t.prototype.max=function(){return d.create(this.charID.replicaID,s.asValidatedDataClock(this.charID.clock+this.length))},t.prototype.setCharID=function(e){this.charID!==e&&(this.charID.release(),this.charID=e.retain())},t.prototype.setLength=function(e){this.length=e},t.prototype.clone=function(){return n.create(this.charID.clone(),this.length)},Object.defineProperty(t.prototype,"dbg_description",{get:function(){var e=this.charID;return e.replicaID.TTShortDescription+" "+e.clock+"-"+(e.clock+this.length-1)},enumerable:!1,configurable:!0}),t.prototype.free=function(){this.charID.release(),e.prototype.free.call(this)},t.create=function(e,t){void 0===e&&(e=null),void 0===t&&(t=NaN);var n=this.alloc(),r=n;return r.charID=e?e.retain():d.create(null,s.MIN_DATA_CLOCK).retain(),r.length=t,n.autorelease()},n=i([a.sealed],t)}(a.Refcounted);t.TTIDRange=p,p.initializeRefcounted()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asTTValidatedCodeUnitIndex=t.asTTValidatedCodeUnitCount=t.TTBoundedCheckedCastNSUIntegerToUInt32=void 0,n(908),t.TTBoundedCheckedCastNSUIntegerToUInt32=function(e){return e},t.asTTValidatedCodeUnitCount=function(e){return e},t.asTTValidatedCodeUnitIndex=function(e){return e}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.TTSubstringIndexComparator=void 0;var o=n(972),a=n(891),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.doesSubstringWithMatchingIndexExistInChildren=function(e,t){for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o===e)return!0;if(n.doesSubstringWithMatchingIndexExistInChildren(e,o.children))return!0}return!1},t.prototype.compare=function(e,t){return e===t||e.substringOrder===t.substringOrder?0:e.substringOrder-t.substringOrder},t.instance=new n,n=i([a.sealed],t)}(o.ComparatorBase);t.TTSubstringIndexComparator=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TTVectorMultiTimestamp=void 0;var s=n(942),c=n(1077),u=n(908),l=a(n(1053)),d=n(1049),p=n(1055),f=n(1083),h=n(1086),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timestamps=[],t}return r(t,e),t.prototype.isDocumentShared=function(){return!1},t.prototype.copy=function(){var e=t.createWithCapacity(this.timestamps.length);return e.mergeWithTimestamp(this),e.retain()},t.prototype.equals=function(e){return this.compareTo(e)===h.TTVectorTimestampComparison.Same},t.prototype.isEqual=function(e){return e instanceof t?this.compareTo(e)===h.TTVectorTimestampComparisonSame:p.NO},t.prototype.clockElementForUUID_atIndex=function(e,t){if(0<=t&&t<this.timestamps.length){var n=this.timestamps[t].clockElementForUUID(e);if(void 0!==n)return n}return h.TTVectorTimestampElement.nilInstance},t.prototype.clockForUUID_atIndex=function(e,t){if(0<=t&&t<this.timestamps.length){var n=this.timestamps[t].clockForUUID(e);if(void 0!==n)return n}return u.MIN_DATA_CLOCK},t.prototype.setClock_forUUID_atIndex=function(e,t,n){return this.timestamps[n].setClock_forUUID(e,t)},t.prototype.setClock_subclock_forUUID_atIndex=function(e,t,n,r){return this.timestamps[r].setClock_subclock_forUUID(e,t,n)},t.prototype.incrementClockForUUIDAtIndex=function(e,t,n){return void 0===n&&(n=1),this.timestamps[t].incrementClockForUUID(e,n)},t.prototype.sortedUUIDs=function(){for(var e=c.PooledOrderedSet.create(d.NSUUIDComparator.instance),t=this.timestamps,n=0,r=t.length;n<r;++n)for(var i=t[n].allUUIDs(),o=0,a=i.length;o<a;++o)e.add(i[o]);var s=[];return e.toArray(s),e.free(),s},t.prototype.replicaUUIDByIndex=function(e){return this.sortedUUIDs()[e]},t.prototype.compareTo=function(e){for(var t=h.TTVectorTimestampComparison.Same,n=this.timestamps,r=0,i=n.length;r<i&&(t|=n[r].compareTo(e.timestamps[r]))!==(h.TTVectorTimestampComparison.Ascending|h.TTVectorTimestampComparison.Descending);++r);return t},t.prototype.mergeWithTimestamp=function(e){for(var t=this.timestamps,n=0,r=t.length;n<r;++n)t[n].mergeWithTimestamp(e.timestamps[n])},t.prototype.savetoArchive=function(){for(var e={clock:[]},t=0,n=this.sortedUUIDs();t<n.length;t++){var r=n[t],i={replicaClock:[]};e.clock.push(i);var o=r.bytes();i.replicaUUID=o;for(var a=0,s=this.timestamps.length;a<s;++a){var c=this.clockElementForUUID_atIndex(r,a),u={};i.replicaClock.push(u),c.clock>0&&(u.clock=f.TTBoundedCheckedCastNSUIntegerToUInt32(c.clock)),c.subclock>0&&(u.subclock=f.TTBoundedCheckedCastNSUIntegerToUInt32(c.subclock))}}return e},t.prototype.dealloc=function(){for(var t=this.timestamps,n=0,r=t.length;n<r;++n)t[n].release();t.length=0,e.prototype.dealloc.call(this)},t.createWithCapacity=function(e){for(var t=this.alloc(),n=t.timestamps,r=0;r<e;++r)n.push(h.TTVectorTimestamp.create().retain());return t.autorelease()},t.createWithTimestamps=function(e){for(var t=this.alloc(),n=0,r=e.length;n<r;++n)t.timestamps.push(e[n].copy());return t.autorelease()},t.createWithProtobuf=function(e,t){for(var n=e.clock,r=!0,i=this.createWithCapacity(t),o=0,a=n;o<a.length;o++){var s=a[o];if(!s.replicaUUID){r=!1;break}var c=l.fromProtobufBuffer(s.replicaUUID),p=c?d.NSUUID.alloc().initWithUUIDString(c).autorelease():d.NSUUID.TTZero;if(!p){r=!1;break}var f=s.replicaClock.length;if(f!==t){r=!1;break}for(var h=0;h<f;++h){var m=s.replicaClock[h].clock,g=s.replicaClock[h].subclock;i.setClock_subclock_forUUID_atIndex(m||u.MIN_DATA_CLOCK,g||u.MIN_DATA_CLOCK,p,h)}}return r?i:(i.release(),null)},t.createWithArchive_andCapacity=function(e,t){var n=p.YES,r=this.createWithCapacity(t);if(r)for(var i=0,o=e.clock.length;i<o;i++){var a=e.clock[i],c=d.NSUUID.fromProtobuf(a.replicaUUID);if(null===c){s.logger.error("TTVectorMultiTimestamp clock requires uuids."),n=p.NO;break}var l=a.replicaClock.length;if(l!==t){s.logger.error("TTVectorMultiTimestamp requires the same number of clocks as capacity "+l+" != "+t+"."),n=p.NO;break}for(var f=0;f<l;f++){var h=a.replicaClock[f],m=void 0!==h.clock&&null!==h.clock?h.clock:u.MIN_DATA_CLOCK,g=void 0!==h.subclock&&null!==h.subclock?h.subclock:u.MIN_DATA_CLOCK;r.setClock_subclock_forUUID_atIndex(m,g,c,f)}}return n?r:null},t.create=function(){return p.autorelease(this.alloc().init())},t.prototype.initWithTimestamps=function(e){for(var t=this.timestamps,n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.retain())}return this},t}(p.NSObject);t.TTVectorMultiTimestamp=m,m.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},a=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.TTVectorTimestamp=t.TTVectorTimestampElement=t.TTVectorTimestampComparisonDescending=t.TTVectorTimestampComparisonAscending=t.TTVectorTimestampComparisonSame=t.TTVectorTimestampComparison=void 0;var s,c=n(891),u=n(1024),l=n(908),d=n(1049),p=n(1055),f=n(1085);!function(e){e[e.Same=0]="Same",e[e.Ascending=1]="Ascending",e[e.Descending=4]="Descending"}(s=t.TTVectorTimestampComparison||(t.TTVectorTimestampComparison={})),t.TTVectorTimestampComparisonSame=s.Same,t.TTVectorTimestampComparisonAscending=s.Ascending,t.TTVectorTimestampComparisonDescending=s.Descending;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.clock=l.MIN_DATA_CLOCK,t.subclock=l.MIN_DATA_CLOCK,t}return r(t,e),t.prototype.setClock=function(e){this.clock=e},t.prototype.setSubclock=function(e){this.subclock=e},t.prototype.free=function(){this.clock=l.MIN_DATA_CLOCK,this.subclock=l.MIN_DATA_CLOCK,e.prototype.free.call(this)},t.create=function(e,t){void 0===e&&(e=l.MIN_DATA_CLOCK),void 0===t&&(t=l.MIN_DATA_CLOCK);var n=this.alloc(),r=n;return r.clock=e,r.subclock=t,n.autorelease()},Object.defineProperty(t,"nilInstance",{get:function(){return t.create(l.MIN_DATA_CLOCK,l.MIN_DATA_CLOCK)},enumerable:!1,configurable:!0}),t}(c.Refcounted);t.TTVectorTimestampElement=h,h.initializeRefcounted();var m=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._clock=null,t}var m;return r(n,e),m=n,n.prototype.isEqual=function(e){return e instanceof m?this.compareTo(e)===t.TTVectorTimestampComparisonSame:p.NO},n.prototype.clockElementForUUID=function(e){var t=this._clock.search(e);return null===t||t.isNil?h.nilInstance:t.value},n.prototype.clockForUUID=function(e){var t=this._clock.search(e);return null===t||t.isNil?l.MIN_DATA_CLOCK:t.value.clock},n.prototype.subclockForUUID=function(e){var t=this._clock.search(e);return null===t||t.isNil?l.MIN_DATA_CLOCK:t.value.subclock},n.prototype.setClock_forUUID=function(e,t){var n=this._clock.search(t);if(n.isNil){var r=h.create(e);this._clock.insertKeyValue(t.retain(),r.retain())}else n.value.clock=e},n.prototype.setClock_subclock_forUUID=function(e,t,n){var r=this._clock.search(n);if(r.isNil){var i=h.create(e,t);this._clock.insertKeyValue(n.retain(),i.retain())}else{var o=r.value;o.clock=e,o.subclock=t}},n.prototype.incrementClockForUUID=function(e,t){void 0===t&&(t=1);var n=this.clockForUUID(e);return null===n?(n=l.MIN_DATA_CLOCK+1,this.setClock_subclock_forUUID(n,l.MIN_DATA_CLOCK,e),n):(this.setClock_forUUID(n+t,e),n+1)},n.prototype.allUUIDs=function(){return Array.from(this._clock._impl.dbg_keys)},n.prototype.sortedUUIDs=function(){return this.allUUIDs().sort(d.NSUUID.compare)},n.prototype.compareTo=function(e){for(var t=!1,n=!1,r=this.allUUIDs(),i=e.allUUIDs(),c=new Set(function(){return o(this,(function(e){switch(e.label){case 0:return[5,a(r)];case 1:return e.sent(),[5,a(i)];case 2:return e.sent(),[2]}}))}()),u=0,l=Array.from(c);u<l.length;u++){var d=l[u],p=this.clockElementForUUID(d),f=e.clockElementForUUID(d);if(p.clock<f.clock?t=!0:p.clock>f.clock?n=!0:p.subclock<f.subclock?t=!0:p.subclock>f.subclock&&(n=!0),t&&n)break}return(t?s.Ascending:0)|(n?s.Descending:0)},n.prototype.mergeWithTimestamp=function(e){for(var t=0,n=e.allUUIDs();t<n.length;t++){var r=n[t],i=this.clockElementForUUID(r),o=e.clockElementForUUID(r);i.clock>o.clock||i.clock===o.clock&&i.subclock>o.subclock?this.setClock_subclock_forUUID(i.clock,i.subclock,r):this.setClock_subclock_forUUID(o.clock,o.subclock,r)}},n.prototype.equals=function(e){return this.compareTo(e)===s.Same},n.prototype.copy=function(){var e=m.alloc().init();return e&&e.mergeWithTimestamp(this),e},n.prototype.toString=function(){for(var e="TTVectorTimestamp(\n",t=0,n=this.sortedUUIDs();t<n.length;t++){var r=n[t],i=this.clockElementForUUID(r);e+=r.UUIDString+":"+i.clock+"."+i.subclock+"\n"}return e+")"},Object.defineProperty(n.prototype,"dbg_description",{get:function(){return this.toString()},enumerable:!1,configurable:!0}),n.prototype.savetoArchive=function(){return f.TTVectorMultiTimestamp.createWithTimestamps([this]).savetoArchive()},n.prototype.init=function(){return e.prototype.init.call(this),this._clock=u.RedBlackTree.create(d.NSUUIDComparator.instance).retain(),this},n.prototype.dealloc=function(){this._clock._impl.inorderTreeWalk(this._clock._impl.root,(function(e){e.key.release(),e.value.release()})),this._clock._impl.disposeAllNodes(),this._clock.release(),this._clock=null,e.prototype.dealloc.call(this)},n.create=function(){return p.autorelease(this.alloc().init())},n.createWithArchive=function(e){var t=f.TTVectorMultiTimestamp.createWithArchive_andCapacity(e,1);return t?p.autorelease(t.timestamps[0].copy()):null},m=i([c.sealed],n)}(p.NSObject);t.TTVectorTimestamp=m,m.initializeRefcounted()},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergingResultUpdated=t.TTMergingResultNoChange=t.TTMergingResultFail=t.TTMergingResult=void 0,function(e){e[e.Fail=0]="Fail",e[e.NoChange=1]="NoChange",e[e.Updated=2]="Updated"}(r=t.TTMergingResult||(t.TTMergingResult={})),t.TTMergingResultFail=r.Fail,t.TTMergingResultNoChange=r.NoChange,t.TTMergingResultUpdated=r.Updated},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1089),t)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.NSTextStorageEditedCharacters=t.NSTextStorageEditedAttributes=t.NSTextStorageEditActions=void 0,function(e){e[e.Attributes=1]="Attributes",e[e.Characters=2]="Characters"}(r=t.NSTextStorageEditActions||(t.NSTextStorageEditActions={})),t.NSTextStorageEditedAttributes=r.Attributes,t.NSTextStorageEditedCharacters=r.Characters},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergeableStringUndoAttributeCommand=void 0;var i=n(891),o=n(1049),a=n(1076),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._attributeRanges=null,t._attributeDictionaries=null,t.isaTTMergeableStringUndoCommand=!0,t}return r(t,e),t.prototype.addAttributeRange=function(e,t){this._attributeRanges.push(e.clone().retain()),this._attributeDictionaries.push(t.retain())},t.create=function(){var e=this.alloc();return e._attributeRanges=[],e._attributeDictionaries=[],e.autorelease()},t.prototype.free=function(){for(var t=0,n=this._attributeRanges;t<n.length;t++)n[t].release();this._attributeRanges.length=0;for(var r=0,i=this._attributeDictionaries;r<i.length;r++)i[r].release();this._attributeDictionaries.length=0,e.prototype.free.call(this)},t.prototype.updateTopoIDRange_toNewRangeID=function(e,t){for(var n=[],r=[],i=0,o=this._attributeRanges.length;i<o;++i){var s=this._attributeRanges[i],c=this._attributeDictionaries[i],u=[];a.updateTopoIDRange(s,e,t,u);for(var l=0,d=u;l<d.length;l++){var p=d[l];n.push(p.retain()),r.push(c.retain())}}for(var f=0,h=this._attributeRanges;f<h.length;f++)(s=h[f]).release();this._attributeRanges=n;for(var m=0,g=this._attributeDictionaries;m<g.length;m++)(c=g[m]).release();this._attributeDictionaries=r},Object.defineProperty(t.prototype,"hasTopoIDsThatCanChange",{get:function(){for(var e=0,t=this._attributeRanges;e<t.length;e++){var n=t[e];if(o.NSUUID.isEqual(n.charID.replicaID,a.TTMergeableString.unserialisedReplicaID))return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.applyToString=function(e){var t=e;t.beginEditing();for(var n=0,r=this._attributeRanges.length;n<r;++n){var i=this._attributeRanges[n],o=this._attributeDictionaries[n],a=[];e.getSubstrings_forTopoIDRange(a,i);for(var s=0,c=a;s<c.length;s++){var u=c[s];t.setAttributes_substring(o,u)}}t.endEditing()},t.prototype.addToGroup=function(e){for(var t=0,n=this._attributeRanges;t<n.length;t++){var r=n[t];e.addSeenRange(r)}return!0},Object.defineProperty(t.prototype,"dbg_description",{get:function(){for(var e="<TTMergeableStringUndoAttributeCommand "+this+" ",t=0,n=this._attributeRanges.length;t<n;++t){var r=this._attributeRanges[t],i=this._attributeDictionaries[t];e+=(r.charID.replicaID?r.charID.replicaID.TTShortDescription:"null")+":"+r.charID.clock+"-"+(r.charID.clock+r.length-1)+" => '"+i+"', "}return e+">"},enumerable:!1,configurable:!0}),t}(i.Refcounted);t.TTMergeableStringUndoAttributeCommand=s,s.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergeableUndoString=void 0;var i=n(1049),o=n(1076),a=n(1092),s=n(1089),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.addUndoCommand=function(e){this.objectsNeedingUpdatedRanges.add(e),this.delegate&&this.delegate.addUndoCommand(e)},t.prototype.applyUndoCommand=function(e){e.applyToString(this)},t.prototype.deleteSubstrings_withCharacterRanges=function(t,n){if(this.delegate&&this.delegate.wantsUndoCommands){for(var r=a.TTMergeableStringUndoEditCommand.create(),i=0,o=t;i<o.length;i++){var s=o[i];s.isTombstone||r.addInsertString(s.substringIDRange,this.attributedString.attributedSubstringFromRange(s.characterRange()))}this.addUndoCommand(r)}e.prototype.deleteSubstrings_withCharacterRanges.call(this,t,n)},t.prototype.undeleteSubstrings=function(e,t){if(this.delegate&&this.delegate.wantsUndoCommands){for(var n=a.TTMergeableStringUndoEditCommand.create(),r=0,c=e.length;r<c;++r)t[r]&&n.addDeleteRange(e[r]);if(!n.hasDeleteRanges)return;this.addUndoCommand(n)}var u=new Set;for(r=0,c=e.length;r<c;++r){var l=e[r],d=t[r];if(d){var p=[];this.getSubstrings_forTopoIDRange(p,l);for(var f=p.length-1;f>=0;--f)if((b=p[f]).isTombstone){var h=b.substringIDRange.charID.clock-l.charID.clock,m=b.substringIDRange.length;this._attributedString.insertAttributedString_atIndex(d.attributedSubstringFromRange(i.NSMakeRange(h,m)),b.substringIndex),b.isTombstone=!1,b.timestamp.setReplicaID(o.TTMergeableString.unserialisedReplicaID),u.add(b)}this.updateSubstringIndexes()}}if(this.delegate)for(var g=0,v=0,y=this.orderedSubstrings;v<y.length;v++){var b=y[v];u.has(b)&&(m=b.substringIDRange.length,this.delegate.edited_range_changeInLength(s.NSTextStorageEditedCharacters,i.NSMakeRange(g,0),m,this._substringCodePointCount(b))),g+=b.characterRange().length}this._hasLocalChanges=!0,this.coalesce(),this.updateSubstringIndexes()},t.prototype.insertAttributedString_after_before=function(t,n,r){var i=e.prototype.insertAttributedString_after_before.call(this,t,n,r);if(i.length>0&&this.delegate&&this.delegate.wantsUndoCommands){var o=a.TTMergeableStringUndoEditCommand.create();o.addDeleteRange(i),this.addUndoCommand(o)}return i},t}(o.TTMergeableString);t.TTMergeableUndoString=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergeableStringUndoEditCommand=void 0;var i=n(891),o=n(1049),a=n(1076),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._deleteRanges=[],t._insertRanges=[],t._insertStrings=[],t.isaTTMergeableStringUndoCommand=!0,t}return r(t,e),Object.defineProperty(t.prototype,"hasDeleteRanges",{get:function(){return this._deleteRanges.length>0},enumerable:!1,configurable:!0}),t.prototype.addDeleteRange=function(e){this._deleteRanges.push(e.clone().retain())},t.prototype.addInsertString=function(e,t){this._insertRanges.push(e.clone().retain()),this._insertStrings.push(t.retain())},t.create=function(){return this.alloc().autorelease()},t.prototype.free=function(){for(var t=0,n=this._deleteRanges;t<n.length;t++)n[t].release();for(var r=0,i=this._insertRanges;r<i.length;r++)i[r].release();for(var o=0,a=this._insertStrings;o<a.length;o++)a[o].release();this._deleteRanges.length=0,this._insertRanges.length=0,this._insertStrings.length=0,e.prototype.free.call(this)},t.prototype.updateTopoIDRange_toNewRangeID=function(e,t){for(var n=[],r=0,i=this._deleteRanges;r<i.length;r++){var o=i[r];a.updateTopoIDRange(o,e,t,n)}for(var s=0,c=this._deleteRanges;s<c.length;s++)(o=c[s]).release();this._deleteRanges.length=0;for(var u=0,l=n;u<l.length;u++)o=l[u],this._deleteRanges.push(o.clone().retain());this.updateInsertTopoIDRange_toNewRangeID(e,t)},Object.defineProperty(t.prototype,"hasTopoIDsThatCanChange",{get:function(){for(var e=0,t=this._deleteRanges;e<t.length;e++){var n=t[e];if(o.NSUUID.isEqual(n.charID.replicaID,a.TTMergeableString.unserialisedReplicaID))return!0}for(var r=0,i=this._insertRanges;r<i.length;r++)if(n=i[r],o.NSUUID.isEqual(n.charID.replicaID,a.TTMergeableString.unserialisedReplicaID))return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.updateInsertTopoIDRange_toNewRangeID=function(e,t){for(var n=0,r=this._insertRanges;n<r.length;n++){var i=r[n];null!==i.charID.replicaID&&null!==e.charID.replicaID&&i.charID.replicaID.isEqual(e.charID.replicaID)&&(i.charID.compare(e.charID)<0||i.charID.compare(e.max())>=0||(i.charID.setReplicaID(t.charID.replicaID),i.charID.setClock(t.charID.clock+(i.charID.clock-e.charID.clock))))}},t.prototype.applyToString=function(e){if(this._deleteRanges.length>0){for(var t=[],n=0,r=this._deleteRanges;n<r.length;n++){var i=r[n];e.getSubstrings_forTopoIDRange(t,i)}var o=[];e.getCharacterRanges_forSubstrings(o,t),e.deleteSubstrings_withCharacterRanges(t,o)}this._insertStrings.length>0&&e.undeleteSubstrings(this._insertRanges,this._insertStrings)},t.prototype.addToGroup=function(e){for(var t=0,n=this._deleteRanges;t<n.length;t++){var r=n[t];e.addSeenRange(r)}return!0},Object.defineProperty(t.prototype,"dbg_description",{get:function(){for(var e="<TTMergeableStringUndoEditCommand "+this+" Delete:",t=0,n=this._deleteRanges;t<n.length;t++)e+=((i=n[t]).charID.replicaID?i.charID.replicaID.TTShortDescription:"null")+":"+i.charID.clock+"-"+(i.charID.clock+i.length-1)+", ";e+="  Insert:";for(var r=0;r<this._insertStrings.length;++r){var i=this._insertRanges[r],o=this._insertStrings[r];e+=(i.charID.replicaID?i.charID.replicaID.TTShortDescription:"null")+":"+i.charID.clock+"-"+(i.charID.clock+i.length-1)+"=>'"+o+"', "}return e+">"},enumerable:!1,configurable:!0}),t}(i.Refcounted);t.TTMergeableStringUndoEditCommand=s,s.initializeRefcounted()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTTMergeableStringUndoCommand=void 0,t.isTTMergeableStringUndoCommand=function(e){return!!e&&Boolean(e.isaTTMergeableStringUndoCommand)}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergeableStringUndoGroup=void 0;var i=n(891),o=n(1024),a=n(1049),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._seen=null,t._commands=null,t.isTTMergeableStringUndoCommand=!0,t}return r(t,e),t.create=function(){var e=this.alloc();return e._seen=o.RedBlackTree.create(a.NSUUIDComparator.instance).retain(),e._commands=[],e.autorelease()},t.prototype.free=function(){this._seen&&this._seen.release();for(var t=0,n=this._commands;t<n.length;t++)n[t].release();this._commands.length=0,e.prototype.free.call(this)},t.prototype.closeGroup=function(){this._seen&&this._seen.release(),this._seen=null},t.prototype.addCommand=function(e){e.addToGroup(this)&&this._commands.push(e.retain())},t.prototype.addSeenRange=function(e){var t,n=e.charID,r=e.nsIDRange(),i=!1,o=this._seen.search(n.replicaID);return null===o||o.isNil?(t=a.NSMutableIndexSet.alloc().initWithIndexesInRange(r),this._seen.insertKeyValue(n.replicaID,t),i=!0):a.NSMaxRange(r)<a.NSNotFound&&((t=o.value).intersectsIndexesInRange(r)||(i=!0,t.addIndexesInRange(r))),i},t.prototype.updateTopoIDRange_toNewRangeID=function(e,t){for(var n=0,r=this._commands;n<r.length;n++)r[n].updateTopoIDRange_toNewRangeID(e,t)},Object.defineProperty(t.prototype,"hasTopoIDsThatCanChange",{get:function(){for(var e=0,t=this._commands;e<t.length;e++)if(t[e].hasTopoIDsThatCanChange)return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.applyToString=function(e){for(var t=this._commands,n=t.length-1;n>=0;--n)t[n].applyToString(e)},t.prototype.addToGroup=function(e){return!1},Object.defineProperty(t.prototype,"dbg_description",{get:function(){return"<TTMergeableStringUndoGroup "+this+" "+this._commands+">"},enumerable:!1,configurable:!0}),t}(i.Refcounted);t.TTMergeableStringUndoGroup=s,s.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TTAttributedStringIterator2=void 0;var s=n(942),c=n(909),u=n(972),l=n(1024),d=n(1051),p=a(n(1054)),f=n(1023),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.string=null,t.isaAttributedStringIterator=!0,t}return r(t,e),t.prototype.clone=function(){return t.createCloneOf(this)},t.prototype.insertAttrStrOrCP=function(e,t){if(!e)return c.NoOpOperation.instance;var n,r;if(0===(n=c.isString(e)?e.toCodePoints():s.isReadonlyArray(e)?e:p.utf16StringToCodePoints(e)).length)return c.NoOpOperation.instance;c.isAttributedString(e)?r=f.TTAttributedString2.attributeIntervalsFromAttributedString(e):(r=l.PooledIntervalTree.create(u.NumberIntervalComparator.instance,0)).insertInterval(0,n.length,d.TTAttrDict.create());var i=this.string.insertCodePointsWithAttributeIntervals(this,n,r,null!==t&&void 0!==t?t:c.DEFAULT_INSERT_AFFINITY);return r.free(),i},t.prototype.insertWithAttributes=function(e,t,n){if(!e)return c.NoOpOperation.instance;var r,i;if(0===(r=c.isString(e)?e.toCodePoints():s.isReadonlyArray(e)?e:p.utf16StringToCodePoints(e)).length)return c.NoOpOperation.instance;Array.isArray(t)?i=this.attributeIntervalsFromAttributesArray(t):(i=l.PooledIntervalTree.create(u.NumberIntervalComparator.instance,0)).insertInterval(0,r.length,void 0===t?d.TTAttrDict.create():t);var o=this.string.insertCodePointsWithAttributeIntervals(this,r,i,null!==n&&void 0!==n?n:c.DEFAULT_INSERT_AFFINITY);return i.free(),o},Object.defineProperty(t.prototype,"nextAttributes",{get:function(){return this.hasNext?this._string._activeMergeContext?this._string._activeMergeContext.currentString.attributesAtIndex_effectiveRange(this.nextCodePointCodeUnitIndex,null):this._string.mergeableString.attributesAtIndex_effectiveRange(this.nextCodePointCodeUnitIndex,null):null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousAttributes",{get:function(){return this.hasPrevious?this._string._activeMergeContext?this._string._activeMergeContext.currentString.attributesAtIndex_effectiveRange(this.previousCodePointCodeUnitIndex,null):this._string.mergeableString.attributesAtIndex_effectiveRange(this.previousCodePointCodeUnitIndex,null):null},enumerable:!1,configurable:!0}),t.prototype.attributeIntervalsFromAttributesArray=function(e){var t=l.PooledIntervalTree.create(u.NumberIntervalComparator.instance,0);if(e.length>0){for(var n=0,r=e[0],i=1,o=e.length;i<o;++i)r!==e[i]&&(t.insertInterval(n,i-1,r),n=i,r=e[i]);t.insertInterval(n,e.length-1,r)}return t},t.prototype.insert=function(e,t){return this.insertAttrStrOrCP(e,t)},t.prototype.toString=function(){return c.iteratorName("TTAttributedStringIterator2",this)},t.createAtLeftOfCodePointIndex=function(e,t,n){var r=this.alloc();return r.initTTStringIteratorBase2(e,t,n),r.autorelease()},t.createAtCharIDWithAffinity=function(e,t,n){var r=this.alloc();return r.initAtCharIDWithAffinity(e,t,n),r.autorelease()},t.createAtStart=function(e,t){var n=this.alloc();return n.initTTStringIteratorBase2(e,0,null!==t&&void 0!==t?t:c.DEFAULT_ITERATOR_AFFINITY),n.autorelease()},t.createAtEnd=function(e,t){var n=this.alloc();return n.initTTStringIteratorBase2(e,e.length,null!==t&&void 0!==t?t:c.IteratorAffinity.AFTER),n.autorelease()},t.createCloneOf=function(e){var t=this.alloc();return t.initFromIteratorBase2(e),t.autorelease()},t}(n(1096).TTStringIteratorBase2);t.TTAttributedStringIterator2=h,h.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TTStringIteratorBase2=t.PooledCodePointInfo=void 0;var c=n(1097),u=n(909),l=n(891),d=s(n(1112)),p=s(n(1054)),f=n(1054),h=n(1062),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.codePoint=u.UNDEFINED_CODEPOINT,t.codeUnitIndex=null,t.exists=!1,t.codePointIndex=null,t}var n;return r(t,e),n=t,t.prototype.setCodeUnitIndex=function(e){this.codeUnitIndex=e},t.prototype.setCodePointIndex=function(e){this.codePointIndex=e},t.prototype.setCodeUnitIndexAndCodePointIndex=function(e,t){this.codeUnitIndex=e,this.codePointIndex=t},t.prototype.clone=function(){var e=n.create(),t=e;return t.codePoint=this.codePoint,t.codeUnitIndex=this.codeUnitIndex,t.exists=this.exists,t.codePointIndex=this.codePointIndex,e},t.prototype.reset=function(e){this.codePoint=e.codePoint,this.codeUnitIndex=e.codeUnitIndex,this.exists=e.exists,this.codePointIndex=e.codePointIndex},t.prototype.resetTo=function(e,t,n,r){this.codePoint=e,this.codeUnitIndex=t,this.exists=n,this.codePointIndex=r},t.prototype.free=function(){this.codePoint=u.UNDEFINED_CODEPOINT,this.codeUnitIndex=null,this.exists=!1,this.codePointIndex=null,e.prototype.free.call(this)},t.create=function(){return this.alloc_own()},n=a([l.sealed],t)}(l.Pooled);t.PooledCodePointInfo=m,m.initializePooled();var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._affinity=u.IteratorAffinity.BEFORE,t.iteratorIndex=-1,t._previousCodePointInfo=null,t._nextCodePointInfo=null,t._string=null,t.dbg_relativeOrderIndex=-1,t}return r(t,e),Object.defineProperty(t.prototype,"affinity",{get:function(){return this._affinity},set:function(e){if(e!==this._affinity){switch(this.affinity){case u.IteratorAffinity.BEFORE:this.cacheNextCodePointInfoIfUncached();break;case u.IteratorAffinity.AFTER:this.cachePreviousCodePointInfoIfUncached()}this._affinity=e}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextCodePoint",{get:function(){return this.cacheNextCodePointInfoIfUncached(),this._nextCodePointInfo.codePoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousCodePoint",{get:function(){return this.cachePreviousCodePointInfoIfUncached(),this._previousCodePointInfo.codePoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNext",{get:function(){return this.cacheNextCodePointInfoIfUncached(),this._nextCodePointInfo.exists},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPrevious",{get:function(){return this.cachePreviousCodePointInfoIfUncached(),this._previousCodePointInfo.exists},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.nextCodePointIndex},enumerable:!1,configurable:!0}),t.prototype.distanceFrom=function(e){return this._previousCodePointInfo?u.CodePointCountOps.subtract(this.previousCodePointIndex,e.previousCodePointIndex):u.CodePointCountOps.subtract(this.nextCodePointIndex,e.nextCodePointIndex)},t.prototype.distanceFromStart=function(){return this._previousCodePointInfo?u.CodePointCountOps.incremented(this.previousCodePointIndex):this.nextCodePointIndex},t.prototype.distanceTo=function(e){return e.distanceFrom(this)},t.prototype.approximateDistanceFrom=function(e){return this._previousCodePointInfo?u.CodeUnitIndexOps.subtract(this.previousCodePointCodeUnitIndex,e.previousCodePointCodeUnitIndex):u.CodeUnitIndexOps.subtract(this.nextCodePointCodeUnitIndex,e.nextCodePointCodeUnitIndex)},t.prototype.approximateDistanceFromStart=function(){return this.nextCodePointCodeUnitIndex},t.prototype.approximateDistanceTo=function(e){return-this.approximateDistanceFrom(e)},t.prototype.isBefore=function(e){return this._previousCodePointInfo?this.previousCodePointCodeUnitIndex<e.previousCodePointCodeUnitIndex:this.nextCodePointCodeUnitIndex<e.nextCodePointCodeUnitIndex},t.prototype.isAfter=function(e){return e.isBefore(this)},t.prototype.equals=function(e){return this===e||(this.affinity===e.affinity&&this.affinity===u.IteratorAffinity.BEFORE?this.previousCodePointCodeUnitIndex===e.previousCodePointCodeUnitIndex:this.nextCodePointCodeUnitIndex===e.nextCodePointCodeUnitIndex)},t.prototype.compare=function(e){return this.equals(e)?0:this._previousCodePointInfo?this.previousCodePointCodeUnitIndex-e.previousCodePointCodeUnitIndex:this.nextCodePointCodeUnitIndex-e.nextCodePointCodeUnitIndex},t.prototype.reset=function(e){this._previousCodePointInfo&&this._previousCodePointInfo.free(),this._previousCodePointInfo=e._previousCodePointInfo?e._previousCodePointInfo.clone():null,this._nextCodePointInfo&&this._nextCodePointInfo.free(),this._nextCodePointInfo=e._nextCodePointInfo?e._nextCodePointInfo.clone():null},t.prototype.moveToNext=function(){this.cacheNextCodePointInfoIfUncached();var e=this._string.isMerging?this._string.mergeContext.currentString.UTF16String:this._string.mergeableString.attributedString.UTF16String,t=this._previousCodePointInfo;return this._previousCodePointInfo=this._nextCodePointInfo,this._nextCodePointInfo=t||m.create(),d.getNextCodePointCodeUnitInfoAtCodeUnitIndex(e,this._previousCodePointInfo.codeUnitIndex,this._nextCodePointInfo),this._nextCodePointInfo.setCodePointIndex(u.CodePointIndexOps.incremented(this._previousCodePointInfo.codePointIndex)),this._nextCodePointInfo.exists},t.prototype.moveToPrevious=function(){this.cachePreviousCodePointInfoIfUncached();var e=this._string.isMerging?this._string.mergeContext.currentString.UTF16String:this._string.mergeableString.attributedString.UTF16String,t=this._nextCodePointInfo;return this._nextCodePointInfo=this._previousCodePointInfo,this._previousCodePointInfo=t||m.create(),d.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex(e,this._nextCodePointInfo.codeUnitIndex,this._previousCodePointInfo),this._previousCodePointInfo.setCodePointIndex(u.CodePointIndexOps.decremented(this._nextCodePointInfo.codePointIndex)),this._previousCodePointInfo.exists},t.prototype.moveToNextByOffset=function(e){if(0===e)return this.hasNext;if(1===e)return this.moveToNext();if(e<0)return this.moveToPreviousByOffset(-e);var t=this._string.isMerging?this._string.mergeContext.currentString.UTF16String:this._string.mergeableString.attributedString.UTF16String;switch(this.affinity){case u.IteratorAffinity.BEFORE:var n=u.CodePointIndexOps.add(this._previousCodePointInfo.codePointIndex,e),r=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(t,n):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(n),i=t.codePointAt(r);this._previousCodePointInfo.resetTo(void 0!==i?i:u.UNDEFINED_CODEPOINT,r,void 0!==i,n),this.invalidateNextCodePointInfo();break;case u.IteratorAffinity.AFTER:n=u.CodePointIndexOps.add(this._nextCodePointInfo.codePointIndex,e),r=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(t,n):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(n),i=t.codePointAt(r),this._nextCodePointInfo.resetTo(void 0!==i?i:u.UNDEFINED_CODEPOINT,r,void 0!==i,n),this.invalidatePreviousCodePointInfo()}return this.dbg_assertCorrectCodeUnitIndices(),this.hasNext},t.prototype.moveToPreviousByOffset=function(e){if(0===e)return this.hasPrevious;if(1===e)return this.moveToPrevious();if(e<0)return this.moveToNextByOffset(-e);var t=this._string.isMerging?this._string.mergeContext.currentString.UTF16String:this._string.mergeableString.attributedString.UTF16String;switch(this.affinity){case u.IteratorAffinity.BEFORE:var n=u.CodePointIndexOps.subtract(this._previousCodePointInfo.codePointIndex,e),r=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(t,n):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(n),i=t.codePointAt(r);this._previousCodePointInfo.resetTo(void 0!==i?i:u.UNDEFINED_CODEPOINT,r,void 0!==i,n),this.invalidateNextCodePointInfo();break;case u.IteratorAffinity.AFTER:n=u.CodePointIndexOps.subtract(this._nextCodePointInfo.codePointIndex,e),r=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(t,n):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(n),i=t.codePointAt(r),this._nextCodePointInfo.resetTo(void 0!==i?i:u.UNDEFINED_CODEPOINT,r,void 0!==i,n),this.invalidatePreviousCodePointInfo()}return this.dbg_assertCorrectCodeUnitIndices(),this.hasPrevious},t.prototype.moveBy=function(e){0!==e&&(e>0?this.hasNext&&this.moveToNextByOffset(e):e<0&&this.hasPrevious&&this.moveToPreviousByOffset(-e))},t.prototype.insertCodePoints=function(e,t){var n=c.ArrayString.create(e);return this.insert(n,t)},t.prototype.insert=function(e,t){return this._string.insertString(this,e,t||u.DEFAULT_INSERT_AFFINITY)},t.prototype.moveForwardUntil=function(e,t){var n=this;if(!this.hasNext)return!1;var r=this._string.isMerging?this._string.mergeContext.currentString.UTF16String:this._string.mergeableString.attributedString.UTF16String,i=t?t.nextCodePointCodeUnitIndex:r.length,o=h.UNDEFINED_CODE_POINT_INDEX,a=h.UNDEFINED_CODE_UNIT_INDEX,s=h.UNDEFINED_CODE_POINT_INDEX,c=h.UNDEFINED_CODE_UNIT_INDEX,l=u.UNDEFINED_CODEPOINT;switch(this.affinity){case u.IteratorAffinity.BEFORE:o=u.CodePointIndexOps.add(this._previousCodePointInfo.codePointIndex,1),a=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(r,o):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(o),s=u.CodePointIndexOps.add(o,1),c=u.CodeUnitIndexOps.add(a,1);var d=r.charCodeAt(a);f.isLeadingSurrogate(d)&&++c,l=r.codePointAt(a);break;case u.IteratorAffinity.AFTER:o=this._nextCodePointInfo.codePointIndex,a=this._nextCodePointInfo.codeUnitIndex,s=u.CodePointIndexOps.add(this._nextCodePointInfo.codePointIndex,1),c=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(r,s):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(s),l=this._nextCodePointInfo.codePoint}for(var g=function(){return n.string.iteratorAt(s)},v=u.UNDEFINED_CODEPOINT;c<i&&!e(l,v=r.codePointAt(c),g);)l=v,a=c,o=s,d=r.charCodeAt(c),f.isLeadingSurrogate(d)&&++c,++c,++s;this._previousCodePointInfo||(this._previousCodePointInfo=m.create()),this._previousCodePointInfo.resetTo(l,a,!0,o),this._nextCodePointInfo||(this._nextCodePointInfo=m.create());var y=c<Math.min(i,r.length);return this._nextCodePointInfo.resetTo(y?v:u.UNDEFINED_CODEPOINT,c,y,s),this.dbg_assertCorrectCodeUnitIndices(),this.hasNext},t.prototype.moveBackwardUntil=function(e,t){var n=this;if(!this.hasPrevious)return!1;var r=this._string.isMerging?this._string.mergeContext.currentString.UTF16String:this._string.mergeableString.attributedString.UTF16String,i=t?t.nextCodePointCodeUnitIndex:0,o=h.UNDEFINED_CODE_POINT_INDEX,a=h.UNDEFINED_CODE_UNIT_INDEX,s=h.UNDEFINED_CODE_POINT_INDEX,c=h.UNDEFINED_CODE_UNIT_INDEX,l=u.UNDEFINED_CODEPOINT;switch(this.affinity){case u.IteratorAffinity.BEFORE:o=this._previousCodePointInfo.codePointIndex,a=this._previousCodePointInfo.codeUnitIndex,s=u.CodePointIndexOps.subtract(this._previousCodePointInfo.codePointIndex,1),c=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(r,s):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(s),l=this._previousCodePointInfo.codePoint;break;case u.IteratorAffinity.AFTER:o=u.CodePointIndexOps.subtract(this._nextCodePointInfo.codePointIndex,1),a=this._string._activeMergeContext?p.utf16StringCodeUnitIndexForCodePointIndex(r,o):this._string.mergeableString.getCodeUnitIndexForCodePointIndex(o),s=u.CodePointIndexOps.subtract(o,1),c=u.CodeUnitIndexOps.subtract(a,1);var d=r.charCodeAt(c);f.isTrailingSurrogate(d)&&--c,l=r.codePointAt(a)}for(var g=function(){return n.string.iteratorAt(s+1)},v=u.UNDEFINED_CODEPOINT;c>=i&&!e(v=r.codePointAt(c),l,g);)l=v,a=c,o=s,--c,--s,d=r.charCodeAt(c),f.isTrailingSurrogate(d)&&--c;this._previousCodePointInfo||(this._previousCodePointInfo=m.create());var y=c>=Math.max(i,0);return this._previousCodePointInfo.resetTo(y?v:u.UNDEFINED_CODEPOINT,c,y,s),this._nextCodePointInfo||(this._nextCodePointInfo=m.create()),this._nextCodePointInfo.resetTo(l,a,!0,o),this.dbg_assertCorrectCodeUnitIndices(),this.hasPrevious},Object.defineProperty(t.prototype,"previousCodePointCodeUnitIndex",{get:function(){return this.cachePreviousCodePointInfoIfUncached(),this._previousCodePointInfo.codeUnitIndex},enumerable:!1,configurable:!0}),t.prototype.setPreviousCodePointCodeUnitIndexAndCodePointIndex=function(e,t){this.cachePreviousCodePointInfoIfUncached(),this._previousCodePointInfo.setCodeUnitIndexAndCodePointIndex(e,t)},t.prototype.resetPreviousCodePointTo=function(e,t,n){this.cachePreviousCodePointInfoIfUncached();var r=void 0===n?u.UNDEFINED_CODEPOINT:n;this._previousCodePointInfo.resetTo(r,e,r!==u.UNDEFINED_CODEPOINT,t)},Object.defineProperty(t.prototype,"nextCodePointCodeUnitIndex",{get:function(){return this.cacheNextCodePointInfoIfUncached(),this._nextCodePointInfo.codeUnitIndex},enumerable:!1,configurable:!0}),t.prototype.setNextCodePointCodeUnitIndexAndCodePointIndex=function(e,t){this.cacheNextCodePointInfoIfUncached(),this._nextCodePointInfo.setCodeUnitIndexAndCodePointIndex(e,t)},t.prototype.resetNextCodePointTo=function(e,t,n){this.cacheNextCodePointInfoIfUncached();var r=void 0===n?u.UNDEFINED_CODEPOINT:n;this._nextCodePointInfo.resetTo(r,e,r!==u.UNDEFINED_CODEPOINT,t)},t.prototype.dbg_assertNextCodeUnitIsValid=function(){l.DEBUG},Object.defineProperty(t.prototype,"previousCodePointInfo",{get:function(){return this.cachePreviousCodePointInfoIfUncached(),this._previousCodePointInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maybePreviousCodePointInfo",{get:function(){return this._previousCodePointInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextCodePointInfo",{get:function(){return this.cacheNextCodePointInfoIfUncached(),this._nextCodePointInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maybeNextCodePointInfo",{get:function(){return this._nextCodePointInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousCodePointIndex",{get:function(){if(this.affinity===u.IteratorAffinity.AFTER&&this.cachePreviousCodePointInfoIfUncached(),null===this._previousCodePointInfo.codePointIndex){var e=this._string.getCodePointIndexForCodeUnitIndex(this._previousCodePointInfo.codeUnitIndex);this._previousCodePointInfo.setCodePointIndex(e)}return this._previousCodePointInfo.codePointIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextCodePointIndex",{get:function(){if(this.cacheNextCodePointInfoIfUncached(),null===this._nextCodePointInfo.codePointIndex){var e=this._string.getCodePointIndexForCodeUnitIndex(this._nextCodePointInfo.codeUnitIndex);this._nextCodePointInfo.setCodePointIndex(e)}return this._nextCodePointInfo.codePointIndex},enumerable:!1,configurable:!0}),t.prototype.invalidate=function(){switch(this.affinity){case u.IteratorAffinity.BEFORE:this.invalidateNextCodePointInfo();break;case u.IteratorAffinity.AFTER:this.invalidatePreviousCodePointInfo()}},t.prototype.invalidatePreviousCodePointInfo=function(){this._previousCodePointInfo&&(this._previousCodePointInfo.free(),this._previousCodePointInfo=null)},t.prototype.invalidateNextCodePointInfo=function(){this._nextCodePointInfo&&(this._nextCodePointInfo.free(),this._nextCodePointInfo=null)},t.prototype.cachePreviousCodePointInfoIfUncached=function(){null===this._previousCodePointInfo&&this.cachePreviousCodePointInfo()},t.prototype.initPreviousCodePointInfo=function(e){if(this._previousCodePointInfo=m.create(),this._string.isMerging){if(0===(r=this._string.mergeContext.currentString.UTF16String).length)return this._previousCodePointInfo.setCodeUnitIndex(-1),void this._previousCodePointInfo.setCodePointIndex(-1);var t=p.utf16StringCodeUnitIndexForCodePointIndex(r,e);d.getCodePointInfoAtCodeUnitIndex(r,t,this._previousCodePointInfo),this._previousCodePointInfo.setCodePointIndex(e)}else{var n=this._string.mergeableString;if(0===n.length)return this._previousCodePointInfo.setCodeUnitIndex(-1),void this._previousCodePointInfo.setCodePointIndex(-1);var r=n.attributedString.UTF16String;t=n.getCodeUnitIndexForCodePointIndex(e),d.getCodePointInfoAtCodeUnitIndex(r,t,this._previousCodePointInfo),this._previousCodePointInfo.setCodePointIndex(e)}},t.prototype.cachePreviousCodePointInfo=function(){if(this._previousCodePointInfo=m.create(),this._string.isMerging){if(0===(t=this._string.mergeContext.currentString.UTF16String).length)return this._previousCodePointInfo.setCodeUnitIndex(-1),void this._previousCodePointInfo.setCodePointIndex(-1);d.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex(t,this._nextCodePointInfo.codeUnitIndex,this._previousCodePointInfo),this._previousCodePointInfo.setCodePointIndex(u.CodePointIndexOps.decremented(this._nextCodePointInfo.codePointIndex))}else{var e=this._string.mergeableString;if(0===e.length)return this._previousCodePointInfo.setCodeUnitIndex(-1),void this._previousCodePointInfo.setCodePointIndex(-1);var t=e.attributedString.UTF16String;d.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex(t,this._nextCodePointInfo.codeUnitIndex,this._previousCodePointInfo),this._previousCodePointInfo.setCodePointIndex(u.CodePointIndexOps.decremented(this._nextCodePointInfo.codePointIndex))}},t.prototype.cacheNextCodePointInfoIfUncached=function(){null===this._nextCodePointInfo&&this.cacheNextCodePointInfo()},t.prototype.initNextCodePointInfo=function(e){if(this._nextCodePointInfo=m.create(),this._string.isMerging){if(0===(r=this._string.mergeContext.currentString.UTF16String).length)return this._nextCodePointInfo.setCodeUnitIndex(u.ZERO_CODE_UNIT_INDEX),void this._nextCodePointInfo.setCodePointIndex(u.ZERO_CODE_POINT_INDEX);var t=p.utf16StringCodeUnitIndexForCodePointIndex(r,e);d.getCodePointInfoAtCodeUnitIndex(r,t,this._nextCodePointInfo),this._nextCodePointInfo.setCodePointIndex(e)}else{var n=this._string.mergeableString;if(0===n.length)return this._nextCodePointInfo.setCodeUnitIndex(u.ZERO_CODE_UNIT_INDEX),void this._nextCodePointInfo.setCodePointIndex(u.ZERO_CODE_POINT_INDEX);var r=n.attributedString.UTF16String;t=n.getCodeUnitIndexForCodePointIndex(e),d.getCodePointInfoAtCodeUnitIndex(r,t,this._nextCodePointInfo),this._nextCodePointInfo.setCodePointIndex(e)}},t.prototype.cacheNextCodePointInfo=function(){if(this._nextCodePointInfo=m.create(),this._string.isMerging){if(0===(t=this._string.mergeContext.currentString.UTF16String).length)return this._nextCodePointInfo.setCodeUnitIndex(u.ZERO_CODE_UNIT_INDEX),void this._nextCodePointInfo.setCodePointIndex(u.ZERO_CODE_POINT_INDEX);d.getNextCodePointCodeUnitInfoAtCodeUnitIndex(t,this._previousCodePointInfo.codeUnitIndex,this._nextCodePointInfo),this._nextCodePointInfo.setCodePointIndex(u.CodePointIndexOps.incremented(this._previousCodePointInfo.codePointIndex))}else{var e=this._string.mergeableString;if(0===e.length)return this._nextCodePointInfo.setCodeUnitIndex(u.ZERO_CODE_UNIT_INDEX),void this._nextCodePointInfo.setCodePointIndex(u.ZERO_CODE_POINT_INDEX);var t=e.attributedString.UTF16String;d.getNextCodePointCodeUnitInfoAtCodeUnitIndex(t,this._previousCodePointInfo.codeUnitIndex,this._nextCodePointInfo),this._nextCodePointInfo.setCodePointIndex(u.CodePointIndexOps.incremented(this._previousCodePointInfo.codePointIndex))}},Object.defineProperty(t.prototype,"dbg_posString",{get:function(){switch(this._affinity){case u.IteratorAffinity.BEFORE:return"[("+this.previousCodePoint+")| "+this.position+" |"+this.nextCodePoint+"]";case u.IteratorAffinity.AFTER:return"["+this.previousCodePoint+"| "+this.position+" |("+this.nextCodePoint+")]"}},enumerable:!1,configurable:!0}),t.prototype.dbg_assertIsValid=function(){},t.prototype.dbg_isValid=function(e,t){if(this.nextCodePointIndex-this.previousCodePointIndex!==1)return!1;if(void 0!==e&&void 0!==t||(e=this._string._activeMergeContext?this._string._activeMergeContext.currentString.UTF16String:this._string.toString()),this.previousCodePointCodeUnitIndex<0){if(-1!==this.previousCodePointCodeUnitIndex)return!1;if(this.previousCodePoint!==u.UNDEFINED_CODEPOINT)return!1}else{var n=e.codePointAt(this.previousCodePointCodeUnitIndex);if(this.previousCodePoint!==n)return!1}if(this.nextCodePointCodeUnitIndex>=e.length){if(this.nextCodePointCodeUnitIndex!==e.length)return!1;if(this.nextCodePoint!==u.UNDEFINED_CODEPOINT)return!1}else{var r=e.codePointAt(this.nextCodePointCodeUnitIndex);if(this.nextCodePoint!==r)return!1}return!0},t.prototype.dbg_assertCorrectCodeUnitIndices=function(){},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this._affinity=u.IteratorAffinity.BEFORE},t.prototype.free=function(){this._nextCodePointInfo&&(this._nextCodePointInfo.free(),this._nextCodePointInfo=null),this._previousCodePointInfo&&(this._previousCodePointInfo.free(),this._previousCodePointInfo=null),this._string&&(this._string.unregisterIterator(this),this._string.release(),this._string=null),this.iteratorIndex=-1,this.dbg_relativeOrderIndex=-1,e.prototype.free.call(this)},t.prototype.initTTStringIteratorBase2=function(t,n,r){switch(e.prototype.initStringIteratorBase.call(this,t),this._affinity=r||u.DEFAULT_ITERATOR_AFFINITY,this._string=t.retain(),n<0&&(n=u.ZERO_CODE_POINT_INDEX),n>t.length&&(n=t.length),this.affinity){case u.IteratorAffinity.BEFORE:this.initPreviousCodePointInfo(u.CodePointIndexOps.decremented(n));break;case u.IteratorAffinity.AFTER:this.initNextCodePointInfo(n)}t.registerIterator(this)},t.prototype.initAtCharIDWithAffinity=function(t,n,r){e.prototype.initStringIteratorBase.call(this,t),this._string=t.retain(),this._affinity=r,t.registerIterator(this)},t.prototype.initFromIteratorBase2=function(t){var n=t._string;e.prototype.initStringIteratorBase.call(this,n),this._string=n.retain(),this._affinity=t.affinity,t._previousCodePointInfo&&(this._previousCodePointInfo=t._previousCodePointInfo.clone()),t._nextCodePointInfo&&(this._nextCodePointInfo=t._nextCodePointInfo.clone()),this.dbg_assertCorrectCodeUnitIndices(),n.registerIterator(this)},t}(u.StringIteratorBase);t.TTStringIteratorBase2=g},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1098),t),i(n(1107),t),i(n(1109),t),i(n(1106),t),i(n(1110),t),i(n(1108),t),i(n(1100),t),i(n(1103),t),i(n(1104),t),i(n(1105),t),i(n(1111),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrAttrStr=t.ArrayAttributedString=void 0;var o=n(942),a=n(909),s=n(891),c=n(1099),u=n(1106),l=function(){function e(){}return Object.defineProperty(e,"ArrayAttributedStringIteratorModule",{get:function(){return null===this._ArrayAttributedStringIteratorModule&&(this._ArrayAttributedStringIteratorModule=n(1107)),this._ArrayAttributedStringIteratorModule},enumerable:!1,configurable:!0}),e._ArrayAttributedStringIteratorModule=null,e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isaAttributedString=!0,t.attributes=[],t._attrStrObservers=[],t}var n;return r(t,e),n=t,t.prototype.iteratorAt=function(e,t){return e>this.length&&(e=this.length,t=null!==t&&void 0!==t?t:a.IteratorAffinity.AFTER),l.ArrayAttributedStringIteratorModule.ArrayAttributedStringIterator.create(this,e,t)},t.prototype.insertCodePoints=function(e,t,n){var r=t.length;if(0===r)return a.NoOpOperation.instance;this.beginEditing();var i=this.iteratorAt(e.position);i.affinity=a.IteratorAffinity.BEFORE;var o=this.iteratorAt(e.position);o.affinity=a.IteratorAffinity.AFTER;var s=e.position;if(this.codePoints=this.codePoints.slice(0,s).concat(t).concat(this.codePoints.slice(s)),this.attributes.length<this.codePoints.length){for(var u=[],l=0,d=t.length;l<d;++l)u.push(a.AttrDict.create().retain());this.attributes=this.attributes.slice(0,s).concat(u).concat(this.attributes.slice(s))}return this.updateIteratorsForInsertion(e,s,r,n),this.length=this.length+r,this.didInsert(i,o),this.endEditing(),c.ArrStrInsertOperation.create(this,s,t,n)},t.prototype.delete=function(e,t){var n=t.position-e.position;if(0===n)return a.NoOpOperation.instance;this.beginEditing();for(var r=this.attributes.splice(e.position,n),i=this.codePoints.splice(e.position,n),o=c.ArrAttrStrDeleteOperation.create(this,e.position,i,r),s=0,u=r;s<u.length;s++)u[s].release();return this.updateIteratorsForDeletion(e,e.position,n),this.length=this.length-n,this.didDelete(e,n),this.endEditing(),o},t.prototype.copyAttributesInRangeToArray=function(e,t,n,r){void 0===r&&(r=!0),r&&(n.length=0);var i=e.position,o=t.position;if(!(o<=i))for(var a=this.attributes,s=i;s<o;)n.push(a[s]),++s},t.prototype.copyCodePointsAndAttributesInRangeToArrays=function(e,t,n,r,i){void 0===i&&(i=!0),i&&(n.length=0,r.length=0);var o=e.position,a=t.position;if(!(a<=o))for(var s=this.codePoints,c=this.attributes,u=o;u<a;)n.push(s[u]),r.push(c[u]),++u},t.prototype.forEachWithAttributesInIndexRange=function(e,t,n){if(!(t<=e))for(var r=this.codePoints,i=this.attributes,o=e;o<t;++o)n(r[o],i[o],o)},t.prototype.forEachWithAttributesInRange=function(e,t,n){this.forEachWithAttributesInIndexRange(e.position,t.position,n)},t.prototype.forEachWithAttributes=function(e){this.forEachWithAttributesInIndexRange(a.ZERO_CODE_POINT_INDEX,this.length,e)},t.prototype.someWithAttributesInIndexRange=function(e,t,n){if(t<=e)return!1;for(var r=this.codePoints,i=this.attributes,o=e;o<t;++o)if(n(r[o],i[o],o))return!0;return!1},t.prototype.someWithAttributesInRange=function(e,t,n){return this.someWithAttributesInIndexRange(e.position,t.position,n)},t.prototype.someWithAttributes=function(e){return this.someWithAttributesInIndexRange(a.ZERO_CODE_POINT_INDEX,this.length,e)},t.prototype.alterAttributesInRange=function(e,t,n){this.beginEditing();for(var r=e.position,i=t.position,o=[],a=[],s=r,u=0;s<i;++s,++u){var l=this.attributes[s];o.push(l.retain());var d=n(l,u);l!==d&&(this.attributes[s]=d.retain(),l&&l.release()),a.push(d.retain())}this.notifyDidAlterAttributes(e,t),this.endEditing();for(var p=c.ArrAttrStrAlterAttributesInRangeOperation.create(this,e.position,t.position,o,a),f=0,h=a;f<h.length;f++)h[f].release();for(var m=0,g=o;m<g.length;m++)g[m].release();return p},t.prototype.addAttributeToRange=function(e,t,n,r){return this.alterAttributesInRange(e,t,(function(e){return e.set(n,r)}))},t.prototype.removeAttributeFromRange=function(e,t,n){return this.alterAttributesInRange(e,t,(function(e){return e.set(n,null)}))},t.prototype.addAttributedStringObserver=function(e){this._attrStrObservers.push(e)},t.prototype.removeAttributedStringObserver=function(e){var t=this._attrStrObservers.indexOf(e);t>=0&&this._attrStrObservers.splice(t,1)},t.prototype.notifyDidAlterAttributes=function(e,t){for(var n=0,r=this._attrStrObservers.slice(0);n<r.length;n++)r[n].attributedStringDidAlterAttributes(this,e.clone(),t.clone())},t.prototype.prependArrStrWithoutNotifications=function(t){for(var n=t.attributes.slice(0),r=0,i=n;r<i.length;r++)i[r].retain();this.attributes=n.concat(this.attributes),e.prototype.prependArrStrWithoutNotifications.call(this,t)},t.prototype.appendArrStrWithoutNotifications=function(t){for(var n=t,r=0,i=n.attributes;r<i.length;r++)i[r].retain();this.attributes=this.attributes.concat(n.attributes),e.prototype.appendArrStrWithoutNotifications.call(this,t)},Object.defineProperty(t.prototype,"dbg_isValid",{get:function(){return this.attributes.length===this.codePoints.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_kernAttributes",{get:function(){return"kerns: "+this.attributes.map((function(e){return e.kern})).join(", ")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_superscriptAttributes",{get:function(){return"superscripts: "+this.attributes.map((function(e){return e.superscript})).join(", ")},enumerable:!1,configurable:!0}),t.prototype.free=function(){this._attrStrObservers.length=0;for(var t=0,n=this.attributes;t<n.length;t++)n[t].release();this.attributes.length=0,e.prototype.free.call(this)},t.prototype.initAttributesCopyFromAttrStr=function(e,t){var n="number"===typeof t,r=n?t:0;if(n){var i=[];i.length=e.length;var o=this.attributes,a=o.slice(0,t),s=o.slice(t);this.attributes=a.concat(i).concat(s)}else this.attributes.length=e.length;for(var c=e.atStart(),u=0;c.hasNext;)this.attributes[r+u]=c.nextAttributes.retain(),c.moveToNext(),++u},t.prototype.initAttributes=function(e,t){var n=null!==t&&void 0!==t?t:a.AttrDict.create();if(o.isReadonlyArray(n))for(var r=0;r<e;++r)this.attributes[r]=n[r].retain();else for(r=0;r<e;++r)this.attributes[r]=n.retain()},t.prototype.initArrayAttributedString=function(t,n){e.prototype.initArrayStringBase.call(this,t),!n&&a.isAttributedString(t)?this.initAttributesCopyFromAttrStr(t):this.initAttributes(this.codePoints.length,n)},t.create=function(e,t){var n=this.alloc();return n.initArrayAttributedString(e,t),n.autorelease()},t.createSubstringOf=function(e,t,n){var r;if(s.beginAutoreleaseFrame(),a.isAttributedStringIterator(t))r=a.isAttributedStringIterator(n)?a.createSliceOf(e,t,n):a.createSliceOf(e,t,e.atEnd());else{var i=e.atStart();if(i.moveBy(t),void 0!==n){var o=e.atStart();o.moveBy(n),r=a.createSliceOf(e,i,o)}else r=a.createSliceOf(e,i,e.atEnd())}var c=this.create(r).retain();return s.endAutoreleaseFrame(),c.autorelease()},t.prototype.createAttributeDictionary=function(e){return n.createAttributeDictionary(e)},t.createAttributeDictionary=function(e){return a.AttrDict.create(e)},n=i([s.sealed],t)}(u.ArrayStringBase);t.ArrayAttributedString=d,d.initializeRefcounted(),t.ArrAttrStr=d},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1100),t),i(n(1101),t),i(n(1103),t),i(n(1104),t),i(n(1102),t),i(n(1105),t)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrAttrStrAlterAttributesInRangeOperation=void 0;var o=n(891),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._string=null,t._startPosition=null,t._endPosition=null,t._oldAttrDicts=null,t._newAttrDicts=null,t}return r(t,e),t.prototype.undo=function(){this._applyAttrDicts(this._oldAttrDicts)},t.prototype.redo=function(){this._applyAttrDicts(this._newAttrDicts)},t.prototype._applyAttrDicts=function(e){var t=this._string.iteratorAt(this._startPosition),n=this._string.iteratorAt(this._endPosition);this._string.alterAttributesInRange(t,n,(function(t,n){return e[n]}))},t.prototype.free=function(){for(var t=0,n=this._newAttrDicts;t<n.length;t++)n[t].release();for(var r=0,i=this._oldAttrDicts;r<i.length;r++)i[r].release();this._string.release(),e.prototype.free.call(this)},t.prototype.init=function(e,t,n,r,i){this._string=e.retain(),this._startPosition=t,this._endPosition=n,this._oldAttrDicts=r.map((function(e){return e.retain()})),this._newAttrDicts=i.map((function(e){return e.retain()}))},t.create=function(e,t,n,r,i){var o=this.alloc();return o.init(e,t,n,r,i),o.autorelease()},i([o.sealed],t)}(o.Refcounted);t.ArrAttrStrAlterAttributesInRangeOperation=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrAttrStrDeleteOperation=void 0;var o=n(891),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._attributes=null,t}return r(t,e),t.prototype.undo=function(){this.string.iteratorAt(this._position).insertWithAttributes(this._codePoints,this._attributes)},t.prototype.free=function(){for(var t=0,n=this._attributes;t<n.length;t++)n[t].release();e.prototype.free.call(this)},t.prototype.initArrAttrStrDeleteOperation=function(t,n,r,i){e.prototype.init.call(this,t,n,r),this._attributes=i.map((function(e){return e.retain()}))},t.create=function(e,t,n,r){var i=this.alloc();return i.initArrAttrStrDeleteOperation(e,t,n,r),i.autorelease()},i([o.sealed],t)}(n(1102).ArrStrDeleteOperationBase);t.ArrAttrStrDeleteOperation=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ArrStrDeleteOperationBase=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.string=null,t._position=null,t._codePoints=null,t}return r(t,e),t.prototype.undo=function(){this.string.iteratorAt(this._position).insert(this._codePoints)},t.prototype.redo=function(){var e=this.string.iteratorAt(this._position),t=e.clone();t.moveBy(this._codePoints.length),this.string.delete(e,t)},t.prototype.free=function(){this.string.release(),e.prototype.free.call(this)},t.prototype.init=function(e,t,n){this.string=e.retain(),this._position=t,this._codePoints=n},t}(n(891).Refcounted);t.ArrStrDeleteOperationBase=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrAttrStrInsertWithAttributesOperation=void 0;var o=n(891),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._string=null,t._position=null,t._insertedAttrStr=null,t._affinity=null,t}return r(t,e),t.prototype.undo=function(){var e=this._string.iteratorAt(this._position),t=e.clone();t.moveBy(this._insertedAttrStr.length),this._string.delete(e,t)},t.prototype.redo=function(){this._string.iteratorAt(this._position).insert(this._insertedAttrStr,this._affinity)},t.prototype.free=function(){this._insertedAttrStr.release(),this._string.release(),e.prototype.free.call(this)},t.prototype.init=function(e,t,n,r){this._string=e.retain(),this._position=t,this._insertedAttrStr=n.retain(),this._affinity=r},t.create=function(e,t,n,r){var i=this.alloc();return i.init(e,t,n,r),i.autorelease()},i([o.sealed],t)}(o.Refcounted);t.ArrAttrStrInsertWithAttributesOperation=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrStrDeleteOperation=void 0;var o=n(891),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.create=function(e,t,n){var r=this.alloc();return r.init(e,t,n),r.autorelease()},i([o.sealed],t)}(n(1102).ArrStrDeleteOperationBase);t.ArrStrDeleteOperation=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrStrInsertOperation=void 0;var o=n(891),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.string=null,t._position=null,t._codePoints=null,t._affinity=null,t}return r(t,e),t.prototype.undo=function(){var e=this.string.iteratorAt(this._position),t=e.clone();t.moveBy(this._codePoints.length),this.string.delete(e,t)},t.prototype.redo=function(){this.string.iteratorAt(this._position).insert(this._codePoints,this._affinity)},t.prototype.free=function(){this.string.release(),e.prototype.free.call(this)},t.prototype.init=function(e,t,n,r){this.string=e.retain(),this._position=t,this._codePoints=n,this._affinity=r},t.create=function(e,t,n,r){var i=this.alloc();return i.init(e,t,n,r),i.autorelease()},i([o.sealed],t)}(o.Refcounted);t.ArrStrInsertOperation=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ArrStrBase=t.ArrayStringBase=void 0;var i=n(942),o=n(909),a=n(1104),s=n(1105),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.codePoints=[],t.iterators=[],t}return r(t,e),t.prototype.copyCodePointsInRangeToArray=function(e,t,n,r){void 0===r&&(r=!0),r&&(n.length=0);var i=e.position,o=t.position;if(!(o<=i))for(var a=this.codePoints,s=i;s<o;)n.push(a[s]),++s},t.prototype.forEachInIndexRange=function(e,t,n){if(!(t<=e))for(var r=this.codePoints,i=e;i<t;)n(r[i],i),++i},t.prototype.forEachInRange=function(e,t,n){this.forEachInIndexRange(e.position,t.position,n)},t.prototype.forEach=function(e){this.forEachInIndexRange(o.ZERO_CODE_POINT_INDEX,this.length,e)},t.prototype.someInIndexRange=function(e,t,n){if(t<=e)return!1;for(var r=this.codePoints,i=e;i<t;){if(n(r[i],i))return!0;++i}return!1},t.prototype.someInRange=function(e,t,n){return this.someInIndexRange(e.position,t.position,n)},t.prototype.some=function(e){return this.someInIndexRange(o.ZERO_CODE_POINT_INDEX,this.length,e)},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.length===o.MIN_CODE_POINT_COUNT},enumerable:!1,configurable:!0}),t.prototype.atEnd=function(e){void 0===e&&(e=o.IteratorAffinity.AFTER);var t=this.iteratorAt(this.codePoints.length);return t.affinity=e,t},t.prototype.delete=function(e,t){var n=t.position-e.position;if(0===n)return o.NoOpOperation.instance;this.beginEditing();var r=this.codePoints.splice(e.position,n);return this.updateIteratorsForDeletion(e,e.position,n),this.length=this.length-n,this.didDelete(e,n),this.endEditing(),a.ArrStrDeleteOperation.create(this,e.position,r)},t.prototype.addIterator=function(e){e.iteratorIndex=this.iterators.length,this.iterators.push(e)},t.prototype.removeIterator=function(e){var t=this.iterators.length,n=this.iterators[t-1];this.iterators[e.iteratorIndex]=n,n.iteratorIndex=e.iteratorIndex,this.iterators.pop()},t.prototype.updateIteratorsForInsertion=function(e,t,n,r){var i=0,a=this.iterators.length;if(0!==n)for(i=0;i<a;++i){var s=this.iterators[i];if(!(s.position<t)){if(s.position===t){var c=s.affinity;s===e&&(c=r),c===o.IteratorAffinity.AFTER&&(s.position=s.position+n)}else s.position=s.position+n;s.hasPrevious=s.position>0,s.setPreviousCodePoint(s.hasPrevious?this.codePoints[s.position-1]:o.UNDEFINED_CODEPOINT),s.hasNext=s.position<this.codePoints.length,s.setNextCodePoint(s.hasNext?this.codePoints[s.position]:o.UNDEFINED_CODEPOINT)}}},t.prototype.updateIteratorsForDeletion=function(e,t,n){var r=0,i=this.iterators.length,a=t+n;if(0!==n)for(r=0;r<i;++r){var s=this.iterators[r];s.position<t||(s.position<a?s.position=t:s.position=s.position-n,s.hasPrevious=s.position>0,s.setPreviousCodePoint(s.hasPrevious?this.codePoints[s.position-1]:o.UNDEFINED_CODEPOINT),s.hasNext=s.position<this.codePoints.length,s.setNextCodePoint(s.hasNext?this.codePoints[s.position]:o.UNDEFINED_CODEPOINT))}},t.prototype.insertCodePoints=function(e,t,n){var r=t.length;if(0===r)return o.NoOpOperation.instance;this.beginEditing();var i=this.iteratorAt(e.position);i.affinity=o.IteratorAffinity.BEFORE;var a=this.iteratorAt(e.position);a.affinity=o.IteratorAffinity.AFTER;var c=e.position;return this.codePoints=this.codePoints.slice(0,c).concat(t).concat(this.codePoints.slice(c)),this.updateIteratorsForInsertion(e,c,r,n),this.length=this.length+r,this.didInsert(i,a),this.endEditing(),s.ArrStrInsertOperation.create(this,c,t,n)},t.prototype.prependArrStrWithoutNotifications=function(e){var t=e.codePoints.slice(0);this.codePoints=t.concat(this.codePoints),this.length=this.codePoints.length,this.updateIterators()},t.prototype.appendArrStrWithoutNotifications=function(e){this.codePoints=this.codePoints.concat(e.codePoints),this.length=this.codePoints.length,this.updateIterators()},t.prototype.updateIterators=function(){for(var e=this.iterators.length,t=0;t<e;++t){var n=this.iterators[t];n.hasPrevious=n.position>0,n.setPreviousCodePoint(n.hasPrevious?this.codePoints[n.position-1]:o.UNDEFINED_CODEPOINT),n.hasNext=n.position<this.codePoints.length,n.setNextCodePoint(n.hasNext?this.codePoints[n.position]:o.UNDEFINED_CODEPOINT)}},Object.defineProperty(t.prototype,"dbg_codePoints",{get:function(){return this.codePoints},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_iteratorPosStrs",{get:function(){return this.iterators.map((function(e){return e.dbg_positionString}))},enumerable:!1,configurable:!0}),t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.iterators.length=0},t.prototype.free=function(){e.prototype.free.call(this)},t.prototype.initArrayStringBase=function(e){var t;t=e?Array.isArray(e)?e.slice(0):o.isString(e)?e.toCodePoints():i.utf16StringToCodePoints(e):[],this.codePoints=t,this.length=t.length},t}(o.StringBase);t.ArrayStringBase=c,t.ArrStrBase=c},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ArrAttrStrIter=t.ArrayAttributedStringIterator=void 0;var i=n(909),o=n(1099),a=n(1098),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.string=null,t.isaAttributedStringIterator=!0,t._string=null,t}return r(t,e),t.prototype.insert=function(e,t){return this.insertCodePoints(this.injectAttributesFrom(e).toCodePoints(),t)},t.prototype.clone=function(){var e=t.create(this._string,this.position);return e.affinity=this.affinity,e},Object.defineProperty(t.prototype,"nextAttributes",{get:function(){return this.hasNext?this._string.attributes[this.position]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousAttributes",{get:function(){return this.hasPrevious?this._string.attributes[this.position-1]:null},enumerable:!1,configurable:!0}),t.prototype.insertWithAttributes=function(e,t,n){var r=this.injectAttributesFrom(e,t);return this.insertCodePoints(r.toCodePoints(),n),o.ArrAttrStrInsertWithAttributesOperation.create(this.string,this.position,r,n)},t.prototype.injectAttributesFrom=function(e,t){var n;return n=i.isAttributedString(e)?e:a.ArrayAttributedString.create(e,t),this._string.initAttributesCopyFromAttrStr(n,this.position),n},t.create=function(e,t,n){var r=this.alloc();return r.initArrayStringIteratorBase(e,t,n),r.autorelease()},t.prototype.toString=function(){return i.iteratorName("ArrayAttributedStringIterator",this)},t}(n(1108).ArrayStringIteratorBase);t.ArrayAttributedStringIterator=s,s.initializeRefcounted(),t.ArrAttrStrIter=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ArrStrIterBase=t.ArrayStringIteratorBase=void 0;var i=n(942),o=n(909),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.affinity=o.DEFAULT_ITERATOR_AFFINITY,t.position=0,t.iteratorIndex=-1,t._string=null,t}return r(t,e),t.prototype.distanceFrom=function(e){return this.position-e.position},t.prototype.distanceFromStart=function(){return this.position},t.prototype.distanceTo=function(e){return e.position-this.position},t.prototype.approximateDistanceFromStart=function(){return this.position},t.prototype.moveToNext=function(){var e=++this.position;this.hasPrevious=!0;var t=this._string.codePoints,n=t.length>e;return this.hasNext=n,this.setPreviousCodePoint(t[e-1]),this.setNextCodePoint(n?t[e]:o.UNDEFINED_CODEPOINT),n},t.prototype.moveToPrevious=function(){var e=--this.position;this.hasNext=!0;var t=this._string.codePoints,n=e>0;return this.hasPrevious=n,this.setNextCodePoint(t[e]),this.setPreviousCodePoint(n?t[e-1]:o.UNDEFINED_CODEPOINT),n},t.prototype.moveBy=function(e){0!==e&&this.moveToCodePointIndex(o.CodePointIndexOps.add(this.position,e))},t.prototype.insertCodePoints=function(e,t){return void 0===t&&(t=o.DEFAULT_INSERT_AFFINITY),this._string.insertCodePoints(this,e,t)},t.prototype.insert=function(e,t){var n;return n="string"===typeof e?i.utf16StringToCodePoints(e):Array.isArray(e)?e:e.toCodePoints(),this.insertCodePoints(n,t)},t.prototype.moveToCodePointIndex=function(e){if(e!==this.position){var t=this._string.codePoints,n=t.length,r=e;r<0?r=0:r>n&&(r=n),this.position=r;var i=r>0;this.hasPrevious=i;var a=n>r;this.hasNext=a,this.setPreviousCodePoint(i?t[r-1]:o.UNDEFINED_CODEPOINT),this.setNextCodePoint(a?t[r]:o.UNDEFINED_CODEPOINT)}},t.prototype.moveForwardToCodePointMatching=function(e,t,n){var r=this._string.codePoints,i=n?n.position:r.length,a=this.position;switch(t){case o.IteratorAffinity.BEFORE:for(;a<i;)if(r[++a]===e)return this.moveToCodePointIndex(a),this.hasNext;break;case o.IteratorAffinity.AFTER:for(;a<i;)if(r[++a-1]===e)return this.moveToCodePointIndex(a),this.hasNext}return this.moveToCodePointIndex(a),this.hasNext},t.prototype.moveBackwardToCodePointMatching=function(e,t,n){var r=this._string.codePoints,i=n?n.position:0,a=this.position;switch(t){case o.IteratorAffinity.BEFORE:for(;a>i;)if(r[--a]===e)return this.moveToCodePointIndex(a),this.hasPrevious;break;case o.IteratorAffinity.AFTER:for(;a>i;)if(r[--a-1]===e)return this.moveToCodePointIndex(a),this.hasPrevious}return this.moveToCodePointIndex(a),this.hasPrevious},t.prototype.moveForwardUntil=function(e,t){for(var n=this,r=this._string.codePoints,i=t?t.position:r.length,o=this.position,a=function(){return n.string.iteratorAt(o-1)};o<i&&!e(r[++o-1],r[o],a););return this.moveToCodePointIndex(o),this.hasNext},t.prototype.moveBackwardUntil=function(e,t){for(var n=this,r=this._string.codePoints,i=t?t.position:0,o=this.position,a=function(){return n.string.iteratorAt(o-1)};o>i&&!e(r[--o-1],r[o],a););return this.moveToCodePointIndex(o),this.hasPrevious},t.prototype.instanceInit=function(){e.prototype.instanceInit.call(this),this.position=0,this.affinity=o.IteratorAffinity.BEFORE,this.iteratorIndex=-1,this._string=null},t.prototype.free=function(){this._string.removeIterator(this),e.prototype.free.call(this)},t.prototype.initArrayStringIteratorBase=function(t,n,r){e.prototype.initStringIteratorBase.call(this,t),this._string=t;var i=t.length;this.position=Math.min(n,i),this.affinity=null!==r&&void 0!==r?r:n>i?o.IteratorAffinity.AFTER:o.DEFAULT_ITERATOR_AFFINITY;var a=n>0,s=t.codePoints,c=n<s.length;this.hasPrevious=a,this.hasNext=c,this.setPreviousCodePoint(a?s[n-1]:o.UNDEFINED_CODEPOINT),this.setNextCodePoint(c?s[n]:o.UNDEFINED_CODEPOINT),t.addIterator(this)},t}(o.StringIteratorEagerBase);t.ArrayStringIteratorBase=a,t.ArrStrIterBase=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrStr=t.ArrayString=void 0;var o=n(909),a=n(891),s=n(1106),c=function(){function e(){}return Object.defineProperty(e,"ArrayStringIteratorModule",{get:function(){return null===this._ArrayStringIteratorModule&&(this._ArrayStringIteratorModule=n(1110)),this._ArrayStringIteratorModule},enumerable:!1,configurable:!0}),e._ArrayStringIteratorModule=null,e}(),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.iteratorAt=function(e,t){return e>this.length&&(e=this.length,t=null!==t&&void 0!==t?t:o.IteratorAffinity.AFTER),c.ArrayStringIteratorModule.ArrayStringIterator.create(this,e,t)},t.create=function(e){var t=this.alloc();return t.initArrayStringBase(e),t.autorelease()},t.createSubstringOf=function(e,t,n){var r;if(a.beginAutoreleaseFrame(),o.isStringIterator(t))r=o.isStringIterator(n)?o.createSliceOf(e,t,n):o.createSliceOf(e,t,e.atEnd());else{var i=e.iteratorAt(t);if(void 0!==n){var s=e.iteratorAt(n);r=o.createSliceOf(e,i,s)}else r=o.createSliceOf(e,i,e.atEnd())}var c=this.create(r.toCodePoints()).retain();return a.endAutoreleaseFrame(),c.autorelease()},i([a.sealed],t)}(s.ArrayStringBase);t.ArrayString=u,u.initializeRefcounted(),t.ArrStr=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrStrIter=t.ArrayStringIterator=void 0;var o=n(909),a=n(891),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return r(t,e),n=t,t.prototype.clone=function(){var e=n.create(this._string,this.position);return e.affinity=this.affinity,e},t.create=function(e,t,r){var i=n.alloc();return i.initArrayStringIteratorBase(e,t,r),i.autorelease()},t.prototype.toString=function(){return o.iteratorName("ArrayStringIterator",this)},n=i([a.sealed],t)}(n(1108).ArrayStringIteratorBase);t.ArrayStringIterator=s,s.initializeRefcounted(),t.ArrStrIter=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSubstringOf=void 0;var r=n(909),i=n(1098),o=n(1109);t.createSubstringOf=function(e,t,n){return r.isAttributedString(e)?i.ArrayAttributedString.createSubstringOf(e,t,n):o.ArrayString.createSubstringOf(e,t,n)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCodePointInfoAtCodeUnitIndex=t.getNextCodePointCodeUnitInfoAtCodeUnitIndex=t.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex=t.reusableUTF16StringCodePointInfo=void 0;var a=n(909),s=o(n(1054));t.reusableUTF16StringCodePointInfo={codePoint:a.UNDEFINED_CODEPOINT,codeUnitIndex:null,exists:!1},t.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex=function(e,t,n){if(t<0)return n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,void(n.codeUnitIndex=-1);var r=e.length;if(0===r)return n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,void(n.codeUnitIndex=-1);t>r&&(t=r);var i=a.CodeUnitIndexOps.decremented(t);if(i<0)return n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,void(n.codeUnitIndex=-1);var o=e.charCodeAt(i);if(s.isTrailingSurrogate(o)){if((i=a.CodeUnitIndexOps.decremented(i))<0)return n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,void(n.codeUnitIndex=-1);n.exists=!0,n.codeUnitIndex=i,n.codePoint=e.codePointAt(i)}else if(s.isLeadingSurrogate(o)){if((i=a.CodeUnitIndexOps.decremented(i))<0)return n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,void(n.codeUnitIndex=-1);o=e.charCodeAt(i),s.isTrailingSurrogate(o)?(i=a.CodeUnitIndexOps.decremented(i),n.exists=!0,n.codeUnitIndex=i,n.codePoint=e.codePointAt(i)):s.isLeadingSurrogate(o)?(n.exists=!0,n.codeUnitIndex=i,n.codePoint=e.charCodeAt(i)):(n.exists=!0,n.codeUnitIndex=i,n.codePoint=o)}else n.exists=!0,n.codeUnitIndex=i,n.codePoint=o},t.getNextCodePointCodeUnitInfoAtCodeUnitIndex=function(e,t,n){var r=e.length;if(t>=r)return n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,void(n.codeUnitIndex=r);t<0&&(t=-1);var i=a.CodeUnitIndexOps.incremented(t);if(i>=r)n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,n.codeUnitIndex=r;else{var o=e.charCodeAt(i);if(s.isTrailingSurrogate(o))if((i=a.CodeUnitIndexOps.incremented(i))>=r)n.exists=!1,n.codePoint=a.UNDEFINED_CODEPOINT,n.codeUnitIndex=r;else{var c=e.codePointAt(i);n.codePoint=c,n.codeUnitIndex=i,n.exists=!0}else s.isLeadingSurrogate(o)?(c=e.codePointAt(i),n.codePoint=c,n.codeUnitIndex=i,n.exists=!0):(n.codePoint=o,n.codeUnitIndex=i,n.exists=!0)}},t.getCodePointInfoAtCodeUnitIndex=function(e,t,n){if(n.codeUnitIndex=t<0?-1:t>e.length?e.length:t,n.exists=0<=t&&t<e.length,n.exists){var r=e.codePointAt(t);n.codePoint=isNaN(r)?a.UNDEFINED_CODEPOINT:r}else n.codePoint=a.UNDEFINED_CODEPOINT}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TTStringBase2=t.TTActiveMergeContext=void 0;var s=n(1097),c=n(909),u=n(909),l=n(891),d=n(1042),p=n(1047),f=a(n(1112)),h=a(n(1054)),m=n(1054),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.editEvents=[],t.dbg_oldString="",t.dbg_oldCodePoints=[],t._currentString=null,t}return r(t,e),Object.defineProperty(t.prototype,"currentString",{get:function(){return this._currentString},set:function(e){this._currentString!==e&&(this._currentString&&this._currentString.release(),this._currentString=e.retain())},enumerable:!1,configurable:!0}),t.prototype.free=function(){this._currentString&&(this._currentString.release(),this._currentString=null),e.prototype.free.call(this)},t.create=function(e){var t=this.alloc();return t._currentString=e.retain(),t.autorelease()},t}(l.Refcounted);t.TTActiveMergeContext=g,g.initializeRefcounted();var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._wantsUndoCommands=0,t._undoCommands=[],t._activeMergeContext=null,t._iterators=[],t._activeInsertionContext=null,t.dbg_trackIteratorOrder=!1,t._mergeableString=null,t}return r(t,e),t.prototype.copyCodePointsInRangeToArray=function(e,t,n,r){if(void 0===r&&(r=!0),r&&(n.length=0),!t.isBefore(e))for(var i=this.isMerging?this.mergeContext.currentString.UTF16String:this.mergeableString.attributedString.UTF16String,o=t.nextCodePointCodeUnitIndex,a=e.nextCodePointCodeUnitIndex;a<o;){var s=i.codePointAt(a);n.push(s);var c=i.charCodeAt(a);m.isLeadingSurrogate(c)&&++a,++a}},t.prototype.forEachInRange=function(e,t,n){if(!t.isBefore(e))for(var r=this.isMerging?this.mergeContext.currentString.UTF16String:this.mergeableString.attributedString.UTF16String,i=t.nextCodePointCodeUnitIndex,o=e.nextCodePointCodeUnitIndex,a=e.nextCodePointIndex;o<i;){n(r.codePointAt(o),a);var s=r.charCodeAt(o);m.isLeadingSurrogate(s)&&++o,++o,++a}},t.prototype.forEach=function(e){this.forEachInRange(this.atStart(),this.atEnd(),e)},t.prototype.someInRange=function(e,t,n){if(t.isBefore(e))return!1;for(var r=this.isMerging?this.mergeContext.currentString.UTF16String:this.mergeableString.attributedString.UTF16String,i=t.nextCodePointCodeUnitIndex,o=e.nextCodePointCodeUnitIndex,a=e.nextCodePointIndex;o<i;){if(n(r.codePointAt(o),a))return!0;var s=r.charCodeAt(o);m.isLeadingSurrogate(s)&&++o,++o,++a}return!1},t.prototype.some=function(e){return this.someInRange(this.atStart(),this.atEnd(),e)},t.prototype.toString=function(){return this._activeMergeContext?this._activeMergeContext.currentString.UTF16String:this._mergeableString.attributedString.UTF16String},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this._activeMergeContext?0===this._activeMergeContext.currentString.length:0===this._mergeableString.length},enumerable:!1,configurable:!0}),t.prototype.delete=function(e,t){var n=e.position,r=t.position-n;if(0===r)return u.NoOpOperation.instance;this.beginEditing(),++this._wantsUndoCommands;for(var i=e.nextCodePointCodeUnitIndex,o=t.nextCodePointCodeUnitIndex,a=p.NSMakeRange(i,o-i),s=0,c=this._iterators;s<c.length;s++){var l=c[s];switch(l.affinity){case u.IteratorAffinity.BEFORE:l.cachePreviousCodePointInfoIfUncached(),l.cacheNextCodePointInfoIfUncached();break;case u.IteratorAffinity.AFTER:l.cacheNextCodePointInfoIfUncached()}}this.mergeableString.deleteCharactersInRange(a),--this._wantsUndoCommands,this.didDelete(e,r),this.endEditing();for(var f=d.TTDeleteOperation2.create(this,this._undoCommands,n,r),h=0,m=this._undoCommands;h<m.length;h++)m[h].release();return this._undoCommands.length=0,f},t.prototype.endEditing=function(){this._activeMergeContext&&h.codePointCountInUtf16String(this._mergeableString.attributedString.UTF16String);for(var t=0,n=this._iterators;t<n.length;t++)n[t].dbg_assertIsValid();e.prototype.endEditing.call(this)},t.prototype.edited_range_changeInLength=function(e,t,n,r){e===p.NSTextStorageEditedCharacters&&(0===n?this.editedRangeCharactersReplaced(t):n>0?this._activeMergeContext?this.editedRangeCharactersReplacedAsInsertion(t,n,r):this.editedRangeInsertion(t,n,r):n<0&&(this._activeMergeContext?this.editedRangeCharactersReplacedAsDeletion(t,n,r):this.editedRangeDeletion(t,n,r)))},t.prototype.editedRangeCharactersReplaced=function(e){var t,n=this._activeMergeContext,r=p.NSMaxRange(e),i=n.currentString,o=i.attributedSubstringFromRange(p.NSMakeRange(0,e.location)),a=i.attributedSubstringFromRange(p.NSMakeRange(r,i.length-r)),s=this._mergeableString.attributedString.attributedSubstringFromRange(e),c=h.codePointCountInUtf16String(s.UTF16String);(t=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(o))).appendAttributedString(s),t.appendAttributedString(a),(t=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(o))).appendAttributedString(a),n.currentString=t,this.editedRangeDeletionInString(t.UTF16String,e.location,e.length,c),(t=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(o))).appendAttributedString(s),t.appendAttributedString(a),n.currentString=t,this.editedRangeInsertionInString(t.UTF16String,e.location,e.length,c)},t.prototype.editedRangeCharactersReplacedAsInsertion=function(e,t,n){var r,i=this._activeMergeContext,o=i.currentString,a=o.attributedSubstringFromRange(p.NSMakeRange(0,e.location)),s=e.length,u=this._mergeableString.attributedString.attributedSubstringFromRange(e),l=h.codePointCountInUtf16String(u.UTF16String),d=c.CodeUnitCountOps.subtract(e.length,t),f=o.attributedSubstringFromRange(p.NSMakeRange(e.location,d)),m=h.codePointCountInUtf16String(f.UTF16String),g=o.attributedSubstringFromRange(p.NSMakeRange(e.location+d,o.length-(e.location+d)));if(m>0){(r=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(a))).appendAttributedString(g),i.currentString=r;var v=c.CodePointCountOps.subtract(this.length,m);this.length=v,this.editedRangeDeletionInString(r.UTF16String,e.location,d,m)}s>0&&(i.currentString,(r=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(a))).appendAttributedString(u),r.appendAttributedString(g),i.currentString=r,v=c.CodePointCountOps.add(this.length,l),this.length=v,this.editedRangeInsertionInString(r.UTF16String,e.location,s,l))},t.prototype.editedRangeInsertion=function(e,t,n){if(this._activeMergeContext){var r=this._activeMergeContext.currentString,i=r.attributedSubstringFromRange(p.NSMakeRange(0,e.location)),o=this._mergeableString.attributedString.attributedSubstringFromRange(e),a=r.attributedSubstringFromRange(p.NSMakeRange(e.location,r.length-e.length)),s=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(i));s.appendAttributedString(o),s.appendAttributedString(a),this._activeMergeContext.currentString=s}var u=this._activeMergeContext?this._activeMergeContext.currentString.UTF16String:this._mergeableString.attributedString.UTF16String,l=c.CodePointCountOps.add(this.length,n);this.length=l,this.editedRangeInsertionInString(u,e.location,t,n)},t.prototype.editedRangeInsertionInString=function(e,t,n,r){for(var i=0,o=this._iterators;i<o.length;i++){var a=o[i];if(a.nextCodePointCodeUnitIndex<t);else if(a.nextCodePointCodeUnitIndex===t){var s=a.affinity;if(this._activeInsertionContext&&a===this._activeInsertionContext.atIterator&&(s=this._activeInsertionContext.atIteratorAffinity),s===u.IteratorAffinity.AFTER)switch(a.affinity){case u.IteratorAffinity.BEFORE:var l=c.CodeUnitIndexOps.add(a.previousCodePointCodeUnitIndex,n),d=c.CodePointIndexOps.add(a.previousCodePointIndex,r);a.setPreviousCodePointCodeUnitIndexAndCodePointIndex(l,d);break;case u.IteratorAffinity.AFTER:l=c.CodeUnitIndexOps.add(a.nextCodePointCodeUnitIndex,n),d=c.CodePointIndexOps.add(a.nextCodePointIndex,r),a.setNextCodePointCodeUnitIndexAndCodePointIndex(l,d)}switch(a.affinity){case u.IteratorAffinity.BEFORE:a.invalidateNextCodePointInfo();break;case u.IteratorAffinity.AFTER:a.invalidatePreviousCodePointInfo()}}else switch(a.affinity){case u.IteratorAffinity.BEFORE:l=c.CodeUnitIndexOps.add(a.previousCodePointCodeUnitIndex,n),d=c.CodePointIndexOps.add(a.previousCodePointIndex,r),a.setPreviousCodePointCodeUnitIndexAndCodePointIndex(l,d),a.invalidateNextCodePointInfo();break;case u.IteratorAffinity.AFTER:l=c.CodeUnitIndexOps.add(a.nextCodePointCodeUnitIndex,n),d=c.CodePointIndexOps.add(a.nextCodePointIndex,r),a.setNextCodePointCodeUnitIndexAndCodePointIndex(l,d),a.invalidatePreviousCodePointInfo()}a.cachePreviousCodePointInfoIfUncached(),a.cacheNextCodePointInfoIfUncached()}if(this._activeMergeContext){var p=this.iteratorAtCodeUnitIndex(t,u.IteratorAffinity.BEFORE),f=this.iteratorAtCodeUnitIndex(c.CodeUnitIndexOps.add(t,n),u.IteratorAffinity.AFTER);this.didInsert(p,f),this._activeMergeContext.editEvents.push({type:"insert",start:p,end:f})}},t.prototype.editedRangeDeletion=function(e,t,n){var r=this._mergeableString.attributedString.UTF16String,i=c.CodePointCountOps.add(this.length,n);this.length=i,this.editedRangeDeletionInString(r,e.location,c.CodeUnitCountOps.negate(t),c.CodePointCountOps.negate(n))},t.prototype.editedRangeCharactersReplacedAsDeletion=function(e,t,n){var r=this._activeMergeContext,i=r.currentString,o=i.attributedSubstringFromRange(p.NSMakeRange(0,e.location)),a=this._mergeableString.attributedString.attributedSubstringFromRange(e),s=i.attributedSubstringFromRange(p.NSMakeRange(e.location+e.length+-t,i.length-(e.location+e.length+-t))),u=(i.UTF16String.substring(e.location+e.length+-t),e.length),l=h.codePointCountInUtf16String(a.UTF16String),d=c.CodeUnitCountOps.subtract(e.length,t),f=i.UTF16String.substr(e.location,d),m=h.codePointCountInUtf16String(f);(g=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(o))).appendAttributedString(s),r.currentString=g;var g,v=c.CodePointCountOps.subtract(this.length,m);(this.length=v,this.editedRangeDeletionInString(g.UTF16String,e.location,d,m),a.length>0)&&(r.currentString,(g=p.autorelease(p.NSMutableAttributedString.alloc().initWithAttributedString(o))).appendAttributedString(a),g.appendAttributedString(s),r.currentString=g,v=c.CodePointCountOps.add(this.length,l),this.length=v,this.editedRangeInsertionInString(g.UTF16String,e.location,u,l))},t.prototype.editedRangeDeletionInString=function(e,t,n,r){for(var i=c.CodeUnitIndexOps.add(t,n),o=0,a=this._iterators;o<a.length;o++){var s=a[o];switch(s.affinity){case u.IteratorAffinity.BEFORE:if(s.nextCodePointCodeUnitIndex<t);else if(s.nextCodePointCodeUnitIndex===t)s.nextCodePointCodeUnitIndex>=e.length&&(f.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex(e,e.length,s.previousCodePointInfo),s.previousCodePointInfo.setCodePointIndex(this.getCodePointIndexForCodeUnitIndex(s.previousCodePointInfo.codeUnitIndex))),s.invalidateNextCodePointInfo();else if(s.nextCodePointCodeUnitIndex<i){var l=c.CodeUnitIndexOps.subtract(s.nextCodePointCodeUnitIndex,t);(m=c.CodeUnitIndexOps.subtract(s.nextCodePointCodeUnitIndex,l))<0&&(m=-1);var d=f.reusableUTF16StringCodePointInfo;f.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex(e,m,d);var p=h.utf16StringCodePointIndexForCodeUnitIndex(e,d.codeUnitIndex);s.resetPreviousCodePointTo(d.codeUnitIndex,p,d.codePoint),s.invalidateNextCodePointInfo()}else(m=c.CodeUnitIndexOps.subtract(s.nextCodePointCodeUnitIndex,n))<0&&(m=-1),f.getPreviousCodePointCodeUnitInfoAtCodeUnitIndex(e,m,s.previousCodePointInfo),p=c.CodePointIndexOps.subtract(s.previousCodePointIndex,r),s.previousCodePointInfo.setCodePointIndex(p),s.invalidateNextCodePointInfo();break;case u.IteratorAffinity.AFTER:if(s.nextCodePointCodeUnitIndex<t);else if(s.nextCodePointCodeUnitIndex===t)f.getCodePointInfoAtCodeUnitIndex(e,t,s.nextCodePointInfo);else if(s.nextCodePointCodeUnitIndex<i)f.getCodePointInfoAtCodeUnitIndex(e,t,s.nextCodePointInfo),p=null,s.nextCodePointInfo.setCodePointIndex(p),s.invalidatePreviousCodePointInfo();else{var m=c.CodeUnitIndexOps.subtract(s.nextCodePointCodeUnitIndex,n),g=(p=c.CodePointIndexOps.subtract(s.nextCodePointIndex,r),m<0||m>=e.length?void 0:e.codePointAt(m));s.resetNextCodePointTo(m,p,g),s.invalidatePreviousCodePointInfo()}}s.cachePreviousCodePointInfoIfUncached(),s.cacheNextCodePointInfoIfUncached()}if(this._activeMergeContext){var v=this.iteratorAtCodeUnitIndex(t);this.didDelete(v,r),this._activeMergeContext.editEvents.push({type:"delete",atIterator:v,deletedCodePointCount:r})}},t.prototype.getCodePointIndexForCodeUnitIndex=function(e){return this._activeMergeContext?h.utf16StringCodePointIndexForCodeUnitIndex(this._activeMergeContext.currentString.UTF16String,e):this._mergeableString.getCodePointIndexForCodeUnitIndex(e)},t.prototype.iteratorAtCodeUnitIndex=function(e,t){var n=this.getCodePointIndexForCodeUnitIndex(e);return this.iteratorAt(n,t)},t.prototype.addUndoCommand=function(e){this._undoCommands.push(e.retain())},Object.defineProperty(t.prototype,"wantsUndoCommands",{get:function(){return this._wantsUndoCommands>0},enumerable:!1,configurable:!0}),t.prototype.willBeginMerging=function(){this._activeMergeContext=g.create(p.autorelease(this._mergeableString.attributedString.copy())).retain(),this.dbg_establishIteratorOrder();for(var e=0,t=this._iterators;e<t.length;e++){var n=t[e];switch(n.affinity){case u.IteratorAffinity.BEFORE:n.cachePreviousCodePointInfoIfUncached(),n.cacheNextCodePointInfoIfUncached();break;case u.IteratorAffinity.AFTER:n.cacheNextCodePointInfoIfUncached()}}},t.prototype.didEndMerging=function(){try{this.dbg_assertIteratorOrderIsCorrect(),this._activeMergeContext}finally{this._activeMergeContext&&(this._activeMergeContext.release(),this._activeMergeContext=null)}},Object.defineProperty(t.prototype,"isMerging",{get:function(){return!!this._activeMergeContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mergeContext",{get:function(){return this._activeMergeContext},enumerable:!1,configurable:!0}),t.prototype.registerIterator=function(e){e.iteratorIndex=this._iterators.length,this._iterators.push(e)},t.prototype.unregisterIterator=function(e){var t=this._iterators.length,n=this._iterators[t-1];this._iterators[e.iteratorIndex]=n,n.iteratorIndex=e.iteratorIndex,e.iteratorIndex=-1,this._iterators.pop()},t.prototype.invalidateIterators=function(){for(var e=0,t=this._iterators;e<t.length;e++)t[e].invalidate()},t.prototype.resetLocalReplicaClocksToTimestampValues=function(){this.mergeableString.resetLocalReplicaClocksToTimestampValues()},t.prototype.updateClock=function(){this.mergeableString.updateClock()},t.prototype.checkTimestampLogStyleErrors=function(e){this.mergeableString.checkTimestampLogStyleErrors(e)},t.prototype.insertStringHelper=function(e,t,n,r){var i,o;if("string"===typeof t)o=t,i=h.codePointCountInUtf16String(o);else if(u.isString(t))o=t.toString(),i=h.codePointCountInUtf16String(o);else{var a=s.ArrayString.create(t);i=a.length,o=a.toString()}if(r.codePointCountToInsert=i,0!==i){for(var c=0,l=this._iterators;c<l.length;c++){var d=l[c];switch(d.affinity){case u.IteratorAffinity.BEFORE:d.cachePreviousCodePointInfoIfUncached(),d.cacheNextCodePointInfoIfUncached();break;case u.IteratorAffinity.AFTER:d.cacheNextCodePointInfoIfUncached()}}var p=e.nextCodePointIndex,f=e.nextCodePointCodeUnitIndex,m=this.iteratorAt(p,u.IteratorAffinity.BEFORE),g=this.iteratorAt(p,u.IteratorAffinity.AFTER);this._activeInsertionContext={atCodeUnitIndex:f,atIterator:e,atIteratorAffinity:n,codePointCountBefore:this.length,codePointCountToInsert:i};try{var v=this.mergeableString;++this._wantsUndoCommands,v.insertString_atIndex(o,f),--this._wantsUndoCommands}finally{this._activeInsertionContext=null}r.startIter=m,r.endIter=g}},t.prototype.insertString=function(e,t,n){this.beginEditing();var r=e.position,i={},o=e.affinity;if(e.affinity=n,this.insertStringHelper(e,t,n,i),0===i.codePointCountToInsert)return u.NoOpOperation.instance;e.affinity=o,this.didInsert(i.startIter,i.endIter),this.endEditing();for(var a=d.TTInsertOperation2.create(this,this._undoCommands,r,i.codePointCountToInsert),s=0,c=this._undoCommands;s<c.length;s++)c[s].release();return this._undoCommands.length=0,a},t.prototype.applyUndoCommand=function(e,t){if(++this._wantsUndoCommands,this._mergeableString.applyUndoCommand(e),--this._wantsUndoCommands,t){t.length=0;for(var n=0,r=this._undoCommands;n<r.length;n++){var i=r[n];t.push(i.autorelease())}}else for(var o=0,a=this._undoCommands;o<a.length;o++)(i=a[o]).release();this._undoCommands.length=0},t.prototype.applyRedoCommand=function(e){this._mergeableString.applyUndoCommand(e)},t.prototype.merge=function(e){this._mergeableString.mergeWithString(e._mergeableString)},t.prototype.toProtobuf=function(){return this.mergeableString.saveToArchive()},t.prototype.dbg_establishIteratorOrder=function(){var e=this._iterators.slice(0);e.sort((function(e,t){return e.position-t.position}));for(var t=0,n=0,r=e;n<r.length;n++)r[n].dbg_relativeOrderIndex=t,t+=10},t.prototype.dbg_assertIteratorOrderIsCorrect=function(){var e=this._iterators.slice(0);e.sort((function(e,t){return e.position-t.position}));for(var t=0,n=e;t<n.length;t++){var r=n[t];-1!==r.dbg_relativeOrderIndex&&(r.dbg_relativeOrderIndex,r.position)}},Object.defineProperty(t.prototype,"dbg_iteratorPosStrs",{get:function(){return this._iterators.map((function(e){return e.dbg_posString}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_codePointsFromUTF16String",{get:function(){return h.utf16StringToCodePoints(this.toString())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_codeUnitsFromUTF16String",{get:function(){return h.utf16StringToCodeUnits(this.toString())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_areIteratorsValid",{get:function(){return this._iterators.every((function(e){return e.dbg_isValid()}))},enumerable:!1,configurable:!0}),t.prototype.dbg_assertStringLengthIsCorrect=function(){},Object.defineProperty(t.prototype,"mergeableString",{get:function(){return this._mergeableString},enumerable:!1,configurable:!0}),t.prototype.free=function(){this._iterators.length=0,this._mergeableString&&(this._mergeableString.delegate=null,this._mergeableString.release(),this._mergeableString=null),this._wantsUndoCommands=0,e.prototype.free.call(this)},t.prototype.init=function(){},t.prototype.initWithString=function(e){var t;this.init(),t=Array.isArray(e)?s.ArrayString.create(e).toString():u.isString(e)?e.toString():e,this.length=c.MIN_CODE_POINT_COUNT,this._mergeableString.insertString_atIndex(t,0)},t.prototype.initWithMergeableUndoString=function(e){this._mergeableString=e.retain(),this._mergeableString.delegate=this,this.length=h.codePointCountInUtf16String(this._mergeableString.attributedString.UTF16String)},t}(u.StringBase);t.TTStringBase2=v},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTString2=void 0;var i=n(909),o=n(1047),a=n(1113),s=n(1115),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.atStart=function(e){return void 0===e&&(e=i.IteratorAffinity.BEFORE),s.TTStringIterator2.createAtStart(this,e)},t.prototype.atEnd=function(e){return void 0===e&&(e=i.IteratorAffinity.AFTER),s.TTStringIterator2.createAtEnd(this,e)},t.prototype.iteratorAt=function(e,t){return e>this.length?s.TTStringIterator2.createAtEnd(this,t):s.TTStringIterator2.createAtLeftOfCodePointIndex(this,e,t)},t.prototype.init=function(){this._mergeableString=o.TTMergeableUndoString.alloc().initWithReplicaID(o.NSUUID.UUID()),this._mergeableString.delegate=this},t.prototype.initWithArchive=function(e){var t=o.autorelease(o.TTMergeableUndoString.alloc().initWithArchive_andReplicaID(e,o.NSUUID.UUID()));this.initWithMergeableUndoString(t)},t.create=function(){var e=this.alloc();return e.init(),e.autorelease()},t.createWithString=function(e){var t=this.alloc();return t.initWithString(e),t.autorelease()},t.createWithArchive=function(e){var t=this.alloc();return t.initWithArchive(e),t.autorelease()},t}(a.TTStringBase2);t.TTString2=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTStringIterator2=void 0;var i=n(909),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.clone=function(){return t.createCloneOf(this)},t.prototype.toString=function(){return i.iteratorName("TTStringIterator2",this)},t.createAtLeftOfCodePointIndex=function(e,t,n){var r=this.alloc();return r.initTTStringIteratorBase2(e,t,n),r.autorelease()},t.createAtCharIDWithAffinity=function(e,t,n){var r=this.alloc();return r.initAtCharIDWithAffinity(e,t,n),r.autorelease()},t.createAtStart=function(e,t){var n=this.alloc();return n.initTTStringIteratorBase2(e,i.ZERO_CODE_POINT_INDEX,null!==t&&void 0!==t?t:i.IteratorAffinity.BEFORE),n.autorelease()},t.createAtEnd=function(e,t){var n=this.alloc();return n.initTTStringIteratorBase2(e,e.length,null!==t&&void 0!==t?t:i.IteratorAffinity.AFTER),n.autorelease()},t.createCloneOf=function(e){var t=this.alloc();return t.initFromIteratorBase2(e),t.autorelease()},t}(n(1096).TTStringIteratorBase2);t.TTStringIterator2=o,o.initializeRefcounted()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CRCoder=void 0;var r=n(1117),i=n(1118),o=n(1119),a=n(906),s=n(1126),c=new Map,u=null,l=function(){function e(){}return Object.defineProperty(e,"typeSet",{get:function(){return u},enumerable:!1,configurable:!0}),Object.defineProperty(e,"typeToClassDict",{get:function(){return c},enumerable:!1,configurable:!0}),e.getTypeIndexForClass=function(e){this.registerCRClasses(),o.CRTable.registerWithCRCoder(),s.ICTable.registerWithCRCoder();for(var t=0,n=this.typeSet.length;t<n;++t){var r=this.typeSet[t];if(e===this.typeToClassDict.get(r))return t}return-1},e.registerClass=function(e,t){this.registerCRClasses(),u&&this._registerClass(u,e,t)},e.registerCRClasses=function(){null===u&&(u=[],c=new Map,this._registerClass(u,r.CRNumber.decode,"com.apple.CRDT.NSNumber"),this._registerClass(u,i.CRString.decode,"com.apple.CRDT.NSString"),this._registerClass(u,a.CRUUID.decode,"com.apple.CRDT.NSUUID"))},e._registerClass=function(e,t,n){c.set(n,t),e.push(n)},e}();t.CRCoder=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRNumber=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._number=null,t}return r(t,e),Object.defineProperty(t.prototype,"number",{get:function(){return this._number},enumerable:!1,configurable:!0}),t.prototype.free=function(){this._number=null,e.prototype.free.call(this)},t.prototype.initWithNumber=function(e){return this._number=e,this},t.prototype.isEqual=function(e){return e instanceof t&&this.number===e.number},t.prototype.encodeNumberField=function(e){return Number.isInteger(this.number)?e.encodeInt64("integerValue",this.number):e.encodeDouble("doubleValue",this.number)},t.decode=function(e,n){if(e.hasDecodableValueForKey("integerValue",n))return t.alloc().initWithNumber(e.decodeInt32ForKey("integerValue",n)).autorelease();if(e.hasDecodableValueForKey("doubleValue",n))return t.alloc().initWithNumber(e.decodeDoubleForKey("doubleValue",n)).autorelease();throw new Error("Unable to decode number")},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new Error("Cannot merge number with non-number");if(this.number!==e.number)throw new Error("Cannot merge number with unequal number")},t.prototype.deltaSince=function(e,t){return null},t.prototype.realizeLocalChanges=function(e){},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){},t.prototype.setDocument=function(e){},t}(n(891).Refcounted);t.CRNumber=i,i.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRString=void 0;var i=n(891),o=n(1116),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._string=null,t}return r(t,e),Object.defineProperty(t.prototype,"string",{get:function(){return this._string},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"UUIDString",{get:function(){return this._string},enumerable:!1,configurable:!0}),t.prototype.init=function(){return this._string="",this},t.prototype.free=function(){this._string=null,e.prototype.free.call(this)},t.prototype.initWithString=function(e){return this._string=e,this},t.prototype.isEqual=function(e){return e instanceof t&&this.string===e.string},t.prototype.encode=function(e){return{contents:"custom",custom:{type:o.CRCoder.getTypeIndexForClass(t.decode),mapEntry:[e.encodeString("self",this.string)]}}},t.decode=function(e,n){var r=e.decodeStringForKey("self",n);return t.alloc().initWithString(r).autorelease()},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new Error("Cannot merge string with non-string");if(this.string!==e.string)throw new Error("Cannot merge string with unequal string")},t.prototype.deltaSince=function(e,t){return null},t.prototype.realizeLocalChanges=function(e){},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){},t.prototype.setDocument=function(e){},t}(i.Refcounted);t.CRString=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRTable=t.CRTableColumnDirection=void 0;var i=n(891),o=n(1116),a=n(904),s=n(1120),c=n(1118),u=n(1122),l=n(906),d=n(1124),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.self=null,t.columnUUID=null,t}return r(t,e),t.create=function(e,t){var n=this.alloc();return n.self=e.retain(),n.columnUUID=t.retain(),n.autorelease()},t.prototype.free=function(){this.self.release(),this.columnUUID.release(),this.self=null,this.columnUUID=null,e.prototype.free.call(this)},t.prototype.apply=function(){this.self.undoablyRemoveContentsOfColumn(this.columnUUID,!0)},t}(i.Refcounted);p.initializeRefcounted();var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.self=null,t.columnUUID=null,t.columnContents=[],t}return r(t,e),t.create=function(e,t,n){var r=this.alloc();r.self=e.retain(),r.columnUUID=t.retain(),r.columnContents.length=0;for(var i=0,o=n;i<o.length;i++){var a=o[i];r.columnContents.push([a[0].retain(),a[1]?a[1].retain():null])}return r.autorelease()},t.prototype.free=function(){this.self.release(),this.columnUUID.release();for(var t=0,n=this.columnContents;t<n.length;t++){var r=n[t];r[0].release(),r[1]&&r[1].release()}this.self=null,this.columnUUID=null,this.columnContents.length=0,e.prototype.free.call(this)},t.prototype.apply=function(){this.self.undoablyInsertContents_atColumn(this.columnContents,this.columnUUID)},t}(i.Refcounted);f.initializeRefcounted();var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.self=null,t.rowUUID=null,t}return r(t,e),t.create=function(e,t){var n=this.alloc();return n.self=e.retain(),n.rowUUID=t.retain(),n.autorelease()},t.prototype.free=function(){this.self.release(),this.rowUUID.release(),this.self=null,this.rowUUID=null,e.prototype.free.call(this)},t.prototype.apply=function(){this.self.undoablyRemoveContentsOfRow(this.rowUUID,!0)},t}(i.Refcounted);h.initializeRefcounted();var m,g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.self=null,t.rowUUID=null,t.rowContents=[],t}return r(t,e),t.create=function(e,t,n){var r=this.alloc();r.self=e.retain(),r.rowUUID=t.retain(),r.rowContents.length=0;for(var i=0,o=n;i<o.length;i++){var a=o[i];r.rowContents.push([a[0].retain(),a[1]?a[1].retain():null])}return r.autorelease()},t.prototype.free=function(){this.self.release(),this.rowUUID.release();for(var t=0,n=this.rowContents;t<n.length;t++){var r=n[t];r[0].release(),r[1]&&r[1].release()}this.self=null,this.rowUUID=null,this.rowContents.length=0,e.prototype.free.call(this)},t.prototype.apply=function(){this.self.undoablyInsertContents_atRow(this.rowContents,this.rowUUID)},t}(i.Refcounted);g.initializeRefcounted(),function(e){e[e.LeftToRight=0]="LeftToRight",e[e.RightToLeft=1]="RightToLeft"}(m=t.CRTableColumnDirection||(t.CRTableColumnDirection={}));var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._delegate=null,t._document=null,t._crColumnDirection=null,t._columns=null,t._rows=null,t._cellColumns=null,t._observers=new Set,t}return r(t,e),Object.defineProperty(t.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delegate",{get:function(){return this._delegate},set:function(e){this._delegate!==e&&(this._delegate&&this._delegate.release(),this._delegate=e?e.retain():null)},enumerable:!1,configurable:!0}),t.prototype.addObserver=function(e){this._observers.add(e)},t.prototype.removeObserver=function(e){this._observers.delete(e)},t.prototype.initWithDocument=function(e){return this.initWithDocument_isRightToLeft(e,!1)},t.prototype.initWithDocument_isRightToLeft=function(e,t){var n=t?m.RightToLeft:m.LeftToRight;return this.initWithDocument_columnDirection(e,n)},t.prototype.initWithDocument_columnDirection=function(e,t){var n=c.CRString.alloc().initWithString(t===m.LeftToRight?"CRTableColumnDirectionLeftToRight":"CRTableColumnDirectionRightToLeft").autorelease(),r=s.CRRegisterLatest.alloc().initWithContents_document(n,e).autorelease(),i=u.CRTombstoneOrderedSet.alloc().initWithDocument(e).autorelease(),o=u.CRTombstoneOrderedSet.alloc().initWithDocument(e).autorelease(),l=a.CRDictionary.alloc().initWithDocument(e).autorelease();return this.initWithDocument_columnDirection_crColumns_crRows_cellColumns(e,r,i,o,l)},t.prototype.initWithDocument_columnDirection_crColumns_crRows_cellColumns=function(e,t,n,r,i){return this.document=e,this.crColumnDirection=t,this.columns=n,this.rows=r,this.cellColumns=i,this.columns.delegate=this,this.rows.delegate=this,this},t.prototype.free=function(){this.crColumnDirection.release(),this.columns.release(),this.rows.release(),this.cellColumns.release(),this.delegate&&this.delegate.release(),this._crColumnDirection=null,this._columns=null,this._rows=null,this._cellColumns=null,this._delegate=null,e.prototype.free.call(this)},t.prototype.encode=function(e){return{contents:"custom",custom:this.encodeIntoCustomObject(e)}},t.prototype.encodeIntoCustomObject=function(e){return this.encodeIntoCustomObjectImpl(e,t.decodeCRTable)},t.prototype.encodeIntoCustomObjectImpl=function(e,t){var n=this;return{type:o.CRCoder.getTypeIndexForClass(t),mapEntry:function(){var t=[];return t.push(e.encodeUUID("identity",n.identity)),t.push(e.encodeObjectField("crTableColumnDirection",n.crColumnDirection)),t.push(e.encodeObjectField("crRows",n.rows)),t.push(e.encodeObjectField("crColumns",n.columns)),t.push(e.encodeObjectField("cellColumns",n.cellColumns)),t}()}},t.decodeCRTable=function(e,n){var r=e.decodeObjectForKey("crTableColumnDirection",n),i=e.decodeObjectForKey("crColumns",n),o=e.decodeObjectForKey("crRows",n),a=e.decodeObjectForKey("cellColumns",n),s=t.alloc().initWithDocument_columnDirection_crColumns_crRows_cellColumns(e.document,r,i,o,a).autorelease();return e.document.objects.set(s.identity.UUIDString,[s.identity,s]),s},t.prototype.mergeWith=function(e){var n=this;if(!(e instanceof t))throw new Error("Cannot merge a CRTable with a non-CRTable");var r=new Map;this.rows.forEach((function(e,t){return r.set(e,t)}));var i=new Map;this.columns.forEach((function(e,t){return i.set(e,t)})),this.crColumnDirection.mergeWith(e.crColumnDirection),this.columns.mergeWith(e.columns),this.rows.mergeWith(e.rows),this.cellColumns.mergeWith(e.cellColumns),this.rows.forEach((function(e,t){var i=r.get(e);"number"!==typeof i?n._observers.forEach((function(t){t.tableDidAddRow&&t.tableDidAddRow(e)})):i!==t&&n._observers.forEach((function(t){t.tableDidMoveRow&&t.tableDidMoveRow(e)}))})),r.forEach((function(e,t){n.rows.has(t)||n._observers.forEach((function(e){e.tableDidDeleteRow&&e.tableDidDeleteRow(t)}))})),this.columns.forEach((function(e,t){var r=i.get(e);"number"!==typeof r?n._observers.forEach((function(t){t.tableDidAddColumn&&t.tableDidAddColumn(e)})):r!==t&&n._observers.forEach((function(t){t.tableDidMoveColumn&&t.tableDidMoveColumn(e)}))})),i.forEach((function(e,t){n.columns.has(t)||n._observers.forEach((function(e){e.tableDidDeleteColumn&&e.tableDidDeleteColumn(t)}))})),this.rows.forEach((function(e){n._observers.forEach((function(t){t.tableDidAddRow&&t.tableDidAddRow(e)}))}))},t.prototype.deltaSince=function(e,n){var r=this.crColumnDirection.deltaSince(e,n),i=this.columns.deltaSince(e,n),o=this.rows.deltaSince(e,n),a=this.cellColumns.deltaSince(e,n);return r&&i&&o&&a?t.alloc().initWithDocument_columnDirection_crColumns_crRows_cellColumns(n,r,i,o,a).autorelease():null},t.prototype.realizeLocalChanges=function(e){},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){e(this.crColumnDirection),e(this.columns),e(this.rows),e(this.cellColumns)},Object.defineProperty(t.prototype,"columnDirection",{get:function(){var e=this.crColumnDirection.contents;return e&&"CRTableColumnDirectionLeftToRight"===e.string?m.LeftToRight:m.RightToLeft},set:function(e){this.crColumnDirection.contents=c.CRString.alloc().initWithString(e===m.LeftToRight?"CRTableColumnDirectionLeftToRight":"CRTableColumnDirectionRightToLeft").autorelease()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"crColumnDirection",{get:function(){return this._crColumnDirection},set:function(e){this._crColumnDirection!==e&&(this._crColumnDirection&&this._crColumnDirection.release(),this._crColumnDirection=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns!==e&&(this._columns&&this._columns.release(),this._columns=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(e){this._rows!==e&&(this._rows&&this._rows.release(),this._rows=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellColumns",{get:function(){return this._cellColumns},set:function(e){this._cellColumns!==e&&(this._cellColumns&&this._cellColumns.release(),this._cellColumns=e.retain())},enumerable:!1,configurable:!0}),t.registerWithCRCoder=function(){o.CRCoder.registerClass(t.decodeCRTable,"com.apple.notes.CRTable")},Object.defineProperty(t.prototype,"columnCount",{get:function(){return this.columns.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowCount",{get:function(){return this.rows.size},enumerable:!1,configurable:!0}),t.prototype.getColumnsIntersectingWithColumns=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];this.columns.has(i)&&t.push(i)}return t},t.prototype.getRowsIntersectingWithRows=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];this.rows.has(i)&&t.push(i)}return t},t.prototype.getIdentifierForRowAtIndex=function(e){return this.rows.get(e)},t.prototype.getIdentifierForColumnAtIndex=function(e){return this.columns.get(e)},t.prototype.getIdentifierForRowIndexes=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(this.rows.get(i))}return t},t.prototype.getIdentifierForColumnIndexes=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(this.columns.get(i))}return t},t.prototype.getRowIndexForIdentifier=function(e){return this.rows.indexOf(e)},t.prototype.getColumnIndexForIdentifier=function(e){return this.columns.indexOf(e)},t.prototype.getRowIndexesForIdentifiers=function(e){for(var t=new d.IndexSet,n=0,r=e;n<r.length;n++){var i=r[n],o=this.rows.indexOf(i);-1!==o&&t.add(o)}return t},t.prototype.getColumnIndexesForIdentifiers=function(e){for(var t=new d.IndexSet,n=0,r=e;n<r.length;n++){var i=r[n],o=this.columns.indexOf(i);-1!==o&&t.add(o)}return t},t.prototype.containsRow=function(e){return this.rows.has(e)},t.prototype.containsColumn=function(e){return this.columns.has(e)},t.prototype.insertRow=function(e){var t=l.CRUUID.UUID();return this.rows.insert(t,e),this.undoablyInsertContents_atRow(null,t),t},t.prototype.insertColumn=function(e){var t=l.CRUUID.UUID();return this.columns.insert(t,e),this.undoablyInsertContents_atColumn(null,t),t},t.prototype.insertRows=function(e,t){for(var n=[],r=0;r<e;++r)n.push(this.insertRow(t));return n},t.prototype.insertColumns=function(e,t){for(var n=[],r=0;r<e;++r)n.push(this.insertColumn(t));return n},t.prototype.removeRowAtIndex=function(e){var t=this.rows.get(e);this.undoablyRemoveContentsOfRow(t,!1),this.rows.delete(e),this._observers.forEach((function(e){e.tableDidDeleteRow&&e.tableDidDeleteRow(t)}))},t.prototype.undoablyRemoveContentsOfRow=function(e,t){for(var n=[],r=0,i=this.columnCount;r<i;r++){var o=this.columns.get(r),a=this.cellColumns.get(o);a&&(n.push([o,a.get(e)]),a.delete(e),a.size<=0&&this.cellColumns.delete(o))}this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(g.create(this,e,n)),t&&this._observers.forEach((function(t){t.tableDidDeleteRow&&t.tableDidDeleteRow(e)}))},t.prototype.undoablyInsertContents_atRow=function(e,t){if(e)for(var n=0,r=e;n<r.length;n++){var i=r[n];this.setObject_columnID_rowID(i[1],i[0],t)}this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(h.create(this,t)),this._observers.forEach((function(e){e.tableDidAddRow&&e.tableDidAddRow(t)}))},t.prototype.removeColumnAtIndex=function(e){var t=this.columns.get(e);this.undoablyRemoveContentsOfColumn(t,!1),this.columns.delete(e),this._observers.forEach((function(e){e.tableDidDeleteColumn&&e.tableDidDeleteColumn(t)}))},t.prototype.moveRow=function(e,t){var n=this.rows.get(e);this.rows.move(e,t),this._observers.forEach((function(e){e.tableDidMoveRow&&e.tableDidMoveRow(n)}))},t.prototype.moveColumn=function(e,t){var n=this.columns.get(e);this.columns.move(e,t),this._observers.forEach((function(e){e.tableDidMoveColumn&&e.tableDidMoveColumn(n)}))},t.prototype.undoablyRemoveContentsOfColumn=function(e,t){var n=this.cellColumns.get(e),r=[];n.forEach((function(e,t){return r.push([t,e])})),this.cellColumns.delete(e),this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(f.create(this,e,r)),t&&this._observers.forEach((function(t){t.tableDidDeleteColumn&&t.tableDidDeleteColumn(e)}))},t.prototype.undoablyInsertContents_atColumn=function(e,t){if(e)for(var n=0,r=e;n<r.length;n++){var i=r[n];this.setObject_columnID_rowID(i[1],t,i[0])}this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(p.create(this,t)),this._observers.forEach((function(e){e.tableDidAddColumn&&e.tableDidAddColumn(t)}))},Object.defineProperty(t.prototype,"isRightToLeft",{get:function(){return this.columnDirection===m.RightToLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLeftToRight",{get:function(){return!this.isRightToLeft},enumerable:!1,configurable:!0}),t.prototype.reverseColumnDirection=function(){var e=this.columnDirection;this.columnDirection=e===m.LeftToRight?m.RightToLeft:m.LeftToRight},t.prototype.get=function(e,t){var n=this.columns.get(e),r=this.cellColumns.get(n);if(!r)return null;var i=this.rows.get(t);return r.get(i)||null},t.prototype.set=function(e,t,n){var r=this.columns.get(e),i=this.rows.get(t);this.setObject_columnID_rowID(n,r,i)},t.prototype.setObject_columnID_rowID=function(e,t,n){var r=this.cellColumns.get(t);if(r)r.set(n,e);else{var i=a.CRDictionary.alloc().initWithDocument(this.document).autorelease();this.cellColumns.set(t,i),i.set(n,e)}},t.prototype.forEachColumn=function(e){this.columns.forEach((function(t,n){return e(t,n)}))},t.prototype.forEachRow=function(e){this.rows.forEach((function(t,n){return e(t,n)}))},t.prototype.forEachSelectedCell=function(e,t,n){var r=this,i=e||function(){for(var e=new d.IndexSet,t=0,n=r.columnCount;t<n;++t)e.add(t);return e}(),o=t||function(){for(var e=new d.IndexSet,t=0,n=r.rowCount;t<n;++t)e.add(t);return e}();i.forEach((function(e){o.forEach((function(t){var i=r.get(e,t);n(i,e,t)}))}))},t.prototype.getSubtable=function(e,n,r){var i=t.alloc().initWithDocument(e).autorelease();return this.populateSubtable(i,n,r),i},t.prototype.populateSubtable=function(e,t,n){var r=this,i=t||function(){for(var e=new d.IndexSet,t=0,n=r.columnCount;t<n;++t)e.add(t);return e}(),o=n||function(){for(var e=new d.IndexSet,t=0,n=r.rowCount;t<n;++t)e.add(t);return e}();i.forEach((function(t){var n=r.columns.get(t);e.columns.insert(n,e.columns.size)})),o.forEach((function(t){var n=r.rows.get(t);e.rows.insert(n,e.rows.size)}));for(var a=0;a<e.columnCount;++a)for(var s=this.getColumnIndexForIdentifier(e.getIdentifierForColumnAtIndex(a)),c=0;c<e.rowCount;++c){var u=this.getRowIndexForIdentifier(e.getIdentifierForRowAtIndex(c)),l=this.get(s,u);l&&e.set(a,c,l)}},t.prototype.getNumberOfPopulatedCells=function(){for(var e=0,t=0;t<this.columnCount;++t){var n=this.columns.get(t),r=this.cellColumns.get(n);r&&(e+=r.size)}return e},t.prototype.setDocument=function(e){this._document=e},Object.defineProperty(t.prototype,"identity",{get:function(){return l.CRUUID.CRZero},enumerable:!1,configurable:!0}),t.prototype.addUndoCommand=function(e){this._delegate&&this._delegate.addUndoCommand(e)},Object.defineProperty(t.prototype,"wantsUndoCommands",{get:function(){return!!this._delegate&&this._delegate.wantsUndoCommands},enumerable:!1,configurable:!0}),t}(i.Refcounted);t.CRTable=v,v.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRRegisterLatest=void 0;var i=n(891),o=n(905),a=n(1121),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._document=null,t._timestamp=null,t._contents=null,t}return r(t,e),t.prototype.initWithContents_document=function(e,t){var n=a.CRTimestamp.alloc().initWithReplica_andCounter(o.unserialisedReplicaID(),0).autorelease();return this.initWithContents_timestamp_document(e,n,t)},t.prototype.initWithContents_timestamp_document=function(e,t,n){return this.document=n,this.timestamp=t,this.contents=e,this},t.prototype.free=function(){this._contents&&this._contents.release(),this._timestamp.release(),this._document=null,this._timestamp=null,this._contents=null,e.prototype.free.call(this)},Object.defineProperty(t.prototype,"timestamp",{get:function(){return this._timestamp},set:function(e){this._timestamp!==e&&(this._timestamp&&this._timestamp.release(),this._timestamp=e?e.retain():e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contents",{get:function(){return this._contents},set:function(e){if(this._contents!==e){if(this._contents&&this._contents.release(),this._contents=e?e.retain():e,this.timestamp.replica!==o.unserialisedReplicaID()){var t=(this.document.replicaClock>this.timestamp.counter?this.document.replicaClock:this.timestamp.counter)+1;this.timestamp=a.CRTimestamp.alloc().initWithReplica_andCounter(o.unserialisedReplicaID(),t).autorelease()}this.document.setDocumentFor(this.contents)}},enumerable:!1,configurable:!0}),t.prototype.encode=function(e){return{contents:"registerLatest",registerLatest:this.encodeIntoProtobufRegisterLatest(e)}},t.prototype.encodeIntoProtobufRegisterLatest=function(e){return{timestamp:this.timestamp.encodeIntoProtobufTimestamp(e),contents:this.contents?e.encodeObjectForObjectID(this.contents):void 0}},t.decodeWithProtobufRegisterLatest=function(e,n){var r=n.contents?e.decodeObjectForProtobufObjectID(n.contents):null,i=n.timestamp?a.CRTimestamp.decodeWithProtobufTimestamp(e,n.timestamp):a.CRTimestamp.alloc().initWithReplica_andCounter(e.document.replica,0).autorelease();return t.alloc().initWithContents_timestamp_document(r,i,e.document).autorelease()},t.prototype.walkGraph=function(e){e(this.contents)},t.prototype.realizeLocalChanges=function(e){if(this.timestamp.replica===o.unserialisedReplicaID()){var t=0===this.timestamp.counter?e.replicaClock+1:this.timestamp.counter;this.timestamp=a.CRTimestamp.alloc().initWithReplica_andCounter(e.replica,t).autorelease(),e.unserializedReplicaClock=e.unserializedReplicaClock>t?e.unserializedReplicaClock:t}},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new Error("Invalid CRRegisterLatest merge, classes must be equal for merge.");this.timestamp.compare(e.timestamp)<0&&(this.contents=e.contents,this.timestamp=e.timestamp)},t.prototype.deltaSince=function(e,n){var r=e.timestampForReplica(this.timestamp.replica).compare(this.timestamp);if(-1===r)return this;if(0===r){if(!this.contents)return null;var i=this.contents.deltaSince(e,n);if(i)return t.alloc().initWithContents_timestamp_document(i,this.timestamp,n).autorelease()}return null},t.prototype.tombstone=function(){return this},t.prototype.setDocument=function(e){this.document=e},t.prototype.toString=function(){return"CRRegisterLatest "+this.timestamp+" "+this.contents},t}(i.Refcounted);t.CRRegisterLatest=s,s.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CRTimestamp=void 0;var o=n(891),a=i(n(888)),s=n(906),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._replica=null,t._counter=null,t}return r(t,e),Object.defineProperty(t.prototype,"replica",{get:function(){return this._replica},set:function(e){this._replica!==e&&(this._replica&&this._replica.release(),this._replica=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"counter",{get:function(){return this._counter},set:function(e){this._counter=e},enumerable:!1,configurable:!0}),t.prototype.initWithReplica_andCounter=function(e,t){return this.replica=e,this.counter=t,this},t.prototype.free=function(){this.replica.release(),this._replica=null,this._counter=null,e.prototype.free.call(this)},t.prototype.getNextTimestamp=function(){return t.alloc().initWithReplica_andCounter(this.replica,this.counter+1).autorelease()},t.prototype.getNextTimestampForReplica=function(e){return s.CRUUID.compare(this.replica,e)<0?t.alloc().initWithReplica_andCounter(e,this.counter).autorelease():t.alloc().initWithReplica_andCounter(e,this.counter+1).autorelease()},t.prototype.earlierTimestamp=function(e){return this.compare(e)>0?e:this},t.prototype.laterTimestamp=function(e){return this.compare(e)<0?e:this},t.prototype.compare=function(e){return this.counter!==e.counter?this.counter>e.counter?1:-1:s.CRUUID.compare(this.replica,e.replica)},t.prototype.clone=function(){return this},t.prototype.isEqual=function(e){return e instanceof t&&this.counter===e.counter&&this.replica.isEqual(e.replica)},t.prototype.encode=function(e){return{contents:"timestamp",timestamp:this.encodeIntoProtobufTimestamp(e)}},t.prototype.encodeIntoProtobufTimestamp=function(e){return{replicaIndex:e.encodeReplica(this.replica),counter:e.encodeLong(this.counter)}},t.decodeWithProtobufTimestamp=function(e,n){var r=n.replicaIndex?n.replicaIndex:a.default.ZERO,i=n.replicaIndex?e.decodeReplica(r):null,o=n.counter?e.decodeLong(n.counter):null;if(null===i||null===o)throw new Error("Cannot decode CRTimestamp; replica or counter null");return t.alloc().initWithReplica_andCounter(i,o).autorelease()},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new TypeError("CRTimestamp cannot merge with non-CRTimestamp type.");e.compare(this)>0&&(this.replica=e.replica,this.counter=e.counter)},t.prototype.deltaSince=function(e,t){return this},t.prototype.realizeLocalChanges=function(e){},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){},t.prototype.setDocument=function(e){},t.prototype.toString=function(){return"("+this.counter+" "+this.replica+")"},t}(o.Refcounted);t.CRTimestamp=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRTombstoneOrderedSet=void 0;var i=n(891),o=n(890),a=n(1123),s=n(1124),c=n(1125),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.self=null,t.wrappedCommand=null,t}return r(t,e),t.create=function(e,t){var n=this.alloc();return n.self=e.retain(),n.wrappedCommand=t.retain(),n.autorelease()},t.prototype.free=function(){this.self.release(),this.wrappedCommand.release(),this.self=null,this.wrappedCommand=null,e.prototype.free.call(this)},t.prototype.apply=function(){this.wrappedCommand.apply(),this.self.wipeoutCaches()},t}(i.Refcounted);u.initializeRefcounted();var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.self=null,t.objectIdentifiers=[],t.insert=!1,t}return r(t,e),t.create=function(e,t,n){var r=this.alloc();r.self=e.retain(),r.insert=n,r.objectIdentifiers.length=0;for(var i=0,o=t;i<o.length;i++){var a=o[i];r.objectIdentifiers.push(a.retain())}return r.autorelease()},t.prototype.free=function(){this.self.release();for(var t=0,n=this.objectIdentifiers;t<n.length;t++)n[t].release();this.self=null,this.objectIdentifiers.length=0,e.prototype.free.call(this)},t.prototype.apply=function(){this.insert?this.self.undoablyInsertObjectIdentifiersIntoElements(this.objectIdentifiers):this.self.undoablyRemoveObjectIdentifiersFromElements(this.objectIdentifiers)},t}(i.Refcounted);l.initializeRefcounted();var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._cachedIdentifierSet=null,t._cachedIndexMapping=null,t._delegate=null,t._document=null,t._ordering=null,t._elements=null,t}return r(t,e),Object.defineProperty(t.prototype,"delegate",{get:function(){return this._delegate},set:function(e){this._delegate=e},enumerable:!1,configurable:!0}),t.prototype.encode=function(e){return{contents:"tsOrderedSet",tsOrderedSet:{array:this.ordering.encodeAsIArray(e),set:this.elements.encodeAsSet(e)}}},t.decodeWithTombstoneOrderedSet=function(e,n){var r=o.CRArray.decodeWithArray(e,n.array),i=a.CRSet.decodeWithSet(e,n.set);return t.alloc().initWithOrdering_elements_document(r,i,e.document).autorelease()},Object.defineProperty(t.prototype,"ordering",{get:function(){return this._ordering},set:function(e){this._ordering!==e&&(this._ordering&&this._ordering.release(),this._ordering=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"elements",{get:function(){return this._elements},set:function(e){this._elements!==e&&(this._elements&&this._elements.release(),this._elements=e.retain())},enumerable:!1,configurable:!0}),t.prototype.initWithDocument=function(e){var t=o.CRArray.alloc().initWithDocument(e).autorelease(),n=a.CRSet.alloc().initWithDocument(e).autorelease();return this.initWithOrdering_elements_document(t,n,e)},t.prototype.initWithOrdering_elements_document=function(e,t,n){return e.delegate=this,this.ordering=e,this.elements=t,this.document=n,this},t.prototype.free=function(){this.ordering.release(),this.elements.release(),this._document=null,this._delegate=null,this._ordering=null,this._elements=null,this._cachedIndexMapping=null,this._cachedIdentifierSet&&this._cachedIdentifierSet.release(),this._cachedIdentifierSet=null,e.prototype.free.call(this)},t.prototype.wipeoutCaches=function(){this._cachedIndexMapping=null,this._cachedIdentifierSet&&this._cachedIdentifierSet.release(),this._cachedIdentifierSet=null},Object.defineProperty(t.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.cachedIdentifierSet.size},enumerable:!1,configurable:!0}),t.prototype.get=function(e){var t=this.cachedIdentifierSet.get(e);return this.ordering.getWithIdentifier(t)},t.prototype.has=function(e){var t=this.cachedIndexMapping.get(e.UUIDString);return!!t&&t[1].size>0},t.prototype.indexOf=function(e){var t=this.cachedIndexMapping.get(e.UUIDString);if(!t||0===t[1].size)return-1;var n=t[1].firstIndex,r=this.ordering.array.get(n);return r?this.cachedIdentifierSet.indexOf(r):-1},t.prototype.insert=function(e,t){var n=this.cachedIndexMapping.get(e.UUIDString);if(!(n&&n[1].size>0&&this.ordering.array.get(n[1].firstIndex))){var r=this.size;if(t>r)throw new Error("CRTombstoneOrderedSet: inserting element at invalid index");if(t<r){var i=this.get(t),o=this.cachedIndexMapping.get(i.UUIDString);if(!o)throw new Error("CRTombstoneOrderdSet: expected element at index");var a=o[1].firstIndex,c=this.ordering._insert(e,a);this.elements.add(c),this.cachedIndexMapping.forEach((function(e){e[1].shiftIndexes(a,1)})),this.cachedIndexMapping.set(e.UUIDString,[e,new s.IndexSet([a])]),this.cachedIdentifierSet.insert(c,t),this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(l.create(this,[c],!1))}else c=this.ordering._push(e),this.elements.add(c),this.cachedIndexMapping.set(e.UUIDString,[e,new s.IndexSet([this.ordering.length-1])]),this.cachedIdentifierSet.insert(c,t),this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(l.create(this,[c],!1))}},t.prototype.undoablyRemoveObjectIdentifiersFromElements=function(e){for(var t=this.elements,n=0,r=e;n<r.length;n++){var i=r[n];t.delete(i)}this.wipeoutCaches(),this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(l.create(this,e,!0))},t.prototype.undoablyInsertObjectIdentifiersIntoElements=function(e){for(var t=this.elements,n=0,r=e;n<r.length;n++){var i=r[n];t.add(i)}this.wipeoutCaches(),this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(l.create(this,e,!1))},t.prototype.push=function(e){this.insert(e,this.size)},t.prototype.delete=function(e){var t=this,n=this.get(e),r=this.cachedIndexMapping.get(n.UUIDString);if(r){var i=this.cachedIdentifierSet.get(e).retain().autorelease(),o=[];o.push(i),this.elements.delete(i),r[1].forEach((function(e){var n=t.ordering.array.get(e).retain().autorelease();t.elements.delete(n),o.push(n)})),this.cachedIndexMapping.delete(n.UUIDString),this._removeObjectsFromOrderingAtIndices(r[1]),this.cachedIdentifierSet.delete(e),this.wantsUndoCommands&&this.delegate&&this.delegate.addUndoCommand(l.create(this,o,!0))}},t.prototype._removeObjectsFromOrderingAtIndices=function(e){if(!(e.size<=0)){var t=this.ordering.array;e.forEachReverse((function(e){return t.delete(e)})),this.cachedIndexMapping.forEach((function(t,n){e.forEachReverse((function(e){t[1].lastIndex>=e&&t[1].shiftIndexes(e+1,-1)}))}))}},t.prototype.move=function(e,t){this._move(e,t,!1)},t.prototype.safeMove=function(e,t){this._move(e,t,!0)},t.prototype._move=function(e,t,n){var r=this;if(t>this.size)throw new Error("CRTombstoneOrderedSet: moving element to an invalid index");if(e!==t||!n){var i=e>t,o=this.get(t),a=this.get(e),c=this.cachedIndexMapping.get(a.UUIDString);if(c){var u=this.cachedIdentifierSet.get(e),l=new Set;if(c[1].forEach((function(e){var t=r.ordering.array.get(e);t&&l.add(t)})),l.delete(u),this.cachedIndexMapping.delete(a.UUIDString),e===t){var d=c[1].firstIndex;c[1].delete(d),this.cachedIndexMapping.set(a.UUIDString,[a,new s.IndexSet([d])])}if(this._removeObjectsFromOrderingAtIndices(c[1]),!n){var p=this.ordering.contents;l.forEach((function(e){p.delete(e)})),p.delete(u),p.set(u,a)}if(e!==t){var f=this.cachedIndexMapping.get(o.UUIDString);if(!f)return;var h=f[1].firstIndex+(i?0:1);this.reinsertIdentifierWithMaskedIdentifiers(u,n?l:null,h,a)}this.cachedIdentifierSet.move(e,t)}}},t.prototype.moveClock=function(){this.ordering.moveClock=!0},t.prototype.reinsertIdentifierWithMaskedIdentifiers=function(e,t,n,r){var i=this.ordering.array;i.insert(e,n);var o=new s.IndexSet([n]);t&&t.forEach((function(e){i.insert(e,n+1),o.add(o.lastIndex+1)})),this.moveClock();var a=t?1+t.size:1;this.cachedIndexMapping.forEach((function(e){e[1].lastIndex>=n&&e[1].shiftIndexes(n,a)})),this.cachedIndexMapping.set(r.UUIDString,[r,o])},t.prototype.forEach=function(e){var t=this;this.cachedIdentifierSet.forEach((function(n,r){e(t.ordering.getWithIdentifier(n),r)}))},Object.defineProperty(t.prototype,"cachedIdentifierSet",{get:function(){return this._cachedIdentifierSet||(this._cachedIndexMapping=new Map,this._cachedIdentifierSet=this.generateOrderedIdentifierSetWithIndexMapping(this._cachedIndexMapping).retain()),this._cachedIdentifierSet},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cachedIndexMapping",{get:function(){return this._cachedIndexMapping||(this._cachedIndexMapping=new Map,this._cachedIdentifierSet=this.generateOrderedIdentifierSetWithIndexMapping(this._cachedIndexMapping).retain()),this._cachedIndexMapping},enumerable:!1,configurable:!0}),t.prototype.generateOrderedIdentifierSetWithIndexMapping=function(e){var t=c.CRUUIDOrderedSet.alloc().init().autorelease(),n=this.elements,r=this.ordering.contents;return this.ordering.array.forEach((function(i,o){if(n.has(i)){var a=r.get(i);if(a){var c=e.get(a.UUIDString);c?c[1].add(o):(t.add(i),e.set(a.UUIDString,[a,new s.IndexSet([o])]))}}})),t},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new TypeError("CRTombstoneOrderedSet cannot merge with non-CRTombstoneOrderedSet type.");this.ordering.mergeWith(e.ordering),this.elements.mergeWith(e.elements),this.wipeoutCaches()},t.prototype.deltaSince=function(e,n){var r=this.ordering.deltaSince(e,n);if(!r)return null;var i=this.elements.deltaSince(e,n);return i?t.alloc().initWithOrdering_elements_document(r,i,n).autorelease():null},t.prototype.realizeLocalChanges=function(e){this.ordering.realizeLocalChanges(e),this.elements.realizeLocalChanges(e)},Object.defineProperty(t.prototype,"tombstone",{get:function(){var e=this.ordering.tombstone,n=this.elements.tombstone;return t.alloc().initWithOrdering_elements_document(e,n,this.document).autorelease()},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){this.ordering.walkGraph(e),this.elements.walkGraph(e)},t.prototype.setDocument=function(e){this._document=e,this.ordering.setDocument(e),this.elements.setDocument(e)},t.prototype.addUndoCommand=function(e){this._delegate&&this._delegate.addUndoCommand(u.create(this,e))},Object.defineProperty(t.prototype,"wantsUndoCommands",{get:function(){return!!this._delegate&&this._delegate.wantsUndoCommands},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg_linearRender",{get:function(){return this.ordering.array.contents.dbg_linearRender},enumerable:!1,configurable:!0}),t}(i.Refcounted);t.CRTombstoneOrderedSet=d,d.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRSet=void 0;var i=n(891),o=n(904),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._dictionary=null,t}return r(t,e),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this._dictionary},set:function(e){this._dictionary!==e&&(this._dictionary&&this._dictionary.release(),this._dictionary=e.retain())},enumerable:!1,configurable:!0}),t.prototype.initWithDocument=function(e){return this.dictionary=o.CRDictionary.alloc().initWithDocument(e).autorelease(),this},t.prototype.free=function(){this.dictionary.release(),this._dictionary=null,e.prototype.free.call(this)},t.prototype.encode=function(e){return{contents:"set",set:this.encodeAsSet(e)}},t.prototype.encodeAsSet=function(e){return this.dictionary.encodeAsDictionaryWithValueCoder(e,(function(t){var n=e.encodeObjectForObjectID(t.value);return{key:n,value:n}}))},t.decodeWithSet=function(e,n){var r=t.alloc().initWithDocument(e.document).autorelease();return r.dictionary=o.CRDictionary.decodeWithDictionaryValueDecoder(e,n,(function(t){var n=t.value?e.decodeObjectForProtobufObjectID(t.value):null;return[n,n]})),r},t.decodeWithSetWithValueDecoder=function(e,n,r){var i=t.alloc().initWithDocument(e.document).autorelease();return i.dictionary=o.CRDictionary.decodeWithDictionaryValueDecoder(e,n,(function(e){var t=r(e);return[t,t]})),i},Object.defineProperty(t.prototype,"size",{get:function(){return this.dictionary.size},enumerable:!1,configurable:!0}),t.prototype.get=function(e){return this.dictionary.get(e)},t.prototype.has=function(e){return null!==this.dictionary.get(e)},t.prototype.add=function(e){this.dictionary.set(e,e)},t.prototype.delete=function(e){this.dictionary.delete(e)},t.prototype.clear=function(){this.dictionary.clear()},t.prototype.realizeLocalChanges=function(e){},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new TypeError("CRSet cannot merge with non-CRSet type.");this.dictionary.mergeWith(e.dictionary)},Object.defineProperty(t.prototype,"document",{get:function(){return this.dictionary.document},enumerable:!1,configurable:!0}),t.prototype.setDocument=function(e){},t.prototype.deltaSince=function(e,n){var r=this.dictionary.deltaSince(e,n);if(!r)return null;var i=t.alloc().initWithDocument(n).autorelease();return i.dictionary=r,i},t.prototype.walkGraph=function(e){e(this.dictionary)},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.toString=function(){if(0===this.size)return"[]";var e="[";return this.dictionary.forEach((function(t,n,r){e+="{timestamp} {obj}\n"})),e+="]"},t.prototype.forEach=function(e){this.dictionary.forEach((function(t,n,r){return e(t,r)}))},t}(i.Refcounted);t.CRSet=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexSet=void 0;var i=function(){function e(e){void 0===e&&(e=[]),this.indices=[],this.indices=r(e)}return e.prototype.toString=function(){return"["+this.indices.join(" ")+"]"},Object.defineProperty(e.prototype,"size",{get:function(){return this.indices.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstIndex",{get:function(){return this.indices[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastIndex",{get:function(){return this.indices[this.indices.length-1]},enumerable:!1,configurable:!0}),e.prototype.shiftIndexes=function(e,t){if(0!==t)if(t>0)for(var n=0,r=this.indices.length;n<r;++n)e<=(i=this.indices[n])&&(this.indices[n]+=t);else{for(n=0,r=this.indices.length;n<r;++n){var i;e<=(i=this.indices[n])?this.indices[n]+=t:e<=i+t&&(this.indices[n]=void 0)}for(var o=[],a=0,s=this.indices;a<s.length;a++)"number"===typeof(r=s[a])&&o.push(r);this.indices=o}},e.prototype.add=function(e){if(e>this.lastIndex)this.indices.push(e);else{for(var t=0,n=this.indices.length;t<n;++t){if(this.indices[t]===e)return;if(this.indices[t]>e)break}this.indices.splice(t,0,e)}},e.prototype.delete=function(e){for(var t=0,n=this.indices.length;t<n;++t)if(this.indices[t]===e)return void this.indices.splice(t,1)},e.prototype.forEach=function(e){this.indices.forEach(e)},e.prototype.forEachReverse=function(e){for(var t=this.indices.length-1;t>=0;--t)e(this.indices[t])},e}();t.IndexSet=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ReferenceValueOrderedSet=t.StringOrderedSet=t.CRUUIDOrderedSet=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.members=new Set,t.order=[],t}return r(t,e),t.prototype.init=function(){return this},t.prototype.free=function(){for(var t=0,n=this.order;t<n.length;t++)n[t].release();this.order.length=0,this.members.clear(),e.prototype.free.call(this)},t.prototype.clear=function(){for(var e=0,t=this.order;e<t.length;e++)t[e].release();this.order.length=0,this.members.clear()},Object.defineProperty(t.prototype,"size",{get:function(){return this.members.size},enumerable:!1,configurable:!0}),t.prototype.get=function(e){return this.order[e]},t.prototype.indexOf=function(e){for(var t=0,n=this.order.length;t<n;++t)if(e.isEqual(this.order[t]))return t;return-1},t.prototype.has=function(e){return this.members.has(e.UUIDString)},t.prototype.add=function(e){this.has(e)||(this.members.add(e.UUIDString),this.order.push(e.retain()))},t.prototype.insert=function(e,t){this.has(e)||(this.members.add(e.UUIDString),this.order.splice(t,0,e.retain()))},t.prototype.delete=function(e){var t=this.get(e);this.members.delete(t.UUIDString),this.order.splice(e,1),t.release()},t.prototype.move=function(e,t){if(e!==t){var n=this.get(e);this.order.splice(e,1),this.order.splice(t,0,n)}},t.prototype.forEach=function(e){this.order.forEach(e)},t}(n(891).Refcounted);t.CRUUIDOrderedSet=i,i.initializeRefcounted();var o=function(){function e(){this.members=new Set,this.order=[]}return e.prototype.clear=function(){this.members.clear(),this.order.length=0},Object.defineProperty(e.prototype,"size",{get:function(){return this.members.size},enumerable:!1,configurable:!0}),e.prototype.get=function(e){return this.order[e]},e.prototype.indexOf=function(e){return this.order.indexOf(e)},e.prototype.has=function(e){return this.members.has(e)},e.prototype.add=function(e){this.has(e)||(this.members.add(e),this.order.push(e))},e.prototype.insert=function(e,t){this.has(e)||(this.members.add(e),this.order.splice(t,0,e))},e.prototype.delete=function(e){var t=this.get(e);this.members.delete(t),this.order.splice(e,1)},e.prototype.move=function(e,t){if(e!==t){var n=this.get(e);this.order.splice(e,1),this.order.splice(t,0,n)}},e.prototype.forEach=function(e){this.order.forEach(e)},e}();t.StringOrderedSet=o;var a=function(){function e(){this.members=new Set,this.order=[]}return e.prototype.clear=function(){this.members.clear(),this.order.length=0},Object.defineProperty(e.prototype,"size",{get:function(){return this.members.size},enumerable:!1,configurable:!0}),e.prototype.get=function(e){return this.order[e]},e.prototype.indexOf=function(e){return this.order.indexOf(e)},e.prototype.has=function(e){return this.members.has(e)},e.prototype.add=function(e){this.has(e)||(this.members.add(e),this.order.push(e))},e.prototype.insert=function(e,t){this.has(e)||(this.members.add(e),this.order.splice(t,0,e))},e.prototype.delete=function(e){var t=this.get(e);this.members.delete(t),this.order.splice(e,1)},e.prototype.move=function(e,t){if(e!==t){var n=this.get(e);this.order.splice(e,1),this.order.splice(t,0,n)}},e.prototype.forEach=function(e){this.order.forEach(e)},e}();t.ReferenceValueOrderedSet=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ICTable=void 0;var i=n(907),o=n(1116),a=n(1127),s=n(1119),c=n(1124),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"ttDocument",{get:function(){return this.document},enumerable:!1,configurable:!0}),t.registerWithCRCoder=function(){o.CRCoder.registerClass(t.decodeICTable,"com.apple.notes.ICTable")},t.prototype.encodeIntoCustomObject=function(e){return this.encodeIntoCustomObjectImpl(e,t.decodeICTable)},t.prototype.initFromRows=function(t,n){for(var r=e.prototype.initWithDocument.call(this,t),i=0,o=0,s=n;o<s.length;o++){var c=s[o];r.insertRow(r.rowCount),i=Math.max(i,c.length)}for(var u=0;u<i;++u)r.insertColumn(r.columnCount);for(u=0;u<n.length;++u){c=n[u];for(var l=0;l<c.length;++l){var d=a.CRMergeableAttributedString.alloc().initWithReplicaID(t.replica).autorelease();d.insertString_atIndex(c[l],0),r.set(l,u,d)}}return r},t.decodeICTable=function(e,n){var r=e.decodeObjectForKey("crTableColumnDirection",n),i=e.decodeObjectForKey("crColumns",n),o=e.decodeObjectForKey("crRows",n),s=e.decodeObjectForKey("cellColumns",n),c=t.alloc().initWithDocument_columnDirection_crColumns_crRows_cellColumns(e.document,r,i,o,s).autorelease(),u=[];c.forEachSelectedCell(null,null,(function(e,t,n){e||u.push([t,n])}));for(var l=0,d=u;l<d.length;l++){var p=d[l],f=p[0],h=p[1];c.set(f,h,a.CRMergeableAttributedString.alloc().init().autorelease())}return e.document.objects.set(c.identity.UUIDString,[c.identity.retain(),c.retain()]),c},t.prototype.getString=function(e,t){var n=this.get(e,t);return n?n.string.UTF16String:null},t.prototype.getStringById=function(e,t){var n=this.getColumnIndexForIdentifier(e),r=this.getRowIndexForIdentifier(t);return this.getString(n,r)},t.prototype.setAttributedString=function(e,t,n){var r=this.get(t,n),o=i.NSAttributedString.alloc().initWithString(e).autorelease();if(null===r){var s=a.CRMergeableAttributedString.alloc().init().autorelease();this.set(t,n,s),s.insertAttributedString_atIndex(o,0)}else r.deleteCharactersInRange(i.NSMakeRange(0,r.length)),r.insertAttributedString_atIndex(o,0)},t.prototype.cellContentsAtRowAndColumn=function(e,t){var n=this.getRowIndexForIdentifier(e),r=this.getColumnIndexForIdentifier(t),i=null;return-1!==r&&-1!==n&&((i=this.get(r,n))||(i=a.CRMergeableAttributedString.alloc().init().autorelease(),this.set(r,n,i))),i},t.prototype.insertRowAfterRow=function(e){var t=this.getRowIndexForIdentifier(e);return this.insertRow(t+1)},t.prototype.insertRowBeforeRow=function(e){var t=this.getRowIndexForIdentifier(e);return this.insertRow(t)},t.prototype.insertColumnAfterColumn=function(e){var t=this.getColumnIndexForIdentifier(e);return this.insertColumn(t+1)},t.prototype.insertColumnBeforeColumn=function(e){var t=this.getColumnIndexForIdentifier(e);return this.insertColumn(t)},t.prototype.removeRow=function(e){var t=this.getRowIndexForIdentifier(e);return this.removeRowAtIndex(t),t<this.rowCount?this.getIdentifierForRowAtIndex(t):t-1>=0?this.getIdentifierForRowAtIndex(t-1):null},t.prototype.removeColumn=function(e){var t=this.getColumnIndexForIdentifier(e);return this.removeColumnAtIndex(t),t<this.columnCount?this.getIdentifierForColumnAtIndex(t):t-1>=0?this.getIdentifierForColumnAtIndex(t-1):null},t.prototype.moveRowBeforeRow=function(e,t){var n=this.getColumnIndexForIdentifier(e),r=this.getColumnIndexForIdentifier(t);this.moveRow(n,r)},t.prototype.moveRowAfterRow=function(e,t){var n=this.getColumnIndexForIdentifier(e),r=this.getColumnIndexForIdentifier(t);this.moveRow(n,r+1)},t.prototype.moveColumnBeforeColumn=function(e,t){var n=this.getColumnIndexForIdentifier(e),r=this.getColumnIndexForIdentifier(t);this.moveColumn(n,r)},t.prototype.moveColumnAfterColumn=function(e,t){var n=this.getColumnIndexForIdentifier(e),r=this.getColumnIndexForIdentifier(t);this.moveColumn(n,r+1)},t.prototype.tableContentsAtRowsAndColumns=function(e,t){var n=this.getRowIndexesForIdentifiers(e),r=this.getColumnIndexesForIdentifiers(t);return this.getSubtable(this.ttDocument,r,n)},t.prototype.copyIntoNewDocumentWithReplicaID=function(e){return this.document.copyForReplica(e)},t.prototype.joinedAttributedStringForColumns=function(e,t){var n="",r=-1;return this.forEachSelectedCell(e,t,(function(e,t,i){r===i?n+="\t":-1!==r&&(n+="\n");var o=e?e.toString():null;o&&(n+=o),r=i})),n},t.prototype.columnIsEmptyAtIndex=function(e){return this.isEmptyAtCells(new c.IndexSet([e]),null)},t.prototype.rowIsEmptyAtIndex=function(e){return this.isEmptyAtCells(null,new c.IndexSet([e]))},t.prototype.isEmptyAtCells=function(e,t){var n=e?e.lastIndex:-1,r=t?t.lastIndex:-1;if(e&&n>=this.columnCount||t&&r>=this.rowCount)return!1;var i=!0;return this.forEachSelectedCell(e,t,(function(e,t,n){e&&e.length>0&&(i=!1)})),i},t.prototype.isEmptyAtIDs=function(e,t){var n=e&&e.length>0?this.getColumnIndexesForIdentifiers(e):null,r=t&&t.length>0?this.getRowIndexesForIdentifiers(t):null;return this.isEmptyAtCells(n,r)},t.prototype.getSubtable=function(e,n,r){var i=t.alloc().initWithDocument(e).autorelease();return this.populateSubtable(i,n,r),e.sharedTopotextTimestamp.mergeWithTimestamp(this.ttDocument.sharedTopotextTimestamp),i},t}(s.CRTable);t.ICTable=u,u.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRMergeableAttributedString=void 0;var i=n(907),o=n(1128),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._document=null,t}return r(t,e),Object.defineProperty(t.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),t.prototype.free=function(){this._document=null,e.prototype.free.call(this)},t.prototype.encode=function(e){return{contents:"string",string:this.saveToArchive()}},t.prototype.encodeAsProtobufString=function(e){return this.saveToArchive()},t.decodeWithProtobufString=function(e,n){var r=e.document,i=t.alloc().initWithArchive_andReplicaID_andSharedTimestamp(n,r.replica,r.sharedTopotextTimestamp).autorelease();return i.setDocument(r),i},t.prototype.mergeWith=function(e){if(!(e instanceof i.TTMergeableAttributedString))throw new TypeError("CRTTAttrStr cannot merge with non-CRTTAttrStr type.");this.mergeWithString_mergeTimestamps(e,!1),this.document&&this.document.addStringWithClocksNeedingUpdating(this)},t.prototype.deltaSince=function(e,t){return this},t.prototype.realizeLocalChanges=function(e){this.generateIdsForLocalChanges(),this.document&&this.document.addStringWithClocksToResetAfterRealizingLocalChanges(this)},Object.defineProperty(t.prototype,"tombstone",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){},t.prototype.setDocument=function(e){if(this.replicaUUID=e.replica,!(e instanceof o.CRTTCompatibleDocument))throw new Error("TTAttributedString document set to a non-TT compatible document.");this.timestamp=e.sharedTopotextTimestamp,this.document=e},t}(i.TTMergeableAttributedString);t.CRMergeableAttributedString=a,a.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRTTCompatibleDocument=void 0;var i=n(907),o=n(1129),a=n(1130),s=n(1139),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sharedTopotextTimestamp=null,t.stringsWithClocksNeedingUpdating=[],t.stringsWithClocksToResetAfterRealizingLocalChanges=[],t}return r(t,e),Object.defineProperty(t.prototype,"sharedTopotextTimestamp",{get:function(){return this._sharedTopotextTimestamp},set:function(e){this._sharedTopotextTimestamp!==e&&(this._sharedTopotextTimestamp&&this._sharedTopotextTimestamp.release(),this._sharedTopotextTimestamp=e.retain())},enumerable:!1,configurable:!0}),t.prototype.addStringWithClocksNeedingUpdating=function(e){this.stringsWithClocksNeedingUpdating.push(e.retain())},t.prototype.addStringWithClocksToResetAfterRealizingLocalChanges=function(e){this.stringsWithClocksToResetAfterRealizingLocalChanges.push(e.retain())},t.prototype.initWithVersion_startVersion_rootObject_replica=function(e,t,n,r){return this.initWithVersion_startVersion_rootObject_replica_topoTimestamp(e,t,n,r,s.TTCRVectorMultiTimestamp.alloc().initWithCapacity(2).autorelease())},t.prototype.initWithVersion_startVersion_rootObject_replica_topoTimestamp=function(t,n,r,i,o){var a=e.prototype.initWithVersion_startVersion_rootObject_replica.call(this,t,n,r,i);return a.sharedTopotextTimestamp=o,a.stringsWithClocksNeedingUpdating=[],a.stringsWithClocksToResetAfterRealizingLocalChanges=[],a},t.prototype.free=function(){this.sharedTopotextTimestamp.release();for(var t=0,n=this.stringsWithClocksNeedingUpdating;t<n.length;t++)n[t].release();for(var r=0,i=this.stringsWithClocksToResetAfterRealizingLocalChanges;r<i.length;r++)i[r].release();this._sharedTopotextTimestamp=null,this.stringsWithClocksToResetAfterRealizingLocalChanges.length=0,this.stringsWithClocksNeedingUpdating.length=0,e.prototype.free.call(this)},t.prototype.realizeLocalChanges=function(){e.prototype.realizeLocalChanges.call(this);for(var t=0,n=this.stringsWithClocksToResetAfterRealizingLocalChanges;t<n.length;t++){var r=n[t];r.resetLocalReplicaClocksToTimestampValues(),r.release()}this.stringsWithClocksToResetAfterRealizingLocalChanges.length=0},t.prototype.mergeResultForMergingWithDocument=function(n){return n instanceof t&&this.sharedTopotextTimestamp.compareTo(n.sharedTopotextTimestamp)&i.TTVectorTimestampComparison.Ascending?o.CRMergeResult.Updated:e.prototype.mergeResultForMergingWithDocument.call(this,n)},t.prototype.mergeTimestampWithDocument=function(t){e.prototype.mergeTimestampWithDocument.call(this,t);var n=t;if(n){this.sharedTopotextTimestamp.mergeWithTimestamp(n.sharedTopotextTimestamp);for(var r=0,i=this.stringsWithClocksNeedingUpdating;r<i.length;r++){var o=i[r];o.updateClock(),o.checkTimestampLogStyleErrors(!0),o.resetLocalReplicaClocksToTimestampValues(),o.release()}this.stringsWithClocksNeedingUpdating.length=0}},t}(a.CRDocument);t.CRTTCompatibleDocument=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CRMergeResult=void 0,(r=t.CRMergeResult||(t.CRMergeResult={}))[r.Fail=0]="Fail",r[r.NoChange=1]="NoChange",r[r.Updated=2]="Updated"},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRDocument=void 0;var i=n(907),o=n(891),a=n(1131),s=n(1136),c=n(1129),u=n(906),l=n(1137),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.unserializedReplicaClock=null,t._version=null,t._startVersion=null,t._replica=null,t._rootObject=null,t._replicaClock=0,t.objects=new Map,t}return r(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},set:function(e){this._version!==e&&(this._version&&this._version.release(),this._version=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startVersion",{get:function(){return this._startVersion},set:function(e){this._startVersion!==e&&(this._startVersion&&this._startVersion.release(),this._startVersion=e?e.retain():e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"replica",{get:function(){return this._replica},set:function(e){this._replica!==e&&(this._replica&&this._replica.release(),this._replica=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rootObject",{get:function(){return this._rootObject},set:function(e){this._rootObject!==e&&(this._rootObject&&this._rootObject.release(),this._rootObject=e?e.retain():e,this.setDocumentFor(this._rootObject))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"replicaClock",{get:function(){return this._replicaClock},set:function(e){this._replicaClock=e},enumerable:!1,configurable:!0}),t.prototype.init=function(){return this.initWithReplica(u.CRUUID.UUID())},t.prototype.initWithReplica=function(e){return this.initWithVersion_startVersion_rootObject_replica(l.CRVectorTimestamp.alloc().init().autorelease(),null,null,e)},t.prototype.initWithVersion_rootObject_replica=function(e,t,n){return this.initWithVersion_startVersion_rootObject_replica(e,null,t,n)},t.prototype.initWithVersion_startVersion_rootObject_replica=function(e,t,n,r){return this.version=e,this.replicaClock=this.version.clockForReplica(r),this.unserializedReplicaClock=this.replicaClock,this.startVersion=t,this.rootObject=n,this.replica=r,this},t.prototype.free=function(){this._version.release(),this._replica.release(),this._startVersion&&this._startVersion.release(),this._rootObject&&this._rootObject.release(),this.objects.forEach((function(e){var t=e[0],n=e[1];t.release(),n.release()})),this.objects.clear(),this._version=null,this._replica=null,this._startVersion=null,this._rootObject=null,this._replicaClock=0,this.unserializedReplicaClock=0,e.prototype.free.call(this)},t.unarchiveFromData=function(e,t){return s.CRCoderUnarchiver.decodedDocumentFromData(e,t)},t.prototype.setRootObject=function(e){e!==this.rootObject&&(this.rootObject=e,this.setDocumentFor(e))},t.prototype.copyForReplica=function(e){return t.unarchiveFromData(this.archivedData,e)},Object.defineProperty(t.prototype,"archivedData",{get:function(){return this.realizeLocalChanges(),(new a.CRCoderArchiver).encodedDataWithDocument(this)},enumerable:!1,configurable:!0}),t.prototype.mergeResultForMergingWithDocument=function(e){return e.startVersion&&e.startVersion.compare(this.version)&l.CRVectorTimestampComparison.Descending?c.CRMergeResult.Fail:0===(this.version.compare(e.version)&l.CRVectorTimestampComparison.Ascending)?c.CRMergeResult.NoChange:c.CRMergeResult.Updated},t.prototype.mergeTimestampWithDocument=function(e){this.version.mergeWith(e.version)},t.prototype.mergeWithData=function(e){var n=t.unarchiveFromData(e,this.replica);this.realizeLocalChanges();var r=this.mergeResultForMergingWithDocument(n);if(r!==c.CRMergeResult.Updated)return r;if(this.objects.forEach((function(e){var t=n.objects.get(e[0].UUIDString);t&&e[1].mergeWith(t[1])})),this.rootObject&&n.rootObject&&this.rootObject.mergeWith(n.rootObject),this.mergeTimestampWithDocument(n),this.replicaClock!==this.version.clockForReplica(this.replica))throw new Error("Merging should not modify local replica clock");return this.updateGraphDocumentPointers(),this.updateObjectsSet(),c.CRMergeResult.Updated},t.prototype.updateGraphDocumentPointers=function(){var e=this;this.rootObject&&this.walkGraph((function(t){return t.setDocument(e)}),this.rootObject)},t.prototype.updateObjectsSet=function(){var e=this;this.objects.forEach((function(e){var t=e[0],n=e[1];t.release(),n.release()})),this.objects.clear(),this.rootObject&&this.walkGraph((function(t){t.identity instanceof i.NSString&&e.objects.set(t.identity.UUIDString,[t.identity.retain(),t.retain()])}),this.rootObject)},t.prototype.walkGraph=function(e,t){var n=new Set;n.add(t),e(t),t.walkGraph((function t(r){n.has(r)||(n.add(r),e(r),r.walkGraph(t))}))},t.prototype.realizeLocalChanges=function(){var e=this;if(this.rootObject&&this.walkGraph((function(t){return t.realizeLocalChanges(e)}),this.rootObject),this.unserializedReplicaClock>this.replicaClock&&(this._replicaClock=this.unserializedReplicaClock,this.version.maxClockForReplica(this.replicaClock,this.replica)),this.replicaClock!==this.version.clockForReplica(this.replica))throw new Error("Version clock should equal cached replica clock")},t.prototype.setDocumentFor=function(e){var t=this;e&&this.walkGraph((function(e){return e.setDocument(t)}),e)},t.prototype.mergeWithDocument=function(e){return this.mergeWithData(e.archivedData)},t.prototype.deltaSince=function(e,n){if(this.realizeLocalChanges(),0===(e.compare(this.version)&l.CRVectorTimestampComparison.Ascending))return null;var r=this.rootObject.deltaSince(e,this);return t.alloc().initWithVersion_startVersion_rootObject_replica(this.version,e,r,this.replica).archivedData},t.prototype.toString=function(){return"<document "+this.version+" "+this.rootObject+">"},t}(o.Refcounted);t.CRDocument=d,d.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CRCoderArchiver=void 0;var i=r(n(887)),o=r(n(888)),a=n(1116),s=n(1132),c=n(1128),u=n(1125),l=function(){function e(){this.uuidSet=null,this.keySet=null,this.encodedObjects=null,this.currentDocument=null}return e.encodedDataWithDocument=function(t){return(new e).encodedDataWithDocument(t)},e.prototype.encodedDataWithDocument=function(e){this.keySet=new u.StringOrderedSet,this.uuidSet=u.CRUUIDOrderedSet.alloc().init().autorelease(),this.encodedObjects=new u.ReferenceValueOrderedSet;var t=e.version.encodeIntoProtobufTimestamp(this),n=e.startVersion?e.startVersion.encodeIntoProtobufTimestamp(this):void 0,r=[],o=[],l=[],d=[],p={version:t,startVersion:n,object:d,keyItem:r,typeItem:o,uuidItem:l};e instanceof c.CRTTCompatibleDocument&&(p.ttTimestamp=e.sharedTopotextTimestamp.encode());var f=d.length;return d.push(void 0),this.currentDocument=p,this.encodedObjects.add(e.rootObject),d[f]=e.rootObject.encode(this),this.keySet.forEach((function(e){return r.push(e)})),a.CRCoder.typeSet.forEach((function(e){return o.push(e)})),this.uuidSet.forEach((function(e){return l.push(i.default.wrap(e.bytes()))})),this.uuidSet.clear(),this.keySet.clear(),this.encodedObjects.clear(),this.currentDocument=null,s.encodeCRDocument(p)},e.prototype.encodeReplica=function(e){return this.encodeUUIDIndexFromUUID(e)},e.prototype.encodeUUIDIndexFromUUID=function(e){var t=this.uuidSet.indexOf(e);return-1===t&&(t=this.uuidSet.size,this.uuidSet.add(e)),this.encodeLong(t)},e.prototype.encodeLong=function(e){return o.default.fromNumber(e)},e.prototype.encodeUUID=function(e,t){return this.encodeString(e,t.toString())},e.prototype.encodeString=function(e,t){return{key:this.indexForKey(e),value:{contents:"stringValue",stringValue:t}}},e.prototype.encodeUInt64=function(e,t){return{key:this.indexForKey(e),value:{contents:"unsignedIntegerValue",unsignedIntegerValue:"number"===typeof t?this.encodeLong(t):t}}},e.prototype.encodeInt64=function(e,t){return{key:this.indexForKey(e),value:{contents:"integerValue",integerValue:this.encodeLong(t)}}},e.prototype.encodeDouble=function(e,t){return{key:this.indexForKey(e),value:{contents:"doubleValue",doubleValue:t}}},e.prototype.encodeObjectField=function(e,t){return{key:this.indexForKey(e),value:this.encodeObjectForObjectID(t)}},e.prototype.encodeObjectForObjectID=function(e){var t=this.encodedObjects.indexOf(e);if(-1!==t)return{contents:"objectIndex",objectIndex:t};var n=this.currentDocument.object.length;this.currentDocument.object.push(void 0),this.encodedObjects.add(e);var r=e.encode(this);return this.currentDocument.object[n]=r,{contents:"objectIndex",objectIndex:n}},e.prototype.indexForKey=function(e){if(!this.keySet)throw new Error("keySet should not be null");var t=this.keySet.indexOf(e);return-1===t&&(t=this.keySet.size,this.keySet.add(e)),t},e}();t.CRCoderArchiver=l},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeVersionedDocument=t.encodeCRDocument=t.encodeTTString=t.decodeTTString=t.decodeCRDocument=t.decodeVersionedDocument=void 0;var a=o(n(1133)),s=a.loadProto('\nsyntax = "proto2";\n\npackage versioned_document;\n\noption optimize_for = LITE_RUNTIME;\n\nmessage Document {\n    // Just in case.\n    optional uint32 serializationVersion = 1;\n\n    repeated Version version = 2;\n}\n\nmessage Version {\n    optional uint32 serializationVersion = 1;\n    optional uint32 minimumSupportedVersion = 2;\n\n    // Interpreted as a topotext.String\n    // Archived as bytes to ensure bit-perfect backward compatibility.\n    optional bytes data = 3;\n}\n',void 0,"versioned-document.proto");s=a.loadProto('\nsyntax = "proto2";\n\npackage topotext;\n\noption optimize_for = LITE_RUNTIME;\n\nmessage String {\n    optional string string = 2;\n\n    // Only needed for mergeable strings.\n    repeated Substring substring = 3;\n    optional VectorTimestamp timestamp = 4;\n\n    repeated AttributeRun attributeRun = 5;\n\n    // Optional attachment data.\n    repeated Attachment attachment = 6;\n}\n\nmessage VectorTimestamp {\n    message Clock {\n        optional bytes replicaUUID = 1;\n        message ReplicaClock {\n            optional uint32 clock = 1;\n            optional uint32 subclock = 2;\n        }\n        repeated ReplicaClock replicaClock = 2;\n    }\n    repeated Clock clock = 1;\n}\n\nmessage CharID {\n    optional uint32 replicaID = 1;\n    optional uint32 clock = 2;\n}\n\nmessage Substring {\n    optional CharID charID = 1;\n    // Length of substring in UTF-16 characters (surrogate pairs are separate characters).\n    optional uint32 length = 2;\n\n    // Style timestamp.\n    optional CharID timestamp = 3;\n\n    optional bool tombstone = 4;\n\n    // Index into String.substring.\n    repeated uint32 child = 5;\n}\n\nmessage Selection {\n    message Range {\n        optional CharID fromChar = 1;\n        optional CharID toChar = 2;\n    };\n    repeated bytes replicaUUID = 1;\n    repeated Range range = 2;\n\n    enum Affinity {\n        Backward = 0;\n        Forward = 1;\n    }\n    optional Affinity affinity = 3;\n}\n\nmessage AttributeRun {\n    // Length of run in UTF-16 characters (surrogate pairs are separate characters).\n    optional uint32 length = 1;\n\n    optional ParagraphStyle paragraphStyle = 2;\n\n    // Overrides bold, italic and paragraph styles.\n    optional Font font = 3;\n\n    // Modifiers applied on-top of paragraph style.\n    // Bold, italic...\n    optional uint32 fontHints = 5;\n\n    // Integer values for future compatibility.\n    // Only set as 1 or 0 currently.\n    optional uint32 underline = 6;\n    optional uint32 strikethrough = 7;\n\n    optional int32 superscript = 8;\n    optional string link = 9;\n    optional Color color = 10;\n\n    enum WritingDirection {\n        NaturalDirection = 0;\n        LeftToRight = 1;\n        RightToLeft = 2;\n        LeftToRightOverride = 3;\n        RightToLeftOverride = 4;\n    }\n\n    optional WritingDirection writingDirection = 11;\n\n    optional AttachmentInfo attachmentInfo = 12;\n\n    // Not used, for future compatibility.\n    optional uint64 timestamp = 13;\n\n    // Reminders hashtags\n    optional HashtagInfo hashtagInfo = 14;\n}\n\nmessage Font {\n    optional string name = 1;\n    optional float pointSize = 2;\n\n    // Hints for when named font does not exist on device.\n    optional uint32 fontHints = 3;\n}\n\nmessage ParagraphStyle {\n    enum Alignment {\n        Left = 0;\n        Center = 1;\n        Right = 2;\n        Justified = 3;\n        Natural = 4;\n    }\n\n    optional uint32 style = 1;\n    optional Alignment alignment = 2;\n    optional AttributeRun.WritingDirection writingDirection = 3;\n    optional int32 indent = 4;\n    optional Todo todo = 5;\n\n    // Hints for when paragraph style does not exist in this version.\n    optional uint32 paragraphHints = 6;\n\n    // Only used for the initial item of a numbered list.\n    optional uint32 startingListItemNumber = 7;\n}\n\nmessage HashtagInfo {\n    optional string objectIdentifier = 1;\n}\n\nmessage AttachmentInfo {\n    optional string attachmentIdentifier = 1;\n    optional string typeUTI = 2;\n}\n\nmessage Attachment {\n    optional string identifier = 2;\n    optional bytes mergeableData = 3;\n    optional float sizeHeight = 4;\n    optional float sizeWidth = 5;\n    optional string summary = 6;\n    optional string title = 7;\n    optional string typeUTI = 8;\n    optional string urlString = 9;\n\n    optional Location location = 10;\n    optional Media media = 11;\n    repeated PreviewImage preview = 12;\n\n    optional float originX = 13;\n    optional float originY = 14;\n    optional int32 orientation = 15;\n\n    optional double previewUpdateDate = 16;\n    optional double modificationDate = 17;\n    optional string remoteFileURL = 18;\n    optional bool checkedForLocation = 19;\n    optional int64 fileSize = 20;\n    optional double duration = 21;\n\n    optional int32 imageFilterType = 22;\n    optional bytes markupModelData = 23;\n    repeated Attachment subAttachment = 24;\n\n    optional int64 minimumSupportedNotesVersion = 25;\n\n    optional double croppingQuadBottomLeftX = 26;\n    optional double croppingQuadBottomLeftY = 27;\n    optional double croppingQuadBottomRightX = 28;\n    optional double croppingQuadBottomRightY = 29;\n    optional double croppingQuadTopLeftX = 30;\n    optional double croppingQuadTopLeftY = 31;\n    optional double croppingQuadTopRightX = 32;\n    optional double croppingQuadTopRightY = 33;\n\n    optional bytes metadataData = 34;\n\n    optional string userTitle = 35;\n\n    optional bytes fallbackImageData = 36;\n}\n\nmessage Location {\n    optional double latitude = 1;\n    optional double longitude = 2;\n\n    optional bytes placemark = 3;\n\n    optional bool placeUpdated = 4;\n}\n\nmessage Media {\n    optional string identifier = 1;\n    optional string filenameExtension = 2;\n    optional bytes data = 3;\n    optional string filename = 4;\n\n    optional int64 minimumSupportedNotesVersion = 5;\n}\n\nmessage PreviewImage {\n    optional float scale = 1;\n    optional bool scaleWhenDrawing = 2;\n    optional bytes data = 3;\n    optional bytes metadata = 4;\n    optional int32 version = 5;\n    optional bool versionOutOfDate = 6;\n\n    optional int64 minimumSupportedNotesVersion = 7;\n}\n\nmessage Todo {\n    optional bytes todoUUID = 1;\n    optional bool done = 2;\n}\n\nmessage Color {\n    optional float red = 1;\n    optional float green = 2;\n    optional float blue = 3;\n    optional float alpha = 4;\n}\n',s,"topotext.proto");var c=(s=a.loadProto('\nsyntax = "proto2";\n\npackage CRDT;\n\noption optimize_for = LITE_RUNTIME;\n\nmessage ObjectID {\n    oneof contents {\n        sint64 integerValue = 1;\n        uint64 unsignedIntegerValue = 2;\n        double doubleValue = 3;\n        string stringValue = 4;\n        bytes bytesValue = 5;\n        // Store objects as an index into \u2018objects\'\n        uint32 objectIndex = 6;\n    }\n}\n\nmessage Timestamp {\n    optional uint64 replicaIndex = 1;\n    optional int64 counter = 2;\n}\n\nmessage RegisterLatest {\n    optional Timestamp timestamp = 1;\n    optional ObjectID contents = 2;\n}\n\nmessage VectorTimestamp {\n    message Element {\n        optional uint64 replicaIndex = 1;\n        optional uint64 clock = 2;\n        optional uint64 subclock = 3;\n    }\n    repeated Element element = 1;\n}\n\nmessage Dictionary {\n    message Element {\n        optional ObjectID key = 1;\n        optional ObjectID value = 2;\n        optional VectorTimestamp timestamp = 3;\n        optional RegisterLatest index = 4;\n    }\n    repeated Element element = 1;\n}\n\nmessage Index {\n    message Element {\n        optional uint64 replicaIndex = 1;\n        optional int64 integer = 2;\n    }\n    repeated Element element = 1;\n}\n\nmessage OneOf {\n    message Element {\n        optional ObjectID value = 1;\n        optional Timestamp timestamp = 2;\n    }\n    repeated Element element = 1;\n}\n\nmessage StringArray {\n    optional topotext.String contents = 1;\n    repeated ArrayAttachment attachments = 2;\n    message ArrayAttachment {\n        optional uint64 attachmentIndex = 1;\n        optional bytes contents = 2;\n    }\n}\n\nmessage Array {\n    optional StringArray array = 1;\n    optional Dictionary dictionary = 2;\n}\n\nmessage OrderedSet {\n    optional Array array = 1;\n    optional Dictionary set = 2;\n}\n\nmessage Document {\n    // A list of all objects in the graph.\n    message CustomObject {\n        // object type as an identifier index\n        optional int32 type = 1;\n        // key as identifier index -> ObjectID\n        message MapEntry {\n            required int32 key = 1;\n            required ObjectID value = 2;\n        }\n        repeated MapEntry mapEntry = 3;\n    }\n    message DocObject {\n        oneof contents {\n            RegisterLatest registerLatest = 1;\n            RegisterLatest registerGreatest = 2;\n            RegisterLatest registerLeast = 3;\n            Dictionary set = 4;\n            Dictionary orderedSet = 5;\n            Dictionary dictionary = 6;\n            Timestamp timestamp = 7;\n            VectorTimestamp vectorTimestamp = 8;\n            Index index = 9;\n            topotext.String string = 10;\n            uint64 weakReference = 11;\n            OneOf oneof = 12;\n            CustomObject custom = 13;\n            StringArray stringArray = 14;\n            Array array = 15;\n            OrderedSet tsOrderedSet = 16;\n            // Note: tags 1-15 take less space\n        }\n    }\n\n    optional VectorTimestamp version = 1;\n    optional VectorTimestamp startVersion = 2;\n    repeated DocObject object = 3;\n    repeated string keyItem = 4;\n    repeated string typeItem = 5;\n    repeated bytes uuidItem = 6;\n    optional topotext.VectorTimestamp ttTimestamp = 7;\n}\n',s,"crframework.proto")).build();t.decodeVersionedDocument=function(e){return"string"===typeof e?c.versioned_document.Document.decode64(e):c.versioned_document.Document.decode(e)},t.decodeCRDocument=function(e){return"string"===typeof e?c.CRDT.Document.decode64(e):c.CRDT.Document.decode(e)},t.decodeTTString=function(e){return"string"===typeof e?c.topotext.String.decode64(e):c.topotext.String.decode(e)},t.encodeTTString=function(e){return new c.topotext.String(e).encode()},t.encodeCRDocument=function(e){return new c.CRDT.Document(e).encode()},t.encodeVersionedDocument=function(e){return new c.versioned_document.Document(e).encode()}},function(e,t,n){(function(r){var i,o,a;o=[n(887)],void 0===(a="function"===typeof(i=function(e,t){"use strict";var i={};return i.ByteBuffer=e,i.Long=e.Long||null,i.VERSION="5.0.3",i.WIRE_TYPES={},i.WIRE_TYPES.VARINT=0,i.WIRE_TYPES.BITS64=1,i.WIRE_TYPES.LDELIM=2,i.WIRE_TYPES.STARTGROUP=3,i.WIRE_TYPES.ENDGROUP=4,i.WIRE_TYPES.BITS32=5,i.PACKABLE_WIRE_TYPES=[i.WIRE_TYPES.VARINT,i.WIRE_TYPES.BITS64,i.WIRE_TYPES.BITS32],i.TYPES={int32:{name:"int32",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:i.WIRE_TYPES.VARINT,defaultValue:i.Long?i.Long.ZERO:void 0},uint64:{name:"uint64",wireType:i.WIRE_TYPES.VARINT,defaultValue:i.Long?i.Long.UZERO:void 0},sint64:{name:"sint64",wireType:i.WIRE_TYPES.VARINT,defaultValue:i.Long?i.Long.ZERO:void 0},bool:{name:"bool",wireType:i.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:i.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:i.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:i.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:i.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:i.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:i.WIRE_TYPES.BITS64,defaultValue:i.Long?i.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:i.WIRE_TYPES.BITS64,defaultValue:i.Long?i.Long.ZERO:void 0},float:{name:"float",wireType:i.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:i.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:i.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:i.WIRE_TYPES.STARTGROUP,defaultValue:null}},i.MAP_KEY_TYPES=[i.TYPES.int32,i.TYPES.sint32,i.TYPES.sfixed32,i.TYPES.uint32,i.TYPES.fixed32,i.TYPES.int64,i.TYPES.sint64,i.TYPES.sfixed64,i.TYPES.uint64,i.TYPES.fixed64,i.TYPES.bool,i.TYPES.string,i.TYPES.bytes],i.ID_MIN=1,i.ID_MAX=536870911,i.convertFieldsToCamelCase=!1,i.populateAccessors=!0,i.populateDefaults=!0,i.Util=function(){var e={};return e.IS_NODE=!("object"!==typeof r||r+""!=="[object process]"||r.browser),e.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,n=0;n<e.length;n++){try{t=e[n]()}catch(r){continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},e.fetch=function(t,r){if(r&&"function"!=typeof r&&(r=null),e.IS_NODE){var i=n(1134);if(r)i.readFile(t,(function(e,t){r(e?null:""+t)}));else try{return i.readFileSync(t)}catch(a){return null}}else{var o=e.XHR();if(o.open("GET",t,!!r),o.setRequestHeader("Accept","text/plain"),"function"===typeof o.overrideMimeType&&o.overrideMimeType("text/plain"),!r)return o.send(null),200==o.status||0==o.status&&"string"===typeof o.responseText?o.responseText:null;if(o.onreadystatechange=function(){4==o.readyState&&(200==o.status||0==o.status&&"string"===typeof o.responseText?r(o.responseText):r(null))},4==o.readyState)return;o.send(null)}},e.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,(function(e,t){return t.toUpperCase()}))},e}(),i.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},i.DotProto=function(e,t){var n={},r=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},i=r.prototype;i._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var n=e.exec(this.source);if(!n)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,n[1]},i.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,n,r;do{for(e=!1;t.WHITESPACE.test(r=this.source.charAt(this.index));)if("\n"===r&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(r=this.source.charAt(this.index)))return"/";do{if("\n"===r&&++this.line,++this.index===this.source.length)return null;n=r,r=this.source.charAt(this.index)}while("*"!==n||"/"!==r);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var i=this.index;if(t.DELIM.lastIndex=0,!t.DELIM.test(this.source.charAt(i++)))for(;i<this.source.length&&!t.DELIM.test(this.source.charAt(i));)++i;var o=this.source.substring(this.index,this.index=i);return'"'!==o&&"'"!==o||(this._stringOpen=o),o},i.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},i.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},i.omit=function(e){return this.peek()===e&&(this.next(),!0)},i.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},n.Tokenizer=r;var o=function(e){this.tn=new r(e),this.proto3=!1},a=o.prototype;function s(e,n){var r=-1,i=1;if("-"==e.charAt(0)&&(i=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))r=parseInt(e);else if(t.NUMBER_HEX.test(e))r=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(i<0?"-":"")+e);r=parseInt(e.substring(1),8)}if(r=i*r|0,!n&&r<0)throw Error("illegal id value: "+(i<0?"-":"")+e);return r}function c(e){var n=1;if("-"==e.charAt(0)&&(n=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return n*parseInt(e,10);if(t.NUMBER_HEX.test(e))return n*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return n*parseInt(e.substring(1),8);if("inf"===e)return n*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return n*parseFloat(e);throw Error("illegal number value: "+(n<0?"-":"")+e)}function u(e,t,n){"undefined"===typeof e[t]?e[t]=n:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(n))}return a.parse=function(){var e,n,r={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},i=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!i||null!==r.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),r.package=e;break;case"import":if(!i)throw Error("unexpected 'import'");("public"===(e=this.tn.peek())||(n="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),n||r.imports.push(e);break;case"syntax":if(!i)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(r.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(r,null),i=!1;break;case"enum":this._parseEnum(r),i=!1;break;case"option":this._parseOption(r);break;case"service":this._parseService(r);break;case"extend":this._parseExtend(r);break;default:throw Error("unexpected '"+e+"'")}}catch(o){throw o.message="Parse error at line "+this.tn.line+": "+o.message,o}return delete r.name,r},o.parse=function(e){return new o(e).parse()},a._readString=function(){var e,t,n="";do{if("'"!==(t=this.tn.next())&&'"'!==t)throw Error("illegal string delimiter: "+t);n+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return n},a._readValue=function(e){var n=this.tn.peek();if('"'===n||"'"===n)return this._readString();if(this.tn.next(),t.NUMBER.test(n))return c(n);if(t.BOOL.test(n))return"true"===n.toLowerCase();if(e&&t.TYPEREF.test(n))return n;throw Error("illegal value: "+n)},a._parseOption=function(e,n){var r=this.tn.next(),i=!1;if("("===r&&(i=!0,r=this.tn.next()),!t.TYPEREF.test(r))throw Error("illegal option name: "+r);var o=r;i&&(this.tn.skip(")"),o="("+o+")",r=this.tn.peek(),t.FQTYPEREF.test(r)&&(o+=r,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,o),n||this.tn.skip(";")},a._parseOptionValue=function(e,n){var r=this.tn.peek();if("{"!==r)u(e.options,n,this._readValue(!0));else for(this.tn.skip("{");"}"!==(r=this.tn.next());){if(!t.NAME.test(r))throw Error("illegal option name: "+n+"."+r);this.tn.omit(":")?u(e.options,n+"."+r,this._readValue(!0)):this._parseOptionValue(e,n+"."+r)}},a._parseService=function(e){var n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal service name at line "+this.tn.line+": "+n);var r={name:n,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(r);else{if("rpc"!==n)throw Error("illegal service token: "+n);this._parseServiceRPC(r)}this.tn.omit(";"),e.services.push(r)},a._parseServiceRPC=function(e){var n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal rpc service method name: "+n);var r=n,i={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(i.request_stream=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal rpc service request type: "+n);if(i.request=n,this.tn.skip(")"),"returns"!==(n=this.tn.next()).toLowerCase())throw Error("illegal rpc service request type delimiter: "+n);if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(i.response_stream=!0,n=this.tn.next()),i.response=n,this.tn.skip(")"),"{"===(n=this.tn.peek())){for(this.tn.next();"}"!==(n=this.tn.next());){if("option"!==n)throw Error("illegal rpc service token: "+n);this._parseOption(i)}this.tn.omit(";")}else this.tn.skip(";");"undefined"===typeof e.rpc&&(e.rpc={}),e.rpc[r]=i},a._parseMessage=function(e,n){var r=!!n,i=this.tn.next(),o={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(i))throw Error("illegal "+(r?"group":"message")+" name: "+i);for(o.name=i,r&&(this.tn.skip("="),n.id=s(this.tn.next()),o.isGroup=!0),"["===(i=this.tn.peek())&&n&&this._parseFieldOptions(n),this.tn.skip("{");"}"!==(i=this.tn.next());)if(t.RULE.test(i))this._parseMessageField(o,i);else if("oneof"===i)this._parseMessageOneOf(o);else if("enum"===i)this._parseEnum(o);else if("message"===i)this._parseMessage(o);else if("option"===i)this._parseOption(o);else if("service"===i)this._parseService(o);else if("extensions"===i)o.hasOwnProperty("extensions")?o.extensions=o.extensions.concat(this._parseExtensionRanges()):o.extensions=this._parseExtensionRanges();else if("reserved"===i)this._parseIgnored();else if("extend"===i)this._parseExtend(o);else{if(!t.TYPEREF.test(i))throw Error("illegal message token: "+i);if(!this.proto3)throw Error("illegal field rule: "+i);this._parseMessageField(o,"optional",i)}return this.tn.omit(";"),e.messages.push(o),o},a._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},a._parseMessageField=function(e,n,r){if(!t.RULE.test(n))throw Error("illegal message field rule: "+n);var i,o={rule:n,type:"",name:"",options:{},id:0};if("map"===n){if(r)throw Error("illegal type: "+r);if(this.tn.skip("<"),i=this.tn.next(),!t.TYPE.test(i)&&!t.TYPEREF.test(i))throw Error("illegal message field type: "+i);if(o.keytype=i,this.tn.skip(","),i=this.tn.next(),!t.TYPE.test(i)&&!t.TYPEREF.test(i))throw Error("illegal message field: "+i);if(o.type=i,this.tn.skip(">"),i=this.tn.next(),!t.NAME.test(i))throw Error("illegal message field name: "+i);o.name=i,this.tn.skip("="),o.id=s(this.tn.next()),"["===(i=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}else if("group"===(r="undefined"!==typeof r?r:this.tn.next())){var a=this._parseMessage(e,o);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);o.type=a.name,o.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(o.type=r,i=this.tn.next(),!t.NAME.test(i))throw Error("illegal message field name: "+i);o.name=i,this.tn.skip("="),o.id=s(this.tn.next()),"["===(i=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}return e.fields.push(o),o},a._parseMessageOneOf=function(e){var n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal oneof name: "+n);var r,i=n,o=[];for(this.tn.skip("{");"}"!==(n=this.tn.next());)(r=this._parseMessageField(e,"optional",n)).oneof=i,o.push(r.id);this.tn.omit(";"),e.oneofs[i]=o},a._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},a._parseEnum=function(e){var n={name:"",values:[],options:{}},r=this.tn.next();if(!t.NAME.test(r))throw Error("illegal name: "+r);for(n.name=r,this.tn.skip("{");"}"!==(r=this.tn.next());)if("option"===r)this._parseOption(n);else{if(!t.NAME.test(r))throw Error("illegal name: "+r);this.tn.skip("=");var i={name:r,id:s(this.tn.next(),!0)};"["===(r=this.tn.peek())&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),n.values.push(i)}this.tn.omit(";"),e.enums.push(n)},a._parseExtensionRanges=function(){var t,n,r,i=[];do{for(n=[];;){switch(t=this.tn.next()){case"min":r=e.ID_MIN;break;case"max":r=e.ID_MAX;break;default:r=c(t)}if(n.push(r),2===n.length)break;if("to"!==this.tn.peek()){n.push(r);break}this.tn.next()}i.push(n)}while(this.tn.omit(","));return this.tn.skip(";"),i},a._parseExtend=function(e){var n=this.tn.next();if(!t.TYPEREF.test(n))throw Error("illegal extend reference: "+n);var r={ref:n,fields:[]};for(this.tn.skip("{");"}"!==(n=this.tn.next());)if(t.RULE.test(n))this._parseMessageField(r,n);else{if(!t.TYPEREF.test(n))throw Error("illegal extend token: "+n);if(!this.proto3)throw Error("illegal field rule: "+n);this._parseMessageField(r,"optional",n)}return this.tn.omit(";"),e.messages.push(r),r},a.toString=function(){return"Parser at line "+this.tn.line},n.Parser=o,n}(i,i.Lang),i.Reflect=function(t){var n={},r=function(e,t,n){this.builder=e,this.parent=t,this.name=n,this.className},i=r.prototype;i.fqn=function(){for(var e=this.name,t=this;null!=(t=t.parent);)e=t.name+"."+e;return e},i.toString=function(e){return(e?this.className+" ":"")+this.fqn()},i.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},n.T=r;var o=function(e,t,n,i,o){r.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=i||{},this.syntax=o||"proto2"},a=o.prototype=Object.create(r.prototype);a.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],n=0,r=this.children.length;n<r;++n)this.children[n]instanceof e&&t.push(this.children[n]);return t},a.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof l.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof l.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},a.getChild=function(e){for(var t="number"===typeof e?"id":"name",n=0,r=this.children.length;n<r;++n)if(this.children[n][t]===e)return this.children[n];return null},a.resolve=function(e,t){var r,i="string"===typeof e?e.split("."):e,o=this,a=0;if(""===i[a]){for(;null!==o.parent;)o=o.parent;a++}do{do{if(!(o instanceof n.Namespace)){o=null;break}if(!(r=o.getChild(i[a]))||!(r instanceof n.T)||t&&!(r instanceof n.Namespace)){o=null;break}o=r,a++}while(a<i.length);if(null!=o)break;if(null!==this.parent)return this.parent.resolve(e,t)}while(null!=o);return o},a.qn=function(e){var t=[],r=e;do{t.unshift(r.name),r=r.parent}while(null!==r);for(var i=1;i<=t.length;i++){var o=t.slice(t.length-i);if(e===this.resolve(o,e instanceof n.Namespace))return o.join(".")}return e.fqn()},a.build=function(){for(var e,t={},n=this.children,r=0,i=n.length;r<i;++r)(e=n[r])instanceof o&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},a.buildOpt=function(){for(var e={},t=Object.keys(this.options),n=0,r=t.length;n<r;++n){var i=t[n],o=this.options[t[n]];e[i]=o}return e},a.getOption=function(e){return"undefined"===typeof e?this.options:"undefined"!==typeof this.options[e]?this.options[e]:null},n.Namespace=o;var s=function(e,n,r,i,o){if(this.type=e,this.resolvedType=n,this.isMapKey=r,this.syntax=i,this.name=o,r&&t.MAP_KEY_TYPES.indexOf(e)<0)throw Error("Invalid map key type: "+e.name)},c=s.prototype;function u(e,n){if(e&&"number"===typeof e.low&&"number"===typeof e.high&&"boolean"===typeof e.unsigned&&e.low===e.low&&e.high===e.high)return new t.Long(e.low,e.high,"undefined"===typeof n?e.unsigned:n);if("string"===typeof e)return t.Long.fromString(e,n||!1,10);if("number"===typeof e)return t.Long.fromNumber(e,n||!1);throw Error("not convertible to Long")}s.defaultFieldValue=function(n){if("string"===typeof n&&(n=t.TYPES[n]),"undefined"===typeof n.defaultValue)throw Error("default value for type "+n.name+" is not supported");return n==t.TYPES.bytes?new e(0):n.defaultValue},c.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},c.verifyValue=function(n){var r=this;function i(e,t){throw Error("Illegal value for "+r.toString(!0)+" of type "+r.type.name+": "+e+" ("+t+")")}switch(this.type){case t.TYPES.int32:case t.TYPES.sint32:case t.TYPES.sfixed32:return("number"!==typeof n||n===n&&n%1!==0)&&i(typeof n,"not an integer"),n>4294967295?0|n:n;case t.TYPES.uint32:case t.TYPES.fixed32:return("number"!==typeof n||n===n&&n%1!==0)&&i(typeof n,"not an integer"),n<0?n>>>0:n;case t.TYPES.int64:case t.TYPES.sint64:case t.TYPES.sfixed64:if(t.Long)try{return u(n,!1)}catch(c){i(typeof n,c.message)}else i(typeof n,"requires Long.js");case t.TYPES.uint64:case t.TYPES.fixed64:if(t.Long)try{return u(n,!0)}catch(c){i(typeof n,c.message)}else i(typeof n,"requires Long.js");case t.TYPES.bool:return"boolean"!==typeof n&&i(typeof n,"not a boolean"),n;case t.TYPES.float:case t.TYPES.double:return"number"!==typeof n&&i(typeof n,"not a number"),n;case t.TYPES.string:return"string"===typeof n||n&&n instanceof String||i(typeof n,"not a string"),""+n;case t.TYPES.bytes:return e.isByteBuffer(n)?n:e.wrap(n,"base64");case t.TYPES.enum:var o=this.resolvedType.getChildren(t.Reflect.Enum.Value);for(s=0;s<o.length;s++){if(o[s].name==n)return o[s].id;if(o[s].id==n)return o[s].id}if("proto3"===this.syntax)return("number"!==typeof n||n===n&&n%1!==0)&&i(typeof n,"not an integer"),(n>4294967295||n<0)&&i(typeof n,"not in range for uint32"),n;i(n,"not a valid enum value");case t.TYPES.group:case t.TYPES.message:if(n&&"object"===typeof n||i(typeof n,"object expected"),n instanceof this.resolvedType.clazz)return n;if(n instanceof t.Builder.Message){var a={};for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n=a}return new this.resolvedType.clazz(n)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+n+" (undefined type "+this.type+")")},c.calculateLength=function(n,r){if(null===r)return 0;var i;switch(this.type){case t.TYPES.int32:return r<0?e.calculateVarint64(r):e.calculateVarint32(r);case t.TYPES.uint32:return e.calculateVarint32(r);case t.TYPES.sint32:return e.calculateVarint32(e.zigZagEncode32(r));case t.TYPES.fixed32:case t.TYPES.sfixed32:case t.TYPES.float:return 4;case t.TYPES.int64:case t.TYPES.uint64:return e.calculateVarint64(r);case t.TYPES.sint64:return e.calculateVarint64(e.zigZagEncode64(r));case t.TYPES.fixed64:case t.TYPES.sfixed64:return 8;case t.TYPES.bool:return 1;case t.TYPES.enum:return e.calculateVarint32(r);case t.TYPES.double:return 8;case t.TYPES.string:return i=e.calculateUTF8Bytes(r),e.calculateVarint32(i)+i;case t.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");return e.calculateVarint32(r.remaining())+r.remaining();case t.TYPES.message:return i=this.resolvedType.calculate(r),e.calculateVarint32(i)+i;case t.TYPES.group:return(i=this.resolvedType.calculate(r))+e.calculateVarint32(n<<3|t.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")},c.encodeValue=function(n,r,i){if(null===r)return i;switch(this.type){case t.TYPES.int32:r<0?i.writeVarint64(r):i.writeVarint32(r);break;case t.TYPES.uint32:i.writeVarint32(r);break;case t.TYPES.sint32:i.writeVarint32ZigZag(r);break;case t.TYPES.fixed32:i.writeUint32(r);break;case t.TYPES.sfixed32:i.writeInt32(r);break;case t.TYPES.int64:case t.TYPES.uint64:i.writeVarint64(r);break;case t.TYPES.sint64:i.writeVarint64ZigZag(r);break;case t.TYPES.fixed64:i.writeUint64(r);break;case t.TYPES.sfixed64:i.writeInt64(r);break;case t.TYPES.bool:"string"===typeof r?i.writeVarint32("false"===r.toLowerCase()?0:!!r):i.writeVarint32(r?1:0);break;case t.TYPES.enum:i.writeVarint32(r);break;case t.TYPES.float:i.writeFloat32(r);break;case t.TYPES.double:i.writeFloat64(r);break;case t.TYPES.string:i.writeVString(r);break;case t.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");var o=r.offset;i.writeVarint32(r.remaining()),i.append(r),r.offset=o;break;case t.TYPES.message:var a=(new e).LE();this.resolvedType.encode(r,a),i.writeVarint32(a.offset),i.append(a.flip());break;case t.TYPES.group:this.resolvedType.encode(r,i),i.writeVarint32(n<<3|t.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")}return i},c.decode=function(e,n,r){if(n!=this.type.wireType)throw Error("Unexpected wire type for element");var i,o;switch(this.type){case t.TYPES.int32:return 0|e.readVarint32();case t.TYPES.uint32:return e.readVarint32()>>>0;case t.TYPES.sint32:return 0|e.readVarint32ZigZag();case t.TYPES.fixed32:return e.readUint32()>>>0;case t.TYPES.sfixed32:return 0|e.readInt32();case t.TYPES.int64:return e.readVarint64();case t.TYPES.uint64:return e.readVarint64().toUnsigned();case t.TYPES.sint64:return e.readVarint64ZigZag();case t.TYPES.fixed64:return e.readUint64();case t.TYPES.sfixed64:return e.readInt64();case t.TYPES.bool:return!!e.readVarint32();case t.TYPES.enum:return e.readVarint32();case t.TYPES.float:return e.readFloat();case t.TYPES.double:return e.readDouble();case t.TYPES.string:return e.readVString();case t.TYPES.bytes:if(o=e.readVarint32(),e.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+e.remaining());return(i=e.clone()).limit=i.offset+o,e.offset+=o,i;case t.TYPES.message:return o=e.readVarint32(),this.resolvedType.decode(e,o);case t.TYPES.group:return this.resolvedType.decode(e,-1,r)}throw Error("[INTERNAL] Illegal decode type")},c.valueFromString=function(n){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case t.TYPES.int32:case t.TYPES.sint32:case t.TYPES.sfixed32:case t.TYPES.uint32:case t.TYPES.fixed32:return this.verifyValue(parseInt(n));case t.TYPES.int64:case t.TYPES.sint64:case t.TYPES.sfixed64:case t.TYPES.uint64:case t.TYPES.fixed64:return this.verifyValue(n);case t.TYPES.bool:return"true"===n;case t.TYPES.string:return this.verifyValue(n);case t.TYPES.bytes:return e.fromBinary(n)}},c.valueToString=function(e){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===t.TYPES.bytes?e.toString("binary"):e.toString()},n.Element=s;var l=function(e,t,n,r,i,a){o.call(this,e,t,n,r,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!i,this._fields=null,this._fieldsById=null,this._fieldsByName=null},d=l.prototype=Object.create(o.prototype);function p(e,n){var r=n.readVarint32(),i=7&r,o=r>>>3;switch(i){case t.WIRE_TYPES.VARINT:do{r=n.readUint8()}while(128===(128&r));break;case t.WIRE_TYPES.BITS64:n.offset+=8;break;case t.WIRE_TYPES.LDELIM:r=n.readVarint32(),n.offset+=r;break;case t.WIRE_TYPES.STARTGROUP:p(o,n);break;case t.WIRE_TYPES.ENDGROUP:if(o===e)return!1;throw Error("Illegal GROUPEND after unknown group: "+o+" ("+e+" expected)");case t.WIRE_TYPES.BITS32:n.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+e+": "+i)}return!0}d.build=function(n){if(this.clazz&&!n)return this.clazz;var r=function(t,n){var r=n.getChildren(t.Reflect.Message.Field),i=n.getChildren(t.Reflect.Message.OneOf),o=function(a,s){t.Builder.Message.call(this);for(var c=0,u=i.length;c<u;++c)this[i[c].name]=null;for(c=0,u=r.length;c<u;++c){var l=r[c];this[l.name]=l.repeated?[]:l.map?new t.Map(l):null,!l.required&&"proto3"!==n.syntax||null===l.defaultValue||(this[l.name]=l.defaultValue)}var d;if(arguments.length>0)if(1!==arguments.length||null===a||"object"!==typeof a||!("function"!==typeof a.encode||a instanceof o)||Array.isArray(a)||a instanceof t.Map||e.isByteBuffer(a)||a instanceof ArrayBuffer||t.Long&&a instanceof t.Long)for(c=0,u=arguments.length;c<u;++c)"undefined"!==typeof(d=arguments[c])&&this.$set(r[c].name,d);else this.$set(a)},a=o.prototype=Object.create(t.Builder.Message.prototype);a.add=function(e,r,i){var o=n._fieldsByName[e];if(!i){if(!o)throw Error(this+"#"+e+" is undefined");if(!(o instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+e+" is not a repeated field");r=o.verifyValue(r,!0)}return null===this[e]&&(this[e]=[]),this[e].push(r),this},a.$add=a.add,a.set=function(e,r,i){if(e&&"object"===typeof e){for(var o in i=r,e)e.hasOwnProperty(o)&&"undefined"!==typeof(r=e[o])&&void 0===n._oneofsByName[o]&&this.$set(o,r,i);return this}var a=n._fieldsByName[e];if(i)this[e]=r;else{if(!a)throw Error(this+"#"+e+" is not a field: undefined");if(!(a instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+a.toString(!0));this[a.name]=r=a.verifyValue(r)}if(a&&a.oneof){var s=this[a.oneof.name];null!==r?(null!==s&&s!==a.name&&(this[s]=null),this[a.oneof.name]=a.name):s===e&&(this[a.oneof.name]=null)}return this},a.$set=a.set,a.get=function(e,r){if(r)return this[e];var i=n._fieldsByName[e];if(!i||!(i instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: undefined");if(!(i instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+i.toString(!0));return this[i.name]},a.$get=a.get;for(var s=0;s<r.length;s++){var c=r[s];c instanceof t.Reflect.Message.ExtensionField||n.builder.options.populateAccessors&&function(e){var t=e.originalName.replace(/(_[a-zA-Z])/g,(function(e){return e.toUpperCase().replace("_","")}));t=t.substring(0,1).toUpperCase()+t.substring(1);var r=e.originalName.replace(/([A-Z])/g,(function(e){return"_"+e})),i=function(t,n){return this[e.name]=n?t:e.verifyValue(t),this},o=function(){return this[e.name]};null===n.getChild("set"+t)&&(a["set"+t]=i),null===n.getChild("set_"+r)&&(a["set_"+r]=i),null===n.getChild("get"+t)&&(a["get"+t]=o),null===n.getChild("get_"+r)&&(a["get_"+r]=o)}(c)}function u(n,r,i,o){if(null===n||"object"!==typeof n){if(o&&o instanceof t.Reflect.Enum){var a=t.Reflect.Enum.getName(o.object,n);if(null!==a)return a}return n}if(e.isByteBuffer(n))return r?n.toBase64():n.toBuffer();if(t.Long.isLong(n))return i?n.toString():t.Long.fromValue(n);var s;if(Array.isArray(n))return s=[],n.forEach((function(e,t){s[t]=u(e,r,i,o)})),s;if(s={},n instanceof t.Map){for(var c=n.entries(),l=c.next();!l.done;l=c.next())s[n.keyElem.valueToString(l.value[0])]=u(l.value[1],r,i,n.valueElem.resolvedType);return s}var d=n.$type,p=void 0;for(var f in n)n.hasOwnProperty(f)&&(d&&(p=d.getChild(f))?s[f]=u(n[f],r,i,p.resolvedType):s[f]=u(n[f],r,i));return s}return a.encode=function(t,r){"boolean"===typeof t&&(r=t,t=void 0);var i=!1;t||(t=new e,i=!0);var o=t.littleEndian;try{return n.encode(this,t.LE(),r),(i?t.flip():t).LE(o)}catch(a){throw t.LE(o),a}},o.encode=function(e,t,n){return new o(e).encode(t,n)},a.calculate=function(){return n.calculate(this)},a.encodeDelimited=function(t,r){var i=!1;t||(t=new e,i=!0);var o=(new e).LE();return n.encode(this,o,r).flip(),t.writeVarint32(o.remaining()),t.append(o),i?t.flip():t},a.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},a.toArrayBuffer=a.encodeAB,a.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},a.toBuffer=a.encodeNB,a.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},a.toBase64=a.encode64,a.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},a.toHex=a.encodeHex,a.toRaw=function(e,t){return u(this,!!e,!!t,this.$type)},a.encodeJSON=function(){return JSON.stringify(u(this,!0,!0,this.$type))},o.decode=function(t,r,i){"string"===typeof r&&(i=r,r=-1),"string"===typeof t?t=e.wrap(t,i||"base64"):e.isByteBuffer(t)||(t=e.wrap(t));var o=t.littleEndian;try{var a=n.decode(t.LE(),r);return t.LE(o),a}catch(s){throw t.LE(o),s}},o.decodeDelimited=function(t,r){if("string"===typeof t?t=e.wrap(t,r||"base64"):e.isByteBuffer(t)||(t=e.wrap(t)),t.remaining()<1)return null;var i=t.offset,o=t.readVarint32();if(t.remaining()<o)return t.offset=i,null;try{var a=n.decode(t.slice(t.offset,t.offset+o).LE());return t.offset+=o,a}catch(s){throw t.offset+=o,s}},o.decode64=function(e){return o.decode(e,"base64")},o.decodeHex=function(e){return o.decode(e,"hex")},o.decodeJSON=function(e){return new o(JSON.parse(e))},a.toString=function(){return n.toString()},Object.defineProperty&&(Object.defineProperty(o,"$options",{value:n.buildOpt()}),Object.defineProperty(a,"$options",{value:o.$options}),Object.defineProperty(o,"$type",{value:n}),Object.defineProperty(a,"$type",{value:n})),o}(t,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var i,o=0,a=this.children.length;o<a;o++)if((i=this.children[o])instanceof g||i instanceof l||i instanceof b){if(r.hasOwnProperty(i.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+i.toString(!0)+" cannot override static property '"+i.name+"'");r[i.name]=i.build()}else if(i instanceof l.Field)i.build(),this._fields.push(i),this._fieldsById[i.id]=i,this._fieldsByName[i.name]=i;else if(i instanceof l.OneOf)this._oneofsByName[i.name]=i;else if(!(i instanceof l.OneOf)&&!(i instanceof y))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[o].toString(!0));return this.clazz=r},d.encode=function(e,t,n){for(var r,i,o=null,a=0,s=this._fields.length;a<s;++a)i=e[(r=this._fields[a]).name],r.required&&null===i?null===o&&(o=r):r.encode(n?i:r.verifyValue(i),t,e);if(null!==o){var c=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw c.encoded=t,c}return t},d.calculate=function(e){for(var t,n,r=0,i=0,o=this._fields.length;i<o;++i){if(n=e[(t=this._fields[i]).name],t.required&&null===n)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);r+=t.calculate(n,e)}return r},d.decode=function(e,n,r){"number"!==typeof n&&(n=-1);for(var i,o,a,s,c=e.offset,u=new this.clazz;e.offset<c+n||-1===n&&e.remaining()>0;){if(a=(i=e.readVarint32())>>>3,(o=7&i)===t.WIRE_TYPES.ENDGROUP){if(a!==r)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(r?r+" expected":"not a group")+")");break}if(s=this._fieldsById[a]){if(s.repeated&&!s.options.packed)u[s.name].push(s.decode(o,e));else if(s.map){var l=s.decode(o,e);u[s.name].set(l[0],l[1])}else if(u[s.name]=s.decode(o,e),s.oneof){var d=u[s.oneof.name];null!==d&&d!==s.name&&(u[d]=null),u[s.oneof.name]=s.name}}else switch(o){case t.WIRE_TYPES.VARINT:e.readVarint32();break;case t.WIRE_TYPES.BITS32:e.offset+=4;break;case t.WIRE_TYPES.BITS64:e.offset+=8;break;case t.WIRE_TYPES.LDELIM:var f=e.readVarint32();e.offset+=f;break;case t.WIRE_TYPES.STARTGROUP:for(;p(a,e););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+o)}}for(var h=0,m=this._fields.length;h<m;++h)if(null===u[(s=this._fields[h]).name])if("proto3"===this.syntax)u[s.name]=s.defaultValue;else{if(s.required){var g=Error("Missing at least one required field for "+this.toString(!0)+": "+s.name);throw g.decoded=u,g}t.populateDefaults&&null!==s.defaultValue&&(u[s.name]=s.defaultValue)}return u},n.Message=l;var f=function(e,n,i,o,a,s,c,u,d,p){r.call(this,e,n,s),this.className="Message.Field",this.required="required"===i,this.repeated="repeated"===i,this.map="map"===i,this.keyType=o||null,this.type=a,this.resolvedType=null,this.id=c,this.options=u||{},this.defaultValue=null,this.oneof=d||null,this.syntax=p||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,!this.builder.options.convertFieldsToCamelCase||this instanceof l.ExtensionField||(this.name=t.Util.toCamelCase(this.name))},h=f.prototype=Object.create(r.prototype);h.build=function(){this.element=new s(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new s(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?"undefined"!==typeof this.options.default&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=s.defaultFieldValue(this.type)},h.verifyValue=function(e,n){n=n||!1;var r,i=this;function o(e,t){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+e+" ("+t+")")}if(null===e)return this.required&&o(typeof e,"required"),"proto3"===this.syntax&&this.type!==t.TYPES.message&&o(typeof e,"proto3 field without field presence cannot be null"),null;if(this.repeated&&!n){Array.isArray(e)||(e=[e]);var a=[];for(r=0;r<e.length;r++)a.push(this.element.verifyValue(e[r]));return a}return this.map&&!n?e instanceof t.Map?e:(e instanceof Object||o(typeof e,"expected ProtoBuf.Map or raw object for map field"),new t.Map(this,e)):(!this.repeated&&Array.isArray(e)&&o(typeof e,"no array expected"),this.element.verifyValue(e))},h.hasWirePresence=function(e,n){if("proto3"!==this.syntax)return null!==e;if(this.oneof&&n[this.oneof.name]===this.name)return!0;switch(this.type){case t.TYPES.int32:case t.TYPES.sint32:case t.TYPES.sfixed32:case t.TYPES.uint32:case t.TYPES.fixed32:return 0!==e;case t.TYPES.int64:case t.TYPES.sint64:case t.TYPES.sfixed64:case t.TYPES.uint64:case t.TYPES.fixed64:return 0!==e.low||0!==e.high;case t.TYPES.bool:return e;case t.TYPES.float:case t.TYPES.double:return 0!==e;case t.TYPES.string:return e.length>0;case t.TYPES.bytes:return e.remaining()>0;case t.TYPES.enum:return 0!==e;case t.TYPES.message:return null!==e;default:return!0}},h.encode=function(n,r,i){if(null===this.type||"object"!==typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return r;try{var o;if(this.repeated)if(this.options.packed&&t.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){r.writeVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),r.ensureCapacity(r.offset+=1);var a=r.offset;for(o=0;o<n.length;o++)this.element.encodeValue(this.id,n[o],r);var s=r.offset-a,c=e.calculateVarint32(s);if(c>1){var u=r.slice(a,r.offset);a+=c-1,r.offset=a,r.append(u)}r.writeVarint32(s,a-c)}else for(o=0;o<n.length;o++)r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n[o],r);else this.map?n.forEach((function(n,i,o){var a=e.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+e.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);r.writeVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),r.writeVarint32(a),r.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,i,r),r.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,n,r)}),this):this.hasWirePresence(n,i)&&(r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n,r))}catch(l){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+l+")")}return r},h.calculate=function(n,r){if(n=this.verifyValue(n),null===this.type||"object"!==typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return 0;var i=0;try{var o,a;if(this.repeated)if(this.options.packed&&t.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(i+=e.calculateVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),a=0,o=0;o<n.length;o++)a+=this.element.calculateLength(this.id,n[o]);i+=e.calculateVarint32(a),i+=a}else for(o=0;o<n.length;o++)i+=e.calculateVarint32(this.id<<3|this.type.wireType),i+=this.element.calculateLength(this.id,n[o]);else this.map?n.forEach((function(n,r,o){var a=e.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,r)+e.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);i+=e.calculateVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),i+=e.calculateVarint32(a),i+=a}),this):this.hasWirePresence(n,r)&&(i+=e.calculateVarint32(this.id<<3|this.type.wireType),i+=this.element.calculateLength(this.id,n))}catch(s){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+s+")")}return i},h.decode=function(e,n,r){var i,o;if(!(!this.map&&e==this.type.wireType||!r&&this.repeated&&this.options.packed&&e==t.WIRE_TYPES.LDELIM||this.map&&e==t.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+e+" ("+this.type.wireType+" expected)");if(e==t.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&t.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!r){o=n.readVarint32(),o=n.offset+o;for(var a=[];n.offset<o;)a.push(this.decode(this.type.wireType,n,!0));return a}if(this.map){var c=s.defaultFieldValue(this.keyType);if(i=s.defaultFieldValue(this.type),o=n.readVarint32(),n.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+n.remaining());var u=n.clone();for(u.limit=u.offset+o,n.offset+=o;u.remaining()>0;){var l=u.readVarint32();e=7&l;var d=l>>>3;if(1===d)c=this.keyElement.decode(u,e,d);else{if(2!==d)throw Error("Unexpected tag in map field key/value submessage");i=this.element.decode(u,e,d)}}return[c,i]}return this.element.decode(n,e,this.id)},n.Message.Field=f;var m=function(e,t,n,r,i,o,a){f.call(this,e,t,n,null,r,i,o,a),this.extension};m.prototype=Object.create(f.prototype),n.Message.ExtensionField=m,n.Message.OneOf=function(e,t,n){r.call(this,e,t,n),this.fields=[]};var g=function(e,t,n,r,i){o.call(this,e,t,n,r,i),this.className="Enum",this.object=null};g.getName=function(e,t){for(var n,r=Object.keys(e),i=0;i<r.length;++i)if(e[n=r[i]]===t)return n;return null},(g.prototype=Object.create(o.prototype)).build=function(e){if(this.object&&!e)return this.object;for(var n=new t.Builder.Enum,r=this.getChildren(g.Value),i=0,o=r.length;i<o;++i)n[r[i].name]=r[i].id;return Object.defineProperty&&Object.defineProperty(n,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=n},n.Enum=g;var v=function(e,t,n,i){r.call(this,e,t,n),this.className="Enum.Value",this.id=i};v.prototype=Object.create(r.prototype),n.Enum.Value=v;var y=function(e,t,n,i){r.call(this,e,t,n),this.field=i};y.prototype=Object.create(r.prototype),n.Extension=y;var b=function(e,t,n,r){o.call(this,e,t,n,r),this.className="Service",this.clazz=null};(b.prototype=Object.create(o.prototype)).build=function(n){return this.clazz&&!n?this.clazz:this.clazz=function(t,n){for(var r=function(e){t.Builder.Service.call(this),this.rpcImpl=e||function(e,t,n){setTimeout(n.bind(this,Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")),0)}},i=r.prototype=Object.create(t.Builder.Service.prototype),o=n.getChildren(t.Reflect.Service.RPCMethod),a=0;a<o.length;a++)!function(t){i[t.name]=function(r,i){try{try{r=t.resolvedRequestType.clazz.decode(e.wrap(r))}catch(o){if(!(o instanceof TypeError))throw o}if(null===r||"object"!==typeof r)throw Error("Illegal arguments");r instanceof t.resolvedRequestType.clazz||(r=new t.resolvedRequestType.clazz(r)),this.rpcImpl(t.fqn(),r,(function(e,r){if(e)i(e);else{null===r&&(r="");try{r=t.resolvedResponseType.clazz.decode(r)}catch(o){}r&&r instanceof t.resolvedResponseType.clazz?i(null,r):i(Error("Illegal response type received in service method "+n.name+"#"+t.name))}}))}catch(o){setTimeout(i.bind(this,o),0)}},r[t.name]=function(e,n,i){new r(e)[t.name](n,i)},Object.defineProperty&&(Object.defineProperty(r[t.name],"$options",{value:t.buildOpt()}),Object.defineProperty(i[t.name],"$options",{value:r[t.name].$options}))}(o[a]);return Object.defineProperty&&(Object.defineProperty(r,"$options",{value:n.buildOpt()}),Object.defineProperty(i,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:n}),Object.defineProperty(i,"$type",{value:n})),r}(t,this)},n.Service=b;var _=function(e,t,n,i){r.call(this,e,t,n),this.className="Service.Method",this.options=i||{}};(_.prototype=Object.create(r.prototype)).buildOpt=a.buildOpt,n.Service.Method=_;var C=function(e,t,n,r,i,o,a,s){_.call(this,e,t,n,s),this.className="Service.RPCMethod",this.requestName=r,this.responseName=i,this.requestStream=o,this.responseStream=a,this.resolvedRequestType=null,this.resolvedResponseType=null};return C.prototype=Object.create(_.prototype),n.Service.RPCMethod=C,n}(i),i.Builder=function(e,t,r){var i=function(e){this.ns=new r.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},o=i.prototype;return i.isMessage=function(e){return"string"===typeof e.name&&"undefined"===typeof e.values&&"undefined"===typeof e.rpc},i.isMessageField=function(e){return"string"===typeof e.rule&&"string"===typeof e.name&&"string"===typeof e.type&&"undefined"!==typeof e.id},i.isEnum=function(e){return"string"===typeof e.name&&!("undefined"===typeof e.values||!Array.isArray(e.values)||0===e.values.length)},i.isService=function(e){return!("string"!==typeof e.name||"object"!==typeof e.rpc||!e.rpc)},i.isExtend=function(e){return"string"===typeof e.ref},o.reset=function(){return this.ptr=this.ns,this},o.define=function(e){if("string"!==typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach((function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new r.Namespace(this,this.ptr,e)),this.ptr=t}),this),this},o.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var n=[t];n.length>0;){if(t=n.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var o=t.shift();if(i.isMessage(o)){var a=new r.Message(this,this.ptr,o.name,o.options,o.isGroup,o.syntax),s={};o.oneofs&&Object.keys(o.oneofs).forEach((function(e){a.addChild(s[e]=new r.Message.OneOf(this,a,e))}),this),o.fields&&o.fields.forEach((function(e){if(null!==a.getChild(0|e.id))throw Error("duplicate or invalid field id in "+a.name+": "+e.id);if(e.options&&"object"!==typeof e.options)throw Error("illegal field options in "+a.name+"#"+e.name);var t=null;if("string"===typeof e.oneof&&!(t=s[e.oneof]))throw Error("illegal oneof in "+a.name+"#"+e.name+": "+e.oneof);e=new r.Message.Field(this,a,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,o.syntax),t&&t.fields.push(e),a.addChild(e)}),this);var c=[];if(o.enums&&o.enums.forEach((function(e){c.push(e)})),o.messages&&o.messages.forEach((function(e){c.push(e)})),o.services&&o.services.forEach((function(e){c.push(e)})),o.extensions&&("number"===typeof o.extensions[0]?a.extensions=[o.extensions]:a.extensions=o.extensions),this.ptr.addChild(a),c.length>0){n.push(t),t=c,c=null,this.ptr=a,a=null;continue}c=null}else if(i.isEnum(o))a=new r.Enum(this,this.ptr,o.name,o.options,o.syntax),o.values.forEach((function(e){a.addChild(new r.Enum.Value(this,a,e.name,e.id))}),this),this.ptr.addChild(a);else if(i.isService(o))a=new r.Service(this,this.ptr,o.name,o.options),Object.keys(o.rpc).forEach((function(e){var t=o.rpc[e];a.addChild(new r.Service.RPCMethod(this,a,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(a);else{if(!i.isExtend(o))throw Error("not a valid definition: "+JSON.stringify(o));if(a=this.ptr.resolve(o.ref,!0))o.fields.forEach((function(t){if(null!==a.getChild(0|t.id))throw Error("duplicate extended field id in "+a.name+": "+t.id);if(a.extensions){var n=!1;if(a.extensions.forEach((function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)})),!n)throw Error("illegal extended field id in "+a.name+": "+t.id+" (not within valid ranges)")}var i=t.name;this.options.convertFieldsToCamelCase&&(i=e.Util.toCamelCase(i));var o=new r.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+i,t.id,t.options),s=new r.Extension(this,this.ptr,t.name,o);o.extension=s,this.ptr.addChild(s),a.addChild(o)}),this);else if(!/\.?google\.protobuf\./.test(o.ref))throw Error("extended message "+o.ref+" is not defined")}o=null,a=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},o.import=function(t,r){var i="/";if("string"===typeof r){if(e.Util.IS_NODE&&(r=n(1135).resolve(r)),!0===this.files[r])return this.reset();this.files[r]=!0}else if("object"===typeof r){var o,a=r.root;if(e.Util.IS_NODE&&(a=n(1135).resolve(a)),(a.indexOf("\\")>=0||r.file.indexOf("\\")>=0)&&(i="\\"),o=e.Util.IS_NODE?n(1135).join(a,r.file):a+i+r.file,!0===this.files[o])return this.reset();this.files[o]=!0}if(t.imports&&t.imports.length>0){var s,c=!1;"object"===typeof r?(this.importRoot=r.root,c=!0,s=this.importRoot,r=r.file,(s.indexOf("\\")>=0||r.indexOf("\\")>=0)&&(i="\\")):"string"===typeof r?this.importRoot?s=this.importRoot:r.indexOf("/")>=0?""===(s=r.replace(/\/[^\/]*$/,""))&&(s="/"):r.indexOf("\\")>=0?(s=r.replace(/\\[^\\]*$/,""),i="\\"):s=".":s=null;for(var u=0;u<t.imports.length;u++)if("string"===typeof t.imports[u]){if(!s)throw Error("cannot determine import root");var l=t.imports[u];if("google/protobuf/descriptor.proto"===l)continue;if(l=e.Util.IS_NODE?n(1135).join(s,l):s+i+l,!0===this.files[l])continue;/\.proto$/i.test(l)&&!e.DotProto&&(l=l.replace(/\.proto$/,".json"));var d=e.Util.fetch(l);if(null===d)throw Error("failed to import '"+l+"' in '"+r+"': file not found");/\.json$/i.test(l)?this.import(JSON.parse(d+""),l):this.import(e.DotProto.Parser.parse(d),l)}else r?/\.(\w+)$/.test(r)?this.import(t.imports[u],r.replace(/^(.+)\.(\w+)$/,(function(e,t,n){return t+"_import"+u+"."+n}))):this.import(t.imports[u],r+"_import"+u):this.import(t.imports[u]);c&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&function e(t){t.messages&&t.messages.forEach((function(n){n.syntax=t.syntax,e(n)})),t.enums&&t.enums.forEach((function(e){e.syntax=t.syntax}))}(t);var p=this.ptr;return t.options&&Object.keys(t.options).forEach((function(e){p.options[e]=t.options[e]})),t.messages&&(this.create(t.messages),this.ptr=p),t.enums&&(this.create(t.enums),this.ptr=p),t.services&&(this.create(t.services),this.ptr=p),t.extends&&this.create(t.extends),this.reset()},o.resolveAll=function(){var n;if(null==this.ptr||"object"===typeof this.ptr.type)return this;if(this.ptr instanceof r.Namespace)this.ptr.children.forEach((function(e){this.ptr=e,this.resolveAll()}),this);else if(this.ptr instanceof r.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(n=(this.ptr instanceof r.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof r.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof r.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==e.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!(n=this.ptr.parent.resolve(this.ptr.requestName,!0))||!(n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,!(n=this.ptr.parent.resolve(this.ptr.responseName,!0))||!(n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf)&&!(this.ptr instanceof e.Reflect.Extension)&&!(this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},o.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"===typeof e?e.split("."):e,n=this.result,r=0;r<t.length;r++){if(!n[t[r]]){n=null;break}n=n[t[r]]}return n},o.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},o.toString=function(){return"Builder"},i.Message=function(){},i.Enum=function(){},i.Service=function(){},i}(i,i.Lang,i.Reflect),i.Map=function(e,t){var n=function(e,n){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=this.keyElem.valueFromString(r[i]),a=this.valueElem.verifyValue(n[r[i]]);this.map[this.keyElem.valueToString(o)]={key:o,value:a}}},r=n.prototype;function i(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}return r.clear=function(){this.map={}},r.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),n=t in this.map;return delete this.map[t],n},r.entries=function(){for(var e,t=[],n=Object.keys(this.map),r=0;r<n.length;r++)t.push([(e=this.map[n[r]]).key,e.value]);return i(t)},r.keys=function(){for(var e=[],t=Object.keys(this.map),n=0;n<t.length;n++)e.push(this.map[t[n]].key);return i(e)},r.values=function(){for(var e=[],t=Object.keys(this.map),n=0;n<t.length;n++)e.push(this.map[t[n]].value);return i(e)},r.forEach=function(e,t){for(var n,r=Object.keys(this.map),i=0;i<r.length;i++)e.call(t,(n=this.map[r[i]]).value,n.key,this)},r.set=function(e,t){var n=this.keyElem.verifyValue(e),r=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(n)]={key:n,value:r},this},r.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},r.has=function(e){return this.keyElem.valueToString(this.keyElem.verifyValue(e))in this.map},n}(0,i.Reflect),i.loadProto=function(e,t,n){return("string"===typeof t||t&&"string"===typeof t.file&&"string"===typeof t.root)&&(n=t,t=void 0),i.loadJson(i.DotProto.Parser.parse(e),t,n)},i.protoFromString=i.loadProto,i.loadProtoFile=function(e,t,n){if(t&&"object"===typeof t?(n=t,t=null):t&&"function"===typeof t||(t=null),t)return i.Util.fetch("string"===typeof e?e:e.root+"/"+e.file,(function(r){if(null!==r)try{t(null,i.loadProto(r,n,e))}catch(o){t(o)}else t(Error("Failed to fetch file"))}));var r=i.Util.fetch("object"===typeof e?e.root+"/"+e.file:e);return null===r?null:i.loadProto(r,n,e)},i.protoFromFile=i.loadProtoFile,i.newBuilder=function(e){return"undefined"===typeof(e=e||{}).convertFieldsToCamelCase&&(e.convertFieldsToCamelCase=i.convertFieldsToCamelCase),"undefined"===typeof e.populateAccessors&&(e.populateAccessors=i.populateAccessors),new i.Builder(e)},i.loadJson=function(e,t,n){return("string"===typeof t||t&&"string"===typeof t.file&&"string"===typeof t.root)&&(n=t,t=null),t&&"object"===typeof t||(t=i.newBuilder()),"string"===typeof e&&(e=JSON.parse(e)),t.import(e,n),t.resolveAll(),t},i.loadJsonFile=function(e,t,n){if(t&&"object"===typeof t?(n=t,t=null):t&&"function"===typeof t||(t=null),t)return i.Util.fetch("string"===typeof e?e:e.root+"/"+e.file,(function(r){if(null!==r)try{t(null,i.loadJson(JSON.parse(r),n,e))}catch(o){t(o)}else t(Error("Failed to fetch file"))}));var r=i.Util.fetch("object"===typeof e?e.root+"/"+e.file:e);return null===r?null:i.loadJson(JSON.parse(r),n,e)},i})?i.apply(t,o):i)||(e.exports=a)}).call(this,n(584))},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CRCoderUnarchiver=t.CRCoderUnarchiverCompletionHandler=void 0;var r=n(889),i=n(890),o=n(1116),a=n(904),s=n(1130),c=n(1127),u=n(1120),l=n(1123),d=n(1121),p=n(1128),f=n(906),h=n(1137),m=n(1138),g=n(1139),v=function(e,t,n){this.callback=e,this.dependency=t,this.value=n};t.CRCoderUnarchiverCompletionHandler=v;var y=function(){function e(){this.replica=null,this._document=null,this.uuidArray=[],this.keySet=[],this.typeSetForDecoding=[],this.currentDocument=null,this.allocedDocObjects=[],this.completionHandlers=[],o.CRCoder.registerCRClasses(),r.CRTable.registerWithCRCoder(),r.ICTable.registerWithCRCoder()}return Object.defineProperty(e.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),e.decodedDocumentFromData=function(t,n){return(new e).decodeDocumentFromData(t,n)},e.prototype.allocedObjectAtIndex=function(e){var t=this.currentDocument;if(!t||!t.object)return null;if(e>=(t.object||[]).length)return null;var n=this.allocedDocObjects[e];if(n)return n;var r=t.object[e];return(n=this.decodeDocObject(this,r))&&(this.allocedDocObjects[e]=n),n},e.prototype.decodeDocumentFromData=function(e,t){var n=this;this.replica=t,this.currentDocument={},this.completionHandlers=[];var i=null;if(this.currentDocument=r.decodeCRDocument(e),this.currentDocument&&this.currentDocument.object){this.uuidArray=[];for(var o=0,a=this.currentDocument.uuidItem||[];o<a.length;o++){var c=a[o],u=f.CRUUID.alloc().initWithUUIDBytes(new Uint8Array(c.toArrayBuffer())).autorelease();this.uuidArray.push(u)}var l=this.currentDocument.version?h.CRVectorTimestamp.decodeWithProtobufTimestamp(this,this.currentDocument.version):null,d=this.currentDocument.startVersion?h.CRVectorTimestamp.decodeWithProtobufTimestamp(this,this.currentDocument.startVersion):null;if(this.currentDocument.ttTimestamp){var m=g.TTCRVectorMultiTimestamp.decode(this.currentDocument.ttTimestamp,2);this._document=p.CRTTCompatibleDocument.alloc().initWithVersion_startVersion_rootObject_replica_topoTimestamp(l,d,null,t,m).autorelease()}else this._document=s.CRDocument.alloc().initWithVersion_startVersion_rootObject_replica(l,d,null,t).autorelease();this.typeSetForDecoding.length=0;for(var v=0,y=this.currentDocument.typeItem||[];v<y.length;v++){var b=y[v];this.typeSetForDecoding.push(b)}this.keySet.length=0;for(var _=0,C=this.currentDocument.keyItem||[];_<C.length;_++){var I=C[_];this.keySet.push(I)}this.allocedDocObjects=[],(this.currentDocument.object||[]).forEach((function(e,t){n.allocedObjectAtIndex(t)})),this.sortCompletionHandlers();for(var w=0,E=this.completionHandlers;w<E.length;w++)E[w].callback(this);i=this.allocedDocObjects[0],this.typeSetForDecoding.length=0,this.keySet.length=0,this.allocedDocObjects.length=0}return this.completionHandlers.length=0,this.currentDocument=null,this.document.rootObject=i,this.document},e.prototype.currentObjectIDForKey=function(e,t){var n=this.indexForKey(e);if(-1===n)return null;for(var r=0;r<(t.mapEntry||[]).length;r++){var i=(t.mapEntry||[])[r];if("number"===typeof i.key&&i.key===n&&i.value)return i.value}return null},e.prototype.decodeObjectForKey=function(e,t){var n=this.currentObjectIDForKey(e,t);return n?this.decodeObjectForProtobufObjectID(n):null},e.prototype.decodeObjectForProtobufObjectID=function(e){return"number"===typeof e.objectIndex?this.allocedObjectAtIndex(e.objectIndex):null},e.prototype.decodeStringForKey=function(e,t){var n=this.currentObjectIDForKey(e,t);if(n&&"string"===typeof n.stringValue)return n.stringValue;throw new Error("Unable to find string for key: "+e)},e.prototype.decodeUUIDForKey=function(e,t){var n=this.decodeStringForKey(e,t);return f.CRUUID.alloc().initWithUUIDString(n).autorelease()},e.prototype.decodeDoubleForKey=function(e,t){var n=this.currentObjectIDForKey(e,t);if(n&&"number"===typeof n.doubleValue)return n.doubleValue;throw new Error("Unable to find double for key: "+e)},e.prototype.decodeLong=function(e){return e.toNumber()},e.prototype.decodeInt32ForKey=function(e,t){var n=this.currentObjectIDForKey(e,t);if(n&&n.integerValue)return this.decodeLong(n.integerValue);throw new Error("Unable to find integer for key: "+e)},e.prototype.decodeInt64ForKey=function(e,t){var n=this.currentObjectIDForKey(e,t);if(n&&n.integerValue)return this.decodeLong(n.integerValue);throw new Error("Unable to find integer for key: "+e)},e.prototype.decodeUInt32ForKey=function(e,t){var n=this.currentObjectIDForKey(e,t);if(n&&n.unsignedIntegerValue)return this.decodeLong(n.unsignedIntegerValue);throw new Error("Unable to find integer for key: "+e)},e.prototype.decodeUInt64ForKey=function(e,t){var n=this.currentObjectIDForKey(e,t);if(n&&n.unsignedIntegerValue)return n.unsignedIntegerValue;throw new Error("Unable to find integer for key: "+e)},e.prototype.decodeUUIDFromUUIDIndex=function(e){var t=this.decodeLong(e);if(t>=this.uuidArray.length)throw new Error("Index "+e+" out of bounds");return this.uuidArray[t]},e.prototype.decodeReplica=function(e){return this.decodeUUIDFromUUIDIndex(e)},e.prototype.hasDecodableValueForKey=function(e,t){return null!==this.currentObjectIDForKey(e,t)},e.prototype.addDecoderCompletionHandler=function(e,t,n){this.completionHandlers.push(new v(e,t,n))},e.prototype.sortCompletionHandlers=function(){for(var e=[];this.completionHandlers.length>0;){for(var t=null,n=0,r=this.completionHandlers;n<r.length;n++)if(null===(s=r[n]).dependency){t=s;break}if(!t)throw new Error("No topological sort of completion handlers.");e.push(t);var i=this.completionHandlers.indexOf(t);this.completionHandlers.splice(i,1);for(var o=0,a=this.completionHandlers;o<a.length;o++){var s;(s=a[o]).dependency===t.value&&(s.dependency=null)}}this.completionHandlers=e},e.prototype.indexForKey=function(e){if(!this.keySet)throw new Error("KeySet should have been allocated");return this.keySet.indexOf(e)},e.prototype.decodeDocObject=function(e,t){function n(t,n){if(!t)throw new Error("contents are invalid");return n(e,t)}switch(t.contents){case"registerLatest":return n(t.registerLatest,u.CRRegisterLatest.decodeWithProtobufRegisterLatest);case"timestamp":return n(t.timestamp,d.CRTimestamp.decodeWithProtobufTimestamp);case"set":return n(t.set,l.CRSet.decodeWithSet);case"dictionary":return n(t.dictionary,a.CRDictionary.decodeWithDictionary);case"vectorTimestamp":return n(t.vectorTimestamp,h.CRVectorTimestamp.decodeWithProtobufTimestamp);case"stringArray":return n(t.stringArray,m.TTArray.decodeWithStringArray);case"array":return n(t.array,i.CRArray.decodeWithArray);case"tsOrderedSet":return n(t.tsOrderedSet,r.CRTombstoneOrderedSet.decodeWithTombstoneOrderedSet);case"string":return n(t.string,c.CRMergeableAttributedString.decodeWithProtobufString);case"custom":if(!t.custom)throw new Error("contents are invalid");var s=t.custom.type;if("number"!==typeof s)throw new Error("Type index not set");var p=this.typeSetForDecoding[s];if(!p)throw new Error("type not found");var f=o.CRCoder.typeToClassDict.get(p);if(!f)throw new Error("Did not find class decoder for type: "+p);return f(this,t.custom);default:throw new Error("Unsupported object type: "+t.contents)}},e}();t.CRCoderUnarchiver=y},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CRVectorTimestamp=t.CRVectorTimestampComparison=void 0;var i,o=n(891),a=n(1121),s=n(906);!function(e){e[e.Same=0]="Same",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"}(i=t.CRVectorTimestampComparison||(t.CRVectorTimestampComparison={}));var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._clock=new Map,t}return r(t,e),t.prototype.init=function(){return this},t.prototype.free=function(){this._clock.forEach((function(e){return e[0].release()})),this._clock.clear(),e.prototype.free.call(this)},t.prototype.encode=function(e){return{contents:"vectorTimestamp",vectorTimestamp:this.encodeIntoProtobufTimestamp(e)}},t.prototype.encodeIntoProtobufTimestamp=function(e){var t=[];return this._clock.forEach((function(n){var r=n[0],i=n[1],o=n[2],a={replicaIndex:e.encodeReplica(r),clock:e.encodeLong(i),subclock:e.encodeLong(o)};t.push(a)})),{element:t}},t.decodeWithProtobufTimestamp=function(e,n){for(var r=t.alloc().init().autorelease(),i=0,o=n.element||[];i<o.length;i++){var a=o[i];if(a.replicaIndex){var s=a.replicaIndex,c=e.decodeReplica(s),u=[c.retain(),0,0];if(a.clock){var l=a.clock;u[1]=e.decodeLong(l)}if(a.subclock){var d=a.subclock;u[2]=e.decodeLong(d)}r._clock.set(c.UUIDString,u)}}return r},t.prototype.copy=function(){var e=t.alloc().init().autorelease();return e.mergeWith(this),e},t.prototype.isEqual=function(e){return e instanceof t&&this.compare(e)===i.Same},Object.defineProperty(t.prototype,"length",{get:function(){return this._clock.size},enumerable:!1,configurable:!0}),t.prototype.timestampForReplica=function(e){return a.CRTimestamp.alloc().initWithReplica_andCounter(e,this.clockForReplica(e)).autorelease()},t.prototype.clockForReplica=function(e){if(!e)return 0;var t=this._clock.get(e.UUIDString);return t?t[1]:0},t.prototype.subclockForReplica=function(e){var t=this._clock.get(e.UUIDString);return t?t[2]:0},t.prototype.clockElementForReplica=function(e){var t=this._clock.get(e.UUIDString);return t?[t[1],t[2]]:null},t.prototype.setClockForReplica=function(e,t){var n=this._clock.get(t.UUIDString);n||(n=[t.retain(),0,0]),n[1]=e,this._clock.set(t.UUIDString,n)},t.prototype.setClockAndSubclockForReplica=function(e,t,n){var r=this._clock.get(n.UUIDString);r?(r[1]=e,r[2]=t):r=[n.retain(),e,t],this._clock.set(n.UUIDString,r)},t.prototype.incrementClockForReplica=function(e){this.setClockForReplica(this.clockForReplica(e)+1,e)},t.prototype.maxClockForReplica=function(e,t){var n=this._clock.get(t.UUIDString);n||(n=[t.retain(),0,0]),n[1]=Math.max(n[1],e),this._clock.set(t.UUIDString,n)},t.prototype.removeReplica=function(e){var t=e.UUIDString,n=this._clock.get(t);n&&n[0].release(),this._clock.delete(t)},t.prototype.allUUIDs=function(){var e=[];return this._clock.forEach((function(t){var n=t[0];return e.push(n)})),e},t.prototype.sortedUUIDs=function(){var e=[];return this._clock.forEach((function(t){var n=t[0];return e.push(n)})),e.sort((function(e,t){return s.CRUUID.compare(e,t)}))},t.prototype.compare=function(e){for(var t=!1,n=!1,r=new Set,o=0,a=this.allUUIDs();o<a.length;o++){var s=a[o];r.add(s)}for(var c=0,u=e.allUUIDs();c<u.length;c++)s=u[c],r.add(s);var l=[];r.forEach((function(e){return l.push(e)}));for(var d=0,p=l;d<p.length;d++){s=p[d];var f=this.clockElementForReplica(s)||[0,0],h=e.clockElementForReplica(s)||[0,0];if(f[0]<h[0]?t=!0:f[0]>h[0]?n=!0:f[1]<h[1]?t=!0:f[1]>h[1]&&(n=!0),t&&n)break}return(t?i.Ascending:0)|(n?i.Descending:0)},t.prototype.minus=function(e){for(var t=0,n=e.allUUIDs();t<n.length;t++){var r=n[t],i=this.clockElementForReplica(r)||[0,0],o=e.clockElementForReplica(r)||[0,0];if(i[0]<o[0]||i[0]===o[0]&&i[1]<o[1]){var a=r.UUIDString,s=this._clock.get(a);s&&s[0].release(),this._clock.delete(a)}}},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new TypeError("CRVectorTimestamp cannot merge with non-CRVectorTimestamp type.");for(var n=0,r=e.allUUIDs();n<r.length;n++){var i=r[n],o=this.clockElementForReplica(i)||[0,0],a=e.clockElementForReplica(i)||[0,0];o[0]>a[0]||o[0]===a[0]&&o[1]>a[1]?this.setClockAndSubclockForReplica(o[0],o[1],i):this.setClockAndSubclockForReplica(a[0],a[1],i)}},t.prototype.deltaSince=function(e,t){throw new Error("Cannot calculate deltas for CRVectorTimestamp instances.")},t.prototype.realizeLocalChanges=function(e){},Object.defineProperty(t.prototype,"tombstone",{get:function(){throw new Error("Cannot tombstone a non-value / non-identified object.")},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){},t.prototype.setDocument=function(e){},t.prototype.toString=function(){for(var e="[\n",t=0,n=this.sortedUUIDs();t<n.length;t++){var r=n[t],i=this._clock.get(r.UUIDString)||[r,0,0];e+="    "+r+" "+i[1]+" "+i[2]+"\n"}return e+"]\n"},t}(o.Refcounted);t.CRVectorTimestamp=c,c.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TTArray=void 0;var o=n(907),a=n(891),s=i(n(887)),c=n(1127),u=n(1128),l=n(906),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.self=null,t.stringCmd=null,t}return r(t,e),t.create=function(e,t){var n=this.alloc();return n.self=e.retain(),n.stringCmd=t.retain(),n.autorelease()},t.prototype.free=function(){this.self.release(),this.stringCmd.release(),this.self=null,this.stringCmd=null,e.prototype.free.call(this)},t.prototype.apply=function(){this.stringCmd.applyToString(this.self.contents)},t}(a.Refcounted);d.initializeRefcounted();var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._contents=null,t._document=null,t._delegate=null,t}return r(t,e),Object.defineProperty(t.prototype,"delegate",{get:function(){return this._delegate},set:function(e){this._delegate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this._document},set:function(e){this._document=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contents",{get:function(){return this._contents},set:function(e){this._contents!==e&&(this._contents&&this._contents.release(),this._contents=e.retain())},enumerable:!1,configurable:!0}),t.prototype.init=function(){return this.initWithContents(c.CRMergeableAttributedString.alloc().init().autorelease())},t.prototype.initWithDocument=function(e){var t=this.initWithContents(c.CRMergeableAttributedString.alloc().initWithReplicaID(e.replica).autorelease());return t&&(t.document=e),t},t.prototype.initWithContents=function(e){return e.delegate=this,this.contents=e,this},t.prototype.free=function(){this._contents&&this._contents.release(),this._document=null,this._delegate=null,this._contents=null,e.prototype.free.call(this)},t.prototype.encode=function(e){return{contents:"stringArray",stringArray:this.encodeAsStringArray(e)}},t.prototype.encodeAsStringArray=function(e){var t=this;return{contents:this.contents.encodeAsProtobufString(e),attachments:function(){for(var n=[],r=0,i=t.length;r<i;++r){var o=t.get(r);o&&n.push({attachmentIndex:e.encodeLong(r),contents:s.default.wrap(o.bytes())})}return n}()}},t.decodeWithStringArray=function(e,n){if(n.contents){for(var r=c.CRMergeableAttributedString.decodeWithProtobufString(e,n.contents),i=0,a=n.attachments||[];i<a.length;i++){var s=a[i];if(s.attachmentIndex&&s.contents){var d=e.decodeLong(s.attachmentIndex),p=s.contents.toArrayBuffer(),f=l.CRUUID.alloc().initWithUUIDBytes(new Uint8Array(p)).autorelease();r.attributedString.setAttributes_range(o.TTAttrDict.create().setTTArrayAttachment(f.UUIDString),o.NSMakeRange(d,1))}}return t.alloc().initWithContents(r).autorelease()}return r=c.CRMergeableAttributedString.alloc().initWithReplicaID(e.document.replica).autorelease(),e.document instanceof u.CRTTCompatibleDocument&&r.setDocument(e.document),t.alloc().initWithContents(r).autorelease()},Object.defineProperty(t.prototype,"length",{get:function(){return this.contents.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"replicaUUID",{get:function(){return this.contents.replicaUUID},enumerable:!1,configurable:!0}),t.prototype.getAttachmentAtIndex=function(e){var t=this.contents.attributesAtIndex_effectiveRange(e,null);return t&&null!==t.TTArrayAttachment?l.CRUUID.alloc().initWithUUIDString(t.TTArrayAttachment).autorelease():null},t.prototype.get=function(e){return this.getAttachmentAtIndex(e)},t.prototype.push=function(e){this.insert(e,this.length)},t.prototype.indexOf=function(e){for(var t=0;t<this.length;++t){var n=this.get(t);if(n&&0===l.CRUUID.compare(n,e))return t}return-1},t.prototype.insert=function(e,t){var n=o.NSAttributedString.alloc().initWithString_attributes("\ufffc",o.TTAttrDict.create().setTTArrayAttachment(e.UUIDString)).autorelease();this.contents.insertAttributedString_atIndex(n,t)},t.prototype.pop=function(){var e=this.length;e>0&&this.delete(e-1)},t.prototype.delete=function(e){this.contents.deleteCharactersInRange(o.NSMakeRange(e,1))},t.prototype.set=function(e,t){this.delete(e),this.insert(t,e)},t.prototype.mergeWith=function(e){if(!(e instanceof t))throw new TypeError("TTArray cannot merge with non-TTArray type.");this.contents.mergeWith(e.contents)},t.prototype.deltaSince=function(e,t){return this},t.prototype.realizeLocalChanges=function(e){this.contents.realizeLocalChanges(e)},Object.defineProperty(t.prototype,"tombstone",{get:function(){return t.alloc().initWithContents(this.contents).autorelease()},enumerable:!1,configurable:!0}),t.prototype.walkGraph=function(e){this.contents.walkGraph(e)},t.prototype.setDocument=function(e){this._document=e,this.contents.setDocument(e)},t.prototype.forEach=function(e){for(var t=0,n=this.length;t<n;++t)e(this.get(t),t)},t.prototype.beginEditing=function(){},t.prototype.endEditing=function(){},t.prototype.edited_range_changeInLength=function(e,t,n){},t.prototype.addUndoCommand=function(e){this._delegate&&this._delegate.addUndoCommand(d.create(this,e))},Object.defineProperty(t.prototype,"wantsUndoCommands",{get:function(){return!!this._delegate&&this._delegate.wantsUndoCommands},enumerable:!1,configurable:!0}),t}(a.Refcounted);t.TTArray=p,p.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTCRVectorMultiTimestamp=t.TTCRVectorTimestamp=void 0;var i=n(907),o=n(906),a=n(1137),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._crTimestamp=null,t}return r(t,e),Object.defineProperty(t.prototype,"crTimestamp",{get:function(){return this._crTimestamp},set:function(e){this._crTimestamp!==e&&(this._crTimestamp&&this._crTimestamp.release(),this._crTimestamp=e?e.retain():e)},enumerable:!1,configurable:!0}),t.prototype.init=function(){var t=e.prototype.init.call(this);return t.crTimestamp=a.CRVectorTimestamp.alloc().init().autorelease(),t},t.prototype.free=function(){this.crTimestamp.release(),this.crTimestamp=null,e.prototype.free.call(this)},t.prototype.copy=function(){var e=t.alloc().init();return e.mergeWithTimestamp(this),e},t.prototype.clockElementForUUID=function(e){var t=this.crTimestamp.clockElementForReplica(e);return t?i.TTVectorTimestampElement.create(t[0],t[1]):null},t.prototype.clockForUUID=function(e){var t=this.clockElementForUUID(e);return t?t.clock:0},t.prototype.subclockForUUID=function(e){var t=this.clockElementForUUID(e);return t?t.subclock:0},t.prototype.setClock_forUUID=function(e,t){this.crTimestamp.setClockForReplica(e,t)},t.prototype.setClock_subclock_forUUID=function(e,t,n){this.crTimestamp.setClockAndSubclockForReplica(e,t,n)},t.prototype.allUUIDs=function(){return this.crTimestamp.allUUIDs()},t.prototype.sortedUUIDs=function(){return this.crTimestamp.sortedUUIDs()},t}(i.TTVectorTimestamp);t.TTCRVectorTimestamp=s,s.initializeRefcounted();var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.initWithCapacity=function(t){for(var n=[],r=0;r<t;++r)n.push(s.alloc().init().autorelease());return e.prototype.initWithTimestamps.call(this,n)},t.prototype.copy=function(){var e=t.alloc().init();return e.mergeWithTimestamp(this),e},t.prototype.isDocumentShared=function(){return!0},t.decode=function(e,n){for(var r=t.alloc().initWithCapacity(n).autorelease(),i=0,a=e.clock.length;i<a;++i){var s=e.clock[i],c=s.replicaUUID;if(!c)throw new Error("TTVectorMultiTimestamp clock requires uuids.");var u=o.CRUUID.alloc().initWithUUIDBytes(new Uint8Array(c.toArrayBuffer())).autorelease(),l=s.replicaClock.length;if(l!==n)throw new Error("TTVectorMultiTimestamp requires the same number of clocks as\n                    capacity "+l+" !== "+n);for(var d=0;d<l;++d){var p=s.replicaClock[d].clock||0,f=s.replicaClock[d].subclock||0;r.setClock_subclock_forUUID_atIndex(p,f,u,d)}}return r},t.prototype.encode=function(){for(var e=[],t=0,n=this.sortedUUIDs();t<n.length;t++){for(var r=n[t],i=[],o=0,a=this.timestamps.length;o<a;++o){var s=this.clockElementForUUID_atIndex(r,o);i.push({clock:s&&s.clock>0?s.clock:void 0,subclock:s&&s.subclock>0?s.subclock:void 0})}e.push({replicaUUID:r.bytes(),replicaClock:i})}return{clock:e}},t}(i.TTVectorMultiTimestamp);t.TTCRVectorMultiTimestamp=c,c.initializeRefcounted()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CRDTManager=void 0;var r=n(891),i=function(){function e(){this.lastRev=0,this.retains=new Map,this.data=new Map,this.revs=new Map,this.lru=new Array,this.destroyListeners=new Map,this.mergeTraces=[],this.maxMergeTraceCount=3,this.lruMaxSize=10}return e.prototype.load=function(e,t){e||r.fatalError("CRDTManager#load: no id given",t);var n=this.data.get(e);if(!n||n instanceof Error)this.data.set(e,t instanceof Error?t:t.retain()),this.revs.set(e,0);else if(!(t instanceof Error)){var i={oursBefore:this.snapshot(n),theirsBefore:this.snapshot(t)};this.mergeTraces.unshift(i),this.mergeTraces.length=this.maxMergeTraceCount,this.merge(n,t),i.oursAfter=this.snapshot(n)}return this.rev(e)},e.prototype.retain=function(e){this.retains.has(e)||this.retains.set(e,0),this.retains.set(e,this.retains.get(e)+1)},e.prototype.release=function(e){if(!this.retains.has(e))throw new Error("CRDTManager#release: overrelease");var t=this.retains.get(e)-1;0===t?(this.retains.delete(e),this.trimLRU()):this.retains.set(e,t)},e.prototype.addDestroyListener=function(e,t){this.destroyListeners.has(e)||this.destroyListeners.set(e,[]),this.destroyListeners.get(e).push(t)},e.prototype.use=function(e){if(this.data.has(e)){var t=this.lru.indexOf(e);t>=0&&this.lru.splice(t,1),this.lru.unshift(e),this.trimLRU()}},e.prototype.find=function(e){return this.use(e),this.data.get(e)||null},e.prototype.rev=function(e){return this.use(e),this.revs.set(e,++this.lastRev),this.revs.get(e)},e.prototype.trimLRU=function(){for(var e=this.lru.length-1;e>=this.lruMaxSize;){var t=this.lru[e],n=this.data.get(t);if(n){if(n instanceof Error){e--;continue}1===n.refCount+(this.retains.get(t)||0)&&(this.data.delete(t),this.revs.delete(t),n.release(),this.lru.splice(e,1),this.didRelease(t)),e--}else this.lru.splice(e,1),e--}},e.prototype.destroy=function(e){var t=this.data.get(e);if(!t)return!1;t instanceof Error||t.release(),this.data.delete(e),this.revs.delete(e);var n=this.lru.indexOf(e);return n>=0&&this.lru.splice(n,1),this.didRelease(e),!0},e.prototype.didRelease=function(e){var t=this.destroyListeners.get(e);if(t){for(var n=0,r=t;n<r.length;n++)(0,r[n])(e);this.destroyListeners.delete(e)}},e}();t.CRDTManager=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ICTableVersionedDocument=void 0;var o=i(n(887)),a=n(1131),s=n(1136),c=n(1129),u=n(1128),l=n(906),d=n(1137),p=n(1126),f=n(1145),h=function(e){function t(){var t=e.call(this)||this;return t._table=null,t._innerTableDocument=null,t._replica=null,t}return r(t,e),t.prototype.getSerializationVersion=function(){return 0},t.prototype.getMinimumSupportedVersion=function(){return 0},Object.defineProperty(t.prototype,"innerTableDocument",{get:function(){return this._innerTableDocument},set:function(e){e!==this._innerTableDocument&&(this._innerTableDocument&&this._innerTableDocument.release(),this._innerTableDocument=e?e.retain():e)},enumerable:!1,configurable:!0}),t.prototype.free=function(){this._table&&this._table.release(),this._table=null,this._innerTableDocument&&this._innerTableDocument.release(),this._innerTableDocument=null,this._replica&&this._replica.release(),this._replica=null,e.prototype.free.call(this)},t.tableDoc=function(e,n){void 0===e&&(e=0),void 0===n&&(n=0);var r=t.alloc().init().autorelease();r.replica=l.CRUUID.UUID();for(var i=r.table,o=0;o<e;++o)i.insertColumn(o);for(o=0;o<n;++o)i.insertRow(o);return r},t.prototype.mergeWithTableVersionedDocument=function(e){switch(this.table.document.mergeWithDocument(e.table.document)){case c.CRMergeResult.Updated:return f.TTMergingResult.Updated;case c.CRMergeResult.NoChange:return f.TTMergingResult.NoChange;case c.CRMergeResult.Fail:return f.TTMergingResult.Fail}},t.serializationVersion=function(){return 0},t.minimumSupportedVersion=function(){return 0},Object.defineProperty(t.prototype,"replica",{get:function(){return this._replica||l.CRUUID.UUID()},set:function(e){this._replica!==e&&(this._replica&&this._replica.release(),this._replica=e.retain())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"table",{get:function(){if(this._table)return this._table;this.innerTableDocument=u.CRTTCompatibleDocument.alloc().initWithVersion_startVersion_rootObject_replica(d.CRVectorTimestamp.alloc().init().autorelease(),null,null,this.replica).autorelease();var e=p.ICTable.alloc().initWithDocument(this.innerTableDocument).autorelease();return this.table=e,this.innerTableDocument.rootObject=this._table,e},set:function(e){this._table!==e&&(this._table&&this._table.release(),this._table=e.retain())},enumerable:!1,configurable:!0}),t.prototype.mergeVersion=function(e,t){var n=s.CRCoderUnarchiver.decodedDocumentFromData(t,l.CRUUID.UUID());this.innerTableDocument?this.innerTableDocument.mergeWithDocument(n):(this.innerTableDocument=n,this.table=this.innerTableDocument.rootObject)},t.prototype.serializeCurrentVersion=function(){return this._innerTableDocument?(this._innerTableDocument.realizeLocalChanges(),[this.getSerializationVersion(),a.CRCoderArchiver.encodedDataWithDocument(this._innerTableDocument)]):[this.getSerializationVersion(),new o.default(0)]},t}(f.TTVersionedDocument);t.ICTableVersionedDocument=h,h.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TTVersionedDocument=t.versionedDocumentSerializationVersion=t.TTMergingResult=void 0;var a,s=n(891),c=o(n(887)),u=n(1132);!function(e){e[e.Fail=0]="Fail",e[e.NoChange=1]="NoChange",e[e.Updated=2]="Updated"}(a=t.TTMergingResult||(t.TTMergingResult={})),t.versionedDocumentSerializationVersion=0;var l=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._documentArchive=null,t}return r(n,e),Object.defineProperty(n.prototype,"futureVersionCount",{get:function(){return this._documentArchive.version?this._documentArchive.version.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxDocumentVersion",{get:function(){if(this._documentArchive.version&&this._documentArchive.version.length>0){var e=this._documentArchive.version[0].serializationVersion;return"number"===typeof e?e:this.getSerializationVersion()}return this.getSerializationVersion()},enumerable:!1,configurable:!0}),n.prototype.init=function(){return this._documentArchive={serializationVersion:t.versionedDocumentSerializationVersion,version:[]},this},n.prototype.initWithBase64=function(e){return this._documentArchive=u.decodeVersionedDocument(e),this.loadData(this._documentArchive),this},n.prototype.initWithData=function(e){return this._documentArchive=u.decodeVersionedDocument(e),this.loadData(this._documentArchive),this},n.prototype.initWithArchive=function(e){return this.loadArchive(e),this},n.prototype.free=function(){this._documentArchive=null,e.prototype.free.call(this)},n.prototype.loadData=function(e){if(e){if("number"!==typeof e.serializationVersion||e.serializationVersion!==t.versionedDocumentSerializationVersion)throw new Error("TTVersionedDocument is wrong versionedDocumentSerializationVersion\n                "+e.serializationVersion+" != "+t.versionedDocumentSerializationVersion);this.loadArchive(e)}},n.prototype.loadArchive=function(e){for(var t=this.getSerializationVersion(),n=-1,r=-1,i=e.version?e.version.length:0,o=0;o<i;++o){var a=(u=e.version[o]).serializationVersion||0,s=u.minimumSupportedVersion||0;if(a<=t&&r<0&&(r=o),a>=t&&s<=t)n=o;else if(a<t){n<0&&(n=o);break}}if(!(n>=0))throw new Error("TTVersionedDocument did not load any compatible version.");for(o=n;o<i;++o){a=(u=e.version[o]).serializationVersion||0,s=u.minimumSupportedVersion||0;var u,l=u.data||new c.default(0);if(a<t)this.mergeVersion(a,l);else if(a===t)this.mergeVersion(a,l);else{if(!(s<=t))throw new Error("Should not attempt to load invalid version.");this.mergeVersion(a,l)}}r>=0&&e.version&&(e.version=e.version.slice(r))},n.prototype.saveToArchive=function(){var e=t.versionedDocumentSerializationVersion,n=this._documentArchive.version?i(this._documentArchive.version):[];return n.push(this.saveCurrentVersion()),u.encodeVersionedDocument({serializationVersion:e,version:n})},n.prototype.saveCurrentVersion=function(){var e=this.getMinimumSupportedVersion(),t=this.serializeCurrentVersion(),n=t[0],r=t[1];if(e>n)throw new Error("Cannot have a min supported version greater than the serialized version.");return{minimumSupportedVersion:e,serializationVersion:n,data:r}},n.prototype.mergeWithVersionedDocument=function(e){return e._documentArchive.version?this._documentArchive.version=i(e._documentArchive.version):this._documentArchive.version=void 0,a.NoChange},n}(s.Refcounted);t.TTVersionedDocument=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TTMergeableStringVersionedDocument=void 0;var i=n(907),o=n(1132),a=n(1145),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._mergeableString=null,t}return r(t,e),t.prototype.getSerializationVersion=function(){return 0},t.prototype.getMinimumSupportedVersion=function(){return 0},Object.defineProperty(t.prototype,"mergeableString",{get:function(){return this._mergeableString},set:function(e){e!==this._mergeableString&&(this._mergeableString&&this._mergeableString.release(),this._mergeableString=e?e.retain():e)},enumerable:!1,configurable:!0}),t.prototype.free=function(){this._mergeableString&&this._mergeableString.release(),this._mergeableString=null,e.prototype.free.call(this)},t.prototype.initWithData_andReplicaID=function(e,t){var n=this.init();return n&&(this.mergeableString=i.TTMergeableAttributedString.alloc().initWithReplicaID(t).autorelease(),n.loadData(o.decodeVersionedDocument(e))),n},t.prototype.initWithMergeableString=function(e){var t=this.init();return t&&(this.mergeableString=e,t.loadData(null)),t},t.prototype.initWithArchive_andReplicaID=function(e,t){var n=this.init();return n&&(this.mergeableString=i.TTMergeableAttributedString.alloc().initWithReplicaID(t).autorelease(),n.loadArchive(e)),n},t.prototype.mergeWithStringVersionedDocument=function(t){var n=this.mergeableString.mergeWithString(t.mergeableString);return n!==a.TTMergingResult.Fail&&e.prototype.mergeWithVersionedDocument.call(this,t),n},t.prototype.mergeVersion=function(e,t){var n=o.decodeTTString(t),r=i.TTMergeableAttributedString.alloc().initWithArchive_andReplicaID(n,null).autorelease();r&&this.mergeableString.mergeWithString(r)},t.prototype.serializeCurrentVersion=function(){var e=this.getSerializationVersion(),t=this.mergeableString.saveToArchive();return[e,o.encodeTTString(t)]},t}(a.TTVersionedDocument);t.TTMergeableStringVersionedDocument=s,s.initializeRefcounted()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TopoTextManager=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.snapshot=function(e){return e.mergeableString.saveToArchive()},t.prototype.merge=function(e,t){e.mergeableString.mergeWithString(t.mergeableString)},t}(n(1141).CRDTManager);t.TopoTextManager=i},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){this.name=e,this.version=t,this.os=n};t.BrowserInfo=r;var i=function(t){this.version=t,this.name="node",this.os=e.platform};t.NodeInfo=i;var o=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};t.BotInfo=o;var a=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],s=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function c(e){var t=""!==e&&a.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1);if(!t)return null;var i=t[0],s=t[1];if("searchbot"===i)return new o;var c=s[1]&&s[1].split(/[._]/).slice(0,3);return c?c.length<3&&(c=n(c,function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-c.length))):c=[],new r(i,c.join("."),u(e))}function u(e){for(var t=0,n=s.length;t<n;t++){var r=s[t],i=r[0];if(r[1].test(e))return i}return null}function l(){return"undefined"!==typeof e&&e.version?new i(e.version.slice(1)):null}t.detect=function(e){return e?c(e):"undefined"!==typeof navigator?c(navigator.userAgent):l()},t.parseUserAgent=c,t.detectOS=u,t.getNodeVersion=l}).call(this,n(584))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(1219),i=n(1220),o=n(1228);o="function"===typeof o.default?o.default:o;var a={lowerCaseAttributeNames:!1};function s(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(o(e,(t=t||{}).htmlparser2||a),t)}s.domToReact=r,s.htmlToDOM=o,s.attributesToProps=i,s.Element=n(1233).Element,e.exports=s,e.exports.default=s},function(e,t,n){var r=n(572),i=n(1220),o=n(1223),a=o.setStyleProp,s=o.canTextBeChildOfNode;function c(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var o,u,l,d,p,f=(n=n||{}).library||r,h=f.cloneElement,m=f.createElement,g=f.isValidElement,v=[],y="function"===typeof n.replace,b=n.trim,_=0,C=t.length;_<C;_++)if(o=t[_],y&&g(l=n.replace(o)))C>1&&(l=h(l,{key:l.key||_})),v.push(l);else if("text"!==o.type){switch(d=o.attribs,c(o)?a(d.style,d):d&&(d=i(d)),p=null,o.type){case"script":case"style":o.children[0]&&(d.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?d.defaultValue=o.children[0].data:o.children&&o.children.length&&(p=e(o.children,n));break;default:continue}C>1&&(d.key=_),v.push(m(o.name,d,p))}else{if((u=!o.data.trim().length)&&o.parent&&!s(o.parent))continue;if(b&&u)continue;v.push(o.data)}return 1===v.length?v[0]:v}},function(e,t,n){var r=n(1221),i=n(1223);function o(e){return r.possibleStandardNames[e]}e.exports=function(e){var t,n,a,s,c,u={},l=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(a=e[t],r.isCustomAttribute(t))u[t]=a;else if(s=o(n=t.toLowerCase()))switch(c=r.getPropertyInfo(s),"checked"!==s&&"value"!==s||l||(s=o("default"+n)),u[s]=a,c&&c.type){case r.BOOLEAN:u[s]=!0;break;case r.OVERLOADED_BOOLEAN:""===a&&(u[s]=!0)}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(u[t]=a);return i.setStyleProp(e.style,u),u}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}Object.defineProperty(t,"__esModule",{value:!0});var o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){o[e]=new i(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t,n,a=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];o[s]=new i(s,1,!1,c,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){o[e]=new i(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){o[e]=new i(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((function(e){o[e]=new i(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){o[e]=new i(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){o[e]=new i(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){o[e]=new i(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){o[e]=new i(e,5,!1,e.toLowerCase(),null,!1,!1)}));var a=/[\-\:]([a-z])/g,s=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((function(e){var t=e.replace(a,s);o[t]=new i(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(a,s);o[t]=new i(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(a,s);o[t]=new i(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){o[e]=new i(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new i("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){o[e]=new i(e,1,!1,e.toLowerCase(),null,!0,!0)}));var c=n(1222),u=c.CAMELCASE,l=c.SAME,d=c.possibleStandardNames,p=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),f=Object.keys(d).reduce((function(e,t){var n=d[t];return n===l?e[t]=t:n===u?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=p,t.possibleStandardNames=f},function(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},function(e,t,n){var r=n(572),i=n(1224).default,o={reactCompat:!0},a=r.version.split(".")[0]>=16,s=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!==typeof e)throw new TypeError("First argument must be an object");var n,r,i="function"===typeof t,o={},a={};for(n in e)r=e[n],i&&(o=t(n,r))&&2===o.length?a[o[0]]=o[1]:"string"===typeof r&&(a[r]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!==e&&void 0!==e)try{t.style=i(e,o)}catch(n){t.style={}}},canTextBeChildOfNode:function(e){return!s.has(e.name)},elementsWithNoTextChildren:s}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(n(1225)),o=n(1227);t.default=function(e,t){var n={};return e&&"string"===typeof e?(i.default(e,(function(e,r){e&&r&&(n[o.camelCase(e,t)]=r)})),n):n}},function(e,t,n){var r=n(1226);e.exports=function(e,t){var n,i=null;if(!e||"string"!==typeof e)return i;for(var o,a,s=r(e),c="function"===typeof t,u=0,l=s.length;u<l;u++)o=(n=s[u]).property,a=n.value,c?t(o,a,n):a&&(i||(i={}),i[o]=a);return i}},function(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g;function l(e){return e?e.replace(u,""):""}e.exports=function(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var u=1,d=1;function p(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function f(){var e={line:u,column:d};return function(t){return t.position=new h(e),y(),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=t.source}h.prototype.content=e;var m=[];function g(n){var r=new Error(t.source+":"+u+":"+d+": "+n);if(r.reason=n,r.filename=t.source,r.line=u,r.column=d,r.source=e,!t.silent)throw r;m.push(r)}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function y(){v(i)}function b(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function C(){var e=f(),t=v(o);if(t){if(_(),!v(a))return g("property missing ':'");var r=v(s),i=e({type:"declaration",property:l(t[0].replace(n,"")),value:r?l(r[0].replace(n,"")):""});return v(c),i}}return y(),function(){var e,t=[];for(b(t);e=C();)!1!==e&&(t.push(e),b(t));return t}()}},function(e,t,n){"use strict";t.__esModule=!0,t.camelCase=void 0;var r=/^--[a-zA-Z0-9-]+$/,i=/-([a-z])/g,o=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||r.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,c)),e.replace(i,s))}},function(e,t,n){"use strict";n.r(t);var r=n(1229);t.default=r},function(e,t,n){var r=n(1230),i=n(1231).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(o);return n&&n[1]&&(t=n[1]),i(r(e),null,t)}},function(e,t,n){var r=/<([a-zA-Z]+[0-9]?)/,i=/<head.*>/i,o=/<body.*>/i,a=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},s=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"===typeof window.DOMParser){var c=new window.DOMParser;a=s=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),c.parseFromString(e,"text/html")}}if(document.implementation){var u=n(1231).isIE,l=document.implementation.createHTMLDocument(u()?"html-dom-parser":void 0);a=function(e,t){return t?(l.documentElement.getElementsByTagName(t)[0].innerHTML=e,l):(l.documentElement.innerHTML=e,l)}}var d,p=document.createElement("template");p.content&&(d=function(e){return p.innerHTML=e,p.content.childNodes}),e.exports=function(e){var t,n,c,u,l=e.match(r);switch(l&&l[1]&&(t=l[1].toLowerCase()),t){case"html":return n=s(e),i.test(e)||(c=n.getElementsByTagName("head")[0])&&c.parentNode.removeChild(c),o.test(e)||(c=n.getElementsByTagName("body")[0])&&c.parentNode.removeChild(c),n.getElementsByTagName("html");case"head":case"body":return u=a(e).getElementsByTagName(t),o.test(e)&&i.test(e)?u[0].parentNode.childNodes:u;default:return d?d(e):a(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t,n){for(var r,i=n(1232),o=n(1233),a=i.CASE_SENSITIVE_TAG_NAMES,s=o.Comment,c=o.Element,u=o.ProcessingInstruction,l=o.Text,d={},p=0,f=a.length;p<f;p++)r=a[p],d[r.toLowerCase()]=r;function h(e){for(var t,n={},r=0,i=e.length;r<i;r++)n[(t=e[r]).name]=t.value;return n}function m(e){return function(e){return d[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:h,formatDOM:function e(t,n,r){n=n||null;for(var i=[],o=0,a=t.length;o<a;o++){var d,p=t[o];switch(p.nodeType){case 1:(d=new c(m(p.nodeName),h(p.attributes))).children=e(p.childNodes,d);break;case 3:d=new l(p.nodeValue);break;case 8:d=new s(p.nodeValue);break;default:continue}var f=i[o-1]||null;f&&(f.next=d),d.parent=n,d.prev=f,d.next=null,i.push(d)}return r&&((d=new u(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,d.parent=n,i.unshift(d),i[1]&&(i[1].prev=i[0])),i},isIE:function(){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var o=n(1234),a=new Map([[o.ElementType.Tag,1],[o.ElementType.Script,1],[o.ElementType.Style,1],[o.ElementType.Directive,1],[o.ElementType.Text,3],[o.ElementType.CDATA,4],[o.ElementType.Comment,8],[o.ElementType.Root,9]]),s=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=a.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),C(this,e)},e}();t.Node=s;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=c;var u=function(e){function t(t){return e.call(this,o.ElementType.Text,t)||this}return r(t,e),t}(c);t.Text=u;var l=function(e){function t(t){return e.call(this,o.ElementType.Comment,t)||this}return r(t,e),t}(c);t.Comment=l;var d=function(e){function t(t,n){var r=e.call(this,o.ElementType.Directive,n)||this;return r.name=t,r}return r(t,e),t}(c);t.ProcessingInstruction=d;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var f=function(e){function t(t){return e.call(this,o.ElementType.Root,t)||this}return r(t,e),t}(p);t.Document=f;var h=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,i,r)||this;return a.name=t,a.attribs=n,a}return r(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function m(e){return(0,o.isTag)(e)}function g(e){return e.type===o.ElementType.CDATA}function v(e){return e.type===o.ElementType.Text}function y(e){return e.type===o.ElementType.Comment}function b(e){return e.type===o.ElementType.Directive}function _(e){return e.type===o.ElementType.Root}function C(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(y(e))n=new l(e.data);else if(m(e)){var r=t?I(e.children):[],a=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=a})),null!=e.namespace&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=a}else if(g(e)){r=t?I(e.children):[];var s=new p(o.ElementType.CDATA,r);r.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){r=t?I(e.children):[];var c=new f(r);r.forEach((function(e){return e.parent=c})),e["x-mode"]&&(c["x-mode"]=e["x-mode"]),n=c}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var C=new d(e.name,e.data);null!=e["x-name"]&&(C["x-name"]=e["x-name"],C["x-publicId"]=e["x-publicId"],C["x-systemId"]=e["x-systemId"]),n=C}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function I(e){for(var t=e.map((function(e){return C(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.isTag=m,t.isCDATA=g,t.isText=v,t.isComment=y,t.isDirective=b,t.isDocument=_,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=C},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e){e.exports=JSON.parse('{"c":0,"d":1,"b":2,"a":3}')},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,r){var i;(function(){var r=function(e){return e instanceof r?e:this instanceof r?void(this.EXIFwrapped=e):new r(e)};e.exports&&(t=e.exports=r),t.EXIF=r;var o=r.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},a=r.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},s=r.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},c=r.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},u=r.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function l(e){return!!e.exifdata}function d(e,t){function n(n){var i=p(n);e.exifdata=i||{};var o=function(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength,i=function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)};n<r;){if(i(t,n)){var o=t.getUint8(n+7);return o%2!==0&&(o+=1),0===o&&(o=4),h(e,n+8+o,t.getUint16(n+6+o))}n++}}(n);if(e.iptcdata=o||{},r.isXmpEnabled){var a=function(e){if("DOMParser"in self){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength,i=new DOMParser;n<r-4;){if("http"==v(t,n,4)){var o=n-1,a=t.getUint16(n-2)-1,s=v(t,o,a),c=s.indexOf("xmpmeta>")+8,u=(s=s.substring(s.indexOf("<x:xmpmeta"),c)).indexOf("x:xmpmeta")+10;return s=s.slice(0,u)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+s.slice(u),_(i.parseFromString(s,"text/xml"))}n++}}}(n);e.xmpdata=a||{}}t&&t.call(e)}if(e.src)if(/^data\:/i.test(e.src))n(function(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),r=n.length,i=new ArrayBuffer(r),o=new Uint8Array(i),a=0;a<r;a++)o[a]=n.charCodeAt(a);return i}(e.src));else if(/^blob\:/i.test(e.src))(o=new FileReader).onload=function(e){n(e.target.result)},function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){var t;200!=this.status&&0!==this.status||(t=this.response,o.readAsArrayBuffer(t))},n.send()}(e.src);else{var i=new XMLHttpRequest;i.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";n(i.response),i=null},i.open("GET",e.src,!0),i.responseType="arraybuffer",i.send(null)}else if(self.FileReader&&(e instanceof self.Blob||e instanceof self.File)){var o;(o=new FileReader).onload=function(e){n(e.target.result)},o.readAsArrayBuffer(e)}}function p(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength;n<r;){if(255!=t.getUint8(n))return!1;if(225==t.getUint8(n+1))return y(t,n+4,t.getUint16(n+2));n+=2+t.getUint16(n+2)}}var f={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function h(e,t,n){for(var r,i,o,a,s=new DataView(e),c={},u=t;u<t+n;)28===s.getUint8(u)&&2===s.getUint8(u+1)&&(a=s.getUint8(u+2))in f&&(o=s.getInt16(u+3),i=f[a],r=v(s,u+5,o),c.hasOwnProperty(i)?c[i]instanceof Array?c[i].push(r):c[i]=[c[i],r]:c[i]=r),u++;return c}function m(e,t,n,r,i){var o,a,s=e.getUint16(n,!i),c={};for(a=0;a<s;a++)o=n+12*a+2,c[r[e.getUint16(o,!i)]]=g(e,o,t,0,i);return c}function g(e,t,n,r,i){var o,a,s,c,u,l,d=e.getUint16(t+2,!i),p=e.getUint32(t+4,!i),f=e.getUint32(t+8,!i)+n;switch(d){case 1:case 7:if(1==p)return e.getUint8(t+8,!i);for(o=p>4?f:t+8,a=[],c=0;c<p;c++)a[c]=e.getUint8(o+c);return a;case 2:return v(e,o=p>4?f:t+8,p-1);case 3:if(1==p)return e.getUint16(t+8,!i);for(o=p>2?f:t+8,a=[],c=0;c<p;c++)a[c]=e.getUint16(o+2*c,!i);return a;case 4:if(1==p)return e.getUint32(t+8,!i);for(a=[],c=0;c<p;c++)a[c]=e.getUint32(f+4*c,!i);return a;case 5:if(1==p)return u=e.getUint32(f,!i),l=e.getUint32(f+4,!i),(s=new Number(u/l)).numerator=u,s.denominator=l,s;for(a=[],c=0;c<p;c++)u=e.getUint32(f+8*c,!i),l=e.getUint32(f+4+8*c,!i),a[c]=new Number(u/l),a[c].numerator=u,a[c].denominator=l;return a;case 9:if(1==p)return e.getInt32(t+8,!i);for(a=[],c=0;c<p;c++)a[c]=e.getInt32(f+4*c,!i);return a;case 10:if(1==p)return e.getInt32(f,!i)/e.getInt32(f+4,!i);for(a=[],c=0;c<p;c++)a[c]=e.getInt32(f+8*c,!i)/e.getInt32(f+4+8*c,!i);return a}}function v(e,t,r){var i="";for(n=t;n<t+r;n++)i+=String.fromCharCode(e.getUint8(n));return i}function y(e,t){if("Exif"!=v(e,t,4))return!1;var n,r,i,l,d,p=t+6;if(18761==e.getUint16(p))n=!1;else{if(19789!=e.getUint16(p))return!1;n=!0}if(42!=e.getUint16(p+2,!n))return!1;var f=e.getUint32(p+4,!n);if(f<8)return!1;if((r=m(e,p,p+f,a,n)).ExifIFDPointer)for(i in l=m(e,p,p+r.ExifIFDPointer,o,n)){switch(i){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":l[i]=u[i][l[i]];break;case"ExifVersion":case"FlashpixVersion":l[i]=String.fromCharCode(l[i][0],l[i][1],l[i][2],l[i][3]);break;case"ComponentsConfiguration":l[i]=u.Components[l[i][0]]+u.Components[l[i][1]]+u.Components[l[i][2]]+u.Components[l[i][3]]}r[i]=l[i]}if(r.GPSInfoIFDPointer)for(i in d=m(e,p,p+r.GPSInfoIFDPointer,s,n)){switch(i){case"GPSVersionID":d[i]=d[i][0]+"."+d[i][1]+"."+d[i][2]+"."+d[i][3]}r[i]=d[i]}return r.thumbnail=function(e,t,n,r){var i=function(e,t,n){var r=e.getUint16(t,!n);return e.getUint32(t+2+12*r,!n)}(e,t+n,r);if(!i)return{};if(i>e.byteLength)return{};var o=m(e,t,t+i,c,r);if(o.Compression)switch(o.Compression){case 6:if(o.JpegIFOffset&&o.JpegIFByteCount){var a=t+o.JpegIFOffset,s=o.JpegIFByteCount;o.blob=new Blob([new Uint8Array(e.buffer,a,s)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",o.Compression)}else 2==o.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return o}(e,p,f,n),r}function b(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t["@attributes"][r.nodeName]=r.nodeValue}}}else if(3==e.nodeType)return e.nodeValue;if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var o=e.childNodes.item(i),a=o.nodeName;if(null==t[a])t[a]=b(o);else{if(null==t[a].push){var s=t[a];t[a]=[],t[a].push(s)}t[a].push(b(o))}}return t}function _(e){try{var t={};if(e.children.length>0)for(var n=0;n<e.children.length;n++){var r=e.children.item(n),i=r.attributes;for(var o in i){var a=i[o],s=a.nodeName,c=a.nodeValue;void 0!==s&&(t[s]=c)}var u=r.nodeName;if("undefined"==typeof t[u])t[u]=b(r);else{if("undefined"==typeof t[u].push){var l=t[u];t[u]=[],t[u].push(l)}t[u].push(b(r))}}else t=e.textContent;return t}catch(d){console.log(d.message)}}r.enableXmp=function(){r.isXmpEnabled=!0},r.disableXmp=function(){r.isXmpEnabled=!1},r.getData=function(e,t){return!((self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete)&&(l(e)?t&&t.call(e):d(e,t),!0)},r.getTag=function(e,t){if(l(e))return e.exifdata[t]},r.getIptcTag=function(e,t){if(l(e))return e.iptcdata[t]},r.getAllTags=function(e){if(!l(e))return{};var t,n=e.exifdata,r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return r},r.getAllIptcTags=function(e){if(!l(e))return{};var t,n=e.iptcdata,r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return r},r.pretty=function(e){if(!l(e))return"";var t,n=e.exifdata,r="";for(t in n)n.hasOwnProperty(t)&&("object"==typeof n[t]?n[t]instanceof Number?r+=t+" : "+n[t]+" ["+n[t].numerator+"/"+n[t].denominator+"]\r\n":r+=t+" : ["+n[t].length+" values]\r\n":r+=t+" : "+n[t]+"\r\n");return r},r.readFromBinaryFile=function(e){return p(e)},void 0===(i=function(){return r}.apply(t,[]))||(e.exports=i)}).call(this)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(t){var r=n(574);function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"===typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=n(1256),s=Object.prototype.hasOwnProperty,c=Array.prototype.slice,u="foo"===function(){}.name;function l(e){return Object.prototype.toString.call(e)}function d(e){return!o(e)&&"function"===typeof t.ArrayBuffer&&("function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var p=e.exports=y,f=/\s*function\s+([^\(\s]*)\s*/;function h(e){if(a.isFunction(e)){if(u)return e.name;var t=e.toString().match(f);return t&&t[1]}}function m(e,t){return"string"===typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(u||!a.isFunction(e))return a.inspect(e);var t=h(e);return"[Function"+(t?": "+t:"")+"]"}function v(e,t,n,r,i){throw new p.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function y(e,t){e||v(e,!0,t,"==",p.ok)}function b(e,t,n,r){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"===typeof e||null!==t&&"object"===typeof t){if(d(e)&&d(t)&&l(e)===l(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null===e||void 0===e||null===t||void 0===t)return!1;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=_(e),o=_(t);if(i&&!o||!i&&o)return!1;if(i)return b(e=c.call(e),t=c.call(t),n);var s,u,l=w(e),d=w(t);if(l.length!==d.length)return!1;for(l.sort(),d.sort(),u=l.length-1;u>=0;u--)if(l[u]!==d[u])return!1;for(u=l.length-1;u>=0;u--)if(!b(e[s=l[u]],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function C(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function I(e,t,n,r){var i;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(n){t=n}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&v(i,n,"Missing expected exception"+r);var o="string"===typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&C(i,n)||s)&&v(i,n,"Got unwanted exception"+r),e&&i&&n&&!C(i,n)||!e&&i)throw i}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=h(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=v,p.ok=y,p.equal=function(e,t,n){e!=t&&v(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||v(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||v(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&v(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){I(!0,e,t,n)},p.doesNotThrow=function(e,t,n){I(!1,e,t,n)},p.ifError=function(e){if(e)throw e},p.strict=r((function e(t,n){t||v(t,!0,n,"==",e)}),p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var w=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(136))},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),c=r[n];n<o;c=r[++n])m(c)||!_(c)?a+=" "+c:a+=" "+s(c);return a},t.deprecate=function(n,r){if("undefined"!==typeof e&&!0===e.noDeprecation)return n;if("undefined"===typeof e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(e,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"\x1b["+s.colors[n][0]+"m"+e+"\x1b["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&w(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return v(i)||(i=l(e,i,r)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),I(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(n);if(0===a.length){if(w(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(C(n))return e.stylize(Date.prototype.toString.call(n),"date");if(I(n))return d(n)}var u,_="",E=!1,S=["{","}"];return f(n)&&(E=!0,S=["[","]"]),w(n)&&(_=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(_=" "+RegExp.prototype.toString.call(n)),C(n)&&(_=" "+Date.prototype.toUTCString.call(n)),I(n)&&(_=" "+d(n)),0!==a.length||E&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=E?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)P(t,String(a))?o.push(p(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,n,r,i,!0))})),o}(e,n,r,s,a):a.map((function(t){return p(e,n,r,s,t,E)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(u,_,S)):S[0]+_+S[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),P(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=m(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e){return Array.isArray(e)}function h(e){return"boolean"===typeof e}function m(e){return null===e}function g(e){return"number"===typeof e}function v(e){return"string"===typeof e}function y(e){return void 0===e}function b(e){return _(e)&&"[object RegExp]"===E(e)}function _(e){return"object"===typeof e&&null!==e}function C(e){return _(e)&&"[object Date]"===E(e)}function I(e){return _(e)&&("[object Error]"===E(e)||e instanceof Error)}function w(e){return"function"===typeof e}function E(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(y(o)&&(o=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=y,t.isRegExp=b,t.isObject=_,t.isDate=C,t.isError=I,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=n(1257);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),T[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=n(1258),t._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var x="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(x&&e[x]){var t;if("function"!==typeof(t=e[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(a){n(a)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),x&&Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=x,t.callbackify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,n).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(A,t,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(584))},function(e,t){e.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,,,,,,,,,,,,,,,,,,function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n(539),n(540),n(541),n(542),n(543),n(544),n(545),n(546),n(547),n(548),n(549),n(550),n(551),n(552),n(553),n(554),n(555),n(556),n(557),n(558),n(559),n(560),n(561),n(562),n(563),n(564),n(565),n(566),n(567),n(568),n(569),n(570),n(571);var r=n(572),i=n.n(r),o=n(575);function a(){return g}function s(e){if(e===s.__TEST_RESET_LOCALES)return g="en-us",v.clear(),void y.clear();if(e!==g){if(t=e,!v.has(t))throw new Error("setLocale can only be called for locales whose strings have been previously loaded.");var t;g=e,document.documentElement.setAttribute("lang",e),y.forEach((function(t){return t(e)}))}}function c(e,t){var n=v.get(e)||{};v.set(e,Object.assign({},n,t))}function u(e){return y.add(e),function(){y.delete(e)}}function l(){var e=d();return function(t,n){return e(g,t,n)}}function d(){return function(e,t,n){var r=v.get(e),i=r?r[t]:void 0;return void 0===i?"{{"+t+"}}":n?i.replace(b,(function(e,t){return n[t].toString()})):i}}var p,f,h,m,g=document.documentElement.getAttribute("lang")||"en-us",v=new Map,y=new Set,b=/%\{(\s*.+?\s*)\}/g;s.__TEST_RESET_LOCALES=Symbol(),c(a(),{"UpgradePlanTiles.PrivateRelay.LinkText":"Obtén más información sobre Retransmisión privada","RecoveryPage.BookmarksRecoveryModal.DeletedToday":"Se eliminó hoy • Quedan %{daysRemaining} días","FileIcon.FileType.aac":"Audio AAC","ContinueOnDevice.ContinueButton.Title.Sending":"Enviando notificación…","StoragePage.Callout.ContinueButton.Title.WebOnly":"Abrir iCloud Drive…","Toolbar.Button.HelpButton.AriaLabel":"Menú de ayuda","Photos.TitleName":"Fotos en iCloud","Note.Empty.Snippet":"No hay más texto","HomePage.CustomizeDashboard.Header.Button.Done":"Listo","FileIcon.FileType.bmp":"Imagen de mapa de bits de Windows","CloudOS.TermsAndConditions.Content.Title":"Te damos la bienvenida a iCloud","CloudOS.Sharing.Unavailable.OkButton.Title":"OK","FileIcon.FileType.cpp":"Código fuente C++","FileIcon.FileType.css":"Hoja de estilo en cascada","CloudOS.LandingPage.description.gcbd":"Tu hogar web para tus fotos, archivos, notas, correos de iCloud y mucho más.","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.NoDevice.Title":"Cómo administrar Compartir en familia de iCloud+ ","AccountPage.PlanCard.iCloud.Title":"iCloud","CloudOS.Toolbar.Apple.AccessibilityLabel":"Apple","CloudOS.MailDrop.Downloading.Title":"La descarga comenzará pronto…","AccountPage.PlanCard.Plan.Link.Name":"Plan","CloudOS.Authentication.Panel.AppName.Title":"Iniciar sesión en iCloud","PhoneNumber.Title":"número telefónico","VoiceOver.MailHomeTile.Messages":"Mensajes","VoiceOver.StorageUsageList.Table":"Uso de almacenamiento","AccountPage.Settings.Access.Title":"Cerrar sesión en todos los navegadores","CustomDomainSettings.TitleName":"iCloud - Configuración de dominio personalizado","CloudOS.LegalFooterView.Text.Fragment.StatusUrl.Title":"Estado del sistema","CustomEmailDomainTile.Description":"Mail personalizado de iCloud","CloudOS.Springboard.SettingsLink.Title":"Configuración de la cuenta","ICloudPlusPage.FamilySharingModalContent.SubTitle.NotSharing":"Comparte tu plan con hasta 5 familiares más","CloudOS.Error.Button.Report":"Reportar un problema…","RemindersTile.Date.Yesterday":"Ayer","ContinueOnDevice.iCloudPlusFamilySharing.Member.NoDevice.Description":"Ve a Configuración #{chevron} %{fullName} #{chevron} iCloud #{chevron} Almacenamiento en iCloud #{chevron} Uso familiar","CalendarHomeRow.Time.EndsAt":"Finaliza el %{time}","RecoveryPage.Loading":"Cargando","VoiceOver.AppIconButton.Launcher.Label":"Abrir app %{appName}","SandwichMenu.NavLinks.ToggleIcon":"Activa el menú para navegar.","NavigationDrawer.Recovery.Drawer.AriaLabel":"Recuperación de datos","FileIcon.FileType.xml":"Texto XML","FileIcon.FileType.blend":"Archivo Blend","CloudOS.OutOfNetworkAcceptance.CancelButton.Title":"Cancelar","CloudOS.Application.Title":"esta aplicación","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Description":"¿Confirmas que quieres eliminar los marcadores de forma permanente? Si eliminas estos marcadores, ya no podrás restaurarlos después.","FileIcon.FileType.dae":"Collada","AccountPage.PlanCard.WebOnly.Title":"iCloud","CloudOS.LandingPage.iCloudPlusTile.Description.Link":"apple.com/la/icloud/","RecoveryPage.ArchivesTile.Title.Calendars":"Restaurar calendarios","VoiceOver.RecoveryPage.ArchivesRecoveryList.RestoreButtonLabel":"Restaurar el archivo del %{date}","IndexFile.Meta.Description.FaceTime":"Usar FaceTime en la web.","CloudOS.UnsavedChanges.Alert.DontSignOutButton":"Cancelar","DeviceBackupList.TotalNumber.Many":"%{count} dispositivos","Utils.BytesToHumanizedFormat.Size.TB":"%{value} TB","CloudOS.AppSwitcherItemView.Offline":"Sin conexión","CloudOS.NavigationLayoutSpinner.Loading":"Cargando","ContinueOnDevice.iCloudStorageManage.NoDevice.Description2":"Ve a Configuración del Sistema #{chevron} Apple ID #{chevron} iCloud #{chevron} Almacenamiento en iCloud: Administrar","VoiceOver.AppSwitcher.Applications":"Aplicaciones","RecoveryPage.ContactsRecoveryModalContent.ListDescription.BulletPointOne":"El archivo de contactos que selecciones reemplazará los contactos en todos tus dispositivos.","FileIcon.FileType.wmv":"Windows Media","Drive.Icon.Description.Audio":"Audio %{fileExtension}","CloudOS.reminders.FileType":"recordatorio","CloudOS.Error.ServiceLocked.Title":"%{applicationName} está bloqueada.","CloudOS.AppIcon.Locked.AccessibilityLabel":"%{applicationName}: bloqueada","CloudOS.UnsavedChanges.Alert.SignOutButton":"Cerrar sesión","CloudOS.TermsAndConditions.Description":"Acepto los términos y condiciones de iCloud.","CloudOS.AppIcon.Loading.AccessibilityLabel":"%{applicationName}: cargando","CalendarHomeTile.TotalNumber.One":"Todos los calendarios • 1 evento","KeynoteHomeTile.Heading":"Keynote","CloudOS.LandingPage.Notes.Description":"Captura tus pensamientos o toma notas detalladas. Tus notas siempre estarán actualizadas en cualquier dispositivo y en la web.","CalendarHomeRow.Event.Maybe":"Quizá","ShareAcceptancePage.Public.Sharing.Description":"%{displayName} compartió un elemento contigo.","LongName.NavLinks.Storage":"Tu almacenamiento en iCloud","NavigationDrawer.Recovery.Description":"Restaura archivos, marcadores, contactos y calendarios eliminados.","FileIcon.FileType.mpeg":"Película MPEG","RecoveryPage.ArchivesRecoveryList.LoadingDescription":"Cargando archivos","CreationMenu.Contact.AriaLabel":"Nuevo contacto","FileIcon.FileType.obj":"Archivo de Wavefront 3D Object","PhotosHomeTile.TotalNumber.Photo.Two":"2 fotos","ImagePicker.DropZoneLabel":"Soltar aquí","ContinueOnDevice.SuccessDialog.Description.LineTwo":"Requiere un dispositivo con al menos iOS 15.2, iPadOS 15.2 o macOS Monterey 12.1.","FileIcon.FileType.ico":"Imagen del ícono de Windows","PlanDetailsPage.Bullets.Standard.Storage":"5 GB de almacenamiento","FileIcon.FileType.h":"Código de cabecera C","CloudOS.Springboard.LearnMore.Phone.Text":"Usa más apps en iCloud.com en un iPad o una computadora.","UpgradePlanTiles.CustomEmailDomain.LinkText":"Obtén más información sobre los dominios de correo electrónico personalizados","ShareAcceptancePage.User.Description.iWorks.Name":"Documento de %{appName}","PlanDetailsPage.Bullets.Features.PasswordAndKeychain":"Contraseñas y llavero de iCloud","CloudOS.Error.AuthDidNotConnect.Title":"Error de conexión","LongName.NavLinks.ICloudPlus":"Funciones de iCloud+","ShareAcceptancePage.Button.NotNow.AriaLabel":"No aceptar ahora","CloudOS.keynote.FileType":"presentación","PlanDetailsPage.Bullets.Plus.Premium.Header":"Premium","UpgradePlanTiles.Upgrade.Description":"Cuando actualizas a iCloud+, obtienes el almacenamiento que necesitas y funciones premium para proteger tu privacidad.","ShareAcceptancePage.VerifyAccessDialog.Content":"Verifica que tengas permitido ver esta invitación mediante %{sharer}.","NotesHomeTileEmpty.Create.Short":"Crea tu primera nota","VoiceOver.CalendarHomeRow.OpenCalendarEvent":"Toca para ir al evento %{title}","MailHomeTile.EmptyContent":"No hay mensajes","NavLinks.DataRecovery":"Recuperación de datos","CreationMenu.Reminder.AriaLabel":"Nuevo recordatorio","Alert.OkButton":"OK","FileIcon.FileType.m":"Código fuente Objective-C","PlanDetailsPage.Bullets.StandardPlus.FeaturesHeader":"Apps y funciones","Drive.Icon.Description.Default":"Elemento","RemindersTile.Date.Yesterday.Time":"Ayer a la(s) %{time}","StorageWarning.Full.Content":"Tu espacio de almacenamiento en iCloud está lleno","Notes.DisplayName":"Notas","CloudOS.MailDrop.Download.Title":"%{shareTitle} • %{size}","FileIcon.FileType.xhtml":"XHTML","ShareAcceptancePage.Accept.Description.Calendar":"Si aceptas esta invitación, este calendario se agregará a tus calendarios.","ContinueOnDevice.homeKitSecureVideo.Description":"Para configurar Video seguro de HomeKit, primero, activa iCloud para Casa.  En un iPhone o iPad, ve a Configuración #{chevron} %{fullName} #{chevron} iCloud y activa Casa. En una Mac, ve a Configuración del Sistema #{chevron} Apple ID #{chevron} iCloud y luego selecciona Casa. A continuación, ve a la app Casa y activa Transmisión y grabación en las opciones de grabación de la cámara.","CalendarHomeTile.TotalNumber.Loading":"Cargando…","CloudOS.Toolbar.AppSwitcherMenu.Heading.ICloudPlus":"Funciones de iCloud+","CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Title":"El enlace de verificación ha caducado","RemindersHomeTile.Completed":"No hay recordatorios","StorageWarning.AlmostFull.Content":"Tu espacio de almacenamiento en iCloud está casi lleno","ErrorHomeTileContent.TryAgain":"Vuelve a intentarlo","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.Title":"Cómo administrar Compartir en familia de iCloud+ ","VoiceOver.NotesHomeTile.PrimaryActionDescription":"Nota nueva","VoiceOver.PagesHomeTile.Documents":"Documentos","FileIcon.FileType.mp3":"Audio MP3","FileIcon.FileType.icns":"Imagen del ícono de Apple","CreationMenu.Document":"Documento de Pages","CreationMenu.Reminder":"Recordatorio","CrashReporter.SendToApple":"Enviar a Apple","Note.Empty.Title":"Nota nueva","VoiceOver.Menu.Close":"Cerrar menú","ImagePicker.CompactDoneButtonLabel":"Guardar cambios","ICloudPlusPage.HomeKitSecureVideoModalContent.Title":"Video seguro de HomeKit","AppSwitcherOnboardingPopover.Customize.Content":"Elige las apps que quieres ver en tu página de inicio.","PhotosHomeTile.SetUpTitle":"Activa Fotos en iCloud","Mail.TitleName":"Mail en iCloud","FileIcon.FileType.scpt":"Script","VoiceOver.HomeTile.LoadingComplete":"Carga completa","UnsupportedApps.HomePageButton":"Página de inicio de iCloud","AccountPage.Settings.FindDevices.Title":"Buscar tus dispositivos","StorageUsageList.Heading":"Uso de almacenamiento","StoragePage.TitleWithName":"Almacenamiento en iCloud de %{firstName}","Notes.TitleName":"Notas de iCloud","HomeKitSecureVideoTile.Description.Five":"Para hasta 5 cámaras de seguridad","CloudOS.TermsAndConditions.CancelButton.Title":"Cancelar","LongName.NavLinks.Settings":"Configuración","Utils.BytesToHumanizedFormat.Size.PB":"%{value} PB","CalendarHomeTile.Heading":"Calendario","RecoveryPage.TileContent.NoItems":"-","ImagePicker.Instructions":"Para reemplazar la foto de tu Apple ID, arrastra una imagen hasta el cuadro o búscala en tu dispositivo.","CloudOS.OutOfNetworkAcceptance.TextMessageSent.Title":"Se ha enviado el mensaje de texto de verificación","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointFour":"Todos los eventos programados se cancelarán y se volverán a crear, y las invitaciones se enviarán otra vez.","DeviceBackupList.Heading":"Respaldo en iCloud","CloudOS.Toolbar.AccountMenuButton.AccessibilityLabel":"Cuenta","PhotosHomeTile.TotalNumber.Photo.Many":"%{count} fotos","PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.Five":"Compatibilidad de video seguro de HomeKit con cinco cámaras","FileIcon.FileType.doc":"Documento de Microsoft Word 97-2004","CloudOS.Authentication.SignInButton.Title":"Iniciar sesión","StoragePage.AppCounts.Mail.All":"Todos los mensajes de correo electrónico","StaticPages.UnsupportedBrowserTabGroups.Message":"Los grupos de pestañas compartidas solo están disponibles en Safari 16 o posterior.","NavigationDrawer.Storage.Description.Small":"%{percentageUsed}% de %{totalSize}","FileIcon.FileType.swift":"Archivo Swift","Drive.Icon.Description.Excel":"Hoja de cálculo de Excel","RecoveryPage.ArchivesRecoveryModalContent.LearnMore":"Más información","FileIcon.FileType.log":"Archivo de registro","CreationMenu.CreateNew":"Crear","Drive.Icon.Description.Word":"Documento de Word","ShareAcceptancePage.User.Description.DriveFile":"%{displayName} te invitó a colaborar en un archivo %{fileExtension}.","FileIcon.FileType.png":"Imagen PNG","CloudOS.OutOfNetworkAcceptance.Error.Description":"Hubo un problema al enviar el enlace de verificación. Vuelve a intentarlo más tarde.","Name.Display.NameIsCJK.FirstAndFamilyNames":"%{familyName}%{firstName}","CloudOS.TermsAndConditions.DisagreeButton.Title":"No acepto","PhotosHomeTile.TotalNumber.Loading":"Cargando…","FileIcon.FileType.class":"Clase Java","ShareAcceptancePage.EmailVerificationDialog.Buttons.Verify":"Verificar","FileIcon.FileType.pages":"Documento de Pages","ContinueOnDevice.SuccessDialog.Description.LineOne.OneDevice":"Busca la notificación de Configuración en %{device1}.","FileIcon.FileType.xlam":"Complemento de Microsoft Excel","ContinueOnDevice.homeKitSecureVideo.NoDevice.Notice":"La configuración de video seguro de HomeKit requiere un dispositivo con al menos iOS 15, iPadOS 15 o macOS Monterey 12.","ShareAcceptancePage.EmailVerificationDialog.Title":"Enviar enlace de verificación","Notification.Alarm.Today.Message":"“%{eventTitle}” a la(s) %{time}","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.Title":"Cómo comenzar a compartir con la familia","ShareAcceptancePage.Accept.Description.Note":"Si aceptas la invitación, esta nota se agregará a tus notas.","PlanDetailsPage.ChangePlanSection.Body.Lite.LearnMore.Title":"Más información","CloudOS.AccountMenu.Settings.Title":"Configuración de iCloud","CloudOS.CreateAccountSpinner.Loading":"Cargando","VoiceOver.MailHomeRow.Unread":"No leídos","VoiceOver.PagesHomeTile.PrimaryActionDescription":"Nueva página","CloudOS.UnsavedChanges.Alert.Description":"%{applicationName} está guardando los cambios más recientes. Si sales, perderás los cambios que no hayas guardado.","Calendar.TitleName":"Calendario de iCloud","CloudOS.LandingPage.Unsupported.LiteAccount.Description":"%{applicationNameToBeDisplayed} no está disponible para tu Apple ID","AccountPage.Settings.LookMeUpByEmail.Modal.Title":"Buscarme por dirección de correo","CloudOS.Error.UnableToLoadiCloud.Title":"No es posible cargar iCloud","CloudOS.LocalizationFormatter.FileSize.MB":"%{value} MB","ShareAcceptancePage.Accept.Description.Folder":"Si aceptas la invitación, esta carpeta se agregará a tu iCloud Drive, pero no consumirá tu almacenamiento en iCloud.","FaceTime.Unsupported.Button.Title.Secondary.Activated":"¡Copiado!","Drive.Icon.Description.Video":"Video %{fileExtension}","AccountPage.Settings.Access.Signout.Modal.Title":"¿Quieres cerrar sesión en todos los navegadores?","EmailAddressOrPhoneNumber.Title":"dirección de correo electrónico o número de teléfono","AccountPage.Settings.Customize.Button.Name":"Personalizar la página de inicio","ContinueOnDevice.iCloudStorageManage.StorageFull.NoDevice.Title":"Cómo cambiar el plan de iCloud y agregar almacenamiento","UpgradePlanTiles.HideMyEmail":"Ocultar mi correo","StaticPages.UnsupportedSafariVersionTabGroups.Message":"Realiza la actualización a Safari 16 o posterior para usar los grupos de pestañas compartidas.","RemoveTileAlert.Remove":"Eliminar","StorageUsageList.Description.Error":"No se pudo cargar","VoiceOver.AccountPage.LookMeUpByEmail.Modal.List.AriaLabel":"Lista de apps","ShareAcceptancePage.User.Description.Calendar":"%{displayName} te invitó a colaborar en un calendario compartido.","PlanDetailsPage.Bullets.Features.Photos":"Fotos en iCloud","UnsupportedApps.Mobile":"Para usar %{appName} en iCloud.com, usa el navegador de una tablet o una computadora de escritorio.","CloudOS.Error.TermsUpdateRequired.Title":"Términos y condiciones","UpgradePlanTiles.FamilySharing.Description":"Comparte tu plan de iCloud+ con hasta cinco familiares de modo que todos puedan obtener almacenamiento adicional y funciones premium. Cada familiar usa su propio Apple ID, lo que permite mantener la privacidad del contenido de todos.","ContinueOnDevice.setupPrivateRelay.Description":"Usa Continuar en el dispositivo para enviar una notificación a tus dispositivos Apple que te llevará directamente a la configuración de Retransmisión privada. Puedes administrar la configuración de Retransmisión privada para cada dispositivo que tenga al menos iOS 15, iPadOS 15 o macOS Monterey 12.","ShareAcceptancePage.User.Description.Reminders.Name":"Lista de recordatorios","CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide":"Manual de uso de iCloud","Banner.QuotaAlmostExceeded.LiteAccount.Title":"Tu espacio de almacenamiento en iCloud está casi lleno.","CalendarIcon.Sunday":"domingo","NavLinks.Settings":"Configuración","RemindersHomeTile.TotalNumber.Zero":"Todo iCloud • No hay recordatorios","CalendarIcon.Friday":"viernes","Banner.Beneficiary.Multiple.Description.NameIsCJK":"Tienes acceso a la cuenta de %{firstName} hasta el %{date}. Después de esa fecha, los datos y la cuenta de %{firstName} se eliminarán de forma permanente. Los demás contactos para legado de %{firstName} podrán ver los cambios que se realicen en esta cuenta.","CloudOS.AppIcon.Disabled.AccessibilityLabel":"%{applicationName}: desactivada","Utils.BytesToHumanizedFormat.Size.TB.Compact":"%{value} TB","Banner.Beneficiary.Single.Description.NameIsCJK":"Tienes acceso a la cuenta de %{firstName} hasta el %{date}. Después de esa fecha, los datos y la cuenta de %{firstName} se eliminarán de forma permanente.","ShareAcceptancePage.EmailVerificationDialog.Buttons.Cancel":"Cancelar","EmptyHomeTileContent.LearnMore":"Más información","DateTime.Relative.YesterdayTime":"Ayer  %{time}","Utils.BytesToHumanizedFormat.Size.YB":"%{value} YB","StaticPages.EnableCookies.Message":"Para usar iCloud, debes activar las cookies en el navegador y luego intentar de nuevo.","SampleApp.DisplayName":"App de muestra","ContinueOnDevice.iCloudPlusFamilySharing.Member.NoDevice.Title":"Cómo dejar de usar el plan compartido de iCloud+","PlanDetailsPage.Title.Lite":"Plan de iCloud","CloudOS.Error.MailNotEnabled.Description":"Para usar %{applicationName} de iCloud, crea una dirección de correo electrónico nueva activando %{applicationName} en la configuración de iCloud con un sistema que use iOS o macOS.","ShareAcceptancePage.EmailVerificationSentDialog.Content.Email":"Sigue las instrucciones indicadas en el correo electrónico para completar la verificación.","FMIP.TitleName":"Buscar dispositivos de iCloud","MailHomeTile.SetUpMessage":"Debes configurar una dirección de correo electrónico de iCloud principal en tu iPhone, iPad, iPod touch o Mac antes de poder usar Mail en iCloud.","UpgradePlanTiles.MoreStorage":"Más almacenamiento","FileIcon.FileType.cer":"Certificado","ShareAcceptancePage.User.Description.Numbers":"%{displayName} te invitó a colaborar en una hoja de cálculo.","RecoveryPage.DriveItemsTile.Title":"Restaurar archivos","CloudOS.Toolbar.AppSwitcherMenu.Heading.Apps":"Apps","CloudOS.Toolbar.AccountMenu.ICloudSettings":"Configuración de iCloud","CloudOS.LandingPage.iCloudWeb.Title":"Accede fácilmente a las apps y a los datos de tu iPhone en la web","CloudOS.OutOfNetworkAcceptance.EmailSent.Description":"Sigue las instrucciones indicadas en el correo electrónico para completar la verificación.","Utils.BytesToHumanizedFormat.Size.bytes.Compact":"%{value} bytes","ShareAcceptancePage.Description.Public.Folder":"Inicia sesión con tu Apple ID para agregar contenido a tu iCloud Drive.","FileIcon.FileType.gz":"Archivo comprimido GZip","PagesHomeTile.Heading":"Pages","CloudOS.Springboard.Greeting.12-18":"Buenas tardes.","CloudOS.Error.TermsUpdateRequired.Description":"Para continuar, acepta los términos y condiciones de iCloud en un dispositivo iOS o macOS.","CloudOS.LoginSpinner.Description":"Cargando","ShareAcceptancePage.Button.SignIn":"Iniciar sesión","Settings.DisplayName":"Configuración","FileIcon.FileType.psd":"Documento de Adobe Photoshop","ImagePicker.Alert.Title.Generic":"No se pudo cargar la foto","ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.Unlimited":"Para una cantidad ilimitada de cámaras de seguridad domésticas","Calendar.DisplayName":"Calendario","VoiceOver.Tile.EditAriaLabel":"Editar mosaico %{tileName}","ShareAcceptancePage.User.Description.RemindersList":"%{displayName} te invitó a colaborar en una lista de recordatorios compartidos.","RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.Title":"¿Quieres restaurar los contactos?","MailDropPage.Error.Description.MaxDownloads":"El archivo ya no está disponible porque ya se descargó la cantidad máxima de veces. Pídele al remitente que lo vuelva a enviar.","FileIcon.FileType.bat":"Archivo de lote","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.FirstLine":"Si los restauras con un archivo de calendarios nuevo:","Toolbar.Button.AppLauncher.AriaLabel":"Acceso rápido","CloudOS.LandingPage.iCloudWeb.Image.Description":"Colección de íconos para apps disponibles en iCloud.com, como Mail, Encontrar y Recordatorios","PlanDetailsPage.ChangePlanSection.Body.Lite":"Incluye 1 GB de almacenamiento para compartir y colaborar en documentos, hojas de cálculo y presentaciones. Si tienes un iPhone, un iPad, un iPod touch o una Mac, inicia sesión en iCloud desde tu dispositivo para obtener acceso inmediato a todas las funciones de iCloud y 5 GB de almacenamiento gratuito. Desde tu dispositivo, también puedes actualizar a iCloud+ para acceder a funciones premium como Retransmisión privada, Ocultar mi correo y Video seguro de HomeKit.","FileIcon.FileType.xls":"Hoja de cálculo de Microsoft Excel 97-2004","StoragePage.Description.Standard":"Usa tu almacenamiento en iCloud para mantener tu información más importante (como tus fotos, archivos, respaldos y más) protegida, actualizada y disponible en todos tus dispositivos.","HomePage.CustomizeDashboard.AddButton.AriaLabel":"Agrega una nuevo mosaico al tablero","Banner.Promotion.HideMyEmail.Description":"Protege la privacidad de tus correos electrónicos con “Ocultar mi correo” y configura direcciones de correo electrónico personalizadas con tu plan de iCloud+.","StaticPages.WebsiteUnavailable.Message":"iCloud.com no está disponible en tu país o región.","ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.One":"Para 1 cámara de seguridad doméstica","CloudOS.Toolbar.AccountMenu.UpgradeToICloudPlus":"Actualizar a iCloud+","CloudOS.SchoolLegalFooterView.Text.Fragment.TermsUrl.Title":"Términos y condiciones para escuelas","Banner.QuotaAlmostExceeded.LiteAccount.Description":"Si te quedas sin espacio de almacenamiento, tus documentos dejarán de actualizarse.","CloudOS.iclouddrive.folder.FileType":"carpeta","CloudOS.TermsAndConditions.DownloadCopyButton.Title":"Descargar","ICloudPlusPage.Title":"Funciones de iCloud+","RemindersTile.Date.Today":"Hoy","CloudOS.RedirectedAuthentication.RedirectNeeded.Title":"Este Apple ID no puede iniciar sesión en %{currentDomain}.","ContinueOnDevice.setupPrivateRelay.NoDevice.Title":"Cómo administrar la configuración de Retransmisión privada para el dispositivo","HideMyEmail.DisplayName":"Ocultar mi correo","FileIcon.FileType.dng":"Imagen sin procesar de Adobe","Error.UnsupportedBrowser.LearnMoreLink.Title":"Más información","CloudOS.Error.ServiceLocked.Description.NoETA":"Debido a operaciones de mantenimiento en la cuenta, %{applicationName} no está disponible en este momento.","ShareAcceptancePage.Button.Add.iCloud.Drive":"Agregar a iCloud Drive","PlanDetailsPage.Bullets.Plus.Premium.CustomEmailDomain":"Dominio de correo electrónico personalizado","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.NoDevice.Title":"Cómo comenzar a compartir con la familia","ICloudPlusPage.Description":"Tu plan de iCloud+ te ofrece almacenamiento para todos tus datos de iCloud, además de funciones premium como Retransmisión privada y Ocultar mi correo. Administra u obtén más información sobre cada una de estas funciones.","Notice.Lite.Subtitle.Desktop":"Crea tu Apple ID gratuito y empieza a usarlo hoy mismo","LoadingPage.CouldntOpen":"No se pudo abrir","AccountPage.PlanCard.WebOnly.Description":"Acceso sólo para la versión web","CloudOS.OutOfNetworkAcceptance.EmailSent.Title":"Se ha enviado un correo electrónico de verificación","StorageUsageList.Drive.Heading":"Documentos","CloudOS.AppSwitcherItemView.Maintenance":"Mantenimiento","RecoveryPage.BookmarksRecoveryModal.Name":"Nombre","CrashReporter.Close":"Cerrar","FileIcon.FileType.ics":"Archivo ICS","Notification.Alarm.Dismiss.Title":"Ignorar","NavLinks.Status":"Estado","VoiceOver.Banner.Heading":"Información de banner","UpgradePlanTiles.MoreStorage.ImageAlt":"Un gráfico de barras donde se muestran las opciones de almacenamiento de los planes de iCloud+, que son 50 GB, 200 GB y 2 TB","ShareAcceptancePage.NewAccount.Description":"¿No tienes un Apple ID? Puedes crear uno de forma gratuita.","Notice.Windows.Title":"Descarga iCloud para Windows","Notice.Lite.Subtitle.Phone":"Crea tu Apple ID gratuito","KeynoteHomeTile.TotalNumber.Description":"Presentaciones","CloudOS.BusinessLegalFooterView.Text.Fragment.TermsUrl.Title":"Términos y condiciones para negocios","CloudOS.Toolbar.AccountMenu.AboutWebOnlyPlan":"Acerca del plan sólo para la versión web","CloudOS.Authentication.SignIn.ShareAcceptance.CreateAriaLabel":"Crea tu Apple ID","AccountPage.PlanCard.Storage.Link.Name":"Almacenamiento","CloudOS.Sharing.Unavailable.Description":"El propietario dejó de compartir este %{fileType} o no tienes permiso para abrirlo.","AutoUpdate.Reload":"Volver a cargar","NavLinks.Storage":"Tu almacenamiento","AppSwitcherOnboardingPopover.QuickAccess.Content":"Ve directamente a una app o función, revisa tu plan y el uso del almacenamiento o recupera datos que hayas eliminado por accidente.","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.Description":"Usa Continuar en el dispositivo para enviar una notificación a tus dispositivos Apple que te llevará directamente a la configuración de Compartir en familia de iCloud+.","MailDropPage.Download.Button.Text":"Descargar al dispositivo","RecoveryPage.FilesRecoveryModalContent.Description":"Puedes recuperar archivos eliminados de iCloud Drive y otras apps en los últimos 30 días, ya sea que los hayas eliminado en iCloud.com u otro dispositivo con iCloud Drive activado.","NavLinks.Home.Label":"Navega a la página de inicio de icloud.com","PlanDetailsPage.Included.iCloudFeatures.Link.Title":"las apps y funciones que usan iCloud","CloudOS.Button.Download.Title":"Descargar","CloudOS.Toolbar.HelpMenu.SignIn":"Iniciar sesión","FileIcon.FileType.xlsx":"Hoja de cálculo Office Open XML","Avatar.ImageAlt":"Tu imagen de perfil","RecoveryPage.BookmarksRecoveryModal.LocalizedName.FavoritesBar":"Favoritos","CloudOS.LocalizationFormatter.FileSize.KB":"%{value} KB","UpgradePlanTiles.PrivateRelay":"Retransmisión privada de iCloud","AppSwitcherOnboardingPopover.Customize.Title":"Personalizar","CloudOS.LocalizationFormatter.FileSize.TB":"%{value} TB","Photos.CloudKit.Recoverable.Subtitle":"Inténtalo otra vez en un momento.","RemoveTileAlert.Cancel":"Cancelar","ShareAcceptancePage.User.Description.Document":"%{displayName} te invitó a colaborar en un documento.","CloudOS.AccountNeedsSetup.LearnMoreButton.Title":"Más información","AccountPage.Settings.Access.Signout.Modal.Description":"¿Confirmas que quieres cerrar la sesión de iCloud en todos los navegadores? Tendrás que verificar tu identidad la próxima vez que inicies sesión.","FileIcon.FileType.wave":"Audio de onda","CloudOS.Error.AppPCSDeleted.Title":"%{applicationName} está bloqueada","RecoveryPage.ArchivesTile.TotalNumber.Two":"2 archivos","FileIcon.FileType.c":"Código fuente C","VoiceOver.RecoveryPage.ArchivesRecoveryModal.CloseButtonLabel":"Cerrar","EmailAddress.Title":"dirección de correo electrónico","LoadingPage.Loading":"Cargando…","FileIcon.FileType.qt":"Película QuickTime","ShareAcceptancePage.VerifyAccessDialog.Buttons.Continue":"Continuar","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Delete":"Eliminar marcador","ImagePicker.RotationControl.RotateLabel":"Girar","VoiceOver.PhotosHomeTile.OpenPhoto":"Toca para ir a la foto del %{date}","AppSwitcherOnboardingPopover.QuickAccess.Title":"Acceso rápido","AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.Two":"2 apps","RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.Title":"¿Quieres restaurar los calendarios?","HomePage.CustomizeDashboard.TilePicker.Close.AriaLabel":"Cerrar selector de mosaicos","RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.RestoreButton":"Restaurar","CloudOS.AccountNeedsSetup.Domain.icloud.com.cn":"iCloud.com.cn","CrashReporter.Title":"Un error ha provocado que esta aplicación no funcione correctamente. Ayúdanos a mejorar los productos Apple enviándonos tus datos de uso y diagnóstico de %{appName}.","NavigationDrawer.Plan.Type.Icloud+":"iCloud+","ShareAcceptancePage.Button.Download":"Descargar una copia","CrashReporter.Details.Open":"▼ Detalles","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointThree":"Se eliminará toda la información compartida. Deberás volver a compartir los calendarios y los recordatorios o pedirles a las personas titulares que los compartan.","NavLinks.ICloudPlus":"Funciones de iCloud+","PhotosHomeTile.Heading":"Fotos","Utils.BytesToHumanizedFormat.Size.PB.Compact":"%{value} PB","ImagePicker.ZoomControl.ZoomLabel":"Zoom","PhotosHomeTile.EmptyContent":"No hay fotos ni videos","Notification.Push.AccessibilityLabel":"Abrir %{applicationName}","AutoUpdate.Title":"%{currentDomain} actualizado","CloudOS.notes.FileType":"nota","FileIcon.FileType.zip":"Archivo ZIP","AccountPage.Settings.FindDevices.Description":"Busca tus dispositivos iPhone, iPad, Mac, Apple Watch, AirPods o Beats. O ayuda a encontrar los dispositivos registrados en Compartir en familia.","Utils.BytesToHumanizedFormat.Size.ZB":"%{value} ZB","CloudOS.Button.Cancel.Title":"Cancelar","RecoveryPage.DriveItemsTile.TotalNumber.One":"1 archivo","CustomEmailDomainTile.Content.Title.Many":"%{count} dominios","ShareAcceptancePage.Title":"Compartido a través de iCloud","PlanDetailsPage.Bullets.Features.Numbers":"Numbers","WelcomePage.WelcomeBack.Text":"Te damos la bienvenida nuevamente, %{name}.","ProfileCard.PlanType.WebOnly":"Sólo para la versión web de iCloud","CloudOS.TermsAndConditions.AgreeButton.Title":"Acepto","FaceTime.Unsupported.Button.Title":"Continuar de todos modos","ShortName.NavLinks.Settings":"Configuración","CloudOS.OutOfNetworkAcceptance.TextMessageSent.AdditionalDescription":"Utiliza el enlace que viene en el mensaje para completar la verificación.","ContinueOnDevice.iCloudStorageManage.StorageFull.Description":"Usa Continuar en el dispositivo para enviar una notificación a tus dispositivos Apple que te llevará directamente a la configuración del plan de iCloud.","ShareAcceptancePage.Button.Accept":"Aceptar invitación","Banner.QuotaExceeded.LiteAccount.Description":"Los documentos ya no se actualizarán.","ContinueOnDevice.FailedDialog.Title":"No se pudo enviar la notificación","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.Description":"Usa Continuar en el dispositivo para enviar una notificación a tus dispositivos Apple que te llevará directamente a la configuración de Compartir en familia.","VoiceOver.NotesHomeRow.Locked":"Bloqueada","PlanDetailsPage.Lite.Details":"Acceso sólo para la versión web con 1 GB de almacenamiento","MailDropPage.Error.Description.NotFound":"Verifica la dirección o pídele al remitente que lo vuelva a enviar.","AccountPage.Settings.LookMeUpByEmail.Description":"Permite que las personas puedan buscarte por tu Apple ID en las apps que usas y vean tu nombre y tus apellidos.","CloudOS.LegalFooterView.Text.Fragment.CreateAccount.Title":"Crear Apple ID","HomePage.CustomizeDashboard.Header.Button.ChangeWallpaper":"Cambiar fondo de pantalla","NavLinks.Home":"Casa","AccountPage.Settings.Title":"Configuración de iCloud","FileIcon.FileType.dmg":"Imagen de disco","CloudOS.OutOfNetworkAcceptance.VerifyAccessContent.Description":"Selecciona tu %{modeOfCommunication}, y te enviaremos un enlace de verificación.","CloudOS.RedirectedAuthentication.RedirectNeeded.RedirectButton.Title":"Ir a %{destinationDomain}","Banner.QuotaExceeded.FullAccount.Title":"Tu espacio de almacenamiento en iCloud está lleno.","AccountMenuPopover.SignOut":"Cerrar sesión","CloudOS.LandingPage.Mail.Description":"Envía y recibe correos desde tu dirección de correo electrónico @icloud.com en cualquier dispositivo y en la web.","VoiceOver.AppSwitcher.Close":"Cerrar selector de apps","AccountPage.Settings.AppleID.Description":"Revisa o actualiza la información importante como tu nombre, contraseña y tus detalles de seguridad. Comprueba cómo otras personas pueden contactarte, consulta tu información de pago y administra los dispositivos conectados a tu cuenta.","AccountPage.Settings.LookMeUpByEmail.Button.Name":"Administrar apps","CloudOS.Springboard.LearnMore.Tablet.Link.Title":"Más información…","PlanDetailsPage.Included":"Incluido","VoiceOver.RemindersHomeTile.Reminders":"Recordatorios","Drive.Icon.Description.PowerPoint":"Presentación de PowerPoint","StoragePage.StorageWarning.AlmostFull":"Tu espacio de almacenamiento en iCloud está casi lleno. Amplía tu plan para obtener más espacio.","ShortName.NavLinks.DataRecovery":"Recuperación de datos","CloudOS.TermsAndConditions.ChinaTerms.Description":"Acepto los términos y condiciones de iCloud operado por GCBD.","Keynote.TitleName":"iCloud Keynote","CloudOS.Toolbar.AppSwitcherMenu.YourPlan":"Tu plan de iCloud","AccountPage.Settings.Access.Signout.Confirm":"Cerrar sesión","RecoveryPage.ContactsRecoveryModalContent.Description":"Puedes restaurar tus contactos de una versión anterior que se haya archivado automáticamente en iCloud.","CloudOS.LandingPage.Reminders.Description":"Tus recordatorios siempre estarán actualizados en cualquier dispositivo y en la web.","CloudOS.pages.FileType":"documento","CloudOS.LegalFooterView.Text.Fragment.Copyright":"Copyright © %{currentYear} Apple Inc. Todos los derechos reservados.","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.NoDevice.Description":"Ve a Configuración #{chevron} %{fullName} #{chevron} iCloud #{chevron} Almacenamiento en iCloud #{chevron} Uso familiar","VoiceOver.NotesHomeRow.Summary.AriaLabel":"%{isShared}%{title} %{snippet} a las %{time}","StorageUsageList.Family.Personal.Title":"Usado por ti","HomePage.CustomizeDashboard.TilePicker.Label":"¿Qué mosaico quieres usar?","VoiceOver.CustomizeDashboard.OpeningPage":"Ahora se muestra la personalización de la página de inicio","ShareAcceptancePage.User.Description.Keynote":"%{displayName} te invitó a colaborar en una presentación.","Banner.Beneficiary.Multiple.Description":"Tienes acceso a la cuenta de %{firstName} hasta el %{date}. Después de esa fecha, los datos y la cuenta de %{firstName} se eliminarán de forma permanente. Los demás contactos digitales de %{firstName} podrán ver los cambios que se realicen en esta cuenta.","ShareAcceptancePage.EmailVerificationSentDialog.Title":"Enlace de verificación enviado","Photos.DisplayName":"Fotos","CloudOS.LandingPage.Find.Description":"Busca tus dispositivos iPhone, iPad, Mac, Apple Watch, AirPods o Beats. O ayuda a encontrar los dispositivos registrados en Compartir en familia.","FileIcon.FileType.jpg":"Imagen JPEG","CloudOS.UnsavedChanges.Alert.Title":"Se están guardando los cambios","StoragePage.StorageWarning.Full":"Tu espacio de almacenamiento en iCloud está lleno. Amplía tu plan para obtener más espacio.","PrivateRelayTile.Description":"Protégete mientras navegas por Internet","HomePage.CustomizeDashboard.RemovedTile.AriaLabel":"Se eliminó %{tileName}","NumbersHomeTile.Heading":"Numbers","StorageUsageList.FreeStorage":"%{free} libre(s)","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointOne":"El archivo de calendarios que selecciones reemplazará los calendarios en todos tus dispositivos.","AccountPage.Settings.AppleID.Button.Name":"appleid.apple.com","FileIcon.FileType.avi":"Película AVI","VoiceOver.DriveHomeTile.Documents":"Documentos","ICloudPlusPage.PlanNavLink":"Ver plan","DeviceBackupList.TotalNumber.One":"1 dispositivo","HomeKitSecureVideoTile.Description.One":"Compatibilidad con 1 cámara","RemoveTileAlert.Title":"¿Quieres eliminar el mosaico %{tileName}?","CloudOS.Error.AuthDidNotValidateOffline.Title":"No estás conectado a Internet","FileIcon.FileType.ai":"Documento de Adobe Illustrator","StaticPages.UnsupportedBrowser.Message":"Tu navegador es incompatible.","DeviceBackupList.TotalNumber.Zero":"0 dispositivos","CloudOS.LandingPage.IClouddrive.Description":"Ve y comparte fácilmente todos tus archivos almacenados en iCloud desde cualquier dispositivo y en la web.","ProfileCard.PlanType.Standard":"iCloud","RecoveryPage.ArchivesRecoveryList.RestoreButton":"Restaurar","Notice.Lite.Title":"Todo el mundo puede usar Pages, Numbers y Keynote para iCloud","CloudOS.Toolbar.AppSwitcherMenu.Storage":"Almacenamiento en iCloud","ContinueOnDevice.SuccessDialog.Description.LineOne.TwoDevices":"Busca la notificación de Configuración en %{device1} y %{device2}.","StorageUsageList.Family.ImageAlt":"Imagen de perfil de %{familyMemberName}","ShareAcceptancePage.Description.Public":"Descarga una copia de tu dispositivo o inicia sesión con tu Apple ID para agregarlo a tu iCloud Drive.","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertSuccess.Title":"Contactos restaurados","Contacts.DisplayName":"Contactos","ImagePicker.DoneButtonLabel":"Guardar","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertSuccess.Description":"Tus contactos se restauraron correctamente a las %{time}. Los contactos restaurados aparecerán en todos tus dispositivos.","CloudOS.Error.AppPCSRequired.Title":"No se puede cargar %{applicationName}","CloudOS.Button.OK.Title":"OK","RecoveryPage.BookmarksTile.TotalNumber.Many":"%{count} marcadores","AccountTilePopover.Button.Text":"Se produjo un problema al cargar tu foto de Apple ID.","CloudOS.Springboard.LearnMore.Tablet.Text":"Usa más apps en iCloud.com ampliando Safari.","VoiceOver.CalendarHomeTile.PrimaryActionDescription":"Nuevo evento","VoiceOver.RemindersHomeRow.Summary.AriaLabel.Scheduled":"%{title} vence el %{date}","RecoveryPage.DriveItemsTile.TotalNumber.Zero":"No hay archivos","CloudOS.LandingPage.Keynote.Description":"Crea presentaciones memorables con Keynote. Colabora con tu equipo en cualquier dispositivo o en la web.","ProfileCard.PlanType.Plus":"iCloud+","CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com":"iCloud.com","NumbersHomeTile.TotalNumber.Loading":"Cargando…","PlanDetailsPage.Bullets.Lite.Storage":"1 GB de almacenamiento","VoiceOver.RemindersHomeRow.ReminderCheckmark.AriaLabel":"Marcar como terminado","FileIcon.FileType.m4p":"Audio MPEG-4 protegido","UpgradePlanTiles.FamilySharing.LinkText":"Obtén más información sobre Compartir en familia de iCloud+","FileIcon.FileType.java":"Código fuente Java","Photo.Created":"Foto creada el %{date}","UpgradePlanTiles.Beta":"BETA","StorageUsageList.Description.Loading":"Cargando…","StaticPages.LearnMore":"Más información","PhotosHomeTile.TotalNumber.Video.Many":"%{count} videos","Schoolwork.DisplayName":"Tareas Escolares","StoragePage.Badge":"Ver plan","StaticPages.UnsupportedBrowser.SubMessage":"Para usar iCloud, recomendamos que uses la versión más reciente de Safari, Firefox, Microsoft Edge o Chrome.","ICloudPlusPage.OnlyOnDevices.Title":"Sólo en tus dispositivos","FaceTime.Unsupported.Description.Safari.ContinueAnyway":"El audio y el video podrían no funcionar. Puedes intentar continuar de todos modos, o copia el enlace y pégalo en la versión más reciente de <a target=\"_blank\" href=\"https://www.apple.com/la/safari/\">Safari</a>, <a target=\"_blank\" href=\"https://www.microsoft.com/edge/\">Microsoft Edge</a> y <a target=\"_blank\" href=\"https://www.google.com/intl/es-419/chrome/\">Google Chrome</a>","VoiceOver.HomePage":"Página de inicio de iCloud.com","MailDropPage.Error.Title.Expired":"Vencido","UpgradePlanTiles.MoreStorage.Description":"Elige la cantidad de almacenamiento indicada para ti. Los planes de iCloud+ incluyen 50 GB, 200 GB o 2 TB de almacenamiento.","PlanDetailsPage.Bullets.Plus.Storage":"%{storage} de almacenamiento","Photos.CloudKit.Unrecoverable.Title":"Las fotos compartidas no están disponibles","FileIcon.FileType.m3u":"Playlist de audio M3U","FileIcon.FileType.bin":"Archivo MacBinary","ShareAcceptancePage.User.Description.Note.Name":"Nota","RecoveryPage.CalendarsRecoveryModalContent.Title":"Restaurar calendarios y recordatorios","FileIcon.FileType.dxf":"Archivo DXF de AutoCAD","FileIcon.FileType.perl":"Script de Perl","FileIcon.FileType.py":"Script de Python","MailDropPage.Description":"Archivo adjunto de Mail Drop","RemindersTile.Date.Tomorrow.Time":"Mañana a la(s) %{time}","DescribePlanPricing.Free":"Gratis","PlanDetailsPage.ExtraStorage":"%{storage} de almacenamiento adicional","CloudOS.LandingPage.Animation.Description":"Animación que muestra los Memojis de distintos usuarios rodeados por los íconos de las apps que el usuario usa más de forma personal","FileIcon.FileType.apk":"Aplicación de Android","RecoveryPage.Details.Standard":"Recupera archivos que se hayan eliminado de iCloud Drive y otras apps en los últimos 30 días o restaura una versión anterior de Calendario, Contactos o los marcadores y la lista de lecturas de Safari.","VoiceOver.DocumentHomeRow.Summary.NotShared.AriaLabel":"%{title} a las %{time}","CloudOS.AppIcon.Badge.LargeNumber":"%{badgeCount}+","ICloudPlusPage.OnlyOnDevices.Description":"Algunas funciones de iCloud+ solo se pueden configurar y administrar desde un dispositivo Apple. Obtén más información sobre cada función y obtén enlaces para administrarlos en tus dispositivos.","CloudOS.Authentication.SignIn.AppleIdView.Title":"Iniciar sesión con Apple ID","RecoveryPage.ContactsRecoveryModalContent.ListDescription.FirstLine":"Si los restauras con un archivo de contactos nuevo:","PlanDetailsPage.Bullets.Plus.Premium.FamilySharing":"Compartir en familia","CloudOS.Application.Title.FaceTime":"esta aplicación","CloudOS.Springboard.ManageAccessLink.Title":"Administrar cuenta de %{firstName}","NavigationDrawer.Plan.Type.Standard":"Estándar","ContinueOnDevice.iCloudPlanUpgrade.Title":"Cómo cambiar tu plan de iCloud","HelpMenu.AriaLabel":"Página del Soporte técnico de Apple (se abre en una pestaña nueva)","FileIcon.FileType.m4r":"Tono","ContinueOnDevice.NoDevice.Mac.Description":"En una Mac","Toolbar.Button.CreateNew.AriaLabel":"Crear","FileIcon.FileType.txt":"Texto","CloudOS.Toolbar.AppSwitcherMenu.YourStorage":"Tu almacenamiento en iCloud","Utils.BytesToHumanizedFormat.Size.EB":"%{value} EB","CloudOS.Sharing.Unavailable.NoLongerShared.Description":"Este %{fileType} ya no se comparte.","ImagePicker.ChangeImageButtonLabel":"Buscar una imagen nueva en tu dispositivo…","PlanDetailsPage.ChangePlanSection.Title.Lite":"Acerca del acceso a iCloud sólo para la versión web","CalendarHomeTile.EmptyContent.NoMoreEvents":"No hay más eventos para hoy","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.NoDevice.Description2":"Ve a Configuración del Sistema #{chevron} Compartir en familia #{chevron} Almacenamiento en iCloud #{chevron} Compartir…","NavigationDrawer.Plan.Type.Lite":"Sólo para la versión web","Utils.BytesToHumanizedFormat.Size.bytes":"%{value} bytes","RecoveryPage.ArchivesTile.TotalNumber.Zero":"No hay archivos","FileIcon.FileType.safariextz":"Extensión de Safari","UpgradePlanTiles.FamilySharing":"Compartir en familia","StorageUsageList.Description":"#{freeStorage} • #{usedStorage}","StorageUsageList.Family.Personal.TitleWithName":"Usado por %{firstName}","VoiceOver.DeviceBackupList.BackupTime.TimeDescription":"Hora del último respaldo","FamilySharingTile.Content.Description.Member":"Estás usando el plan de iCloud+ compartido por %{name}.","Utils.BytesToHumanizedFormat.Size.EB.Compact":"%{value} EB","RecoveryPage.BookmarksRecoveryModal.SelectAll":"Seleccionar todo","FileIcon.FileType.ipa":"App de iOS","CreationMenu.Presentation.AriaLabel":"Nueva presentación","CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com.cn":"iCloud.com.cn","AccountPage.Settings.LookMeUpByEmail.Modal.List.Description":"Puedes evitar que una app de la lista muestre tu nombre y dirección de correo electrónico a otras personas si quitas la selección de la casilla de la app.","StoragePage.Description.WebOnly":"Usa tu almacenamiento para guardar, compartir y colaborar en documentos, hojas de cálculo, presentaciones y archivos.","FMIP.DisplayName":"Encontrar","AppSwitcherOnboardingPopover.CloseButton.AriaLabel":"Cerrar consejo","CalendarIcon.Monday":"lunes","RecoveryPage.BookmarksRecoveryModal.Delete":"Eliminar","IndexFile.Meta.Description":"Inicia sesión en iCloud para acceder a tus fotos, videos, documentos, notas, contactos y mucho más. Usa tu Apple ID o crea una cuenta para empezar a usar los servicios de Apple.","CloudOS.Toolbar.AppSwitcherMenu.HomePage":"Página de inicio de iCloud","RecoveryPage.BookmarksRecoveryModal.DateDeleted":"Fecha de eliminación","CloudOS.Error.AuthDidNotValidateOffline.Description":"No puedes iniciar sesión en iCloud porque tu dispositivo está sin conexión.","DateTime.Relative.Yesterday":"Ayer","VoiceOver.NumbersHomeTile.Spreadsheets":"Hojas de cálculo","AccountPage.Settings.Access.Description":"Cierra sesión inmediatamente en todos los navegadores que en este momento tienen la sesión iniciada en iCloud.com con este Apple ID.","StorageUsageList.UsedStorage":"%{used} en uso","ShareAcceptancePage.Accept.Description.Folder.UnsupportedDevices":"Si aceptas la invitación, esta carpeta se agregará a tu iCloud Drive, pero no consumirá tu almacenamiento en iCloud. Las carpetas compartidas se pueden ver solo en dispositivos que tengan iOS 13.4 o macOS Catalina 10.15.4 como mínimo.","CloudOS.AlarmNotificationSpinner.ApplicationLoading":"Cargando","FaceTime.TitleName":"FaceTime","UpgradePlanTiles.PrivateRelay.Description":"Usa la función Retransmisión privada de iCloud en tu iPhone, iPad, iPod touch y Mac para ocultar tu dirección IP y tu actividad de navegación en Safari y proteger el tráfico de internet sin encriptar.","CalendarIcon.Tuesday":"martes","FileIcon.FileType.gif":"GIF","Breadcrumbs":"Breadcrumbs","Banner.Beneficiary.Single.Description":"Tienes acceso a la cuenta de %{firstName} hasta el %{date}. Después de esa fecha, los datos y la cuenta de %{firstName} se eliminarán de forma permanente.","Banner.QuotaAlmostExceeded.FullAccount.Title":"Tu espacio de almacenamiento en iCloud está casi lleno.","Alert.Settings.Button.Title":"Configuración","RemindersHomeTileEmpty.Create.Short":"Crea tu primer recordatorio","ContinueOnDevice.setupPrivateRelay.Title":"Cómo administrar la configuración de Retransmisión privada","VoiceOver.ProfileCard.SettingsLink":"Ir a la página Configuración de iCloud","FileIcon.FileType.xcodeproj":"Proyecto de Xcode","PlanDetailsPage.Included.iCloudMail.Link.Title":"la dirección de Mail en iCloud","StorageUsageList.Messages.Count":"Todos los mensajes","AccountPage.AppleId.Title":"Apple ID","CloudOS.Sharing.Error.UpgradeToNotes.Title":"¡Es hora de ampliar tus notas!","CreationMenu.Note.AriaLabel":"Nota nueva","Name.Display.FirstAndFamilyNames":"%{firstName} %{familyName}","CloudOS.Authentication.SignIn.Button":"Iniciar sesión","FileIcon.FileType.pps":"Presentación de diapositivas de Microsoft PowerPoint 97-2004","Banner.Promotion.HideMyEmail.Link":"Primeros pasos en Configuración","PlanDetailsPage.Plus.Details":"iCloud+ con %{storage} de almacenamiento","CloudOS.LegalFooterView.Text.Fragment.TermsUrl.Title":"Términos y condiciones","CloudOS.TermsAndConditions.Title.WithoutiCloud":"Términos y condiciones","PlanDetailsPage.TitleWithName":"Plan de iCloud de %{firstName}","Notice.Windows.Subtitle":"Mantén tus fotos, videos, documentos y más actualizados en tu PC.","CloudOS.Authentication.QuickAccess.ManageDevices.Title":"Administrar dispositivos","RecoveryPage.BookmarksRecoveryModal.Deleting":"Eliminando…","PlanDetailsPage.ChangePlanSection.LearnMore.Text":"Ver #{iCloudPlusLink}","Error.UnsupportedBrowser.Warning.Description":"Puedes usar este navegador, pero iCloud funciona mejor con la versión más reciente de Safari, Chrome, Firefox, Microsoft Edge o Internet Explorer.","WelcomePage.Welcome.Beneficiary":"iCloud de %{name}","PlanDetailsPage.Bullets.Features.Notes":"Notas","FileIcon.FileType.pptx":"Presentación de Office Open XML","CustomEmailDomainTile.Content.Title.One":"1 dominio","RecoveryPage.BookmarksRecoveryModal.LearnMore":"Más información","PlanDetailsPage.Bullets.Features.Pages":"Pages","HomePage.CustomizeDashboard.Header.Heading":"Personalización de la página de inicio","MailHomeTile.SetUpTitle":"Configura Mail en iCloud","AccountPage.Settings.LookMeUpByEmail.Modal.Description":"Las apps de iOS, iPadOS y macOS que permiten que otros usuarios de esas apps te busquen por la dirección de correo electrónico asociada con tu Apple ID aparecerán aquí. Las personas que te busquen también podrán ver tu nombre y tus apellidos.","AccountPage.Settings.Customize.Description":"Elige las apps que quieres ver en tu página de inicio de iCloud.com.","Alert.Cancel.Button.Title":"Cancelar","FileIcon.FileType.stl":"Archivo de estereolitografía","ContinueOnDevice.SuccessDialog.Description.LineOne.ThreeDevices":"Busca la notificación de Configuración en %{device1}, %{device2} y %{device3}.","CalendarHomeTile.TotalNumber.Two":"Todos los calendarios • 2 eventos","NavigationDrawer.Plan.Description.Large":"%{size} de almacenamiento","VoiceOver.DocumentHomeRow.Summary.MissingNumShared.AriaLabel":"%{title} a las %{time}, compartido","LongName.NavLinks.DataRecovery":"Recuperación de datos","ContinueOnDevice.iCloudStorageManage.StorageFull.NoDevice.Description":"Ve a Configuración #{chevron} %{fullName} #{chevron} iCloud #{chevron} Administrar almacenamiento de la cuenta #{chevron} Cambiar plan","VoiceOver.RemindersHomeRow.OpenReminder":"Toca para ir al recordatorio %{title}","CloudOS.LegalFooterView.Text.Fragment.PrivacyUrl.Title":"Política de privacidad","CloudOS.Button.GoBack.Title":"Regresar","FileIcon.FileType.numbers":"Hoja de cálculo de Numbers","CreationMenu.Event.AriaLabel":"Nuevo evento","Contacts.TitleName":"Contactos de iCloud","UpgradePlanTiles.MoreStorage.LinkText":"Obtén más información sobre los planes y los precios de iCloud+","Notification.Alarm.Future.Message":"“%{eventTitle}” el %{date} a la(s) %{time}","ContinueOnDevice.setupPrivateRelay.NoDevice.Description":"Ve a Configuración #{chevron} %{fullName} #{chevron} iCloud #{chevron} Retransmisión privada","RecoveryPage.ArchivesTile.TotalNumber.Many":"%{count} archivos","CloudOS.Authentication.QuickAccess.FMIP.Title":"Buscar dispositivos","CloudOS.calendar.FileType":"calendario","ContinueOnDevice.iCloudPlusFamilySharing.OrganizerNoFamily.NoDevice.Description":"Ve a Configuración #{chevron} %{fullName} #{chevron} iCloud #{chevron} Almacenamiento en iCloud #{chevron} Comparte con la familia","Notification.PlaceholderDescription.mail":"Sin asunto","CloudOS.MailDrop.Download.Description":"El remitente cargó este archivo utilizando Mail Drop.","ContinueOnDevice.iCloudStorageManage.NoDevice.Description":"Ve a Configuración #{chevron} %{fullName} #{chevron} iCloud #{chevron} Almacenamiento en iCloud","ContinueOnDevice.iCloudStorageManage.StorageFull.NoDevice.Description2":"Ve a Configuración del Sistema #{chevron} Apple ID #{chevron} iCloud #{chevron} Administrar #{chevron} Cambiar plan de almacenamiento","CloudOS.Sharing.Error.UpgradeToiCloudDrive.Title":"Ampliar a iCloud Drive","RecoveryPage.BookmarksRecoveryModal.Description":"Puedes restaurar los marcadores de Safari eliminados durante los últimos 30 días.","ShareAcceptancePage.Button.NewAccount":"Crea tu Apple ID","Toolbar.Button.FeedbackButton.AriaLabel":"Enviar comentarios","VoiceOver.MailHomeRow.OpenEmail":"Toca para ir al correo electrónico de %{from}","Numbers.DisplayName":"Numbers","ShareAcceptancePage.Description.Private":"Te unirás como %{userName} (%{shareeId})","UpgradePlanTiles.HomeKitSecureVideo.Description":"Conecta tus cámaras de seguridad en la app Casa para que puedas grabar y ver los videos desde cualquier lugar. Es privado, seguro y no usa tu almacenamiento en iCloud.","RecoveryPage.ContactsRecoveryModalContent.Title":"Restaurar contactos","ContinueOnDevice.iCloudPlanUpgrade.NoDevice.Title":"Cómo cambiar tu plan de iCloud","CloudOS.LandingPage.LearnMoreLink.Text":"Obtén más información sobre %{applicationNameToBeDisplayed}","RemindersHomeTileEmpty.Create":"Crea tu primer recordatorio en Recordatorios para iCloud","AccountMenuPopover.ManageAppleId":"Administrar Apple ID","PlanDetailsPage.ChangePlanSection.LearnMore.Link.Title":"planes de iCloud+","ICloudPlusPage.PrivateRelayModalContent.Title":"Retransmisión privada","AccountPage.PlanCard.iCloud+.Link.Name":"Funciones","PlanDetailsPage.Title":"Tu plan de iCloud","RemindersHomeTile.CreateFirst.TotalNumber.Zero":"Todo iCloud","CloudOS.AccountNeedsSetup.Title":"Configura iCloud en un dispositivo para usar %{currentDomain}.","CloudOS.OutOfNetworkAcceptance.PhoneVettedError.Description":"Otro Apple ID ya usa el número de teléfono %{phoneNumber}. Inicia sesión en iCloud con ese Apple ID y vuelve a intentarlo.","DescribePlanPricing.Monthly.WithSpace":"%{price} por mes","CloudOS.Sharing.Error.UpgradeToiCloudDrive.Description":"Puedes ampliar tu plan activando iCloud Drive en Configuración en un dispositivo con iOS 8 o una versión posterior.","HomeTile.Loading":"Cargando","VoiceOver.CalendarHomeTile.Events":"Eventos de Calendario","AccountPage.Settings.Customize.Title":"Personalizar","CloudOS.Springboard.Greeting.0-6":"Buenas noches.","WelcomePage.Welcome.Text":"Te damos la bienvenida, %{name}.","CustomEmailDomainTile.Content.Title.Two":"2 dominios","FileIcon.FileType.exe":"Aplicación de Microsoft Windows","FileIcon.FileType.sh":"script de shell","RecoveryPage.BookmarksTile.TotalNumber.Zero":"No hay marcadores","AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.Many":"%{appsCount} apps","VoiceOver.AccountPage.PlanCard":"Plan de iCloud, almacenamiento y enlaces a otras páginas.","CloudOS.Authentication.TrustBrowserAndSignOutButton.Title":"Confiar y cerrar sesión","PhotosHomeTile.TotalNumber.Video.One":"1 video","HomePage.CustomizeDashboard.RemoveButton.AriaLabel":"Elimina el mosaico %{tileName} del tablero","Truncate.ExtraItems.Two":"y 2 más","NotesHomeTile.TotalNumber.Loading":"Cargando…","ContinueOnDevice.homeKitSecureVideo.Title":"Cómo configurar video seguro de HomeKit","ImagePicker.Title":"Cambiar foto de Apple ID","FileIcon.FileType.keychain":"llavero","NavigationDrawer.Recovery.Description.Lite":"Restaura archivos y contactos eliminados.","ShareAcceptancePage.Button.NotNow":"Ahora no","PagesHomeTile.TotalNumber.Description":"Documentos","VoiceOver.ImagePicker.LoadingAriaLabel":"Imagen cargando","CloudOS.LandingPage.Pages.Description":"Crea documentos increíbles con Pages. Colabora con tu equipo en cualquier dispositivo y en la web.","NavigationDrawer.AriaLabel":"Plan y almacenamiento","CloudOS.TermsAndConditions.ChinaTerms.Paragraph.One":"Ahora los servicios de iCloud en China continental son operados por la empresa china de servicios de internet Guizhou on the Cloud Big Data Industrial Development Co., Ltd. (GCBD). Esto nos permite continuar mejorando la velocidad y confiabilidad de iCloud, así como cumplir con las regulaciones chinas.","ICloudPlusPage.FamilySharingModalContent.SubTitle.Sharing":"Compartido por %{name}","HelpMenu.UserGuide":"Manual de uso de iCloud","RecoveryPage.DriveItemsTile.TotalNumber.Two":"2 archivos","LongName.NavLinks.Plan":"Tu plan de iCloud","CustomDomainSettings.DisplayName":"Configuración de dominio personalizado","RecoveryPage.BookmarksTile.Title":"Restaurar marcadores","CloudOS.Error.MailNotEnabled.Title":"Se necesita un correo electrónico de iCloud","UpgradePlanTiles.HideMyEmail.LinkText":"Obtén más información sobre Ocultar mi correo","CloudOS.numbers.FileType":"hoja de cálculo","CloudOS.TermsAndConditions.SuccessConfirmation.UpToDate.Description":"Tus términos y condiciones están actualizados.","CloudOS.Error.ServiceLocked.Description.HourOrMore":"Debido a operaciones de mantenimiento en la cuenta, %{applicationName} no estará disponible durante varias horas.","CrashReporter.Privacy":"Al hacer clic en “Enviar a Apple”, aceptas que Apple recopile y use esta información como parte de sus servicios de asistencia y con el fin de mejorar sus productos y servicios. Este informe incluirá información personal, como tus datos y nombre de usuario. Para obtener más información sobre la política de privacidad de Apple, consulta ","ContinueOnDevice.iCloudStorageManage.Description":"Usa Continuar en el dispositivo para enviar una notificación a tus dispositivos Apple que te llevará directamente a la configuración del almacenamiento en iCloud.","Notice.Windows.DownloadNow.Text":"Descargar ahora","CloudOS.LocalizationFormatter.DecimalSymbol":".","Utils.BytesToHumanizedFormat.Size.YB.Compact":"%{value} YB","CloudOS.TermsAndConditions.SuccessConfirmation.Title":"Términos y condiciones","NavigationDrawer.Storage.Description.Large":"%{usedSize} en uso","CalendarHomeRow.Time.AllDay":"Todo el día","AccountPage.Settings.LookMeUpByEmail.Modal.LearnMore":"Más información","CloudOS.LandingPage.Unsupported.Tablet.Description":"Para usar %{applicationNameToBeDisplayed} en iCloud.com, usa cualquier navegador en una computadora.","RecoveryPage.FilesRecoveryUnsupportedModal.Content":"Para restaurar archivos en iCloud.com, usa el navegador de una tablet o una computadora.","Error.AppNotLoading.Description":"Hubo un problema al abrir %{appName}.","FileIcon.FileType.iso":"Imagen de disco ISO","CloudOS.TermsAndConditions.SuccessConfirmation.Description":"Has aceptado correctamente los términos y condiciones de iCloud.","VoiceOver.CustomizeDashboard.ClosingPage":"Ahora se muestra la página de inicio","UpgradePlanTiles.Upgrade":"Actualiza a iCloud+","PlanDetailsPage.Bullets.Features.Contacts":"Contactos","RecoveryPage.ContactsRecoveryModalContent.ListDescription.BulletPointTwo":"Tus contactos actuales se archivarán para que puedas recuperarlos si los necesitas.","CrashReporter.CreateRadar":"Crear un Radar","FileIcon.FileType.htm":"Texto HTML","VoiceOver.ExternalLink.Description":"(se abre en una pestaña nueva)","FileIcon.FileType.pkg":"Archivo de paquete de Installer","ContinueOnDevice.iCloudPlusFamilySharing.Organizer.NoDevice.Description2":"Ve a Configuración del Sistema #{chevron} Compartir en familia #{chevron} Almacenamiento en iCloud","CloudOS.Authentication.SignIn.ShareAcceptance.Subtitle":"Inicia sesión con tu Apple ID para ver la invitación de %{name}.","VoiceOver.NotesHomeTile.Notes":"Notas","ICloudPlusPage.HomeKitSecureVideoModalContent.Section.Description":"Agrega tus cámaras de seguridad domésticas a la app Casa para grabar los videos y verlos desde cualquier lugar. Los videos están encriptados de extremo a extremo y no ocupan espacio de almacenamiento en iCloud. Puedes acceder a Video seguro de HomeKit en tu iPhone, iPad, iPod touch, Mac o Apple TV.","ShareAcceptancePage.EmailVerificationDialog.Content":"Selecciona tu dirección de correo electrónico o número de teléfono de la lista a continuación, y te enviaremos un enlace de verificación. Si no ves tu dirección de correo electrónico o número de teléfono, comunícate con la persona que te envió la invitación.","CloudOS.Sharing.Error.UpgradeToNotes.SubTitle":"Para abrir las notas compartidas en la web, necesitas abrir la app Notas en iOS 9, OS X 10.11 o en una versión posterior y actualizar tu cuenta de iCloud.","Ellipsis":"…","VoiceOver.CalendarHomeRow.Summary.AriaLabel":"%{calendar}, %{title}, %{time}","AccountMenuPopover.Button.AriaLabel":"Cuenta","CreationMenu.DriveFolder.AriaLabel":"Carpeta nueva","CloudOS.MailDrop.Download.Size":"tamaño <b>%{size}</b>","AccountPage.Settings.FindDevices.Button.Name":"Buscar dispositivos","ICloudDrive.TitleName":"iCloud Drive","FamilySharingTile.Heading":"Compartir en familia","ImagePicker.Alert.Description.FileTooLarge":"La imagen que estás intentando cargar es demasiado grande. El tamaño máximo permitido es 10 MB.","VoiceOver.MailHomeRow.Summary.AriaLabel":"%{unread}%{from} %{subject} a las %{time}","UpgradePlanTiles.HomeKitSecureVideo":"Video seguro de HomeKit","KeynoteHomeTileEmpty.Create.Short":"Crea tu primera presentación","ShareAcceptancePage.Accept.Description.RemindersList":"Si aceptas esta invitación, estos recordatorios se agregarán a tus recordatorios.","MailHomeTile.TotalNumber.Zero":"Bandeja de entrada • No hay mensajes no leídos","FileIcon.FileType.epub":"Publicación electrónica (ePub)","PhotosHomeTile.Description":"%{photoCount} • %{videoCount}","UnsupportedApps.Tablet":"Para usar %{appName} en iCloud.com, usa el navegador de una computadora de escritorio.","CloudOS.iclouddrive.FileType":"elemento","HomePage.CustomizeDashboard.Header.Button.AddTile":"Agregar mosaico","FileIcon.FileType.eps":"PostScript encapsulado","NavigationDrawer.Storage.Drawer.AriaLabel":"Tu almacenamiento","Application.Title":"iCloud","FaceTime.Unsupported.Description":"Copia el enlace y pégalo en otro navegador. FaceTime funciona con la versión más reciente de <a target=\"_blank\" href=\"https://www.microsoft.com/edge/\">Microsoft Edge</a> y <a target=\"_blank\" href=\"https://www.google.com/intl/es-419/chrome/\">Google Chrome</a>","FileIcon.FileType.key":"Presentación de Keynote","PlanDetailsPage.Bullets.Features.Mail":"Mail en iCloud","RecoveryPage.ArchivesRecoveryList.RestoringArchiveDescription":"Restaurando archivo del %{date}","ContinueOnDevice.FailedDialog.Description":"Hubo un problema al enviar la notificación. Vuelve a intentarlo más tarde.","CustomEmailDomainTile.Content.Title.Zero":"0 dominios","ShareAcceptancePage.VerifyAccessDialog.Title":"Verificación","DescribePlanPricing.Monthly":"%{price}/mes","FileIcon.FileType.m4v":"Película MPEG-4 Apple","RecoveryPage.BookmarksRecoveryModal.Folder":"Carpeta","ShortName.NavLinks.Plan":"Plan de iCloud","CloudOS.AccountNeedsSetup.Description":"Antes de poder usar %{currentDomain}, debes usar tu Apple ID para configurar iCloud en un dispositivo iOS o macOS.","CloudOS.LandingPage.iCloudPlusTile.Title":"Más almacenamiento y funciones adicionales para proteger tu privacidad","Banner.QuotaExceeded.OptionalLink.Text":"Más información","Truncate.ExtraItems.One":"y 1 más","CreationMenu.Note":"Nota","CloudOS.Sharing.Unavailable.AlreadyAccepted.Description":"Ya se aceptó la invitación para ver este %{fileType}.","HideMyEmailTile.Description":"Mantén privado tu correo electrónico personal","FileIcon.FileType.rar":"Archivo RAR","LoadingPage.Problem":"Hubo un problema al abrir %{application}.","StorageUsage.Message":"%{used} de %{total} en uso","CloudOS.TermsAndConditions.ChinaTerms.Paragraph.Two":"Los servicios de iCloud y los datos que almacenes en iCloud, incluyendo fotos, videos, documentos y respaldos, estarán sujetos a los nuevos términos y condiciones de iCloud operado por GCBD.","Error.UnsupportedBrowser.IgnoreButton.Title":"Ignorar","FileIcon.FileType.js":"JavaScript","ImagePicker.Alert.Title.UnsupportedFileType":"Formato de imagen no válido","CloudOS.OutOfNetworkAcceptance.SendVerificationButton.Title":"Enviar enlace de verificación","HideMyEmailTile.Heading":"Ocultar mi correo","VoiceOver.MailHomeTile.PrimaryActionDescription":"Nuevo mensaje","CloudOS.Error.AppPCSRequired.Description":"Surgió un problema al cargar los datos de la aplicación.","CloudOS.AccountNeedsSetup.Domain.icloud.com":"iCloud.com","PlanDetailsPage.Plus.Free":"Gratis","Notification.Alarm.Snooze.Title":"Posponer","ImagePicker.CancelButtonLabel":"Cancelar","CloudOS.SettingsLinkSpinner.Loading":"Cargando","ShareAcceptancePage.User.Description.Folder":"%{displayName} te invitó a colaborar en una carpeta compartida.","CloudOS.Error.AppPCSDeleted.Description":"No se puede iniciar esta aplicación. Ponte en contacto con el Servicio de atención al cliente.","ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.Five":"Para hasta 5 cámaras de seguridad domésticas","ContinueOnDevice.iCloudPlusFamilySharing.Member.Description":"Usa Continuar en el dispositivo para enviar una notificación a tus dispositivos Apple que te llevará directamente a la configuración del plan compartido de iCloud+.","ShareAcceptancePage.User.Description.Note":"%{displayName} te invitó a colaborar en una nota.","CloudOS.TermsAndConditions.SuccessConfirmation.GameCenter.UpToDate.Description":"Tus términos y condiciones están actualizados. Ve a Game Center en tu Mac o dispositivo e inicia sesión nuevamente.","ICloudPlusPage.FamilySharingModalContent.Section.Description.NotSharing":"Con Compartir en familia, puedes compartir tu suscripción a iCloud+ con hasta 5 personas sin costo adicional. Automáticamente obtendrán acceso al almacenamiento en iCloud+ y a las funciones de privacidad como Retransmisión privada y Ocultar mi correo.","VoiceOver.AppIconButton.TilePicker.Add.Label":"Agregar mosaico de %{appName}","PlanDetailsPage.Standard.Price":"Gratis","CloudOS.RedirectedAuthentication.RedirectNeeded.Subtitle":"Para iniciar sesión con este Apple ID, ve a %{destinationDomain}.","PhotosHomeTile.TotalNumber.Photo.Zero":"No hay fotos","PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.Unlimited":"Compatibilidad de video seguro de HomeKit con un número ilimitado de cámaras","ShareAcceptancePage.EmailVerificationSentDialog.Buttons.Ok":"OK","ShareAcceptancePage.User.Description.Calendar.Name":"Calendario compartido","CloudOS.AccountNeedsSetup.HomePageButton.Title":"Página de inicio de iCloud","PagesHomeTile.TotalNumber.Zero":"No hay documentos","StorageUsageList.Content.Error.Button.Label":"Vuelve a intentarlo","Alert.Help.Button.Title":"Ayuda","CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.DescriptionTwo":"Intenta abrir el archivo compartido nuevamente o intenta abrirlo en otro dispositivo.","FileIcon.FileType.rtf":"Texto enriquecido (RTF)","ErrorHomeTileContent.Message":"Hubo un problema al cargar este contenido.","CloudOS.Toolbar.AppSwitcherMenu.Plan":"Plan de iCloud","PlanDetailsPage.Bullets.Features.Backup":"Respaldo en iCloud","CalendarIcon.Thursday":"jueves","FileIcon.FileType.hqx":"Archivo BinHex","Drive.Icon.Description.Archive":"Archivo ZIP","FaceTime.DisplayName":"FaceTime","CloudOS.MailDrop.Downloading.Description":"Consulta la carpeta de descargas de:","RecoveryPage.BookmarksRecoveryModal.Restoring":"Restaurando","RecoveryPage.DriveItemsTile.TotalNumber.Many":"%{count} archivos","Pages.DisplayName":"Pages","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertFailure.Title":"No se pudieron restaurar los contactos","CloudOS.Error.UnableToLoadApp.iCloudLiteAccount.Description":"Tu Apple ID %{appleId} no puede visualizar %{applicationTitle}. Inicia sesión con el Apple ID que utilizas en tu dispositivo.","FaceTime.Unsupported.Description.Safari":"Copia el enlace y pégalo en otro navegador. FaceTime funciona con la versión más reciente de <a target=\"_blank\" href=\"https://www.apple.com/la/safari/\">Safari</a>, <a target=\"_blank\" href=\"https://www.microsoft.com/edge/\">Microsoft Edge</a> y <a target=\"_blank\" href=\"https://www.google.com/intl/es-419/chrome/\">Google Chrome</a>","VoiceOver.NotesHomeRow.Shared":"Compartido","FaceTime.Unsupported.Button.Title.Secondary":"Copiar enlace","RecoveryPage.BookmarksRecoveryModal.LocalizedName.BookmarksMenu":"Menú de marcadores","Utils.BytesToHumanizedFormat.Size.KB.Compact":"%{value} KB","CloudOS.Sharing.Unavailable.Title":"%{fileType} no disponible","FileIcon.FileType.fbx":"Archivo de Filmbox","StaticPages.UnsupportedMobile.Message":"En estos momentos tu navegador no es compatible.","FileIcon.FileType.mid":"Audio Midi","PlanDetailsPage.Included.StandardPlus.LearnMore.Mail":"Obtén más información sobre #{iCloudMailLink}","ICloudPlusPage.ModalContent.LearnMore":"Más información","MailDropPage.Error.Description.Expired":"Este archivo ya no está disponible para descargar. Pídele al remitente que lo vuelva a enviar.","CloudOS.LandingPage.iCloudPlusTile.Image.Description":"Gráfico que representa los íconos de varios beneficios de iCloud+, incluidos hasta 2 TB de almacenamiento","FileIcon.FileType.ibooks":"Publicación electrónica (Apple Books)","RemoveTileAlert.Description":"Si eliminas este mosaico, no se eliminará ningún dato. Puedes ir directamente a %{tileName} desde el menú de acceso rápido.","CreationMenu.Mail":"Correo","Drive.Icon.Description.Key":"Presentación de Keynote","FileIcon.FileType.m4a":"Audio MPEG-4 Apple","CloudOS.LandingPage.Unsupported.Phone.Subdescription":"Otras apps están disponibles en este navegador, como Mail, Fotos y Drive.","HomePage.CustomizeDashboard.TilePicker.Add.Label":"¿Qué mosaico quieres agregar?","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertFailure.Title":"No se pudieron restaurar los calendarios","DriveHomeTile.Heading":"Drive","StaticPages.UnsupportedMobile.SubMessage":"Quizá puedas usar iCloud con las apps de correo, contactos y calendario de tu dispositivo.","VoiceOver.Close":"Cerrar","NavLinks.Shared":"Compartido","PagesHomeTileEmpty.Create.Short":"Crea tu primer documento","Utils.BytesToHumanizedFormat.Size.KB":"%{value} KB","CloudOS.TermsAndConditions.ChinaTerms.Title":"Tu cuenta de iCloud","CloudOS.TermsAndConditions.ContinueButton.Title":"Continuar","CloudOS.Authentication.SignIn.ShareAcceptance.CreateDescription":"¿No tienes un Apple ID? Puedes crear uno de forma gratuita.","VoiceOver.NumbersHomeTile.PrimaryActionDescription":"Nueva hoja de cálculo","VoiceOver.ImagePicker.CloseButtonLabel":"Cancelar","CloudOS.Authentication.TrustBrowser.SignOut.Title":"¿Quieres cerrar la sesión en iCloud.com?","RecoveryPage.BookmarksRecoveryModal.Restore":"Restaurar","StorageUsageList.Content.Error.Description":"Hubo un problema al cargar los detalles de tu almacenamiento en iCloud.","Utils.BytesToHumanizedFormat.Size.GB":"%{value} GB","ShortName.NavLinks.Storage":"Almacenamiento en iCloud","CloudOS.Toolbar.AppSwitcherMenu.Heading.More":"Más","FamilySharingTile.Description.Five":"Compártelo con hasta 5 personas","Drive.Icon.Description.Numbers":"Hoja de cálculo de Numbers","PlanDetailsPage.Standard.Details":"5 GB de almacenamiento","ContinueOnDevice.iCloudPlanUpgrade.NoDevice.Description2":"Ve a Configuración del Sistema #{chevron} Apple ID #{chevron} iCloud #{chevron} Administrar… #{chevron} Cambiar plan de almacenamiento…","FaceTime.UpdateNeeded.Description":"Actualiza a la versión iOS 14.5 o superior para unirte a esta llamada.","ShareAcceptancePage.User.Description.DriveFile.NoExtension":"%{displayName} te invitó a colaborar en un elemento.","CloudOS.AccountInfoMenuView.ManagedId.Title":"Administrar Apple ID","VoiceOver.RemindersHomeTile.PrimaryActionDescription":"Nuevo recordatorio","CustomEmailDomainTile.Heading":"Dominio de correo electrónico personalizado","RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.RestoreButton":"Restaurar","ShareAcceptancePage.VerifyAccessDialog.Buttons.NotNow":"Ahora no","DocumentHomeRow.SharedBy":"por %{sharedBy}","StorageUsageList.Family.List.Me":" (Yo)","VoiceOver.AppIconButton.TilePicker.Label":"Cambiar al mosaico de %{appName}","ICloudPlusPage.FamilySharingModalContent.Title":"Compartir en familia de iCloud+","NotesHomeTile.Heading":"Notas","CloudOS.Springboard.Greeting.18-0":"Buenas noches.","StaticPages.HomePage":"Página de inicio de iCloud","DriveHomeTileEmpty.Create":"Carga tu primer archivo","RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.Description":"El archivo seleccionado reemplazará los contactos en todos tus dispositivos. Tus contactos actuales se archivarán. Los cambios realizados en los contactos mientras la restauración está en curso no se guardarán. Espera hasta que finalice el proceso de restauración para realizar cambios.","AppLibraryHomeTile.Heading":"Apps","RecoveryPage.BookmarksRecoveryModal.Title":"Restaurar marcadores de Safari","FileIcon.FileType.pdf":"Formato de Documento Portátil (PDF)","ImagePicker.Alert.Action.Ok":"OK","Drive.Icon.Description.Pages":"Documento de Pages","CalendarHomeTile.TotalNumber.Many":"Todos los calendarios • %{count} eventos","CloudOS.Authentication.SignIn.ShareAcceptance.CreateButton":"Crear tu Apple ID","Alert.ContactSupport":"Soporte técnico de iCloud","CloudOS.LandingPage.Unsupported.Tablet.Subdescription":"Otras apps están disponibles en este navegador, como Mail, Fotos y Drive.","RecoveryPage.BookmarksRecoveryModal.DeletedDaysAgo":"Se eliminó hace %{daysAgo} días • Quedan %{daysRemaining} días","CloudOS.OutOfNetworkAcceptance.TextMessageSent.Description":"Se ha enviado un mensaje de texto con un enlace de verificación a %{phoneNumber}.","AutoUpdate.Domain.icloud.com":"iCloud.com","HomeKitSecureVideoTile.Description.Unlimited":"Compatibilidad con cámaras ilimitadas.","HideMyEmail.TitleName":"iCloud - Ocultar mi correo","Drive.Icon.Description.Image":"Imagen %{fileExtension}","AccountPage.Settings.AppleID.Title":"Configuración de Apple ID","PrivateRelayTile.Heading":"Retransmisión privada","VoiceOver.NavLinks.OpeningPage":"Ahora se muestra la página %{name}","MailDropPage.Error.Description":"Se produjo un problema al descargar el archivo. Vuelve a intentarlo más tarde.","AccountPage.Settings.LookMeUpByEmail.Modal.LoadingDescription":"Cargando","AccountPage.Settings.LookMeUpByEmail.Modal.List.Empty.Title":"No hay apps","MailDropPage.Download.Item.Description":"%{fileType} • %{size}","NotesHomeTile.TotalNumber.Description":"Todo iCloud","NavLinks.Restore":"Restaurar","ContinueOnDevice.iCloudStorageManage.Title":"Cómo administrar el almacenamiento en iCloud","CloudOS.Error.UnableToLoadApp.Title":"No se puede cargar %{applicationName}","CloudOS.Authentication.SignIn.ShareAcceptance.Title":"Compartido a través de iCloud","StorageUsageList.Family.Title":"Usado por la familia","ContinueOnDevice.iCloudPlanUpgrade.Description":"Usa Continuar en el dispositivo para enviar una notificación a tus dispositivos Apple que te llevará directamente a la configuración del plan de iCloud.","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Cancel":"Cancelar","FamilySharingTile.Content.Description":"Comparte tu suscripción a iCloud+ con tu familia sin costo adicional. Tendrán acceso al almacenamiento y las funciones de iCloud+.","PlanDetailsPage.Includes":"Incluye","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertFailure.Description":"Se desactivó la sincronización de calendarios debido a un error. Comunícate con el Soporte técnico de iCloud para obtener ayuda.","ContinueOnDevice.iCloudPlanUpgrade.NoDevice.Description":"Ve a Configuración #{chevron} %{fullName} #{chevron} iCloud #{chevron} Administrar almacenamiento de la cuenta #{chevron} Cambiar plan","VoiceOver.Tile.RemoveAriaLabel":"Eliminar ventanilla %{tileName}","NavigationDrawer.Plan.Description.Small.AppleOneWithExtra":"Almacenamiento adicional de Apple One+","CloudOS.LandingPage.Contacts.Description":"Accede a todos tus contactos almacenados en iCloud. Siempre estarán actualizados en cualquier dispositivo y en la web.","CreationMenu.Document.AriaLabel":"Nueva página","RecoveryPage.Title":"Recuperación de datos","MailHomeTile.Heading":"Mail","CloudOS.InterstitialPage.Loading":"Cargando","FileIcon.FileType.c4d":"Archivo de Cinema 4D","ContinueOnDevice.SuccessDialog.Title":"Notificación enviada","VoiceOver.HomePage.CustomizationMode":"Personalización de la página de inicio: página de inicio de iCloud.com","FileIcon.FileType.tiff":"Imagen TIFF","CloudOS.Authentication.TrustBrowser.SignOut.Description":"Si eliges confiar en este navegador, no se te pedirá un código de verificación la próxima vez que inicies sesión.","HomeKitSecureVideoTile.Content.Description":"Usa Video seguro de HomeKit para guardar videos de cámaras de seguridad domésticas en iCloud. Puedes ver las grabaciones desde cualquier lugar, y siempre permanecerán privadas y seguras.","CloudOS.LandingPage.Find.DisplayName":"Buscar dispositivos","CloudOS.Springboard.LearnMore.Phone.Link.Title":"Más información…","AccountMenuPopover.Settings":"Configuración de la cuenta","StoragePage.Description.Neutral":"El almacenamiento de iCloud se puede usar para tus respaldos de iCloud, para guardar tus fotos y videos en Fotos en iCloud, para mantener documentos actualizados en iCloud Drive y mucho más.","CrashReporter.Details.Collapsed":"▶ Detalles","Reminders.DisplayName":"Recordatorios","StoragePage.Title":"Tu almacenamiento en iCloud","NavigationDrawer.Plan.Drawer.AriaLabel":"Tu plan","Utils.BytesToHumanizedFormat.Size.ZB.Compact":"%{value} ZB","MailHomeTile.TotalNumber.One":"Bandeja de entrada • 1 mensaje no leído","CreationMenu.Spreadsheet":"Hoja de cálculo de Numbers","UpgradePlanTiles.HideMyEmail.Description":"Crea direcciones de correo electrónico únicas y aleatorias que redirigen la correspondencia a tu buzón de entrada. De esta manera podrás enviar y recibir correos sin compartir tu dirección de correo electrónico personal.","ContinueOnDevice.SuccessDialog.Description.LineOne.MoreThanThree":"Busca la notificación de Configuración en %{device1}, %{device2}, %{device3} y %{restCount} más.","PlanDetailsPage.Bullets.Plus.Premium.HideMyEmail":"Ocultar mi correo","ContinueOnDevice.ContinueButton.Title":"Continuar en el dispositivo…","CloudOS.LocalizationFormatter.FileSize.GB":"%{value} GB","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertSuccess.Description":"Tus calendarios se restauraron correctamente a las %{time}. Los calendarios restaurados aparecerán en todos tus dispositivos.","FileIcon.FileType.wma":"Audio de Windows Media","CloudOS.Error.AuthDidNotConnect.Description":"iCloud ha sufrido un error al intentar conectar con el servidor.","Truncate.ExtraItems.Many":"y %{count} más","RemindersTile.Date.Today.Time":"Hoy a la(s) %{time}","CloudOS.LandingPage.description":"El mejor lugar para tus fotos, archivos, notas, correos y mucho más.","Notification.Alarm.Tomorrow.Message":"“%{eventTitle}” mañana a la(s) %{time}","CloudOS.Authentication.SignOutButton.Title":"Cerrar sesión","FileIcon.FileType.ps":"PostScript","CloudOS.Springboard.ManageAccessLink.Title.NameIsCJK":"Administrar cuenta de %{firstName}","AccountPage.Settings.LookMeUpByEmail.Modal.List.Empty.Content":"Puedes evitar que una app de la lista muestre tu nombre y dirección de correo electrónico a otras personas si quitas la selección de la casilla de la app.","CreationMenu.Mail.AriaLabel":"Nuevo mensaje","CloudOS.InNetworkAcceptance.NotNowButton.Title":"Ahora no","NavigationDrawer.Plan.Type.Standard.Size":"5 GB","Alert.ManageAppleId.Button.Title":"Administrar Apple ID","HomeTile.NotLoaded":"Sin cargar","DescribePlanPricing.Yearly.WithSpace":"%{price} por año","RecoveryPage.ArchivesRecoveryList.EmptyList":"No hay archivos para restaurar.","DriveHomeTile.Description":"Todos los archivos","FileIcon.FileType.tar":"archivo tar","VoiceOver.PageHeader.LinksButton":"Observa los enlaces a las páginas relacionadas","CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Description":"Hubo un problema al verificar tu dirección de correo electrónico o número de teléfono.","ContinueOnDevice.homeKitSecureVideo.NoDevice.Title":"Cómo configurar video seguro de HomeKit","NumbersHomeTileEmpty.Create.Short":"Crea tu primera hoja de cálculo","RecoveryPage.FilesRecoveryModalContent.Title":"Restaurar archivos","KeynoteHomeTile.TotalNumber.Zero":"No hay presentaciones","CloudOS.OutOfNetworkAcceptance.Error.Title":"No se pudo enviar el enlace de verificación","UpgradePlanTiles.HideMyEmail.ImageAlt":"iPhone que muestra una página de registro para una membresía de Nike con el título “Ocultar mi correo” superpuesto con una dirección de correo electrónico aleatoria y el botón “Continuar”","FileIcon.FileType.otf":"Tipo de letra PostScript® OpenType™","HomeKitSecureVideoTile.Heading":"Video seguro de HomeKit","RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.Description":"El archivo seleccionado reemplazará los calendarios en todos tus dispositivos. Tus calendarios actuales se archivarán. Los cambios realizados en los calendarios mientras la restauración está en curso no se guardarán. Espera hasta que finalice el proceso de restauración para realizar cambios.","DateTime.Relative.DateTime":"%{date} %{time}","PlanDetailsPage.Lite.Price":"Gratis","AccountPage.Settings.LookMeUpByEmail.Title":"Buscarme por correo","NumbersHomeTile.TotalNumber.Zero":"No hay hojas de cálculo","AccountPage.Settings.Access.Button.Name":"Cerrar sesión en todos los navegadores","ContinueOnDevice.setupPrivateRelay.NoDevice.Description2":"Ve a Configuración del Sistema #{chevron} Apple ID #{chevron} iCloud #{chevron} Opciones de Retransmisión privada","AutoUpdate.Domain.icloud.com.cn":"iCloud.com.cn","AccountPage.Settings.Photo.ChangeAppleIDPhoto.Button.Name":"Cambiar foto de Apple ID","VoiceOver.NotesHomeRow.OpenNote":"Toca para ir a la nota %{title}","CloudOS.LocalizationFormatter.FileSize.bytes":"%{value} bytes","CreationMenu.Presentation":"Presentación de Keynote","MailHomeTile.TotalNumber.Many":"Bandeja de entrada • %{count} mensajes no leídos","ContinueOnDevice.homeKitSecureVideo.NoDevice.Description":"Para configurar Video seguro de HomeKit, primero, activa iCloud para Casa. En iOS, ve a Configuración #{chevron} %{fullName} #{chevron} iCloud y activa Casa. En una Mac, ve a Configuración del Sistema #{chevron} Apple ID #{chevron} iCloud y luego selecciona Casa. A continuación, ve a la app Casa y activa Transmisión y grabación en las opciones de grabación de la cámara.","MailHomeTile.TotalNumber.Loading":"Cargando…","CloudOS.Sharing.Unavailable.Description.Photo":"El propietario dejó de compartir, o no tienes permiso para ver estas fotos.","Application.Title.FaceTime":"FaceTime","RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertSuccess.Title":"Calendarios restaurados","HideMyEmailTile.Create":"Crea direcciones únicas y aleatorias que reenvíen los correos a tu bandeja de entrada personal para mantener la privacidad de tu dirección de correo electrónico.","PhotosHomeTile.TotalNumber.Video.Zero":"No hay videos","CloudOS.OutOfNetworkAcceptance.VerifyAccessContent.FooterText":"Si no ves tu %{modeOfCommunication}, comunícate con la persona que te invitó.","Photos.CloudKit.Recoverable.Title":"Las fotos compartidas no están disponibles en este momento","RecoveryPage.ArchivesRecoveryList.Restoring":"Restaurando…","AccountPage.PlanCard.iCloud+.Title":"iCloud+","HideMyEmailTile.Content.Title":"Direcciones","CloudOS.NavigationLayout.Loading":"Cargando","ShortName.NavLinks.ICloudPlus":"Funciones de iCloud+","CloudOS.Sharing.Error.UpgradeToiCloudDrive.SubTitle":"Para abrir este documento, debes ampliar tu cuenta a iCloud Drive.","MailDropPage.Error.Title.MaxDownloads":"El archivo ya no está disponible","PhotosHomeTile.TotalNumber.Video.Two":"2 videos","PlanDetailsPage.Bullets.Plus.Premium.PrivateRelay":"Retransmisión privada","ImagePicker.Alert.Title.FileTooLarge":"No se pudo cargar la foto","HomePage.CustomizeDashboard.Header.Button.ShowTips":"Mostrar consejos","CustomEmailDomainTile.Status.InProgress":"%{domain} (pendiente)","CloudOS.LandingPage.Unsupported.Phone.Description":"Para usar %{applicationNameToBeDisplayed} en iCloud.com, usa cualquier navegador en una tablet o computadora.","RemindersHomeTile.Heading":"Recordatorios","FileIcon.FileType.indd":"Documento de Adobe InDesign","CalendarIcon.Saturday":"sábado","FileIcon.FileType.ppsx":"Presentación de diapositivas de Office Open XML","ShareAcceptancePage.Accept.Description.Document":"Si aceptas la invitación, este documento se agregará a tu iCloud Drive, pero no consumirá tu almacenamiento en iCloud.","FileIcon.FileType.vcf":"Tarjeta de presentación electrónica","VoiceOver.ProfileCard.Heading":"Información de la cuenta","FamilySharingTile.Description.Member":"Compartido por %{name}","CloudOS.Error.ServiceLocked.Description.Hour":"Debido a operaciones de mantenimiento en la cuenta, %{applicationName} no estará disponible durante la próxima hora.","CloudOS.ChildApplicationSpinner.Loading":"Cargando","CloudOS.LandingPage.iCloudPlusTile.Description":"Actualiza a iCloud+ para obtener más almacenamiento y funciones de iCloud como Retransmisión privada, Ocultar mi correo y Video seguro de HomeKit. Incluso puedes compartir tu suscripción con tu familia. Obtén más información en","AccountPage.Settings.Photo.Title":"Foto","AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.One":"1 app","CloudOS.LandingPage.Unsupported.LiteAccount.Subdescription":"El Apple ID %{appleId} tiene acceso únicamente web a iCloud, que no incluye la app %{applicationNameToBeDisplayed}. Puedes usar otras apps, como Drive, Notas y Numbers. Para usar %{applicationNameToBeDisplayed}, inicia sesión con un Apple ID que uses con un dispositivo Apple.","Newspublisher.ResourcesTitle":"Recursos y soporte","RecoveryPage.BookmarksRecoveryModal.DeletedYesterday":"Se eliminó ayer • Quedan %{daysRemaining} días","FileIcon.FileType.abbu":"Archivo de contactos","AutoUpdate.Later":"Más tarde","AccountPage.Settings.Access.Signout.Cancel":"Cancelar","PlanDetailsPage.SharedBy":"Compartido por %{planOwnerName} (Compartir en familia)","VoiceOver.StorageUsageList.StorageUsed":"%{percentage} del almacenamiento total","ContinueOnDevice.iCloudPlusFamilySharing.Member.NoDevice.Description2":"Ve a Configuración del Sistema #{chevron} Compartir en familia #{chevron} Almacenamiento en iCloud","ICloudDrive.DisplayName":"Drive","CloudOS.Error.AuthDidNotConnect.Support":"Soporte","RecoveryPage.BookmarksRecoveryModal.EmptyList":"No hay marcadores que restaurar.","Banner.QuotaExceeded.LiteAccount.Title":"Tu espacio de almacenamiento en iCloud está lleno.","PlanDetailsPage.AppleOne":"Incluido en Apple One","VoiceOver.PhotosHomeTile.Photos":"Fotos","CloudOS.LandingPage.iCloudWeb.Description":"iCloud es fundamental para mantener la información personal de tus dispositivos segura, actualizada y disponible estés donde estés. En iCloud.com, puedes acceder a tus fotos, archivos y más contenido desde cualquier navegador web. Los cambios que hagas se sincronizarán con tu iPhone y demás dispositivos, para que siempre tengas tu contenido actualizado.","ImagePicker.ErrorImageFailedToLoad":"No se pudo cargar la imagen","FaceTime.Unsupported.Title":"Este navegador no es compatible","CloudOS.TermsAndConditions.ChinaTerms.Content":"Debes aceptar los términos y condiciones de iCloud. En los términos encontrarás información importante. Léelos con atención. Si decides usar iCloud en China continental, aceptas regirte por los Términos y condiciones de iCloud y GCBD. También reconoces que GCBD procesará datos de iCloud.","PhotosHomeTile.SetUp":"Configuración","CloudOS.Authentication.QuickAccess.Title":"Si no puedes ingresar un código porque perdiste tu dispositivo, puedes usar la opción Encontrar Dispositivos para buscarlo o la opción Administrar dispositivos para eliminar las tarjetas de Apple Pay del dispositivo.","CalendarIcon.Wednesday":"miércoles","FileIcon.FileType.csv":"valores separados por comas","AutoUpdate.Description":"Vuelve a cargar para usar la versión más reciente.","VoiceOver.RecoveryPage.ArchivesRecoveryList.ArchiveTableLabel":"Lista de archivos","HomePage.CustomizeDashboard.AddedTile.AriaLabel":"Se agregó %{tileName}","PrivateRelayTile.Content.Description":"Usa la función Retransmisión privada de iCloud en tu iPhone, iPad, iPod touch y Mac para ocultar tu dirección IP y tu actividad de navegación en Safari y proteger el tráfico de internet sin encriptar.","RecoveryPage.BookmarksRecoveryModal.DeselectAll":"Anular selección","VoiceOver.DocumentHomeRow.MultiShares":"Compartido %{numSharedWith} veces","HomePage.CustomizeDashboard":"Personalizar página de inicio","ContinueOnDevice.iCloudStorageManage.StorageFull.Title":"Cómo cambiar el plan de iCloud y agregar almacenamiento","RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointTwo":"Tus calendarios actuales se guardarán y archivarán como una versión independiente.","Drive.Icon.Description.Pdf":"PDF","MailHomeTile.SetUp":"Configuración","Banner.QuotaAlmostExceeded.FullAccount.Description":"Si te quedas sin espacio de almacenamiento, tus fotos, videos, documentos y datos dejarán de actualizarse.","PhotosHomeTile.SetUpMessage":"Activa Fotos en iCloud en tu iPhone, iPad, iPod touch o Mac y mantén tus fotos y videos almacenados y actualizados de forma segura en la web y sincronizados en todos los dispositivos.","ShareAcceptancePage.Button.Download.AriaLabel":"Descargar una copia del elemento compartido","FileIcon.FileType.aiff":"Audio AIFF-C","Pages.TitleName":"iCloud Pages","ShareAcceptancePage.Button.Accept.AriaLabel":"Aceptar invitación","FileIcon.FileType.band":"Proyecto de GarageBand","StorageUsageList.Drive.Count":"Todos los archivos","CreationMenu.Event":"Evento de calendario","CloudOS.LandingPage.Unsupported.LiteAccount.SignOut":"Cerrar sesión","MailHomeTile.TotalNumber.Two":"Bandeja de entrada • 2 mensajes no leídos","NavLinks.Plan":"Tu plan","CloudOS.TermsAndConditions.Content":"Antes de usar iCloud, debes aceptar los términos y condiciones de iCloud. En los términos encontrarás información importante. Léelos con atención.","ICloudDriveFileRecovery.TitleName":"iCloud - Restaurar archivos","Error.UnsupportedBrowser.Warning.Title":"Navegador incompatible","VoiceOver.DocumentHomeRow.OpenDocument":"Toca para ir a %{title}","ContinueOnDevice.NoDevice.IOS.Description":"En un iPhone, iPad o iPod touch","Tile.Edit":"Editar","CloudOS.LandingPage.Photos.Description":"Ve y comparte fácilmente tus fotos y videos almacenados en iCloud desde cualquier dispositivo y en la web.","Settings.TitleName":"Configuración","RemindersTile.Date.Tomorrow":"Mañana","CloudOS.TermsAndConditions.Title":"Términos y condiciones de iCloud","FaceTime.UpdateNeeded.Title":"Se necesita actualizar el software","MailDropPage.Error.Title":"Algo salió mal","NavigationDrawer.Plan.Description.Small.FamilySharing":"Compartido por %{planOwnerName} (Compartir en familia)","Banner.QuotaExceeded.FullAccount.Description":"A partir de ahora ya no se actualizarán las fotos, los vídeos, los documentos ni los datos.","NumbersHomeTile.TotalNumber.Description":"Hojas de cálculo","RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Title":"¿Quieres eliminar el marcador de forma permanente?","CreationMenu.Spreadsheet.AriaLabel":"Nueva hoja de cálculo","VoiceOver.DocumentHomeRow.Summary.SingleShare.AriaLabel":"%{title} a las %{time}, compartido 1 vez","PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.One":"Compatibilidad de video seguro de HomeKit con una cámara ","FileIcon.FileType.svg":"gráficos vectoriales redimensionables (SVG)","VoiceOver.DocumentHomeRow.Summary.MultiShares.AriaLabel":"%{title} a las %{time}, compartido %{numSharedWith} veces","UpgradePlanTiles.CustomEmailDomain":"Dominio de correo electrónico personalizado","LoadingPage.TryAgain":"Vuelve a intentarlo","VoiceOver.ImagePicker.RotationControl.RotateLabel":"Girar","CloudOS.LandingPage.Numbers.Description":"Haz que los datos cobren vida con Numbers. Colabora con tu equipo en cualquier dispositivo y en la web.","StaticPages.TryAgain":"Vuelve a intentarlo","FileIcon.FileType.docx":"Documento de procesamiento de texto Office Open XML","StaticPages.NotFound.Message":"iCloud no encuentra esa página.","Numbers.TitleName":"iCloud Numbers","DeviceBackupList.TotalNumber.Two":"2 dispositivos","VoiceOver.DocumentHomeRow.MissingNumShared":"compartido","CloudOS.LandingPage.iCloudPlusTile.Description.gcbd":"Amplía a iCloud+ para obtener más almacenamiento y funciones como Ocultar mi correo y Video seguro de HomeKit. Incluso puedes compartir tu suscripción con tu familia. Obtén más información en","ICloudDriveFileRecovery.DisplayName":"Restaurar archivos","ICloudPlusPage.FamilySharingModalContent.Section.Description.Sharing":"Estás usando el plan de iCloud+ compartido por %{name}.","Mail.DisplayName":"Mail","HideMyEmailTile.Content.ListItem.Inactive":"%{count} inactiva(s)","FileIcon.FileType.ppt":"Presentación de Microsoft PowerPoint 97-2004","PhotosHomeTile.TotalNumber.Photo.One":"1 foto","Utils.BytesToHumanizedFormat.Size.GB.Compact":"%{value} GB","ICloudPlusPage.PrivateRelayModalContent.Section.Description":"La función Retransmisión privada oculta tu dirección IP y tu actividad de navegación en Safari. Esto protege el tráfico de Internet que no esté encriptado, de modo que nadie, ni siquiera Apple, pueda ver quién eres o qué sitios visitas.","RecoveryPage.CalendarsRecoveryModalContent.Description":"Puedes restaurar tus calendarios y eventos (junto con tus recordatorios y listas de recordatorios) de una versión anterior que se haya archivado automáticamente en iCloud.","IDMSAuthWidget.SignInLabel":"Iniciar sesión en iCloud","FaceTime.Unsupported.Description.ContinueAnyway":"El audio y el video podrían no funcionar. Puedes intentar continuar de todos modos, o copia el enlace y pégalo en la versión más reciente de <a target=\"_blank\" href=\"https://www.microsoft.com/edge/\">Microsoft Edge</a> y <a target=\"_blank\" href=\"https://www.google.com/intl/es-419/chrome/\">Google Chrome</a>","Alert.CancelButton":"Cancelar","ContinueOnDevice.iCloudPlusFamilySharing.Member.Title":"Cómo dejar de usar el plan compartido de iCloud+","PlanDetailsPage.Included.StandardPlus.LearnMore.Features":"Consulta todas #{iCloudFeaturesLink}","RecoveryPage.Details.WebOnly":"Recupera archivos que se hayan eliminado de iCloud Drive en los últimos 30 días o restaura una versión anterior de Contactos.","RemindersHomeTile.TotalNumber.Description":"Todo iCloud","CloudOS.OutOfNetworkAcceptance.DoneButton.Title":"Listo","CustomEmailDomainTile.Create":"Tú, tu familia y tus amigos pueden usar Mail en iCloud para enviar y recibir correos con un dominio personalizado.","Utils.BytesToHumanizedFormat.Size.MB":"%{value} MB","CloudOS.LandingPage.iCloudPlusTile.Description.LinkLabel":"Obtén más información https://www.apple.com/mx/icloud/","ImagePicker.Alert.Description.UnsupportedFileType":"Comprueba que el formato de tu foto sea JPEG, GIF, PNG o BMP.","VoiceOver.StorageUsageList.FamilyUsageList":"Uso de almacenamiento de los miembros de la familia","CloudOS.AccountNeedsSetup.CloseButton.Title":"Cerrar","PlanDetailsPage.Bullets.Lite.FeaturesHeader":"Accede en icloud.com y obtén lo siguiente:","RecoveryPage.ArchivesTile.Title.Contacts":"Restaurar contactos","CalendarHomeTile.TotalNumber.Zero":"Todos los calendarios • No hay eventos","CloudOS.Help.Title":"Ayuda","StoragePage.Title.Lite":"Almacenamiento en iCloud","VoiceOver.AppSwitcher.Open":"Abrir %{appName}","RecoveryPage.ArchivesTile.TotalNumber.One":"1 archivo","CrashReporter.Heading":"%{appName} ha dejado de responder.","CloudOS.TermsAndConditions.SuccessConfirmation.GameCenter.Description":"Has aceptado correctamente los términos y condiciones de iCloud. Ve a Game Center en tu Mac o dispositivo e inicia sesión nuevamente.","FileIcon.FileType.app":"Aplicación","CloudOS.OutOfNetworkAcceptance.VerifyAccess.Title":"Verifica tu acceso","RecoveryPage.BookmarksTile.TotalNumber.One":"1 marcador","VoiceOver.CloudOS.Toolbar.Beta":"Beta","RecoveryPage.BookmarksRecoveryModal.LoadingDescription":"Cargando marcadores","ShareAcceptancePage.User.Description.Folder.Name":"Carpeta compartida","VoiceOver.KeynoteHomeTile.PrimaryActionDescription":"Nueva presentación","StorageUsageList.Family.TitleWithName":"Usado por la familia de %{firstName}","RecoveryPage.BookmarksTile.TotalNumber.Two":"2 marcadores","HideMyEmailTile.Content.ListItem.Active":"%{count} activa(s)","RemindersHomeTile.TotalNumber.Loading":"Cargando…","CloudOS.Toolbar.AccountMenu.DigitalLegacyPortal":"Portal de legado digital","RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertFailure.Description":"Se desactivó la sincronización de contactos debido a un error. Comunícate con el Soporte técnico de iCloud para obtener ayuda.","Utils.BytesToHumanizedFormat.Size.MB.Compact":"%{value} MB","DescribePlanPricing.Yearly":"%{price}/año","PlanDetailsPage.Bullets.Features.Drive":"iCloud Drive","CloudOS.LandingPage.Calendar.Description":"Organiza tu tiempo con Calendario en iCloud. Siempre estará actualizado en en cualquier dispositivo y en la web.","Reminders.TitleName":"Recordatorios de iCloud","ContinueOnDevice.setupPrivateRelay.NoDevice.Notice":"La función Retransmisión privada requiere un dispositivo con al menos iOS 15, iPadOS 15 o macOS Monterey 12.","LoadingPage.SystemStatus":"Estado del sistema","CloudOS.PushNotificationSpinner.ApplicationLoading":"Cargando","ImagePicker.Alert.Description.Generic":"Vuelve a intentarlo.","DateTime.Relative.TodayTime":"Hoy  %{time}","Error.AppNotLoading.Title":"No se puede cargar %{appName}","MailDropPage.Error.Title.NotFound":"No se encontró el archivo","UpgradePlanTiles.CustomEmailDomain.Description":"Personaliza tu dirección de Mail en iCloud con un nombre de dominio personalizado. También puedes invitar a tus amistades y familiares a usar el mismo dominio con sus cuentas de Mail en iCloud.","RecoveryPage.BookmarksRecoveryModal.ListDescription.FirstLine":"Los marcadores muestran cuántos días faltan para su eliminación definitiva.","StoragePage.Callout.Content.WebOnly":"Para administrar tu almacenamiento, abre iCloud Drive, selecciona los archivos que quieras conservar y elimina los que ya no necesites.","UpgradePlanTiles.HomeKitSecureVideo.LinkText":"Obtén más información sobre Video seguro de HomeKit","FileIcon.FileType.mp4":"Película MPEG-4","VoiceOver.AccountPage.LookMeUpByEmail.Modal.List.Checkbox.AriaLbel":"si %{appName} puede mostrar tu nombre y correo electrónico a otros usuarios","PlanDetailsPage.Bullets.Features.Keynote":"Keynote","VoiceOver.DocumentHomeRow.SingleShare":"Compartido 1 vez","ContinueOnDevice.iCloudStorageManage.NoDevice.Title":"Cómo administrar el almacenamiento en iCloud","FileIcon.FileType.ttf":"Tipo de letra TrueType® OpenType™","StorageUsageList.Family.Count":"Todos los demás familiares","ShareAcceptancePage.EmailVerificationSentDialog.Content.Message":"Sigue las instrucciones indicadas en el mensaje para completar la verificación.","CloudOS.Springboard.Greeting.6-12":"Buenos días.","NavigationDrawer.Plan.Description.Small.AppleOne":"Incluido en Apple One","CloudOS.Toolbar.AccountMenu.Profile.AccessibilityLabel":"Iniciaste sesión como %{name}, %{email}","Keynote.DisplayName":"Keynote","SandwichMenu.AriaLabel":"Enlaces rápidos","NavigationDrawer.Plan.Description.Small.Free":"Gratis","VoiceOver.KeynoteHomeTile.Keynotes":"Presentaciones","Banner.Beneficiary.OptionalLink.Text":"Más información","ICloudPlusPage.PrivateRelayModalContent.SubTitle":"Protégete mientras navegas por Internet","VoiceOver.RemindersHomeRow.Summary.AriaLabel.NotScheduled":"“%{title}”"}),n(579),function(e){e.PHONE="PHONE",e.TABLET="TABLET",e.DESKTOP="DESKTOP"}(p||(p={})),function(e){e.COMPACT="COMPACT",e.REGULAR="REGULAR"}(f||(f={})),function(e){e.MOUSE="MOUSE",e.TOUCH="TOUCH"}(h||(h={})),function(e){e.IOS="IOS",e.ANDROID="ANDROID",e.WINDOWS="WINDOWS",e.MAC="MAC",e.LINUX="LINUX",e.CHROMEOS="CHROMEOS",e.UNKNOWN="UNKNOWN"}(m||(m={}));var _=function(){this.platformType=function(){var e=window.navigator.userAgent;return/ipad|ipod|iphone/i.test(e)?m.IOS:/android/i.test(e)?m.ANDROID:/mac/i.test(e)&&!/like mac/i.test(e)?"ontouchstart"in window||"createTouch"in window.document?m.IOS:m.MAC:/windows/i.test(e)?m.WINDOWS:/\bcros\b/i.test(e)?m.CHROMEOS:/\blinux\b/i.test(e)?m.LINUX:m.UNKNOWN}(),this.isAndroid=this.platformType===m.ANDROID,this.isWindows=this.platformType===m.WINDOWS,this.isMac=this.platformType===m.MAC,this.isiOS=this.platformType===m.IOS,this.primaryInteractionMode=this.isiOS||this.isAndroid?h.TOUCH:h.MOUSE,this.isTouch=this.primaryInteractionMode===h.TOUCH,this.isMouse=this.primaryInteractionMode===h.MOUSE,this.deviceType=this.isMouse?p.DESKTOP:Math.min(window.screen.width,window.screen.height)>667?p.TABLET:p.PHONE,this.isiPad=this.isiOS&&this.deviceType===p.TABLET,this.isiPhoneOriPod=this.isiOS&&this.deviceType===p.PHONE};_.sharedInstance=new _,n(580);var C=Object.freeze({MOUSE:"MOUSE",TOUCH:"TOUCH"});function I(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}n(581);var w,E={appName:"",environmentInfo:"",localizedAppName:"",buildInfo:"",radarComponentID:"",radarTitle:"",isAppleInternal:!1,isSendingStatsEnabled:!1,flushInterval:6e4,serviceUrl:"https://feedbackws.icloud.com/",sessionID:I(),primaryInteractionMode:C.MOUSE,radarComponentName:null,radarComponentVersion:null,userDSID:null,userAppleId:null},S=["ar","iw","he","ur","fa","sd"];function T(e){return S.some((function(t){return e.startsWith(t)}))}function O(){var e=Object(r.useState)((function(){return a()})),t=e[0],n=e[1];return Object(r.useEffect)((function(){return u(n)}),[]),t}function P(){var e=d();return function(t,n){return e(O(),t,n)}}function x(){return function(){var e=Object(r.useState)((function(){return T(a())})),t=e[0],n=e[1];return Object(r.useEffect)((function(){var e=u((function(e){return n(T(e))}));return function(){return e()}}),[]),t}()?w.RTL:w.LTR}!function(e){e.LTR="ltr",e.RTL="rtl"}(w||(w={}));var A=l(),N=(P(),function(){function e(){}return e.render=function(e,t){var n=this,r=document.createElement("span");e.appendChild(r);var i=document.createElement("span");e.appendChild(i);var o=function(){n.isDetailsCollapsed?i.textContent=A("CrashReporter.Details.Collapsed"):i.textContent=A("CrashReporter.Details.Open")};o(),e.addEventListener("click",(function(){n.isDetailsCollapsed=!n.isDetailsCollapsed,o(),t(n.isDetailsCollapsed)}))},e}());N.isDetailsCollapsed=!0;var R={iCloud:"https://www.apple.com/icloud/",systemStatus:"https://www.apple.com/support/systemstatus/",privacyPolicy:"https://www.apple.com/legal/privacy/",termsAndCondition:"https://www.apple.com/legal/internet-services/icloud/",appleTermsOfUse:"https://www.apple.com/legal/internet-services/terms/site.html",iCloudGetStarted:"http://www.apple.com/icloud/get-started",schoolTerms:"https://www.apple.com/legal/education/apple-school-manager/",businessTerms:"https://www.apple.com/legal/enterprise/apple-business-manager/",cnPrivacyPolicy:"https://www.icloud.com.cn/gcbd-privacy-policy/",digitalLegacyPortal:"https://digital-legacy.apple.com/manage"};function D(e){if(!R[e])throw new Error("No link found for "+e);return R[e]}function k(e){var t,n,r,i,o,a,s,c,u,l=[];for(t in e)if(n=e[t]){for(r="",a=!0,i=0,o=t.length;i<o;i++)c=(s=t.charAt(i)).toUpperCase(),s===c?((0===i||u)&&(a=!1),a&&(r+=" "),u=!0):u=!1,r+=c;l.push(r),l.push(n+"\n")}return l.join("\n")}var U,L=function(){function e(){}return e.appendDetailsBase=function(e){var t=document.createElement("div");t.classList.add("main-content"),e.appendChild(t);var n=document.createElement("div");return n.classList.add("crash-details"),e.appendChild(n),[t,n]},e.appendMainContent=function(e){var t=document.createElement("div");t.classList.add("icon"),e.appendChild(t);var n=document.createElement("div");return n.classList.add("text-container"),e.appendChild(n),n},e.appendPrivacyPolicy=function(e){var t=document.createElement("div");t.classList.add("privacy-info"),t.textContent=A("CrashReporter.Privacy"),e.appendChild(t);var n=document.createElement("a");n.classList.add("privacy-policy"),n.setAttribute("href",D("privacyPolicy")),n.setAttribute("referrerpolicy","noreferrer"),n.setAttribute("target","_blank"),n.textContent=D("privacyPolicy"),e.appendChild(n)},e.appendErrorText=function(e){var t=document.createElement("div");t.classList.add("scrolling-container"),e.appendChild(t);var n=document.createElement("div");n.classList.add("crash-details-message"),n.textContent=k(this.errorReport||{}),t.appendChild(n)},e.appendCrashDetails=function(e){var t=document.createElement("button");t.classList.add("crash-details-toggle");var n=document.createElement("div");n.classList.add("crash-details-message-scroll-view"),n.style.display="none",this.appendErrorText(n);var r=document.createElement("div");r.classList.add("apple-privacy"),N.render(t,(function(e){n.style.display=e?"none":"inherit",e?r.classList.remove("hide"):r.classList.add("hide")})),this.appendPrivacyPolicy(r),e.appendChild(t),e.appendChild(n),e.appendChild(r)},e.render=function(e,t){this.errorReport=t;var n=this.appendDetailsBase(e),r=n[0],i=n[1],o=this.appendMainContent(r);this.appendCrashDetails(i);var a=document.createElement("div");a.classList.add("message"),a.textContent=A("CrashReporter.Heading",{appName:E.localizedAppName}),o.appendChild(a);var s=document.createElement("div");s.classList.add("description"),s.textContent=A("CrashReporter.Title",{appName:E.localizedAppName}),o.appendChild(s)},e}();function M(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){M(o,r,i,a,s,"next",e)}function s(e){M(o,r,i,a,s,"throw",e)}a(void 0)}))}}function F(e){return""+E.serviceUrl+e}L.errorReport=void 0,function(e){e.STAT="STAT",e.PERF_STAT="PERF_STAT"}(U||(U={}));var B,z=function(){function e(){}return e.queueStat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U.STAT;H(e,["dsid","sessionID"])&&(t===U.PERF_STAT?this.perfStatsQueue.push(e):this.statsQueue.push(e))},e.scheduleFlush=function(){var e=this;void 0!==this.flushInterval&&window.clearInterval(this.flushInterval),this.flushInterval=window.setInterval((function(){e.sendAllStats()}),E.flushInterval)},e.sendAllStats=function(){var e=j(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.statsQueue,n=this.perfStatsQueue,0!==t.length||0!==n.length){e.next=4;break}return e.abrupt("return");case 4:r={},t.length>0&&(r.stats=t,this.statsQueue=[]),n.length>0&&(r.perfStats=n,this.perfStatsQueue=[]),E.isSendingStatsEnabled&&window.fetch(F("reportStats"),{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},credentials:"omit",body:JSON.stringify(r)}).catch((function(){})),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,this,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),e.sendCrashError=function(){var e=j(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,window.fetch(F("reportError"),{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},credentials:"omit",body:JSON.stringify(t)});case 3:if(e.sent.ok){e.next=6;break}return e.abrupt("return");case 6:e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),e}();function H(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=[];t.forEach((function(t){void 0!==e[t]&&r.push(t)}));var i=!0;if(r.length>1){r.join(", ");W(),i=!1}else if(n&&0===r.length){t.join(", ");W(),i=!1}return i}function W(e){}z.statsQueue=[],z.perfStatsQueue=[],z.flushInterval=void 0,function(e){e.SESSION="session",e.USER="user"}(B||(B={}));var V=function(e){z.queueStat(e)},Z=function(e){z.queueStat(e,U.PERF_STAT)},q={location:window.location};function K(e){if("network"!==e.statName)return[e];var t=[],n=Object.assign({},e,{statName:"requestInfo"});if(t.push(n),n.response_status>299){var r=Object.assign({},e,{statName:"serverErrorOrTimeout"});t.push(r)}return t}function G(e){return e.statCategory!==B.USER&&Object.assign(e,{sessionID:e.sessionID||q.sessionID}),Object.assign(e,{isInternal:!1,isDebug:!1})}function Y(e){var t=e.appName,n=e.statName,r=e.fullStatName||t+"."+n;return delete e.fullStatName,Object.assign(e,{statName:r})}function Q(e){var t=e.appName;return t=t||q.appName,Object.assign(e,{appName:t})}function X(e,t){return Math.max(0,Math.round(e/t)*t)}function J(e){return Number.isFinite(e.clientTiming)&&(e.clientTiming=X(e.clientTiming,100)),Number.isFinite(e.net_uncompressedResponseSize)&&(e.net_uncompressedResponseSize=function(e){return 100,">1KB",(t=e)>1e3?">1KB":X(t,100);var t}(e.net_uncompressedResponseSize)),e}function $(){var e=q.buildInfo,t=q.environmentInfo,n=q.userAgent,r=q.sessionID,i=q.location,o=q.appName,a=q.hostingAppName,s=i.hostname;return Object.assign({appName:o,hostingAppName:a,clientTime:new Date+" ("+Date.now()+")",userAgent:n,hostname:s,buildInfo:e,sessionID:r,environmentInfo:t})}function ee(e){var t=e.message,n=e.type,r=e.requestUUID;return Q({appName:e.appName,reportedErrorTitle:t||"UNKNOWN",reportedErrorType:n||"UNKNOWN",requestUUID:r})}function te(e){var t=window.performance.now();return{toJSON:function(){return Object.assign($(),{statName:e,clientTiming:Math.floor(window.performance.now()-t)})}}}function ne(e){return e.appName&&delete e.appName,e}var re=function(e){var t=e.stack;if(!t)return t;var n=(t=t.trim()).split("\n"),r=n.length;if(r<=501)return t;var i=r-400-100;return n.splice(400,i,"... "+i+" lines truncated ..."),n.join("\n")},ie=function(e){var t=e.lineNumber||e.line;if(!t)try{var n=e.stack.split("\n")[1].split(":");t=n[n.length-2]}catch(r){t="Unknown"}return t},oe={configure:function(e){Object.assign(q,e),!0===q.isSendingStatsEnabled&&(E.isSendingStatsEnabled=!0),E.flushInterval=e.flushInterval,z.scheduleFlush()},recordCWNetworkRequest:function(e){var t=te("network");e.on("didFinalize",(function(){var n=Object.assign(t.toJSON(),function(e){var t,n=e.url,r=e.method,i=e.response,o=i.status,a=i.encodedBody,s=n,c=s.hostname,u=s.pathname;return"function"===typeof e.getUUID&&(t=e.getUUID()),{request_uuid:t||"",request_method:r,request_pathname:u,request_hostname:c,request_timedOut:"timedout"===e.state,response_status:o,response_body:o>299?a:"(skipped)",response_size:a?a.length:null}}(e));oe.handleStat(n)}))},recordErrorCatcherWasDisplayed:function(e){var t=te("errorCatcherWasDisplayed"),n=Object.assign(t.toJSON(),ee(e));return oe.handleStat(n),oe.flush()},createErrorReport:function(e){return Object.assign($(),ee(e),{lineNumber:ie(e),userAppleId:q.userAppleId,userDSID:q.userDSID,stack:re(e),errorContext:q.stringifyExceptionContext(e.context)})},recordErrorReportWithUserConsent:function(e){return t=e,Promise.all([z.sendAllStats(),z.sendCrashError(t)]);var t},handleStat:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(K),i=r.flat(1/0);i.map(G).map(Q).map(Y).map(J).map(V)},handlePerfStat:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(K),i=r.flat(1/0);i.map(Q).map(ne).map(J).map(Z)},flush:function(){return z.sendAllStats()},updateServiceUrl:function(e){if(!e)throw"[Reporting] `serviceUrl` missing from `updateServiceUrl()` routine.";E.serviceUrl=e}},ae=n(582),se=function(){function e(){}return e.onSendToApple=function(){var e=this;oe.recordErrorReportWithUserConsent(this.errorReport).finally((function(){e.close()}))},e.onCreateRadar=function(){var e,t=E.radarComponentID,n=encodeURIComponent(E.radarComponentName||"iCloud.com"),r=encodeURIComponent(E.radarComponentVersion||"New Bugs"),i=encodeURIComponent(E.radarTitle),o=encodeURIComponent(function(e){var t=k(e);return e&&e.requestUUID&&(t+="\n\n\nSplunk:\nhttps://splunk-qa.icloud.apple.com/en-US/app/search/search?q=search%20index%3Dfeedbackws%20web_appName%3D%22"+E.appName+"%22%20web_request_uuid%3D"+e.requestUUID),t}(this.errorReport)),a=encodeURIComponent("Serious Bug"),s=encodeURIComponent("I Didn't Try");e=this.primaryInteractionMode===C.TOUCH?"tap-to-radar://new?ComponentID="+t+"&ComponentName="+n+"&ComponentVersion="+r+"&Title="+i+"&Description="+o+"&Classification="+a+"&Reproducibility="+s+"&AutoDiagnostics=-1":"rdar://new/problem/componentId="+t+"&title="+i+"&description="+o+"&classification="+a,Object(ae.a)(e,{target:"_blank",features:[]}),this.close()},e.close=function(){void 0!==this.root&&(this.root.remove(),this.root=void 0),this.errorReport=void 0,this.shouldReloadOnClose&&window.location.reload()},e.appendModalBase=function(e){var t=document.createElement("div");t.classList.add("crash-modal-background");var n=document.createElement("div");n.classList.add("crash-modal-view",e===C.TOUCH?"primary-interaction-mode-touch":"primary-interaction-mode-mouse");var r=document.createElement("div");r.classList.add("main-container"),n.appendChild(r);var i=document.createElement("div");return i.classList.add("button-container"),n.appendChild(i),t.appendChild(n),document.body.appendChild(t),[t,r,i]},e.appendControls=function(e){var t=this;if(E.isAppleInternal){var n=document.createElement("button");n.classList.add("other"),n.textContent=A("CrashReporter.CreateRadar"),n.addEventListener("click",(function(){t.onCreateRadar()})),e.appendChild(n)}var r=document.createElement("div");r.classList.add("spacer"),e.appendChild(r);var i=document.createElement("button");i.classList.add("alternate"),i.textContent=A("CrashReporter.Close"),i.addEventListener("click",(function(){t.close()})),e.appendChild(i);var o=document.createElement("div");o.classList.add("divider"),e.appendChild(o);var a=document.createElement("button");a.classList.add("primary"),a.textContent=A("CrashReporter.SendToApple"),a.addEventListener("click",(function(){t.onSendToApple()})),e.appendChild(a)},e.showOnce=function(e){if(!this.errorReport){this.errorReport=oe.createErrorReport(e.error),this.primaryInteractionMode=e.primaryInteractionMode;var t=this.appendModalBase(e.primaryInteractionMode),n=t[0],r=t[1],i=t[2];this.root=n,this.shouldReloadOnClose=e.shouldReloadOnClose,this.appendControls(i),L.render(r,this.errorReport),oe.recordErrorCatcherWasDisplayed(e.error)}},e}();se.errorReport=void 0,se.root=void 0,se.shouldReloadOnClose=!1,se.primaryInteractionMode=void 0;var ce={configure:function(e){Object.assign(E,e);var t=E.appName,n=E.environmentInfo,r=E.buildInfo,i=E.isSendingStatsEnabled,o=E.flushInterval,a=E.serviceUrl,s=E.sessionID,c=E.userDSID,u=E.userAppleId;oe.configure({appName:t,environmentInfo:n,hostingAppName:e.hostingAppName,buildInfo:r,flushInterval:o,serviceUrl:a,sessionID:s,userDSID:c,userAppleId:u,location:window.location,userAgent:window.navigator.userAgent,stringifyExceptionContext:le}),i&&z.scheduleFlush()},handleError:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];se.showOnce({error:e,primaryInteractionMode:t,shouldReloadOnClose:n})},InteractionMode:C};function ue(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function le(e){var t="";try{var n=e&&e.toJSON&&e.toJSON()||e;t=ue(n)?""+n:JSON.stringify(n)}catch(o){var r={};for(var i in e)r[i]=de(e,i);t=JSON.stringify(r)}return t}function de(e,t){var n=e[t];if(ue(n))return n;var r="";try{var i=n&&n.toJSON&&n.toJSON()||n;r=ue(i)?""+i:JSON.stringify(i)}catch(o){try{r=n+" (could not `JSON.stringify()`)"}catch(a){r="(cannot stringify value)"}}return r}var pe={shouldSendStatsWhileInDevelopmentMode:!1,flushInterval:6e4},fe=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,t=(e.shouldSendStatsWhileInDevelopmentMode,e.flushInterval),n=!0;oe.configure({isSendingStatsEnabled:n,flushInterval:t})}var t=e.prototype;return t.updateServiceUrl=function(e){oe.updateServiceUrl(e)},t.recordStat=function(e){oe.handleStat(e)},t.recordPerfStat=function(e){oe.handlePerfStat(e)},t.flush=function(){oe.flush()},e}(),he=n(1296),me={url:Object(he.c)("https://www.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",cookiesDomain:"icloud.com",rootDomain:"www"},ge={url:Object(he.c)("https://www.icloud.com.cn/"),servicesDomain:"icloud.com.cn",domainLogo:"icloud.cn.logo",cookiesDomain:"icloud.com.cn",rootDomain:"www"},ve={url:Object(he.c)("https://beta.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:me,cookiesDomain:"icloud.com",rootDomain:"beta"},ye={url:Object(he.c)("https://future.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:ve,cookiesDomain:"icloud.com",rootDomain:"future"},be={url:Object(he.c)("https://carry.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:me,cookiesDomain:"icloud.com",rootDomain:"carry"},_e={url:Object(he.c)("https://sprinkles.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:me,cookiesDomain:"icloud.com",rootDomain:"sprinkles"},Ce={url:Object(he.c)("https://facetime.apple.com/"),servicesDomain:"icloud.com",cookiesDomain:"apple.com",rootDomain:"facetime"},Ie={url:Object(he.c)("https://prod-facetime.apple.com/"),servicesDomain:"icloud.com",cookiesDomain:"apple.com",rootDomain:"prod-facetime"},we={url:Object(he.c)("https://carry-facetime.apple.com/"),servicesDomain:"icloud.com",cookiesDomain:"apple.com",rootDomain:"carry-facetime"},Ee={url:Object(he.c)("https://icloud1-facetime.apple.com/"),servicesDomain:"icloud.com",cookiesDomain:"apple.com",rootDomain:"icloud1-facetime"},Se={url:Object(he.c)("https://icloud2-facetime.apple.com/"),servicesDomain:"icloud.com",cookiesDomain:"apple.com",rootDomain:"icloud2-facetime"},Te={url:Object(he.c)("https://icloud3-facetime.apple.com/"),servicesDomain:"icloud.com",cookiesDomain:"apple.com",rootDomain:"icloud3-facetime"},Oe=[me,ge,ve,ye,be,_e,Ce,Ie,we,Ee,Se,Te];function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ae,Ne=function(){function e(){this.current=function(){for(var e,t=window.location.hostname,n=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Pe(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(Oe);!(e=n()).done;){var r=e.value;if(r.url.hostname===t)return r}throw new Error("hostname "+t+" is not supported")}(),this.allowedRemoteOrigins=Oe.map((function(e){return e.url.origin}))}var t,n;return e.prototype.findAvailableHostname=function(e){for(var t=this.current;t;t=t.fallbackDomain)if(e.includes(t))return t.url.hostname;return null},t=e,(n=[{key:"isDomainCN",get:function(){return this.current===ge}}])&&xe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Re(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function De(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Re(o,r,i,a,s,"next",e)}function s(e){Re(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ue(e,t,n){return t&&ke(e.prototype,t),n&&ke(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Le(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Me(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ze(e,t)}function je(e){var t="function"===typeof Map?new Map:void 0;return(je=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Fe(e,arguments,He(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ze(r,e)})(e)}function Fe(e,t,n){return(Fe=Be()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&ze(i,n.prototype),i}).apply(null,arguments)}function Be(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function We(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Ve(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Ne.sharedInstance=new Ne,function(e){e.assertNever=function(e){throw new Error},e.arrayToEnum=function(e){for(var t,n={},r=We(e);!(t=r()).done;){var i=t.value;n[i]=i}return n},e.getValidEnumValues=function(t){for(var n,r={},i=We(e.objectKeys(t).filter((function(e){return"number"!==typeof t[t[e]]})));!(n=i()).done;){var o=n.value;r[o]=t[o]}return e.objectValues(r)},e.objectValues=function(t){return e.objectKeys(t).map((function(e){return t[e]}))},e.objectKeys="function"===typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=function(e,t){for(var n,r=We(e);!(n=r()).done;){var i=n.value;if(t(i))return i}},e.isInteger="function"===typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e}}(Ae||(Ae={}));var Ze=Ae.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"]),qe=function(e){function t(n){var r;(r=e.call(this)||this).issues=[],r.format=function(){var e={_errors:[]};return function t(n){for(var r,i=We(n.issues);!(r=i()).done;){var o=r.value;if("invalid_union"===o.code)o.unionErrors.map(t);else if("invalid_return_type"===o.code)t(o.returnTypeError);else if("invalid_arguments"===o.code)t(o.argumentsError);else if(0===o.path.length)e._errors.push(o.message);else for(var a=e,s=0;s<o.path.length;){var c=o.path[s];if(s===o.path.length-1)a[c]=a[c]||{_errors:[]},a[c]._errors.push(o.message);else if("string"===typeof c)a[c]=a[c]||{_errors:[]};else if("number"===typeof c){var u=[];u._errors=[],a[c]=a[c]||u}a=a[c],s++}}}(Le(r)),e},r.addIssue=function(e){r.issues=[].concat(r.issues,[e])},r.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.issues=[].concat(r.issues,e)};var i=(this instanceof t?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(Le(r),i):r.__proto__=i,r.name="ZodError",r.issues=n,r}Me(t,e);var n=t.prototype;return n.toString=function(){return this.message},n.flatten=function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},n={},r=[],i=We(this.issues);!(e=i()).done;){var o=e.value;o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o))}return{formErrors:r,fieldErrors:n}},Ue(t,[{key:"errors",get:function(){return this.issues}},{key:"message",get:function(){return JSON.stringify(this.issues,null,2)}},{key:"isEmpty",get:function(){return 0===this.issues.length}},{key:"formErrors",get:function(){return this.flatten()}}]),t}(je(Error));qe.create=function(e){return new qe(e)};var Ke=function(e,t){var n;switch(e.code){case Ze.invalid_type:n="undefined"===e.received?"Required":"Expected "+e.expected+", received "+e.received;break;case Ze.invalid_literal:n="Invalid literal value, expected "+JSON.stringify(e.expected);break;case Ze.unrecognized_keys:n="Unrecognized key(s) in object: "+e.keys.map((function(e){return"'"+e+"'"})).join(", ");break;case Ze.invalid_union:n="Invalid input";break;case Ze.invalid_union_discriminator:n="Invalid discriminator value. Expected "+e.options.map((function(e){return"string"===typeof e?"'"+e+"'":e})).join(" | ");break;case Ze.invalid_enum_value:n="Invalid enum value. Expected "+e.options.map((function(e){return"string"===typeof e?"'"+e+"'":e})).join(" | ");break;case Ze.invalid_arguments:n="Invalid function arguments";break;case Ze.invalid_return_type:n="Invalid function return type";break;case Ze.invalid_date:n="Invalid date";break;case Ze.invalid_string:n="regex"!==e.validation?"Invalid "+e.validation:"Invalid";break;case Ze.too_small:n="array"===e.type?"Array must contain "+(e.inclusive?"at least":"more than")+" "+e.minimum+" element(s)":"string"===e.type?"String must contain "+(e.inclusive?"at least":"over")+" "+e.minimum+" character(s)":"number"===e.type?"Number must be greater than "+(e.inclusive?"or equal to ":"")+e.minimum:"Invalid input";break;case Ze.too_big:n="array"===e.type?"Array must contain "+(e.inclusive?"at most":"less than")+" "+e.maximum+" element(s)":"string"===e.type?"String must contain "+(e.inclusive?"at most":"under")+" "+e.maximum+" character(s)":"number"===e.type?"Number must be less than "+(e.inclusive?"or equal to ":"")+e.maximum:"Invalid input";break;case Ze.custom:n="Invalid input";break;case Ze.invalid_intersection_types:n="Intersection results could not be merged";break;case Ze.not_multiple_of:n="Number must be a multiple of "+e.multipleOf;break;default:n=t.defaultError,Ae.assertNever(e)}return{message:n}},Ge=Ke,Ye=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qe=function(e){switch(typeof e){case"undefined":return Ye.undefined;case"string":return Ye.string;case"number":return isNaN(e)?Ye.nan:Ye.number;case"boolean":return Ye.boolean;case"function":return Ye.function;case"bigint":return Ye.bigint;case"object":return Array.isArray(e)?Ye.array:null===e?Ye.null:e.then&&"function"===typeof e.then&&e.catch&&"function"===typeof e.catch?Ye.promise:"undefined"!==typeof Map&&e instanceof Map?Ye.map:"undefined"!==typeof Set&&e instanceof Set?Ye.set:"undefined"!==typeof Date&&e instanceof Date?Ye.date:Ye.object;default:return Ye.unknown}},Xe=function(e){for(var t,n=e.data,r=e.path,i=e.errorMaps,o=e.issueData,a=[].concat(r,o.path||[]),s=Object.assign({},o,{path:a}),c="",u=We(i.filter((function(e){return!!e})).slice().reverse());!(t=u()).done;)c=(0,t.value)(s,{data:n,defaultError:c}).message;return Object.assign({},o,{path:a,message:o.message||c})};function Je(e,t){var n=Xe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Ge,Ke].filter((function(e){return!!e}))});e.common.issues.push(n)}var $e,et=function(){function e(){this.value="valid"}var t=e.prototype;return t.dirty=function(){"valid"===this.value&&(this.value="dirty")},t.abort=function(){"aborted"!==this.value&&(this.value="aborted")},e.mergeArray=function(e,t){for(var n,r=[],i=We(t);!(n=i()).done;){var o=n.value;if("aborted"===o.status)return tt;"dirty"===o.status&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}},e.mergeObjectAsync=function(){var t=De(regeneratorRuntime.mark((function t(n,r){var i,o,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=[],o=We(r);case 2:if((a=o()).done){t.next=15;break}return s=a.value,t.t0=i,t.next=7,s.key;case 7:return t.t1=t.sent,t.next=10,s.value;case 10:t.t2=t.sent,t.t3={key:t.t1,value:t.t2},t.t0.push.call(t.t0,t.t3);case 13:t.next=2;break;case 15:return t.abrupt("return",e.mergeObjectSync(n,i));case 16:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.mergeObjectSync=function(e,t){for(var n,r={},i=We(t);!(n=i()).done;){var o=n.value,a=o.key,s=o.value;if("aborted"===a.status)return tt;if("aborted"===s.status)return tt;"dirty"===a.status&&e.dirty(),"dirty"===s.status&&e.dirty(),("undefined"!==typeof s.value||o.alwaysSet)&&(r[a.value]=s.value)}return{status:e.value,value:r}},e}(),tt=Object.freeze({status:"aborted"}),nt=function(e){return{status:"valid",value:e}},rt=function(e){return"aborted"===e.status},it=function(e){return"dirty"===e.status},ot=function(e){return"valid"===e.status},at=function(e){return void 0!==typeof Promise&&e instanceof Promise};!function(e){e.errToObj=function(e){return"string"===typeof e?{message:e}:e||{}},e.toString=function(e){return"string"===typeof e?e:null===e||void 0===e?void 0:e.message}}($e||($e={}));var st=function(){function e(e,t,n,r){this.parent=e,this.data=t,this._path=n,this._key=r}return Ue(e,[{key:"path",get:function(){return this._path.concat(this._key)}}]),e}(),ct=function(e,t){if(ot(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,error:new qe(e.common.issues)}};function ut(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,i=e.description;if(t&&(n||r))throw new Error('Can\'t use "invalid" or "required" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:function(t,n){return"invalid_type"!==t.code?{message:n.defaultError}:"undefined"===typeof n.data&&r?{message:r}:e.invalid_type_error?{message:e.invalid_type_error}:{message:n.defaultError}},description:i}}var lt=function(){function e(e){this.spa=this.safeParseAsync,this.superRefine=this._refinement,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.default=this.default.bind(this),this.describe=this.describe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}var t=e.prototype;return t._getType=function(e){return Qe(e.data)},t._getOrReturnCtx=function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Qe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}},t._processInputParams=function(e){return{status:new et,ctx:{common:e.parent.common,data:e.data,parsedType:Qe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},t._parseSync=function(e){var t=this._parse(e);if(at(t))throw new Error("Synchronous parse encountered promise.");return t},t._parseAsync=function(e){var t=this._parse(e);return Promise.resolve(t)},t.parse=function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error},t.safeParse=function(e,t){var n,r={common:{issues:[],async:null!==(n=null===t||void 0===t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null===t||void 0===t?void 0:t.errorMap},path:(null===t||void 0===t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qe(e)},i=this._parseSync({data:e,path:r.path,parent:r});return ct(r,i)},t.parseAsync=function(){var e=De(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.safeParseAsync(t,n);case 2:if(!(r=e.sent).success){e.next=5;break}return e.abrupt("return",r.data);case 5:throw r.error;case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.safeParseAsync=function(){var e=De(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={common:{issues:[],contextualErrorMap:null===n||void 0===n?void 0:n.errorMap,async:!0},path:(null===n||void 0===n?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qe(t)},i=this._parse({data:t,path:[],parent:r}),e.next=4,at(i)?i:Promise.resolve(i);case 4:return o=e.sent,e.abrupt("return",ct(r,o));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.refine=function(e,t){return this._refinement((function(n,r){var i=e(n),o=function(){return r.addIssue(Object.assign({code:Ze.custom},function(e){return"string"===typeof t||"undefined"===typeof t?{message:t}:"function"===typeof t?t(e):t}(n)))};return"undefined"!==typeof Promise&&i instanceof Promise?i.then((function(e){return!!e||(o(),!1)})):!!i||(o(),!1)}))},t.refinement=function(e,t){return this._refinement((function(n,r){return!!e(n)||(r.addIssue("function"===typeof t?t(n,r):t),!1)}))},t._refinement=function(e){return new Vt({schema:this,typeName:Yt.ZodEffects,effect:{type:"refinement",refinement:e}})},t.optional=function(){return Zt.create(this)},t.nullable=function(){return qt.create(this)},t.nullish=function(){return this.optional().nullable()},t.array=function(){return Ot.create(this)},t.promise=function(){return Wt.create(this)},t.or=function(e){return Nt.create([this,e])},t.and=function(e){return Dt.create(this,e)},t.transform=function(e){return new Vt({schema:this,typeName:Yt.ZodEffects,effect:{type:"transform",transform:e}})},t.default=function(e){return new Kt({innerType:this,defaultValue:"function"===typeof e?e:function(){return e},typeName:Yt.ZodDefault})},t.describe=function(e){return new(0,this.constructor)(Object.assign({},this._def,{description:e}))},t.isOptional=function(){return this.safeParse(void 0).success},t.isNullable=function(){return this.safeParse(null).success},Ue(e,[{key:"description",get:function(){return this._def.description}}]),e}(),dt=/^c[^\s-]{8,}$/i,pt=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,ft=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,ht=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._regex=function(e,n,r){return t.refinement((function(t){return e.test(t)}),Object.assign({validation:n,code:Ze.invalid_string},$e.errToObj(r)))},t.nonempty=function(e){return t.min(1,$e.errToObj(e))},t}Me(t,e);var n=t.prototype;return n._parse=function(e){if(this._getType(e)!==Ye.string){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.string,received:t.parsedType}),tt}for(var n,r=new et,i=void 0,o=We(this._def.checks);!(n=o()).done;){var a=n.value;if("min"===a.kind)e.data.length<a.value&&(Je(i=this._getOrReturnCtx(e,i),{code:Ze.too_small,minimum:a.value,type:"string",inclusive:!0,message:a.message}),r.dirty());else if("max"===a.kind)e.data.length>a.value&&(Je(i=this._getOrReturnCtx(e,i),{code:Ze.too_big,maximum:a.value,type:"string",inclusive:!0,message:a.message}),r.dirty());else if("email"===a.kind)ft.test(e.data)||(Je(i=this._getOrReturnCtx(e,i),{validation:"email",code:Ze.invalid_string,message:a.message}),r.dirty());else if("uuid"===a.kind)pt.test(e.data)||(Je(i=this._getOrReturnCtx(e,i),{validation:"uuid",code:Ze.invalid_string,message:a.message}),r.dirty());else if("cuid"===a.kind)dt.test(e.data)||(Je(i=this._getOrReturnCtx(e,i),{validation:"cuid",code:Ze.invalid_string,message:a.message}),r.dirty());else if("url"===a.kind)try{new URL(e.data)}catch(s){Je(i=this._getOrReturnCtx(e,i),{validation:"url",code:Ze.invalid_string,message:a.message}),r.dirty()}else"regex"===a.kind&&(a.regex.lastIndex=0,a.regex.test(e.data)||(Je(i=this._getOrReturnCtx(e,i),{validation:"regex",code:Ze.invalid_string,message:a.message}),r.dirty()))}return{status:r.value,value:e.data}},n._addCheck=function(e){return new t(Object.assign({},this._def,{checks:[].concat(this._def.checks,[e])}))},n.email=function(e){return this._addCheck(Object.assign({kind:"email"},$e.errToObj(e)))},n.url=function(e){return this._addCheck(Object.assign({kind:"url"},$e.errToObj(e)))},n.uuid=function(e){return this._addCheck(Object.assign({kind:"uuid"},$e.errToObj(e)))},n.cuid=function(e){return this._addCheck(Object.assign({kind:"cuid"},$e.errToObj(e)))},n.regex=function(e,t){return this._addCheck(Object.assign({kind:"regex",regex:e},$e.errToObj(t)))},n.min=function(e,t){return this._addCheck(Object.assign({kind:"min",value:e},$e.errToObj(t)))},n.max=function(e,t){return this._addCheck(Object.assign({kind:"max",value:e},$e.errToObj(t)))},n.length=function(e,t){return this.min(e,t).max(e,t)},Ue(t,[{key:"isEmail",get:function(){return!!this._def.checks.find((function(e){return"email"===e.kind}))}},{key:"isURL",get:function(){return!!this._def.checks.find((function(e){return"url"===e.kind}))}},{key:"isUUID",get:function(){return!!this._def.checks.find((function(e){return"uuid"===e.kind}))}},{key:"isCUID",get:function(){return!!this._def.checks.find((function(e){return"cuid"===e.kind}))}},{key:"minLength",get:function(){var e=-1/0;return this._def.checks.map((function(t){"min"===t.kind&&(null===e||t.value>e)&&(e=t.value)})),e}},{key:"maxLength",get:function(){var e=null;return this._def.checks.map((function(t){"max"===t.kind&&(null===e||t.value<e)&&(e=t.value)})),e}}]),t}(lt);function mt(e,t){var n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}ht.create=function(e){return new ht(Object.assign({checks:[],typeName:Yt.ZodString},ut(e)))};var gt=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}Me(t,e);var n=t.prototype;return n._parse=function(e){if(this._getType(e)!==Ye.number){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.number,received:t.parsedType}),tt}for(var n,r=void 0,i=new et,o=We(this._def.checks);!(n=o()).done;){var a=n.value;"int"===a.kind?Ae.isInteger(e.data)||(Je(r=this._getOrReturnCtx(e,r),{code:Ze.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(Je(r=this._getOrReturnCtx(e,r),{code:Ze.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,message:a.message}),i.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(Je(r=this._getOrReturnCtx(e,r),{code:Ze.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,message:a.message}),i.dirty()):"multipleOf"===a.kind?0!==mt(e.data,a.value)&&(Je(r=this._getOrReturnCtx(e,r),{code:Ze.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):Ae.assertNever(a)}return{status:i.value,value:e.data}},n.gte=function(e,t){return this.setLimit("min",e,!0,$e.toString(t))},n.gt=function(e,t){return this.setLimit("min",e,!1,$e.toString(t))},n.lte=function(e,t){return this.setLimit("max",e,!0,$e.toString(t))},n.lt=function(e,t){return this.setLimit("max",e,!1,$e.toString(t))},n.setLimit=function(e,n,r,i){return new t(Object.assign({},this._def,{checks:[].concat(this._def.checks,[{kind:e,value:n,inclusive:r,message:$e.toString(i)}])}))},n._addCheck=function(e){return new t(Object.assign({},this._def,{checks:[].concat(this._def.checks,[e])}))},n.int=function(e){return this._addCheck({kind:"int",message:$e.toString(e)})},n.positive=function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(e)})},n.negative=function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(e)})},n.nonpositive=function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(e)})},n.nonnegative=function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(e)})},n.multipleOf=function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$e.toString(t)})},Ue(t,[{key:"minValue",get:function(){for(var e,t=null,n=We(this._def.checks);!(e=n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}return t}},{key:"maxValue",get:function(){for(var e,t=null,n=We(this._def.checks);!(e=n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}return t}},{key:"isInt",get:function(){return!!this._def.checks.find((function(e){return"int"===e.kind}))}}]),t}(lt);gt.create=function(e){return new gt(Object.assign({checks:[],typeName:Yt.ZodNumber},ut(e)))};var vt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){if(this._getType(e)!==Ye.bigint){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.bigint,received:t.parsedType}),tt}return nt(e.data)},t}(lt);vt.create=function(e){return new vt(Object.assign({typeName:Yt.ZodBigInt},ut(e)))};var yt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){if(this._getType(e)!==Ye.boolean){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.boolean,received:t.parsedType}),tt}return nt(e.data)},t}(lt);yt.create=function(e){return new yt(Object.assign({typeName:Yt.ZodBoolean},ut(e)))};var bt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){if(this._getType(e)!==Ye.date){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.date,received:t.parsedType}),tt}return isNaN(e.data.getTime())?(Je(this._getOrReturnCtx(e),{code:Ze.invalid_date}),tt):{status:"valid",value:new Date(e.data.getTime())}},t}(lt);bt.create=function(e){return new bt(Object.assign({typeName:Yt.ZodDate},ut(e)))};var _t=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){if(this._getType(e)!==Ye.undefined){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.undefined,received:t.parsedType}),tt}return nt(e.data)},t}(lt);_t.create=function(e){return new _t(Object.assign({typeName:Yt.ZodUndefined},ut(e)))};var Ct=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){if(this._getType(e)!==Ye.null){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.null,received:t.parsedType}),tt}return nt(e.data)},t}(lt);Ct.create=function(e){return new Ct(Object.assign({typeName:Yt.ZodNull},ut(e)))};var It=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._any=!0,t}return Me(t,e),t.prototype._parse=function(e){return nt(e.data)},t}(lt);It.create=function(e){return new It(Object.assign({typeName:Yt.ZodAny},ut(e)))};var wt=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._unknown=!0,t}return Me(t,e),t.prototype._parse=function(e){return nt(e.data)},t}(lt);wt.create=function(e){return new wt(Object.assign({typeName:Yt.ZodUnknown},ut(e)))};var Et=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.never,received:t.parsedType}),tt},t}(lt);Et.create=function(e){return new Et(Object.assign({typeName:Yt.ZodNever},ut(e)))};var St=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){if(this._getType(e)!==Ye.undefined){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.void,received:t.parsedType}),tt}return nt(e.data)},t}(lt);St.create=function(e){return new St(Object.assign({typeName:Yt.ZodVoid},ut(e)))};var Tt,Ot=function(e){function t(){return e.apply(this,arguments)||this}Me(t,e);var n=t.prototype;return n._parse=function(e){var t=this._processInputParams(e),n=t.ctx,r=t.status,i=this._def;if(n.parsedType!==Ye.array)return Je(n,{code:Ze.invalid_type,expected:Ye.array,received:n.parsedType}),tt;if(null!==i.minLength&&n.data.length<i.minLength.value&&(Je(n,{code:Ze.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,message:i.minLength.message}),r.dirty()),null!==i.maxLength&&n.data.length>i.maxLength.value&&(Je(n,{code:Ze.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all(n.data.map((function(e,t){return i.type._parseAsync(new st(n,e,n.path,t))}))).then((function(e){return et.mergeArray(r,e)}));var o=n.data.map((function(e,t){return i.type._parseSync(new st(n,e,n.path,t))}));return et.mergeArray(r,o)},n.min=function(e,n){return new t(Object.assign({},this._def,{minLength:{value:e,message:$e.toString(n)}}))},n.max=function(e,n){return new t(Object.assign({},this._def,{maxLength:{value:e,message:$e.toString(n)}}))},n.length=function(e,t){return this.min(e,t).max(e,t)},n.nonempty=function(e){return this.min(1,e)},Ue(t,[{key:"element",get:function(){return this._def.type}}]),t}(lt);Ot.create=function(e,t){return new Ot(Object.assign({type:e,minLength:null,maxLength:null,typeName:Yt.ZodArray},ut(t)))},function(e){e.mergeShapes=function(e,t){return Object.assign({},e,t)}}(Tt||(Tt={}));var Pt=function(e){return function(t){return new At(Object.assign({},e,{shape:function(){return Object.assign({},e.shape(),t)}}))}};function xt(e){if(e instanceof At){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=Zt.create(xt(r))}return new At(Object.assign({},e._def,{shape:function(){return t}}))}return e instanceof Ot?Ot.create(xt(e.element)):e instanceof Zt?Zt.create(xt(e.unwrap())):e instanceof qt?qt.create(xt(e.unwrap())):e instanceof kt?kt.create(e.items.map((function(e){return xt(e)}))):e}var At=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._cached=null,t.nonstrict=t.passthrough,t.augment=Pt(t._def),t.extend=Pt(t._def),t}Me(t,e);var n=t.prototype;return n._getCached=function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=Ae.objectKeys(e);return this._cached={shape:e,keys:t}},n._parse=function(e){if(this._getType(e)!==Ye.object){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.object,received:t.parsedType}),tt}var n=this._processInputParams(e),r=n.status,i=n.ctx,o=this._getCached(),a=o.shape,s=o.keys,c=[];for(var u in i.data)s.includes(u)||c.push(u);for(var l,d=[],p=We(s);!(l=p()).done;){var f=l.value,h=a[f],m=i.data[f];d.push({key:{status:"valid",value:f},value:h._parse(new st(i,m,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Et){var g=this._def.unknownKeys;if("passthrough"===g)for(var v,y=We(c);!(v=y()).done;){var b=v.value;d.push({key:{status:"valid",value:b},value:{status:"valid",value:i.data[b]}})}else if("strict"===g)c.length>0&&(Je(i,{code:Ze.unrecognized_keys,keys:c}),r.dirty());else if("strip"!==g)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else for(var _,C=this._def.catchall,I=We(c);!(_=I()).done;){var w=_.value,E=i.data[w];d.push({key:{status:"valid",value:w},value:C._parse(new st(i,E,i.path,w)),alwaysSet:w in i.data})}return i.common.async?Promise.resolve().then(De(regeneratorRuntime.mark((function e(){var t,n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],n=We(d);case 2:if((r=n()).done){e.next=17;break}return i=r.value,e.next=6,i.key;case 6:return o=e.sent,e.t0=t,e.t1=o,e.next=11,i.value;case 11:e.t2=e.sent,e.t3=i.alwaysSet,e.t4={key:e.t1,value:e.t2,alwaysSet:e.t3},e.t0.push.call(e.t0,e.t4);case 15:e.next=2;break;case 17:return e.abrupt("return",t);case 18:case"end":return e.stop()}}),e)})))).then((function(e){return et.mergeObjectSync(r,e)})):et.mergeObjectSync(r,d)},n.strict=function(e){var n=this;return $e.errToObj,new t(Object.assign({},this._def,{unknownKeys:"strict"},void 0!==e?{errorMap:function(t,r){var i,o,a,s,c=null!==(a=null===(o=(i=n._def).errorMap)||void 0===o?void 0:o.call(i,t,r).message)&&void 0!==a?a:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=$e.errToObj(e).message)&&void 0!==s?s:c}:{message:c}}}:{}))},n.strip=function(){return new t(Object.assign({},this._def,{unknownKeys:"strip"}))},n.passthrough=function(){return new t(Object.assign({},this._def,{unknownKeys:"passthrough"}))},n.setKey=function(e,t){var n;return this.augment(((n={})[e]=t,n))},n.merge=function(e){var n=this;return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return Tt.mergeShapes(n._def.shape(),e._def.shape())},typeName:Yt.ZodObject})},n.catchall=function(e){return new t(Object.assign({},this._def,{catchall:e}))},n.pick=function(e){var n=this,r={};return Ae.objectKeys(e).map((function(e){r[e]=n.shape[e]})),new t(Object.assign({},this._def,{shape:function(){return r}}))},n.omit=function(e){var n=this,r={};return Ae.objectKeys(this.shape).map((function(t){-1===Ae.objectKeys(e).indexOf(t)&&(r[t]=n.shape[t])})),new t(Object.assign({},this._def,{shape:function(){return r}}))},n.deepPartial=function(){return xt(this)},n.partial=function(e){var n=this,r={};if(e)return Ae.objectKeys(this.shape).map((function(t){-1===Ae.objectKeys(e).indexOf(t)?r[t]=n.shape[t]:r[t]=n.shape[t].optional()})),new t(Object.assign({},this._def,{shape:function(){return r}}));for(var i in this.shape){var o=this.shape[i];r[i]=o.optional()}return new t(Object.assign({},this._def,{shape:function(){return r}}))},n.required=function(){var e={};for(var n in this.shape){for(var r=this.shape[n];r instanceof Zt;)r=r._def.innerType;e[n]=r}return new t(Object.assign({},this._def,{shape:function(){return e}}))},Ue(t,[{key:"shape",get:function(){return this._def.shape()}}]),t}(lt);At.create=function(e,t){return new At(Object.assign({shape:function(){return e},unknownKeys:"strip",catchall:Et.create(),typeName:Yt.ZodObject},ut(t)))},At.strictCreate=function(e,t){return new At(Object.assign({shape:function(){return e},unknownKeys:"strict",catchall:Et.create(),typeName:Yt.ZodObject},ut(t)))},At.lazycreate=function(e,t){return new At(Object.assign({shape:e,unknownKeys:"strip",catchall:Et.create(),typeName:Yt.ZodObject},ut(t)))};var Nt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this._processInputParams(e).ctx,n=this._def.options;if(t.common.async)return Promise.all(n.map(function(){var e=De(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.assign({},t,{common:Object.assign({},t.common,{issues:[]}),parent:null}),e.next=3,n._parseAsync({data:t.data,path:t.path,parent:r});case 3:return e.t0=e.sent,e.t1=r,e.abrupt("return",{result:e.t0,ctx:e.t1});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){for(var n,r=We(e);!(n=r()).done;){var i=n.value;if("valid"===i.result.status)return i.result}for(var o,a=We(e);!(o=a()).done;){var s,c=o.value;if("dirty"===c.result.status)return(s=t.common.issues).push.apply(s,c.ctx.common.issues),c.result}var u=e.map((function(e){return new qe(e.ctx.common.issues)}));return Je(t,{code:Ze.invalid_union,unionErrors:u}),tt}));for(var r,i,o=void 0,a=[],s=We(n);!(r=s()).done;){var c=r.value,u=Object.assign({},t,{common:Object.assign({},t.common,{issues:[]}),parent:null}),l=c._parseSync({data:t.data,path:t.path,parent:u});if("valid"===l.status)return l;"dirty"!==l.status||o||(o={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return(i=t.common.issues).push.apply(i,o.ctx.common.issues),o.result;var d=a.map((function(e){return new qe(e)}));return Je(t,{code:Ze.invalid_union,unionErrors:d}),tt},Ue(t,[{key:"options",get:function(){return this._def.options}}]),t}(lt);Nt.create=function(e,t){return new Nt(Object.assign({options:e,typeName:Yt.ZodUnion},ut(t)))};var Rt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==Ye.object)return Je(t,{code:Ze.invalid_type,expected:Ye.object,received:t.parsedType}),tt;var n=this.discriminator,r=t.data[n],i=this.options.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Je(t,{code:Ze.invalid_union_discriminator,options:this.validDiscriminatorValues,path:[n]}),tt)},t.create=function(e,n,r){var i=new Map;try{n.forEach((function(t){var n=t.shape[e].value;i.set(n,t)}))}catch(o){throw new Error("The discriminator value could not be extracted from all the provided schemas")}if(i.size!==n.length)throw new Error("Some of the discriminator values are not unique");return new t(Object.assign({typeName:Yt.ZodDiscriminatedUnion,discriminator:e,options:i},ut(r)))},Ue(t,[{key:"discriminator",get:function(){return this._def.discriminator}},{key:"validDiscriminatorValues",get:function(){return Array.from(this.options.keys())}},{key:"options",get:function(){return this._def.options}}]),t}(lt),Dt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx,i=function(e,t){if(rt(e)||rt(t))return tt;var i=function e(t,n){var r=Qe(t),i=Qe(n);if(t===n)return{valid:!0,data:t};if(r===Ye.object&&i===Ye.object){for(var o,a=Ae.objectKeys(n),s=Ae.objectKeys(t).filter((function(e){return-1!==a.indexOf(e)})),c=Object.assign({},t,n),u=We(s);!(o=u()).done;){var l=o.value,d=e(t[l],n[l]);if(!d.valid)return{valid:!1};c[l]=d.data}return{valid:!0,data:c}}if(r===Ye.array&&i===Ye.array){if(t.length!==n.length)return{valid:!1};for(var p=[],f=0;f<t.length;f++){var h=e(t[f],n[f]);if(!h.valid)return{valid:!1};p.push(h.data)}return{valid:!0,data:p}}return r===Ye.date&&i===Ye.date&&+t===+n?{valid:!0,data:t}:{valid:!1}}(e.value,t.value);return i.valid?((it(e)||it(t))&&n.dirty(),{status:n.value,value:i.data}):(Je(r,{code:Ze.invalid_intersection_types}),tt)};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((function(e){var t=e[0],n=e[1];return i(t,n)})):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))},t}(lt);Dt.create=function(e,t,n){return new Dt(Object.assign({left:e,right:t,typeName:Yt.ZodIntersection},ut(n)))};var kt=function(e){function t(){return e.apply(this,arguments)||this}Me(t,e);var n=t.prototype;return n._parse=function(e){var t=this,n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==Ye.array)return Je(i,{code:Ze.invalid_type,expected:Ye.array,received:i.parsedType}),tt;if(i.data.length<this._def.items.length)return Je(i,{code:Ze.too_small,minimum:this._def.items.length,inclusive:!0,type:"array"}),tt;!this._def.rest&&i.data.length>this._def.items.length&&(Je(i,{code:Ze.too_big,maximum:this._def.items.length,inclusive:!0,type:"array"}),r.dirty());var o=i.data.map((function(e,n){var r=t._def.items[n]||t._def.rest;return r?r._parse(new st(i,e,i.path,n)):null})).filter((function(e){return!!e}));return i.common.async?Promise.all(o).then((function(e){return et.mergeArray(r,e)})):et.mergeArray(r,o)},n.rest=function(e){return new t(Object.assign({},this._def,{rest:e}))},Ue(t,[{key:"items",get:function(){return this._def.items}}]),t}(lt);kt.create=function(e,t){return new kt(Object.assign({items:e,typeName:Yt.ZodTuple,rest:null},ut(t)))};var Ut=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==Ye.object)return Je(r,{code:Ze.invalid_type,expected:Ye.object,received:r.parsedType}),tt;var i=[],o=this._def.keyType,a=this._def.valueType;for(var s in r.data)i.push({key:o._parse(new st(r,s,r.path,s)),value:a._parse(new st(r,r.data[s],r.path,s))});return r.common.async?et.mergeObjectAsync(n,i):et.mergeObjectSync(n,i)},t.create=function(e,n,r){return new t(n instanceof lt?Object.assign({keyType:e,valueType:n,typeName:Yt.ZodRecord},ut(r)):Object.assign({keyType:ht.create(),valueType:e,typeName:Yt.ZodRecord},ut(n)))},Ue(t,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"element",get:function(){return this._def.valueType}}]),t}(lt),Lt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==Ye.map)return Je(r,{code:Ze.invalid_type,expected:Ye.map,received:r.parsedType}),tt;var i=this._def.keyType,o=this._def.valueType,a=[].concat(r.data.entries()).map((function(e,t){var n=e[0],a=e[1];return{key:i._parse(new st(r,n,r.path,[t,"key"])),value:o._parse(new st(r,a,r.path,[t,"value"]))}}));if(r.common.async){var s=new Map;return Promise.resolve().then(De(regeneratorRuntime.mark((function e(){var t,r,i,o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=We(a);case 1:if((r=t()).done){e.next=15;break}return i=r.value,e.next=5,i.key;case 5:return o=e.sent,e.next=8,i.value;case 8:if(c=e.sent,"aborted"!==o.status&&"aborted"!==c.status){e.next=11;break}return e.abrupt("return",tt);case 11:"dirty"!==o.status&&"dirty"!==c.status||n.dirty(),s.set(o.value,c.value);case 13:e.next=1;break;case 15:return e.abrupt("return",{status:n.value,value:s});case 16:case"end":return e.stop()}}),e)}))))}for(var c,u=new Map,l=We(a);!(c=l()).done;){var d=c.value,p=d.key,f=d.value;if("aborted"===p.status||"aborted"===f.status)return tt;"dirty"!==p.status&&"dirty"!==f.status||n.dirty(),u.set(p.value,f.value)}return{status:n.value,value:u}},t}(lt);Lt.create=function(e,t,n){return new Lt(Object.assign({valueType:t,keyType:e,typeName:Yt.ZodMap},ut(n)))};var Mt=function(e){function t(){return e.apply(this,arguments)||this}Me(t,e);var n=t.prototype;return n._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==Ye.set)return Je(r,{code:Ze.invalid_type,expected:Ye.set,received:r.parsedType}),tt;var i=this._def;null!==i.minSize&&r.data.size<i.minSize.value&&(Je(r,{code:Ze.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,message:i.minSize.message}),n.dirty()),null!==i.maxSize&&r.data.size>i.maxSize.value&&(Je(r,{code:Ze.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,message:i.maxSize.message}),n.dirty());var o=this._def.valueType;function a(e){for(var t,r=new Set,i=We(e);!(t=i()).done;){var o=t.value;if("aborted"===o.status)return tt;"dirty"===o.status&&n.dirty(),r.add(o.value)}return{status:n.value,value:r}}var s=[].concat(r.data.values()).map((function(e,t){return o._parse(new st(r,e,r.path,t))}));return r.common.async?Promise.all(s).then((function(e){return a(e)})):a(s)},n.min=function(e,n){return new t(Object.assign({},this._def,{minSize:{value:e,message:$e.toString(n)}}))},n.max=function(e,n){return new t(Object.assign({},this._def,{maxSize:{value:e,message:$e.toString(n)}}))},n.size=function(e,t){return this.min(e,t).max(e,t)},n.nonempty=function(e){return this.min(1,e)},t}(lt);Mt.create=function(e,t){return new Mt(Object.assign({valueType:e,minSize:null,maxSize:null,typeName:Yt.ZodSet},ut(t)))};var jt=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).validate=t.implement,t}Me(t,e);var n=t.prototype;return n._parse=function(e){var t=this,n=this._processInputParams(e).ctx;if(n.parsedType!==Ye.function)return Je(n,{code:Ze.invalid_type,expected:Ye.function,received:n.parsedType}),tt;function r(e,t){return Xe({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ge,Ke].filter((function(e){return!!e})),issueData:{code:Ze.invalid_arguments,argumentsError:t}})}function i(e,t){return Xe({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ge,Ke].filter((function(e){return!!e})),issueData:{code:Ze.invalid_return_type,returnTypeError:t}})}var o={errorMap:n.common.contextualErrorMap},a=n.data;return this._def.returns instanceof Wt?nt(De(regeneratorRuntime.mark((function e(){var n,s,c,u,l,d,p,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=f.length,s=new Array(n),c=0;c<n;c++)s[c]=f[c];return u=new qe([]),e.next=4,t._def.args.parseAsync(s,o).catch((function(e){throw u.addIssue(r(s,e)),u}));case 4:return l=e.sent,e.next=7,a.apply(void 0,l);case 7:return d=e.sent,e.next=10,t._def.returns._def.type.parseAsync(d,o).catch((function(e){throw u.addIssue(i(d,e)),u}));case 10:return p=e.sent,e.abrupt("return",p);case 12:case"end":return e.stop()}}),e)})))):nt((function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];var c=t._def.args.safeParse(n,o);if(!c.success)throw new qe([r(n,c.error)]);var u=a.apply(void 0,c.data),l=t._def.returns.safeParse(u,o);if(!l.success)throw new qe([i(u,l.error)]);return l.data}))},n.parameters=function(){return this._def.args},n.returnType=function(){return this._def.returns},n.args=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return new t(Object.assign({},this._def,{args:kt.create(n).rest(wt.create())}))},n.returns=function(e){return new t(Object.assign({},this._def,{returns:e}))},n.implement=function(e){return this.parse(e)},n.strictImplement=function(e){return this.parse(e)},t}(lt);jt.create=function(e,t,n){return new jt(Object.assign({args:e?e.rest(wt.create()):kt.create([]).rest(wt.create()),returns:t||wt.create(),typeName:Yt.ZodFunction},ut(n)))};var Ft=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;return this._def.getter()._parse({data:t.data,path:t.path,parent:t})},Ue(t,[{key:"schema",get:function(){return this._def.getter()}}]),t}(lt);Ft.create=function(e,t){return new Ft(Object.assign({getter:e,typeName:Yt.ZodLazy},ut(t)))};var Bt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){return e.data!==this._def.value?(Je(this._getOrReturnCtx(e),{code:Ze.invalid_literal,expected:this._def.value}),tt):{status:"valid",value:e.data}},Ue(t,[{key:"value",get:function(){return this._def.value}}]),t}(lt);Bt.create=function(e,t){return new Bt(Object.assign({value:e,typeName:Yt.ZodLiteral},ut(t)))};var zt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){return-1===this._def.values.indexOf(e.data)?(Je(this._getOrReturnCtx(e),{code:Ze.invalid_enum_value,options:this._def.values}),tt):nt(e.data)},Ue(t,[{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){for(var e,t={},n=We(this._def.values);!(e=n()).done;){var r=e.value;t[r]=r}return t}},{key:"Values",get:function(){for(var e,t={},n=We(this._def.values);!(e=n()).done;){var r=e.value;t[r]=r}return t}},{key:"Enum",get:function(){for(var e,t={},n=We(this._def.values);!(e=n()).done;){var r=e.value;t[r]=r}return t}}]),t}(lt);zt.create=function(e){return new zt({values:e,typeName:Yt.ZodEnum})};var Ht=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=Ae.getValidEnumValues(this._def.values);return-1===t.indexOf(e.data)?(Je(this._getOrReturnCtx(e),{code:Ze.invalid_enum_value,options:Ae.objectValues(t)}),tt):nt(e.data)},Ue(t,[{key:"enum",get:function(){return this._def.values}}]),t}(lt);Ht.create=function(e,t){return new Ht(Object.assign({values:e,typeName:Yt.ZodNativeEnum},ut(t)))};var Wt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){var t=this,n=this._processInputParams(e).ctx;if(n.parsedType!==Ye.promise&&!1===n.common.async)return Je(n,{code:Ze.invalid_type,expected:Ye.promise,received:n.parsedType}),tt;var r=n.parsedType===Ye.promise?n.data:Promise.resolve(n.data);return nt(r.then((function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})})))},t}(lt);Wt.create=function(e,t){return new Wt(Object.assign({type:e,typeName:Yt.ZodPromise},ut(t)))};var Vt=function(e){function t(){return e.apply(this,arguments)||this}Me(t,e);var n=t.prototype;return n.innerType=function(){return this._def.schema},n._parse=function(e){var t=this,n=this._processInputParams(e),r=n.status,i=n.ctx,o=this._def.effect||null;if("preprocess"===o.type){var a=o.transform(i.data);return i.common.async?Promise.resolve(a).then((function(e){return t._def.schema._parseAsync({data:e,path:i.path,parent:i})})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if("refinement"===o.type){var s={addIssue:function(e){Je(i,e),e.fatal?r.abort():r.dirty()},get path(){return i.path}};s.addIssue=s.addIssue.bind(s);var c=function(e){var t=o.refinement(e,s);if(i.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===i.common.async){var u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return"aborted"===u.status?tt:("dirty"===u.status&&r.dirty(),c(u.value),{status:r.value,value:u.value})}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){return"aborted"===e.status?tt:("dirty"===e.status&&r.dirty(),c(e.value).then((function(){return{status:r.value,value:e.value}})))}))}if("transform"===o.type){if(!1===i.common.async){var l=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ot(l))return l;var d=o.transform(l.value);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return nt(d)}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){return ot(e)?Promise.resolve(o.transform(e.value)).then(nt):e}))}Ae.assertNever(o)},t}(lt);Vt.create=function(e,t,n){return new Vt(Object.assign({schema:e,typeName:Yt.ZodEffects,effect:t},ut(n)))},Vt.createWithPreprocess=function(e,t,n){return new Vt(Object.assign({schema:t,effect:{type:"preprocess",transform:e},typeName:Yt.ZodEffects},ut(n)))};var Zt=function(e){function t(){return e.apply(this,arguments)||this}Me(t,e);var n=t.prototype;return n._parse=function(e){return this._getType(e)===Ye.undefined?nt(void 0):this._def.innerType._parse(e)},n.unwrap=function(){return this._def.innerType},t}(lt);Zt.create=function(e,t){return new Zt(Object.assign({innerType:e,typeName:Yt.ZodOptional},ut(t)))};var qt=function(e){function t(){return e.apply(this,arguments)||this}Me(t,e);var n=t.prototype;return n._parse=function(e){return this._getType(e)===Ye.null?nt(null):this._def.innerType._parse(e)},n.unwrap=function(){return this._def.innerType},t}(lt);qt.create=function(e,t){return new qt(Object.assign({innerType:e,typeName:Yt.ZodNullable},ut(t)))};var Kt=function(e){function t(){return e.apply(this,arguments)||this}Me(t,e);var n=t.prototype;return n._parse=function(e){var t=this._processInputParams(e).ctx,n=t.data;return t.parsedType===Ye.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})},n.removeDefault=function(){return this._def.innerType},t}(lt);Kt.create=function(e,t){return new Zt(Object.assign({innerType:e,typeName:Yt.ZodOptional},ut(t)))};var Gt=function(e){function t(){return e.apply(this,arguments)||this}return Me(t,e),t.prototype._parse=function(e){if(this._getType(e)!==Ye.nan){var t=this._getOrReturnCtx(e);return Je(t,{code:Ze.invalid_type,expected:Ye.nan,received:t.parsedType}),tt}return{status:"valid",value:e.data}},t}(lt);Gt.create=function(e){return new Gt(Object.assign({typeName:Yt.ZodNaN},ut(e)))};var Yt,Qt=function(e,t){return e?It.create().refine(e,t):It.create()},Xt={object:At.lazycreate};!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",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.ZodPromise="ZodPromise"}(Yt||(Yt={}));var Jt=ht.create,$t=gt.create,en=Gt.create,tn=vt.create,nn=yt.create,rn=bt.create,on=_t.create,an=Ct.create,sn=It.create,cn=wt.create,un=Et.create,ln=St.create,dn=Ot.create,pn=At.create,fn=At.strictCreate,hn=Nt.create,mn=Rt.create,gn=Dt.create,vn=kt.create,yn=Ut.create,bn=Lt.create,_n=Mt.create,Cn=jt.create,In=Ft.create,wn=Bt.create,En=zt.create,Sn=Ht.create,Tn=Wt.create,On=Vt.create,Pn=Zt.create,xn=qt.create,An=Vt.createWithPreprocess,Nn=Object.freeze({__proto__:null,ZodParsedType:Ye,getParsedType:Qe,makeIssue:Xe,EMPTY_PATH:[],addIssueToContext:Je,ParseStatus:et,INVALID:tt,DIRTY:function(e){return{status:"dirty",value:e}},OK:nt,isAborted:rt,isDirty:it,isValid:ot,isAsync:at,ZodType:lt,ZodString:ht,ZodNumber:gt,ZodBigInt:vt,ZodBoolean:yt,ZodDate:bt,ZodUndefined:_t,ZodNull:Ct,ZodAny:It,ZodUnknown:wt,ZodNever:Et,ZodVoid:St,ZodArray:Ot,get objectUtil(){return Tt},ZodObject:At,ZodUnion:Nt,ZodDiscriminatedUnion:Rt,ZodIntersection:Dt,ZodTuple:kt,ZodRecord:Ut,ZodMap:Lt,ZodSet:Mt,ZodFunction:jt,ZodLazy:Ft,ZodLiteral:Bt,ZodEnum:zt,ZodNativeEnum:Ht,ZodPromise:Wt,ZodEffects:Vt,ZodTransformer:Vt,ZodOptional:Zt,ZodNullable:qt,ZodDefault:Kt,ZodNaN:Gt,custom:Qt,Schema:lt,ZodSchema:lt,late:Xt,get ZodFirstPartyTypeKind(){return Yt},any:sn,array:dn,bigint:tn,boolean:nn,date:rn,discriminatedUnion:mn,effect:On,enum:En,function:Cn,instanceof:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of "+e.name};return Qt((function(t){return t instanceof e}),t)},intersection:gn,lazy:In,literal:wn,map:bn,nan:en,nativeEnum:Sn,never:un,null:an,nullable:xn,number:$t,object:pn,oboolean:function(){return nn().optional()},onumber:function(){return $t().optional()},optional:Pn,ostring:function(){return Jt().optional()},preprocess:An,promise:Tn,record:yn,set:_n,strictObject:fn,string:Jt,transformer:On,tuple:vn,undefined:on,union:hn,unknown:cn,void:ln,ZodIssueCode:Ze,quotelessJson:function(e){return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")},ZodError:qe,defaultErrorMap:Ke,get overrideErrorMap(){return Ge},setErrorMap:function(e){Ge=e}});function Rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Dn=Nn.object({url:Nn.string().optional(),status:Nn.string().optional(),iCloudEnv:Nn.object({shortId:Nn.string(),vipSuffix:Nn.string()}).optional(),pcsRequired:Nn.boolean().optional()}),kn=new Map([["ckdatabasews",{url:"https://ckdatabasews."+Ne.sharedInstance.current.servicesDomain,status:"active"}],["docws",{url:"https://docws."+Ne.sharedInstance.current.servicesDomain,status:"active"}],["feedbackws",Mn()]]),Un=function(){function e(){this.configurationProvider=null}var t,n,r=e.prototype;return r.hasWebService=function(e){return!!this.getWebServiceInfo(e)},r.getWebServiceInfo=function(e){return this.webServices?Ln(this.webServices,e):null},r.isWebServiceActive=function(e){if(!this.webServices)return!1;var t=Ln(this.webServices,e);if(!t)throw new Error("isWebServiceActive: Service "+e+" was not found");return"active"===t.status},r.urlForServiceName=function(e,t){var n=Ln(this.webServices,e);if(!n)throw new Error("urlForServiceName: Service "+e+" was not found");return void 0===t?n.url:n.url+"/"+t},r.serviceNameForUrl=function(e){var t=this.webServices;if(!t)return null;var n=null;return t.forEach((function(t,r){var i=t.url;if(i){if(i.endsWith(":443")){var o=i.match("(.*):443");o&&(i=o[1])}e.startsWith(i)&&(n=r)}})),n},t=e,(n=[{key:"webServices",get:function(){var e,t;return null!=(e=null==(t=this.configurationProvider)?void 0:t.webServices)?e:null}}])&&Rn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ln(e,t){if(!e)return null;var n=e.get(t);if(n)return n;if("feedbackws"===t){var r=Mn(e);return e.set("feedbackws",r),r}return null}function Mn(e){var t=Ne.sharedInstance.current.servicesDomain,n="";if(e&&t===ge.servicesDomain){var r,i=/^https:\/\/(p\d{2,})/g,o={};for(var a in e.forEach((function(e){var t=e.url,n=i.exec(t);if(n&&n.length){var r=n[1];o[r]?o[r]=1:o[r]+=1}})),o)(!r||o[a]>o[r])&&(r=a);r&&(n=r+"-")}return{url:"https://"+n+"feedbackws."+t,status:"active"}}function jn(e,t){return Un.sharedInstance.urlForServiceName(e,t)}function Fn(e){return Un.sharedInstance.hasWebService(e)}function Bn(e){return Un.sharedInstance.isWebServiceActive(e)}function zn(e){return Un.sharedInstance.serviceNameForUrl(e)}Un.sharedInstance=new Un;var Hn=n(583),Wn=["ICLOUD2","ICLOUD3"],Vn=function(e,t){return function(e){return Wn.some((function(t){return t===e}))}(e)&&function(e){return"current"!==e||(console.debug("Not Initializing Sentry for a locally run app"),!1)}(t)},Zn=function(e,t){Vn(e,t)&&(console.debug("Initializing Sentry for "+e+" Environment"),Hn.a.init({project:"www_icloud",dsn:"https://029daf5b241945f58df7d5bff77b49f9@sentry-dev.amp.apple.com/676",environment:e,release:t}))};function qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Kn=function(){function e(){var e=this;this._sessionIdentifier=I(),this._sessionStart=Date.now(),window.setInterval((function(){return e._setSessionIdentifier()}),288e5)}var t,n;return e.prototype._setSessionIdentifier=function(){this._sessionIdentifier=I(),this._sessionStart=Date.now()},t=e,(n=[{key:"identifier",get:function(){return this._sessionIdentifier}},{key:"duration",get:function(){return Date.now()-this._sessionStart}}])&&qn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();Kn.sharedInstance=new Kn;var Gn,Yn,Qn=n(586),Xn=l();function Jn(){return[Ce,Ie,we,Ee,Se,Te].includes(Ne.sharedInstance.current)}function $n(){return crypto.randomUUID()}function er(e,t,n,r,i,o,a,s,c){return tr(e,t,n,r,i,o,a,s,c,U.PERF_STAT)}function tr(e,t,n,r,i,o,a,s){var c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{},u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:U.STAT,l={appName:e,statName:s,masteringNumber:t,buildNumber:n,hostname:i,browserLocale:o,primaryInteractionMode:a};switch(c.statCategory){case B.USER:l.dsid=c.dsid;break;case B.SESSION:default:l.sessionID=r,l.sessionDuration=c.sessionDuration}delete c.dsid,delete c.sessionDuration;try{if(u===U.PERF_STAT){if(!c||null===c.duration||void 0===c.duration)throw"_createStat: no duration specified for a perf stat";l.duration=c.duration}else c&&c.urlPath&&(c.urlPath=ir(c.urlPath));return Object.assign({},c,l)}catch(d){return rr(d,l)}}function nr(e){switch(typeof e){case"string":case"number":case"boolean":case"function":case"symbol":case"bigint":return e.toString();case"object":return e?e.toString():"null";case"undefined":default:return"undefined"}}function rr(e,t){return{exceptionTitle:nr(e),statParameters:t,appName:_r.applicationName,statName:"createStatFailed"}}function ir(e){var t=new Array;return e.split("/").forEach((function(e){e.match(/^[0-9]/)&&e.length>5||e.length>20&&/^\d+$/.test(e)||/\d{3}/.test(e)||/^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$/.test(e)?t.push("*"):t.push(e)})),t.join("/")}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ar(e,t){return Math.max(0,Math.round(e/t)*t)}P(),function(e){e.NOT_SET="NOT_SET",e.SUCCESS="SUCCESS",e.FAILURE="FAILURE"}(Gn||(Gn={})),function(e){e.NOT_SET="NOT_SET",e.MANUAL="MANUAL",e.AUTOMATIC="AUTOMATIC"}(Yn||(Yn={}));var sr=globalThis.performance&&globalThis.performance.timing?globalThis.performance.timing:{};function cr(e){var t=e.toString(),n=t+" ("+e.getTime()+")",r=t.match(/\(([a-zA-Z\s]*)\)/),i="UNKNOWN";return r&&(i=r[1]),{timeString:n,timezoneString:i}}var ur=function(){var e,t,n=r.prototype;function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sr;this.startTimestamp=void 0,this.endTimestamp=void 0,this._isRecorded=void 0,this.statName=void 0,this.additionalProperties=void 0,this.status=Gn.NOT_SET,this._timingMode=Yn.NOT_SET,this._timing=void 0,this._processStartTimestamp=void 0,this.statName=e,this.additionalProperties=t,this._timing=n,this._isRecorded=!1;var r=cr(new Date),i=r.timeString,o=r.timezoneString;this.addAdditionalProperties({time:i,timezone:o})}return n.markRecorded=function(){this._isRecorded=!0},n.addAdditionalProperties=function(e){return this.additionalProperties=Object.assign({},this.additionalProperties,e),this},n.record=function(){fr.sharedInstance.recordStat(this)},n.recordOnce=function(){this.isRecorded||this.record()},n.time=function(){return this._timingMode=Yn.MANUAL,this.startTimestamp=Date.now(),this},n.timeFromProcessStart=function(){return this.timeWithTotalDurationFromBaseline()},n.timeWithTotalDurationFromBaseline=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._timing.domInteractive,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._timing.navigationStart;return this._timingMode=Yn.AUTOMATIC,this.startTimestamp=e,this._processStartTimestamp=t,this},n.end=function(){return this.endTimestamp=Date.now(),this},n.toJSON=function(){var e=this.status,t=this.additionalProperties,n=this.statName;e===Gn.SUCCESS?n+=".success":e===Gn.FAILURE&&(n+=".failure");var r=Object.assign({},t,{statName:n});return this._timingMode!==Yn.NOT_SET&&(this.endTimestamp||this.end(),r.duration=ar(this.duration||0,10),this._timingMode===Yn.AUTOMATIC&&(r.totalDuration=ar(this._totalDuration||0,10))),r},n.success=function(e){return this._finish(Gn.SUCCESS,e)},n.failure=function(e){return this._finish(Gn.FAILURE,e)},r.withEventAndLabel=function(e,t,n){return new r(e+"_"+t,n)},n._finish=function(e,t){return this.status=e,this.addAdditionalProperties(t),null!==this._timingMode&&this.end(),this},e=r,(t=[{key:"isRecorded",get:function(){return this._isRecorded}},{key:"duration",get:function(){if(void 0!==this.startTimestamp&&void 0!==this.endTimestamp)return this.endTimestamp-this.startTimestamp}},{key:"_totalDuration",get:function(){if(void 0!==this._processStartTimestamp&&void 0!==this.endTimestamp)return this.endTimestamp-this._processStartTimestamp}}])&&or(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}(),lr=function(){function e(e,t){this.statName=void 0,this.additionalProperties=void 0,t.duration||(t.duration=0),this.statName=e,this.additionalProperties=t}return e.prototype.toJSON=function(){var e=this.additionalProperties,t=this.statName;return Object.assign({},e,{statName:t})},e}();function dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pr=new fe({shouldSendStatsWhileInDevelopmentMode:!1,flushInterval:8e3}),fr=function(){function e(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:pr;this.applicationName=void 0,this.telemetryClient=void 0,this.masteringNumber=void 0,this.buildNumber=void 0,this.hostname=void 0,this.telemetrySession=void 0,this.browserLocale=void 0,this.markTimestampBuckets={},this.measureDictionary={},this.userInfo=null,this.applicationName=e,this.masteringNumber=t,this.buildNumber=n,this.hostname=r,this.browserLocale=i,this.telemetrySession=Kn.sharedInstance,this.telemetryClient=o,this.updateServiceUrl(),this.registerPerformanceObserver()}var t,n,r=e.prototype;return r.updateAuthenticationState=function(e){this.userInfo=e},r.recordStat=function(e){e.markRecorded();var t=e.toJSON();this.recordStatRaw(t.statName,t)},r.recordPerfStat=function(e){var t=e.toJSON();this.recordStatRaw(t.statName,t,U.PERF_STAT)},r.recordStatRaw=function(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:U.STAT,o=this.applicationName,a=this.masteringNumber,s=this.buildNumber,c=this.hostname,u=this.browserLocale,l=this.telemetrySession,d=this.telemetryClient;t.isSessionAuthenticated=this.isSessionAuthenticated,t.statCategory===B.USER?t.dsid=null==(n=this.userInfo)||null==(r=n.details)?void 0:r.dsid:t.sessionDuration=l.duration||0;var p=tr(o,a,s,l.identifier||"",c,u,_.sharedInstance.primaryInteractionMode,e,t);if(i===U.PERF_STAT)d.recordPerfStat(p);else{if(i!==U.STAT)throw"Unknown stat type used to report a stat";d.recordStat(p)}},r.recordApplicationStat=function(e,t,n,r){var i,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this.masteringNumber,c=this.buildNumber,u=this.browserLocale,l=this.hostname,d=this.telemetryClient,p=this.telemetrySession;a.isSessionAuthenticated=this.isSessionAuthenticated,a.statCategory===B.USER?a.dsid=null==(i=this.userInfo)||null==(o=i.details)?void 0:o.dsid:a.sessionDuration=p.duration||0;var f=tr(e,t,n,p.identifier,l,u,_.sharedInstance.primaryInteractionMode,r,a);f.cloudOSMasteringNumber=s,f.cloudOSBuildNumber=c,d.recordStat(f)},r.flushStats=function(){this.telemetryClient.flush()},r.updateServiceUrl=function(){var e=jn("feedbackws","");this.telemetryClient.updateServiceUrl(e)},r.mark=function(e,t){var n,r,i,o;if(void 0!==(null==(n=window)||null==(r=n.performance)?void 0:r.mark)&&void 0!==(null==(i=window)||null==(o=i.performance)?void 0:o.clearMarks))try{return window.performance.clearMarks(e),window.performance.mark(e,{detail:t})}catch(a){return}},r.measure=function(e,t,n,r){var i,o,a,s;if(void 0!==(null==(i=window)||null==(o=i.performance)?void 0:o.measure)&&void 0!==(null==(a=window)||null==(s=a.performance)?void 0:s.clearMeasures))try{return window.performance.clearMeasures(e),window.performance.measure(e,{detail:r,start:t,end:n})}catch(c){return}},r.registerPerformanceObserver=function(){var e=this;if("PerformanceObserver"in self&&"function"===typeof PerformanceObserver)try{return new PerformanceObserver((function(t){var n=t.getEntries();n.forEach((function(t){var n,r,i,o;if(void 0!==(null==(n=t.detail)?void 0:n.baselineName)&&void 0!==(null==(r=t.detail)?void 0:r.measureFromBaseline)&&void 0!==(null==(i=t.detail)?void 0:i.applicationName)){var a=null!=(o=e.markTimestampBuckets[t.name])?o:new Set;e.markTimestampBuckets[t.name]=a;var s=parseInt(String(t.startTime/1e3));if(!1===a.has(s)&&!1===a.has(s-1)){var c,u,l;a.add(s);var d=null!=(c=t.detail)&&c.contextLabel?t.name+"."+t.detail.contextLabel:t.name,p=new ur(d,Object.assign({},null==(u=t.detail)?void 0:u.additionalProperties,{statCategory:B.USER}));null!=(l=t.detail)&&l.success?p.success():p.failure(),e.recordStat(p)}}})),n.forEach((function(t){var n,r;if(null!=(n=t.detail)&&n.measureFromBaseline&&!0===(null==(r=t.detail)?void 0:r.success)){var i,o,a,s,c=e.measureDictionary[t.name],u=null!=(i=t.detail)&&i.contextLabel?t.name+"."+t.detail.contextLabel:t.name,l=e.measure(u,null==(o=t.detail)?void 0:o.baselineName,t.name,t.detail);if(!l)return;if(!c||c.startTime<l.startTime){var d,p;e.measureDictionary[t.name]=l;var f=new lr(void 0===c?u+"_0":u,Object.assign({},null==(d=t.detail)?void 0:d.additionalProperties,{baselineName:null==(p=t.detail)?void 0:p.baselineName,duration:l.duration,statCategory:B.USER}));e.recordPerfStat(f)}null==(a=window)||null==(s=a.performance)||s.clearMeasures(l.name)}}))})).observe({type:"mark",buffered:!0})}catch(t){}},t=e,(n=[{key:"isSessionAuthenticated",get:function(){return!!this.userInfo}}])&&dr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hr(e,t){for(var n=he.c(e),r=n.searchParams,i=0,o=Object.entries(t);i<o.length;i++){var a=o[i],s=a[0],c=a[1];null!==c&&void 0!==c&&r.set(s,String(c))}return n}function mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}fr.sharedInstance=void 0;var gr,vr=function(){return window.localStorage.removeItem("didAlreadyFailToFetchAppleIdUrlKey")},yr=function(){function e(){this.delegate=null,this.observers=new Set,this._applications=[],this._isIDMSJSScriptAdded=!1,this._environment=null,this._rawConfiguration=void 0,this._accountCreateEnabled=null,this._trustTokens=[],this._isPCSKeyDeleted=null,this._urls=null,this._authenticatedWebServices=null,Un.sharedInstance.configurationProvider=this}var t,n,r=e.prototype;return r.updateConfiguration=function(e,t,n,r,i,o,a,s,c,u){var l,d=this;if(this._applications=t,this._authenticatedWebServices=n,this._urls=r,this._accountCreateEnabled=i,this._trustTokens=o,this._isPCSKeyDeleted=a,fr.sharedInstance.recordStat(new ur("updateConfiguration",{configBag:null==s?void 0:s.configBag,httpStatusCode:c,updateSource:u})),this._environment!==e&&(this._environment=e,FZ()),this._rawConfiguration=s,!this._isIDMSJSScriptAdded){var p=document.createElement("script");p.setAttribute("src",this.appleIdIDMSJSUrl),document.head.appendChild(p),this._isIDMSJSScriptAdded=!0}return this.observers.forEach((function(e){return e(d)})),null==(l=this.delegate)?void 0:l.configurationWasUpdated(this)},r.invalidateConfiguration=function(){var e,t,n=this;return this._applications=[],this._authenticatedWebServices=null,this._urls=null,this._accountCreateEnabled=null,this._trustTokens=[],this._isPCSKeyDeleted=null,this._environment=null,this._rawConfiguration=null,this.observers.forEach((function(e){return e(n)})),null!=(e=null==(t=this.delegate)?void 0:t.configurationWasUpdated(this))?e:Promise.resolve()},t=e,(n=[{key:"environment",get:function(){var e;return null!=(e=this._environment)?e:"PROD"}},{key:"isProduction",get:function(){return!this.environment||"ICLOUD1"===this.environment||"PROD"===this.environment}},{key:"applications",get:function(){return this._applications}},{key:"urls",get:function(){return this._urls}},{key:"accountCreateEnabled",get:function(){return this._accountCreateEnabled}},{key:"trustTokens",get:function(){return this._trustTokens}},{key:"isPCSKeyDeleted",get:function(){return this._isPCSKeyDeleted}},{key:"rawConfiguration",get:function(){return this._rawConfiguration}},{key:"appleIdUrl",get:function(){var e,t=this.urls;if(!t){if("true"===window.localStorage.getItem("didAlreadyFailToFetchAppleIdUrlKey"))throw vr(),new Error("[CloudOSConfiguration] appleIdUrl cannot be empty");return window.localStorage.setItem("didAlreadyFailToFetchAppleIdUrlKey","true"),window.location.reload(),""}return vr(),t.accountAuthorizeUI||fr.sharedInstance.recordStat(new ur("incompleteAuthBag",{message:"[CloudOSConfiguration] accountAuthorizeUI cannot be undefined"})),hr(null!=(e=t.accountAuthorizeUI)?e:t.accountLoginUI,{redirect_uri:window.location.origin,response_mode:"web_message",response_type:"code",frame_id:$n()}).href}},{key:"appleIdIDMSJSUrl",get:function(){var e=this.environment;return"PROD"===e?"https://appleid.cdn-apple.com/appleauth/static/jsapi/authService.latest.min.js":"ICLOUD3"===e?"https://idmsauth-stable.corp.apple.com/appleauth/static/jsapi/authService.latest.min.js":"https://idmsauth-uat.corp.apple.com/appleauth/static/jsapi/authService.latest.min.js"}},{key:"appleIdUrlForSessionRetrieve",get:function(){var e,t;return null!=(e=null==(t=this.urls)?void 0:t.accountLoginUI)?e:null}},{key:"createAccountUrl",get:function(){var e,t;return null!=(e=null==(t=this.urls)?void 0:t.accountCreateUI)?e:null}},{key:"webServices",get:function(){var e;return null!=(e=this._authenticatedWebServices)?e:kn}}])&&mr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var _r=function(){function e(){}var t,n;return e.pushHistoryState=function(t,n,r,i,o,a){var s="";"newspublisher"===r?(a="#"+r,r="",i&&(a=a+"/"+i)):(r&&(s=r+"/"),i&&(s=""+s+i));var c=Ir(e.protocol,e.hostname,s,o,a);window.history.pushState(t,n,c),n&&(this.title=n)},e.replaceHistoryState=function(t,n,r,i,o,a){var s="";"newspublisher"===r?(a="#"+r,r="",i&&(a=a+"/"+i)):(r&&(s=r+"/"),i&&(s=""+s+i));var c=Ir(e.protocol,e.hostname,s,o,a),u=!1;return window.history.state===t&&window.location.href===c||(window.history.replaceState(t,"",c),u=!0),n&&this.title!==n&&(this.title=n,u=!0),u},t=e,n=[{key:"domain",get:function(){return Ne.sharedInstance.current},set:function(e){this.supportedDomains.includes(e)&&Object(Qn.a)(window.location.href.replace(this.domain.url.hostname,e.url.hostname))}},{key:"primaryInteractionMode",get:function(){return _.sharedInstance.primaryInteractionMode}},{key:"applicationName",get:function(){return Jn()?"facetime-host-app":"cloudos2"}},{key:"protocol",get:function(){return window.location.protocol}},{key:"hostname",get:function(){return window.location.hostname}},{key:"masteringNumber",get:function(){return __CW_BUILD_INFO.masteringNumber}},{key:"buildNumber",get:function(){return __CW_BUILD_INFO.buildNumber}},{key:"locale",get:function(){return a()}},{key:"isRTL",get:function(){return T(a())}},{key:"theme",get:function(){return"modern"}},{key:"platformType",get:function(){return _.sharedInstance.platformType}},{key:"secondaryLocale",get:function(){return e._secondaryLocale},set:function(t){e._secondaryLocale=t}},{key:"deviceType",get:function(){return _.sharedInstance.deviceType}},{key:"title",get:function(){return window.document.title},set:function(e){window.document.title=e}},{key:"isDesktopPlatform",get:function(){var e=_.sharedInstance;return e.primaryInteractionMode===h.MOUSE||e.isiPad}}],null&&br(t.prototype,null),n&&br(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Cr(e,t,n,r,i,o,a,s){e.endsWith(":")||(e+=":");var c=hr(e+"//"+t+"/applications/"+r+"/current/"+n,{rootDomain:a});return void 0!==i&&(c.port=i.toString()),o&&(c.pathname+="/"+o),s&&(c.hash="#"+s),c.href}function Ir(e,t,n,r,i){e.endsWith(":")||(e+=":");var o=Object(he.c)(e+"//"+t);return n&&(o.pathname=n),r&&(o.search=r),i&&(o.hash=i),o.href}function wr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Er(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(wr(arguments[t]));return e}_r.supportedDomains=Object.entries(Oe).map((function(e){return e[1]})),_r._secondaryLocale=null,_r.clientId=null!=(gr=window.__earlyClientId)?gr:$n(),_r.supportedLocales=["ar-sa","ca-es","cs-cz","da-dk","de-de","el-gr","en-au","en-ca","en-gb","en-nz","en-us","es-es","es-mx","fi-fi","fr-ca","fr-fr","hi-in","hr-hr","hu-hu","id-id","it-it","iw-il","ja-jp","ko-kr","ms-my","nl-nl","no-no","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sv-se","th-th","tr-tr","uk-ua","vi-vi","zh-cn","zh-hk","zh-tw"],_r.childApplicationSupportedLocales=["ca-es","cs-cz","da-dk","de-de","el-gr","en-au","en-ca","en-gb","en-nz","en-us","es-es","es-mx","fi-fi","fr-ca","fr-fr","hi-in","hr-hr","hu-hu","id-id","it-it","ja-jp","ko-kr","ms-my","nl-nl","no-no","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sv-se","th-th","tr-tr","uk-ua","vi-vi","zh-cn","zh-hk","zh-tw"],_r.protocolVersion=2,_r.configuration=new yr,window.document.title=Jn()?Xn("Application.Title.FaceTime"):Xn("Application.Title");var Sr=function(){return(Sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Tr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Or(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Tr(arguments[t]));return e}var Pr=n(588),xr=Object(Pr.b)(),Ar="Sentry Logger ",Nr=function(){function e(){this._enabled=!1}return e.prototype.disable=function(){this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&Object(Pr.a)((function(){xr.console.log(Ar+"[Log]: "+e.join(" "))}))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&Object(Pr.a)((function(){xr.console.warn(Ar+"[Warn]: "+e.join(" "))}))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&Object(Pr.a)((function(){xr.console.error(Ar+"[Error]: "+e.join(" "))}))},e}();xr.__SENTRY__=xr.__SENTRY__||{};var Rr,Dr=xr.__SENTRY__.logger||(xr.__SENTRY__.logger=new Nr),kr=n(587);!function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(Rr||(Rr={}));var Ur=function(){function e(e){var t=this;this._state=Rr.PENDING,this._handlers=[],this._resolve=function(e){t._setResult(Rr.RESOLVED,e)},this._reject=function(e){t._setResult(Rr.REJECTED,e)},this._setResult=function(e,n){t._state===Rr.PENDING&&(Object(kr.c)(n)?n.then(t._resolve,t._reject):(t._state=e,t._value=n,t._executeHandlers()))},this._attachHandler=function(e){t._handlers=t._handlers.concat(e),t._executeHandlers()},this._executeHandlers=function(){if(t._state!==Rr.PENDING){var e=t._handlers.slice();t._handlers=[],e.forEach((function(e){e.done||(t._state===Rr.RESOLVED&&e.onfulfilled&&e.onfulfilled(t._value),t._state===Rr.REJECTED&&e.onrejected&&e.onrejected(t._value),e.done=!0)}))}};try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}return e.prototype.toString=function(){return"[object SyncPromise]"},e.resolve=function(t){return new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(n,r){if(Array.isArray(t))if(0!==t.length){var i=t.length,o=[];t.forEach((function(t,a){e.resolve(t).then((function(e){o[a]=e,0===(i-=1)&&n(o)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},e.prototype.then=function(t,n){var r=this;return new e((function(e,i){r._attachHandler({done:!1,onfulfilled:function(n){if(t)try{return void e(t(n))}catch(r){return void i(r)}else e(n)},onrejected:function(t){if(n)try{return void e(n(t))}catch(r){return void i(r)}else i(t)}})}))},e.prototype.catch=function(e){return this.then((function(e){return e}),e)},e.prototype.finally=function(t){var n=this;return new e((function(e,r){var i,o;return n.then((function(e){o=!1,i=e,t&&t()}),(function(e){o=!0,i=e,t&&t()})).then((function(){o?r(i):e(i)}))}))},e}(),Lr=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._context={}}return e.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},e.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout((function(){e._scopeListeners.forEach((function(t){t(e)})),e._notifyingListeners=!1})))},e.prototype._notifyEventProcessors=function(e,t,n,r){var i=this;return void 0===r&&(r=0),new Ur((function(o,a){var s=e[r];if(null===t||"function"!==typeof s)o(t);else{var c=s(Sr({},t),n);Object(kr.c)(c)?c.then((function(t){return i._notifyEventProcessors(e,t,n,r+1).then(o)})).then(null,a):i._notifyEventProcessors(e,c,n,r+1).then(o).then(null,a)}}))},e.prototype.setUser=function(e){return this._user=e||{},this._notifyScopeListeners(),this},e.prototype.setTags=function(e){return this._tags=Sr({},this._tags,e),this._notifyScopeListeners(),this},e.prototype.setTag=function(e,t){var n;return this._tags=Sr({},this._tags,((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(e){return this._extra=Sr({},this._extra,e),this._notifyScopeListeners(),this},e.prototype.setExtra=function(e,t){var n;return this._extra=Sr({},this._extra,((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},e.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(e){return this._transaction=e,this._span&&(this._span.transaction=e),this._notifyScopeListeners(),this},e.prototype.setContext=function(e,t){var n;return this._context=Sr({},this._context,((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.clone=function(t){var n=new e;return t&&(n._breadcrumbs=Or(t._breadcrumbs),n._tags=Sr({},t._tags),n._extra=Sr({},t._extra),n._context=Sr({},t._context),n._user=t._user,n._level=t._level,n._span=t._span,n._transaction=t._transaction,n._fingerprint=t._fingerprint,n._eventProcessors=Or(t._eventProcessors)),n},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._context={},this._level=void 0,this._transaction=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(e,t){var n=Sr({timestamp:Object(Pr.d)()},e);return this._breadcrumbs=void 0!==t&&t>=0?Or(this._breadcrumbs,[n]).slice(-t):Or(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e.prototype.applyToEvent=function(e,t){return this._extra&&Object.keys(this._extra).length&&(e.extra=Sr({},this._extra,e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Sr({},this._tags,e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Sr({},this._user,e.user)),this._context&&Object.keys(this._context).length&&(e.contexts=Sr({},this._context,e.contexts)),this._level&&(e.level=this._level),this._transaction&&(e.transaction=this._transaction),this._span&&(e.contexts=Sr({trace:this._span.getTraceContext()},e.contexts)),this._applyFingerprint(e),e.breadcrumbs=Or(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(Or(function(){var e=Object(Pr.b)();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}(),this._eventProcessors),e,t)},e}();var Mr,jr=function(){function e(e,t,n){void 0===t&&(t=new Lr),void 0===n&&(n=3),this._version=n,this._stack=[],this._stack.push({client:e,scope:t})}return e.prototype._invokeClient=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.getStackTop();i&&i.client&&i.client[e]&&(t=i.client)[e].apply(t,Or(n,[i.scope]))},e.prototype.isOlderThan=function(e){return this._version<e},e.prototype.bindClient=function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()},e.prototype.pushScope=function(){var e=this.getStack(),t=e.length>0?e[e.length-1].scope:void 0,n=Lr.clone(t);return this.getStack().push({client:this.getClient(),scope:n}),n},e.prototype.popScope=function(){return void 0!==this.getStack().pop()},e.prototype.withScope=function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(e,t){var n=this._lastEventId=Object(Pr.e)(),r=t;if(!t){var i=void 0;try{throw new Error("Sentry syntheticException")}catch(e){i=e}r={originalException:e,syntheticException:i}}return this._invokeClient("captureException",e,Sr({},r,{event_id:n})),n},e.prototype.captureMessage=function(e,t,n){var r=this._lastEventId=Object(Pr.e)(),i=n;if(!n){var o=void 0;try{throw new Error(e)}catch(a){o=a}i={originalException:e,syntheticException:o}}return this._invokeClient("captureMessage",e,t,Sr({},i,{event_id:r})),r},e.prototype.captureEvent=function(e,t){var n=this._lastEventId=Object(Pr.e)();return this._invokeClient("captureEvent",e,Sr({},t,{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(e,t){var n=this.getStackTop();if(n.scope&&n.client){var r=n.client.getOptions&&n.client.getOptions()||{},i=r.beforeBreadcrumb,o=void 0===i?null:i,a=r.maxBreadcrumbs,s=void 0===a?100:a;if(!(s<=0)){var c=Object(Pr.d)(),u=Sr({timestamp:c},e),l=o?Object(Pr.a)((function(){return o(u,t)})):u;null!==l&&n.scope.addBreadcrumb(l,Math.min(s,100))}}},e.prototype.setUser=function(e){var t=this.getStackTop();t.scope&&t.scope.setUser(e)},e.prototype.setTags=function(e){var t=this.getStackTop();t.scope&&t.scope.setTags(e)},e.prototype.setExtras=function(e){var t=this.getStackTop();t.scope&&t.scope.setExtras(e)},e.prototype.setTag=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setTag(e,t)},e.prototype.setExtra=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setExtra(e,t)},e.prototype.setContext=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setContext(e,t)},e.prototype.configureScope=function(e){var t=this.getStackTop();t.scope&&t.client&&e(t.scope)},e.prototype.run=function(e){var t=Br(this);try{e(this)}finally{Br(t)}},e.prototype.getIntegration=function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return Dr.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},e.prototype.startSpan=function(e,t){return void 0===t&&(t=!1),this._callExtensionMethod("startSpan",e,t)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype._callExtensionMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Fr(),i=r.__SENTRY__;if(i&&i.extensions&&"function"===typeof i.extensions[e])return i.extensions[e].apply(this,t);Dr.warn("Extension method "+e+" couldn't be found, doing nothing.")},e}();function Fr(){var e=Object(Pr.b)();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Br(e){var t=Fr(),n=Wr(t);return Vr(t,e),n}function zr(){var e=Fr();return Hr(e)&&!Wr(e).isOlderThan(3)||Vr(e,new jr),Object(Pr.c)()?function(e){try{var t=Fr().__SENTRY__;if(!t||!t.extensions||!t.extensions.domain)return Wr(e);var n=t.extensions.domain.active;if(!n)return Wr(e);if(!Hr(n)||Wr(n).isOlderThan(3)){var r=Wr(e).getStackTop();Vr(n,new jr(r.client,Lr.clone(r.scope)))}return Wr(n)}catch(i){return Wr(e)}}(e):Wr(e)}function Hr(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Wr(e){return e&&e.__SENTRY__&&e.__SENTRY__.hub||(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=new jr),e.__SENTRY__.hub}function Vr(e,t){return!!e&&(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=t,!0)}function Zr(e){var t;try{throw new Error("Sentry syntheticException")}catch(e){t=e}return function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=zr();if(r&&r[e])return r[e].apply(r,Er(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}("captureException",e,{originalException:e,syntheticException:t})}function qr(e){e?(window.scrollTo(0,0),window.document.body.classList.add("disable-scroll")):window.document.body.classList.remove("disable-scroll")}function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.buildNumber,n=void 0===t?"UNKNOWN":t,r=e.masteringNumber,i=void 0===r?"UNKNOWN":r,o=e.locale,a=void 0===o?"UNKNOWN":o;return n+"__"+i+"__"+a}var Gr=!0,Yr=function(){function e(){}return e.disableStats=function(){Gr=!1},e.showCrashReporter=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ce;if(!t)throw"[CrashReporterUtils] no crashing application info specified";var o=_.sharedInstance.primaryInteractionMode===h.TOUCH,a=Kn.sharedInstance,s={sessionID:a.identifier,isSendingStatsEnabled:Gr,primaryInteractionMode:o?h.TOUCH:h.MOUSE},c=t.localizedApplicationName,u=t.applicationIdentifier,l=t.buildInfo,d=t.environmentInfo,p=t.radarComponentId,f=t.dsid,m=t.appleId,g=t.isAppleInternal;if(s.appName=u,s.localizedAppName=c,s.buildInfo=Kr(l),s.masteringNumber=l.masteringNumber,s.buildNumber=l.buildNumber,s.isAppleInternal=g,s.environmentInfo=d,f&&(s.userDSID=f),m&&(s.userAppleId=m),s.serviceUrl=jn("feedbackws",""),g){var v=e.message,y=v?": "+v:"";s.radarComponentID=p,s.radarTitle=u+" crashed"+y}if(n){var b=n.applicationIdentifier,C=n.buildInfo,I=n.environmentInfo,w=n.dsid,E=n.appleId,S=n.isAppleInternal;s.hostingAppName=b,s.environmentInfo=I,w&&(s.userDSID=w),E&&(s.userAppleId=E),S&&(s.isAppleInternal=S),s.cloudOSMasteringNumber=C.masteringNumber,s.cloudOSBuildNumber=C.buildNumber}i.configure(s),i.handleError(e,s.primaryInteractionMode,r),Vn(_r.configuration.environment,_r.buildNumber)&&Zr({exceptionInfo:e,options:s}),qr(!0)},e.showCrashReporterWithTerminationReasonAndInfo=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ce;e.showCrashReporterWithTerminationReasonAndInfoForHost(t,r,i,null!=(n=Mr)?n:null,o,a)},e.showCrashReporterWithTerminationReasonAndInfoForHost=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:ce,c=r.error||r,u=c.buildInfo,l=Object.assign({type:t},c),d=i.localizedApplicationName,p=i.radarComponentId,f=null!=(n=i.applicationName)?n:"UNKNOWN",h={applicationIdentifier:f,localizedApplicationName:d,radarComponentId:p,buildInfo:u};e.showCrashReporter(l,h,o,a,s)},e}();function Qr(e){return Nn.union([Nn.boolean(),Nn.number(),Nn.string(),Nn.null(),Nn.undefined()]).safeParse(e).success}function Xr(e){return Nn.record(Nn.unknown()).safeParse(e).success}function Jr(e,t){var n=e[t];if(Qr(n))return n;try{var r=n&&n.toJSON&&n.toJSON()||n;return Qr(r)?""+r:JSON.stringify(r)}catch(i){try{return n+" (could not `JSON.stringify()`)"}catch(o){return"(cannot stringify value)"}}}var $r,ei=function(){function e(e){this.hostingApplicationCrashInfo=e,this.isExceptionHandlingEnabled=!0,this.isExceptionHandlingFatal=!0,this.exceptionWasHandled=!1}return e.prototype.exceptionHandler=function(e){var t=function(e){if(!e)return null;var t=e.message,n=e.type;return{message:"string"===typeof t?t:"",type:"string"===typeof n?n:"",stack:function(e){if(!Xr(e))return null;if("string"!==typeof e.stack)return null;var t=e.stack.trim().split("\n"),n=t.length;if(n>500){var r=n-500;t.splice(400,r,"\u2026 "+r+" lines truncated \u2026")}return t.join("\n")}(e),lineNumber:function(e){if(!Xr(e))return null;if("number"===typeof e.lineNumber)return e.lineNumber;if("number"===typeof e.line)return e.line;if("string"!==typeof e.stack)return null;var t=e.stack.split("\n")[1];if("string"!==typeof t)return null;var n=t.split(":"),r=n[n.length-2],i=parseInt(r,10);return Number.isFinite(i)?i:null}(e),context:function(e){if(Qr(e))return""+e;if(!Xr(e))return"";try{var t="function"===typeof e.toJSON?e.toJSON():e;return Qr(t)?""+t:JSON.stringify(t)}catch(i){var n={};for(var r in e)n[r]=Jr(e,r);return JSON.stringify(n)}}(e.context)}}(e);null!==t&&(t.type="UNHANDLED_EXCEPTION"),Yr.showCrashReporter(t||{},this.hostingApplicationCrashInfo,null,!0)},e}();!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.CLEARED="CLEARED",e.RUNNING="RUNNING",e.COMPLETE="COMPLETE"}($r||($r={}));var ti=function(){function e(){this.queue=[],this.pendingMessages=new Map,this.pendingProcessQueueItemTimer=void 0}var t=e.prototype;return t.enqueue=function(e){var t=e.precedesMessage;if(t){this.cancelPendingMessageTimer(t);var n=this.insertMessageBefore(e,t);return this.processNextItemInQueue(),n}if(e.precedingMessageExpiry)return this.queuePendingMessage(e);var r=e.clearsMessage;if(r){var i=this.queueMessage(e);return this.cancelPendingMessageTimer(r),this.setPendingMessageState(r,$r.CLEARED),this.processNextItemInQueue(),i}return this.queueMessage(e)},t.processNextItemInQueue=function(){var e=this;this.pendingProcessQueueItemTimer||(this.pendingProcessQueueItemTimer=window.setTimeout((function(){e.pendingProcessQueueItemTimer=void 0;var t=e.queue;if(e.queue.length>0){var n,r,i=e.queue[0],o=i.message,a=null!=(n=null==(r=e.pendingMessages.get(o.delegateMethodName))?void 0:r.state)?n:null;(!a||a===$r.CLEARED||a===$r.COMPLETE)&&(e.processMessageAction(o,i.resolve),t.length>0&&e.processNextItemInQueue())}})))},t.processMessageAction=function(e,t){var n=this,r=e.delegateMethodTarget,i=e.delegateMethodName,o=e.delegateMethodArguments,a=e.delegateMethodIsAsync,s=e.precedingMessageExpiry;s&&this.setPendingMessageState(i,$r.RUNNING);var c=r[i].apply(r,o);a&&c?c.then((function(){t(),s&&(n.cancelPendingMessageTimer(i),n.pendingMessages.delete(i)),n.queue.shift(),n.processNextItemInQueue()})):(t(),s&&(this.cancelPendingMessageTimer(i),this.pendingMessages.delete(i)),this.queue.shift())},t.cancelPendingMessageTimer=function(e){var t=this.pendingMessages.get(e);if(t){var n=t.timer;t.timer&&(clearTimeout(n),t.timer=void 0)}},t.insertMessageBefore=function(e,t){for(var n=this.queue,r=0,i=0,o=0,a=n.length;o<a;o++,++i)if(n[o].message.delegateMethodName===t){r=o;break}return i===n.length?this.queueMessage(e):this.insertMessageAtIndex(e,r)},t.queuePendingMessage=function(e){var t,n,r=this,i=e.precedingMessageExpiry,o=e.delegateMethodName,a=null!=(t=null==(n=this.pendingMessages.get(o))?void 0:n.state)?t:null;if(!a||a!==$r.CLEARED&&a!==$r.PENDING){var s=i.getTime()-Date.now(),c=window.setTimeout((function(){r.cancelPendingMessageTimer(o),r.pendingMessages.get(o).state=$r.COMPLETE,r.processNextItemInQueue()}),s);this.pendingMessages.set(o,{message:e,timer:c,state:$r.PENDING})}else this.processNextItemInQueue();return this.queueMessage(e)},t.queueMessage=function(e){var t=function(){},n={message:e,promise:new Promise((function(e){t=e})),resolve:function(){t()}};return this.queue.push(n),n.promise},t.insertMessageAtIndex=function(e,t){var n=function(){},r={message:e,promise:new Promise((function(e){n=e})),resolve:function(){n()}};return this.queue.splice(t,0,r),r.promise},t.setPendingMessageState=function(e,t){var n=this.pendingMessages.get(e);n?n.state=t:this.pendingMessages.set(e,{message:void 0,state:t,timer:void 0})},e}(),ni=function(){function e(e,t,n,r,i){this.name=e,this.spec=t,this.raw=n,this.getEnv=r,this.fallbackFor=i,this.nullValue=t.type()}return Object.defineProperty(e.prototype,"configurable",{get:function(){var e=this.spec.configurable;return"object"===typeof e&&(e=e[this.getEnv()]),null!==e&&void 0!==e&&e},enumerable:!1,configurable:!0}),e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return String(this.value)},Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype.sanityCheck=function(e){var t,n,r=this.spec,i=r.oneOf,o=r.matches,a=r.type;if(n=a===Boolean?"false"!==e&&"0"!==e&&!!e:a(e),i){if(!0===e)return null!==(t=i[1])&&void 0!==t?t:i[0];if(i.includes(n))return n}else if(("number"!==typeof n||isFinite(n))&&(!o||o.test(n+"")))return n},e.prototype.getValue=function(){var e,t=this.raw;if(this.configurable&&void 0!==t){var n=this.sanityCheck(t);if(void 0!==n)return n}var r=null===(e=this.fallbackFor)||void 0===e?void 0:e.call(this,this.name);return void 0!==r&&(r=this.sanityCheck(r)),null!==r&&void 0!==r?r:this.defaultValue},Object.defineProperty(e.prototype,"defaultValue",{get:function(){var e=this.spec.value;"object"===typeof e&&(e=e[this.getEnv()]);var t=this.nullValue;if(typeof e===typeof t)return e;var n=this.spec.oneOf;return n?n[0]:t},enumerable:!1,configurable:!0}),e}();function ri(e){void 0===e&&(e=null!==top&&void 0!==top?top:window);var t=function(e){try{return e.location.search}catch(t){return""}}(e),n=function(e){try{return e.location.hash.replace(/^#/,"")}catch(t){return""}}(e);return n?t+"&"+n:t}function ii(e){var t=e.indexOf("=");return-1===t?[decodeURIComponent(e),!0]:[decodeURIComponent(e.slice(0,t)),decodeURIComponent(e.slice(1+t))]}function oi(e){return void 0===e&&(e=ri()),Object.fromEntries((void 0===(t=e)&&(t=ri()),(t?t.replace(/^[?&]+/,"").split("&"):[]).map(ii)));var t}var ai=function(){return(ai=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},si=function(){function e(e,t,n,r,i){var o=this;void 0===t&&(t=ri),void 0===i&&(i=oi),this.specs=e,this.getInput=t,this.parseInput=i;var a=i(this._lastInput=t()),s=Object.entries(e).map((function(e){var t=e[0],i=e[1];return[t,new ni(t,i,a[t],n,r)]})),c=this.flags=Object.fromEntries(s);this.values=Object.defineProperties({},Object.fromEntries(s.map((function(e){var t=e[0];return[t,{enumerable:!0,get:function(){return o.updateFlags(),c[t].getValue()}}]}))))}return Object.defineProperty(e.prototype,"lastInput",{get:function(){return this._lastInput},enumerable:!1,configurable:!0}),e.prototype.updateFlags=function(e){if(void 0===e&&(e=this.getInput()),e===this.lastInput)return!1;var t=this.parseInput(this._lastInput=e);for(var n in this.flags)this.flags[n].raw=t[n];return!0},e.prototype.computeFlags=function(e){var t=this;return void 0===e&&(e=Object.keys(this.flags)),e.reduce((function(e,n){var r;return ai(ai({},e),((r={})[n]=t.values[n],r))}),{})},e.prototype.isOverridden=function(e){return this.values[e]!==this.flags[e].defaultValue},e}(),ci=n.p+"86402577c05f2f58b9ddddd5ad038be0.png",ui=n.p+"a94f70ad2d849c012bd8091f61ea6abf.png",li=n.p+"65d456157686c5d9d77b1c95bf96fb87.png",di=n.p+"db127ebd0ae994211d455458b55f0d2d.png",pi=n.p+"b2ca2facd6e8a38f2576cc27e2bd96b3.png",fi=n.p+"432541c0befd758c340fb5cf8b8803c7.png",hi=n.p+"8ecb5e3ec6dce08746ac1c8f17e1fc58.png",mi=n.p+"c17855a20471523f0d1b455c5d489603.png",gi=n.p+"4f4262e12c89a6bd78b2c623f28aa863.png",vi=n.p+"56c42046b04ca03763eac9aebf15dbd7.png",yi=n.p+"e83fcda1f531dd84bc17a0c5b077cd25.png",bi=n.p+"20434f60f2a05ba38e575065684cda9e.png",_i=n.p+"26477be68b68179f58f6945d7ed34fbf.png",Ci=n.p+"77c0fc0d1c7b56c948b53dc61f35518f.png",Ii=n.p+"26477be68b68179f58f6945d7ed34fbf.png",wi=n.p+"77c0fc0d1c7b56c948b53dc61f35518f.png",Ei=n.p+"26477be68b68179f58f6945d7ed34fbf.png",Si=n.p+"77c0fc0d1c7b56c948b53dc61f35518f.png",Ti=n.p+"26477be68b68179f58f6945d7ed34fbf.png",Oi=n.p+"77c0fc0d1c7b56c948b53dc61f35518f.png",Pi=n.p+"26477be68b68179f58f6945d7ed34fbf.png",xi=n.p+"77c0fc0d1c7b56c948b53dc61f35518f.png",Ai=n.p+"9ddb6aa1a6dd6aa3711255c1342798d8.png",Ni=n.p+"82002d26ce38f549cc3ac9915a1b4a79.png",Ri=n.p+"9ddb6aa1a6dd6aa3711255c1342798d8.png",Di=n.p+"82002d26ce38f549cc3ac9915a1b4a79.png",ki=n.p+"6e314543990e8fede18720c55f696f8d.png",Ui=n.p+"cc910bb05e9217a2e50a57c6790b81d1.png",Li=n.p+"02e717c3d0c1721288f08d383031a2d2.png",Mi=n.p+"e24fba9360a9397544fbc632883d8aad.png",ji=n.p+"02e717c3d0c1721288f08d383031a2d2.png",Fi=n.p+"e24fba9360a9397544fbc632883d8aad.png",Bi=n.p+"f75c561417d84bda148859cb2bf63f25.png",zi=n.p+"ed8f6fffa9418d323ed20c575e0969dd.png",Hi=n.p+"72b087dc0193bd13e86036a2c83c156d.png",Wi=n.p+"2f30bbca8f55f4a72d89c2d3b829ec43.png",Vi=n.p+"f89de2f9400028cf8455e715990e0929.png",Zi=n.p+"76bd54830f803ee7e705d596592f6150.png",qi=n.p+"a1987cdb3196fe839e08efd61b3599cf.png",Ki=n.p+"fcd238637307fe1d60ec845ec253a8c2.png",Gi=n.p+"ca4b1b5875ff0135ab5fbf85f13bc418.png",Yi=n.p+"794eb95ce716273bf71f77e11af1cb3a.png",Qi=n.p+"2e0dfa982cfca41459646027dd98ed36.png",Xi=n.p+"89d126a6f3a71c461c5800469bfa897c.png",Ji=n.p+"2064d4fe9bf9b743037ce623271724e5.png",$i=n.p+"6c41147102e0258e11bc0651e0747f66.png",eo=n.p+"1f7c98c121298b39deee4593c4eb35dd.png",to=n.p+"0caa000901ae4d544d8c521d6c8235f6.png",no=n.p+"a1987cdb3196fe839e08efd61b3599cf.png",ro=n.p+"fcd238637307fe1d60ec845ec253a8c2.png",io=n.p+"de94721d1b43165384aaa31f9e857126.png",oo=n.p+"304662231afadfe9594b0a1b55a4b596.png",ao=n.p+"0efa80414eec412689c5ac70e947a262.png",so=n.p+"2a5ace6f045442284e3ccec5eabc922c.png",co=n.p+"72e6f51fb239fde9f65f3f9b18d168d4.png",uo=n.p+"ad49305e99ca8f6c0bb9dce1705993d1.png",lo=n.p+"ba3bdfa6160a5166a0ecdc79c30e72b0.png",po=n.p+"33125fcd5284342f2ba69a34b25b0460.png",fo=n.p+"ba3bdfa6160a5166a0ecdc79c30e72b0.png",ho=n.p+"33125fcd5284342f2ba69a34b25b0460.png",mo=n.p+"d0004229ffc36e47db3b2bca478fe7aa.png",go=n.p+"36c186d5f4a94ec6d46c682d47b02fa1.png",vo=n.p+"59947fff53d27eb64fdea1735ae71416.png",yo=n.p+"cabaec2aeb833b1cffbed6664ee6c19f.png",bo=n.p+"d1aae02071d926212557d81a2ca7e719.png",_o=n.p+"23c56816938d96b9a16171df1e351e72.png",Co=n.p+"b47e840e369d2f7cd15d36b5653fdb2e.png",Io=n.p+"f5df9cb04c1c7e566722de354373357c.png",wo=n.p+"3c4c7b17fe7fb6b55c2060ce7ba071fa.png",Eo=n.p+"f219b2ec550c3f755b7bdbf8857b54ea.png",So=n.p+"e1ceea8ed8fcb39de303774040f83a10.png",To=n.p+"dea5bba2ad7365f0f4a3bca51e2a483e.png",Oo=n.p+"8b326167fad26eadb670b0a7047005d0.png",Po=n.p+"adc4034163faa97f8dafcba015694a68.png",xo=n.p+"2f41304e966b3b709e7a3d6a5c43102b.png",Ao=n.p+"0c51cab640ab6ad99752e279e9501cfc.png",No=n.p+"25bd1dcba751d789537732abd4cc280f.png",Ro=n.p+"9d0549f0fb5dc7f319edd6a8ae27788a.png",Do=n.p+"25bd1dcba751d789537732abd4cc280f.png",ko=n.p+"9d0549f0fb5dc7f319edd6a8ae27788a.png",Uo=n.p+"25bd1dcba751d789537732abd4cc280f.png",Lo=n.p+"9d0549f0fb5dc7f319edd6a8ae27788a.png",Mo=[["ar-sa",{"1x":ci,"2x":ui}],["ca-es",{"1x":li,"2x":di}],["cs-cz",{"1x":pi,"2x":fi}],["da-dk",{"1x":hi,"2x":mi}],["de-de",{"1x":gi,"2x":vi}],["el-gr",{"1x":yi,"2x":bi}],["en-au",{"1x":_i,"2x":Ci}],["en-ca",{"1x":Ii,"2x":wi}],["en-gb",{"1x":Ei,"2x":Si}],["en-nz",{"1x":Ti,"2x":Oi}],["en-us",{"1x":Pi,"2x":xi}],["es-es",{"1x":Ai,"2x":Ni}],["es-mx",{"1x":Ri,"2x":Di}],["fi-fi",{"1x":ki,"2x":Ui}],["fr-ca",{"1x":Li,"2x":Mi}],["fr-fr",{"1x":ji,"2x":Fi}],["hi-in",{"1x":Bi,"2x":zi}],["hr-hr",{"1x":Hi,"2x":Wi}],["hu-hu",{"1x":Vi,"2x":Zi}],["id-id",{"1x":qi,"2x":Ki}],["it-it",{"1x":Gi,"2x":Yi}],["iw-il",{"1x":Qi,"2x":Xi}],["ja-jp",{"1x":Ji,"2x":$i}],["ko-kr",{"1x":eo,"2x":to}],["ms-my",{"1x":no,"2x":ro}],["nl-nl",{"1x":io,"2x":oo}],["no-no",{"1x":ao,"2x":so}],["pl-pl",{"1x":co,"2x":uo}],["pt-br",{"1x":lo,"2x":po}],["pt-pt",{"1x":fo,"2x":ho}],["ro-ro",{"1x":mo,"2x":go}],["ru-ru",{"1x":vo,"2x":yo}],["sk-sk",{"1x":bo,"2x":_o}],["sv-se",{"1x":Co,"2x":Io}],["th-th",{"1x":wo,"2x":Eo}],["tr-tr",{"1x":So,"2x":To}],["uk-ua",{"1x":Oo,"2x":Po}],["vi-vi",{"1x":xo,"2x":Ao}],["zh-cn",{"1x":No,"2x":Ro}],["zh-hk",{"1x":Do,"2x":ko}],["zh-tw",{"1x":Uo,"2x":Lo}]],jo=Mo.map((function(e){return e[0]})),Fo=[[/beta\.icloud\./i,"beta"],[/carry\.icloud\./i,"carry"],[/future\.icloud\./i,"future"],[/sprinkles\.icloud\./i,"sprinkles"]];function Bo(){return e=location.hostname,(Fo.find((function(t){return t[0].test(e)}))||[void 0,"prod"])[1];var e}var zo,Ho,Wo,Vo,Zo,qo,Ko=si,Go=/sprin/.test(window.location.hostname),Yo=new Ko({env:{configurable:!0,type:String,oneOf:["prod","beta","carry","future","sprinkles"],value:Bo()},flags:{configurable:!1,type:Boolean},failRequests:{configurable:Go,type:String,value:void 0},failSchemas:{configurable:Go,type:String,value:void 0},locale:{configurable:!0,type:String,oneOf:jo,value:a()},logResponses:{configurable:Go,type:String,value:void 0},logTimeouts:{configurable:!1,type:Boolean,value:!1},measureBlock:{configurable:!1,type:String,value:!1}},ri,Bo),Qo=Yo.values;function Xo(e,t,n){return new Promise((function(r){return window.setTimeout((function(){t&&Qo.logTimeouts&&console.info(t+" timed out after "+e+"ms"),r(n)}),e)}))}function Jo(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function $o(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Jo(o,r,i,a,s,"next",e)}function s(e){Jo(o,r,i,a,s,"throw",e)}a(void 0)}))}}Yo.isOverridden.bind(Yo),function(e){e.LITE="lite",e.DARK="dark"}(zo||(zo={})),function(e){e.TIBURON_LOGIN="TIBURON",e.DEFAULT="DEFAULT"}(Ho||(Ho={})),function(e){e.UNKNOWN="UNKNOWN",e.SA="SA",e.HSA1="HSA1",e.HSA2="HSA2",e.MANAGED="MANAGED",e.RESTRICTED="RESTRICTED"}(Wo||(Wo={})),function(e){e.TIMEOUT="Timeout loading authentication",e.INVALID_DATA="Invalid data received",e.UNABLE_TO_CONTINUE_AUTHENTICATION="Unable to continue authentication",e.TIBURON_LOGIN_FAILURE="Sign in With Apple Id failed"}(Vo||(Vo={})),function(e){e.KEEP_ME_SIGNED_IN="keep-me-signed-in",e.REMEMBER_ME="remember-me"}(Zo||(Zo={})),function(e){e.UNKNOWN="UNKNOWN",e.REPAIR="REPAIR",e.HSA1="HSA1",e.HSA2="HSA2",e.INTERSTITIAL="INTERSTITIAL",e.SIGNIN="SIGNIN",e.MANAGED="MANAGED",e.RESTRICTED="RESTRICTED",e.FEDERATED="FEDERATED"}(qo||(qo={}));var ea=function(){function e(e,t,n,r,i,o,a,s,c,u){var l=this;this.delegate=void 0,this.pauseBetweenSteps=!1,this.appleIdUrl=void 0,this.timer=void 0,this.authMethod=Ho.DEFAULT,this.authenticatingAppleIdAccountType=void 0,this.completedAuthenticationStep=0,this.totalNumberOfAuthenticationSteps=void 0,this.appleIdUIMode=qo.SIGNIN,this.messageProcessor=new ti;var d=this.appleIdUrl=hr(e,{locale:n});this.delegate=r,this.pauseBetweenSteps=u,this.timer=window.setTimeout((function(){return l.onAuthFailure()}),45e3);var p=this.appleIdUrl.searchParams.get("widgetKey")||this.appleIdUrl.searchParams.get("client_id"),f={onNativeTakeOverDidStart:function(){return l.onNativeTakeOverDidStart()},onNativeTakeOverDidComplete:function(){return l.onNativeTakeOverDidComplete()},onNativeTakeOverError:function(){return l.onNativeTakeOverError()},onNativeTakeOverDidCancel:function(){return l.onNativeTakeOverDidCancel()},onAuthReady:function(){return l.onAuthReady()},onAuthSuccess:function(e){return l.onAuthSuccess(e)},onAuthFailure:function(){return l.onAuthFailure()},onPasswordAuthDone:function(e,t){return l.onPasswordAuthDone(e,t)},onRepairStart:function(){return l.onRepairStart()},onAuthTeardown:function(){return l.onAuthTeardown()},onAuthCancel:function(){return l.onAuthCancel()},onAuthWidgetWillChangeFlow:function(e){return l.onAuthWidgetWillChangeFlow(e)},onAuthWidgetDidChangeFlow:function(e){return l.onAuthWidgetDidChangeFlow(e)}};$o(regeneratorRuntime.mark((function e(){var u,h,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=Object.assign({features:{rememberMe:a,createLink:!1,iForgotLink:!0,pause2FA:l.pauseBetweenSteps,skipTrustBrowserStep:c,enableFirstPartyOAuth:!0,enableOIDCGrantCode:!0}},p&&{serviceKey:p},{defaultAccountNameAutoFillDomain:"",trustTokens:i,rememberMeLabel:Zo.KEEP_ME_SIGNED_IN,theme:zo.DARK,waitAnimation:"false",waitAnimationOnAuthComplete:!1,containerId:t,serviceURL:d.origin+"/appleauth",locale:n,callbacks:f},!!o&&{accountName:o},!!s&&{forceCRAuth:s}),h=!1,m=$o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h){e.next=8;break}if(!window.AppleID){e.next=4;break}return window.AppleID.service.auth.init(u),e.abrupt("return",!0);case 4:return e.next=6,Xo(10);case 6:e.next=0;break;case 8:return e.abrupt("return",!1);case 9:case"end":return e.stop()}}),e)})))(),window.setTimeout((function(){h=!0}),45e3),e.next=6,m;case 6:e.sent||r.appleIdError(l,Vo.TIMEOUT,{});case 8:case"end":return e.stop()}}),e)})))()}var t=e.prototype;return t.onNativeTakeOverDidStart=function(){var e;this.stopTimer(),null==(e=this.delegate)||e.appleIdWillStart(this,!0)},t.onNativeTakeOverDidComplete=function(){this.authMethod=Ho.TIBURON_LOGIN},t.onNativeTakeOverError=function(){var e;null==(e=this.delegate)||e.appleIdError(this,Vo.TIBURON_LOGIN_FAILURE,{})},t.onNativeTakeOverDidCancel=function(){var e;null==(e=this.delegate)||e.appleIdDidCancel(this,!0)},t.continueAuthentication=function(){if(this.pauseBetweenSteps){var e=this.delegate.getElement();if(e){var t=e.getElementsByTagName("iframe");if(!t||t[0]instanceof HTMLIFrameElement){var n=t[0].contentWindow;if(n)try{n.postMessage("pmrpc."+JSON.stringify({jsonrpc:"2.0",method:"resume2FA",id:"CW.JsonRpcMessageFormatterV2:1"}),this.appleIdUrl.origin)}catch(i){var r;null==(r=this.delegate)||r.appleIdError(this,Vo.UNABLE_TO_CONTINUE_AUTHENTICATION,{})}}}}},t.onAuthReady=function(){var e;null==(e=this.delegate)||e.appleIdWillStart(this,!1),this.stopTimer()},t.onAuthFailure=function(){var e;null==(e=this.delegate)||e.appleIdError(this,Vo.TIMEOUT,{}),this.stopTimer()},t.onPasswordAuthDone=function(e,t){if(this.authenticatingAppleIdAccountType=t.accountType,e){var n=function(e){switch(e){case Wo.MANAGED:case Wo.HSA1:case Wo.HSA2:return 2;case Wo.UNKNOWN:case Wo.SA:case Wo.RESTRICTED:return 1}}(t.accountType);this.totalNumberOfAuthenticationSteps=n,("SA"!==t.accountType||t.session)&&(this.completedAuthenticationStep=1,this.messageProcessor.enqueue({precedingMessageExpiry:new Date(Date.now()+1e3),delegateMethodTarget:this.delegate,delegateMethodName:"appleIdStepDidComplete",delegateMethodIsAsync:!0,delegateMethodArguments:[this,t.accountName,t.accountType,{dsWebAuthToken:t.session},t.accountCountry,1,n]}))}},t.onAuthSuccess=function(e){var t;if(e.session||e.grantCode){if((null!=(t=this.totalNumberOfAuthenticationSteps)?t:0)>1&&this.completedAuthenticationStep<=1){this.completedAuthenticationStep++;var n={delegateMethodTarget:this.delegate,delegateMethodName:"appleIdStepDidComplete",delegateMethodIsAsync:!0,delegateMethodArguments:[this,e.accountName,this.authenticatingAppleIdAccountType,{dsWebAuthToken:e.session},e.accountCountry,this.completedAuthenticationStep,this.totalNumberOfAuthenticationSteps]};1===this.completedAuthenticationStep&&(n.precedingMessageExpiry=new Date(Date.now()+1e3)),this.messageProcessor.enqueue(n)}var r=e.grantCode&&!e.session?{dsGrantCode:e.grantCode,dsMethod:this.authMethod}:{dsWebAuthToken:e.session};this.messageProcessor.enqueue({delegateMethodTarget:this.delegate,delegateMethodName:"appleIdDidFinish",clearsMessage:"appleIdStepDidComplete",delegateMethodArguments:[this,e.accountName,this.authenticatingAppleIdAccountType,r,e.accountCountry,e.rememberMe,e.trustToken]})}else{var i;null==(i=this.delegate)||i.appleIdError(this,Vo.INVALID_DATA,{})}},t.onRepairStart=function(){this.messageProcessor.enqueue({precedesMessage:"appleIdStepDidComplete",delegateMethodTarget:this.delegate,delegateMethodName:"appleIdRepairDidStart",delegateMethodArguments:[this]})},t.onAuthTeardown=function(){},t.onAuthCancel=function(){var e;null==(e=this.delegate)||e.appleIdDidCancel(this,!1)},t.onAuthWidgetWillChangeFlow=function(e){var t,n=null!=(t=e.to)?t:qo.UNKNOWN,r=n===qo.HSA1||n===qo.HSA2||n===qo.MANAGED||n===qo.INTERSTITIAL||n===qo.FEDERATED;n===qo.REPAIR&&this.authenticatingAppleIdAccountType===Wo.SA&&(this.totalNumberOfAuthenticationSteps=2),this.messageProcessor.enqueue({precedesMessage:n===qo.REPAIR||n===qo.RESTRICTED?"appleIdStepDidComplete":void 0,clearsMessage:r?"appleIdStepDidComplete":void 0,delegateMethodTarget:this.delegate,delegateMethodName:n===qo.RESTRICTED?"appleIdRepairDidStart":"appleIdModeWillChange",delegateMethodArguments:[this,n]})},t.onAuthWidgetDidChangeFlow=function(e){var t,n=null!=(t=e.to)?t:qo.UNKNOWN;this.appleIdUIMode=n,this.messageProcessor.enqueue({precedesMessage:n===qo.REPAIR?"appleIdStepDidComplete":void 0,delegateMethodTarget:this.delegate,delegateMethodName:"appleIdModeDidChange",delegateMethodArguments:[this,n]})},t.stopTimer=function(){window.clearTimeout(this.timer),this.timer=void 0},e}();function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var na=Nn.object({requiredServices:Nn.string().array().optional(),supportedFileExtensions:Nn.string().array().optional(),isHidden:Nn.boolean().optional(),isPCSRequired:Nn.boolean().optional(),pushTopic:Nn.string().optional(),supportedLocales:Nn.string().array().optional(),additionalSupportedLocales:Nn.string().array().optional(),radarComponentId:Nn.number().optional(),requiresAuth:Nn.boolean().optional(),isWWW:Nn.boolean().optional(),isBeta:Nn.boolean().optional(),isFuture:Nn.boolean().optional(),isCarry:Nn.boolean().optional(),shareInfo:Nn.object({containerIdentifier:Nn.string(),partition:Nn.string(),titleFields:Nn.object({name:Nn.string(),type:Nn.string()}).array()}).optional(),isQualifiedForBeta:Nn.boolean().optional(),preloadCoreTypes:Nn.boolean().optional(),supportsLite:Nn.boolean().optional(),hasPreferences:Nn.boolean().optional(),showsPushNotifications:Nn.boolean().optional(),awakesInBackgroundFromPush:Nn.boolean().optional(),supportsMAID:Nn.boolean().optional(),supportsPhoneNumberBasedAppleId:Nn.boolean().optional(),canLaunchWithOneFactor:Nn.boolean().optional()}),ra=Nn.object({dsid:Nn.string(),aDsID:Nn.string(),firstName:Nn.string(),lastName:Nn.string(),fullName:Nn.string(),locale:Nn.string(),languageCode:Nn.string(),countryCode:Nn.string().optional(),appleId:Nn.string(),brMigrated:Nn.boolean(),brZoneConsolidated:Nn.boolean(),tantorMigrated:Nn.boolean(),notesMigrated:Nn.boolean(),statusCode:Nn.number(),appleIdEntries:Nn.object({isPrimary:Nn.boolean().optional(),type:Nn.string()}).array(),isManagedAppleID:Nn.boolean(),locked:Nn.boolean(),ContinueOnDeviceEligibleDeviceInfo:Nn.string().array().optional(),beneficiaryInfo:Nn.object({isBeneficiary:Nn.boolean(),isBeneficiaryMultiple:Nn.boolean().optional(),beneficiaryExpiredTime:Nn.number().optional()}).optional(),isHideMyEmailSubscriptionActive:Nn.boolean().optional(),isCustomDomainTransferSubscriptionActive:Nn.boolean().optional(),isCustomDomainPurchaseSubscriptionActive:Nn.boolean().optional(),isPaidDeveloper:Nn.boolean().optional(),customEmailDomainServiceEndDate:Nn.string().optional(),hasUnreleasedOS:Nn.boolean().optional(),isCustomDomainsFeatureAvailable:Nn.boolean().optional(),isHideMyEmailFeatureAvailable:Nn.boolean().optional(),mailFlags:Nn.object({isCKMail:Nn.boolean(),isSearchV2Provisioned:Nn.boolean(),isThreadingAvailable:Nn.boolean()}),analyticsOptInStatus:Nn.boolean(),hsaEnabled:Nn.boolean().optional(),hsaVersion:Nn.number().optional(),primaryEmail:Nn.string().optional()}),ia=Nn.object({accountCreateUI:Nn.string(),accountLoginUI:Nn.string(),accountLogin:Nn.string(),accountRepairUI:Nn.string(),downloadICloudTerms:Nn.string(),repairDone:Nn.string(),vettingUrlForEmail:Nn.string(),vettingUrlForPhone:Nn.string(),accountCreate:Nn.string(),getICloudTerms:Nn.string(),accountAuthorizeUI:Nn.string()});function oa(e){return{responseKind:"unknown",isOK:!1,isError:!0,error:e}}Nn.object({appsOrder:Nn.string().array(),apps:Nn.record(Nn.object({isQualifiedForBeta:Nn.boolean().optional(),canLaunchWithOneFactor:Nn.boolean().optional(),isHidden:Nn.boolean().optional()})),dsInfo:ra,requestInfo:Nn.union([Nn.object({isAppleInternal:Nn.boolean().optional()}).array(),Nn.object({isAppleInternal:Nn.boolean().optional()})]),domainToUse:Nn.string().optional(),hsaTrustedBrowser:Nn.boolean(),trustTokens:Nn.string().array().optional(),configBag:Nn.object({urls:ia,accountCreateEnabled:Nn.union([Nn.boolean(),Nn.string()])}),hsaChallengeRequired:Nn.boolean(),webservices:Nn.record(Dn),isCarryUser:Nn.boolean().optional(),isExtendedLogin:Nn.boolean(),primaryEmail:Nn.string().optional(),pcsDeleted:Nn.boolean(),termsUpdateNeeded:Nn.boolean().optional(),environment:Nn.string(),success:Nn.boolean().optional(),error:Nn.number().optional()});var aa=Nn.object({configBag:Nn.object({urls:ia,accountCreateEnabled:Nn.union([Nn.boolean(),Nn.string()])}).optional(),environment:Nn.string().optional(),error:Nn.string().or(Nn.number()).optional(),requestInfo:Nn.object({isAppleInternal:Nn.boolean().optional()}).array().optional(),success:Nn.boolean(),trustTokens:Nn.string().array().optional(),termsUpdateNeeded:Nn.boolean().optional(),hsaTrustedBrowser:Nn.boolean().optional(),pcsDeleted:Nn.boolean().optional()});function sa(e){return aa.safeParse(e).success}var ca,ua=Nn.object({dsInfo:ra,hasMinimumDeviceForPhotosWeb:Nn.boolean(),iCDPEnabled:Nn.boolean(),webservices:Nn.record(Dn),pcsEnabled:Nn.boolean().optional(),configBag:Nn.object({urls:ia,accountCreateEnabled:Nn.union([Nn.boolean(),Nn.string()])}),environment:Nn.string().optional(),hsaTrustedBrowser:Nn.boolean().optional(),appsOrder:Nn.array(Nn.string()),version:Nn.number(),isExtendedLogin:Nn.boolean(),pcsServiceIdentitiesIncluded:Nn.boolean().optional(),hsaChallengeRequired:Nn.boolean().optional(),requestInfo:Nn.union([Nn.object({isAppleInternal:Nn.boolean().optional()}).array(),Nn.object({isAppleInternal:Nn.boolean().optional()})]),pcsDeleted:Nn.boolean(),iCloudInfo:Nn.object({SafariBookmarksHasMigratedToCloudKit:Nn.boolean(),canShare:Nn.boolean().optional(),allowDataAnalytics:Nn.boolean().optional()}),apps:Nn.record(Nn.object({isQualifiedForBeta:Nn.boolean().optional(),canLaunchWithOneFactor:Nn.boolean().optional(),isHidden:Nn.boolean().optional()})),trustTokens:Nn.string().array().optional(),termsUpdateNeeded:Nn.boolean().optional(),isCarryUser:Nn.boolean().optional()});function la(e){return ua.safeParse(e).success}function da(e,t){var n,r;return{responseKind:"error",isOK:null!=(n=e.success)&&n,isError:!0,httpStatusCode:t,rawResponse:e,error:null!=(r=e.error)?r:t,environment:e.environment,applications:[],webServices:null,urls:null,accountCreateEnabled:!1,trustTokens:[],isPCSKeyDeleted:!1,primaryEmail:null,isAppleInternal:!1,hsaTrustedBrowser:!1,termsUpdateNeeded:!1,isCarryUser:!1,authenticatedUserDetails:null,isAuthenticated:!1,isExtendedLogin:!1,totalAuthenticationSteps:0,completedAuthenticationStep:0,accountType:Wo.UNKNOWN,domainToUse:e.domainToUse}}function pa(e,t,n){var r=e.configBag,i=e.requestInfo,o=e.trustTokens,a=e.hsaTrustedBrowser,s=e.pcsDeleted,c=e.termsUpdateNeeded,u=e.environment;if(!r)throw fr.sharedInstance.recordStat(new ur("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag"})),new Error("[AuthenticationDataResponse] no configBag found");if(!r.urls)throw fr.sharedInstance.recordStat(new ur("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag.urls"})),new Error("[AuthenticationDataResponse] no configBag.urls found");var l="true"===r.accountCreateEnabled||!0===r.accountCreateEnabled;return{responseKind:"partial",isOK:!0,isError:!1,urls:r.urls,configBag:r,requestInfo:i,trustTokens:null!=o?o:[],isPCSKeyDeleted:null!=s&&s,hsaTrustedBrowser:null!=a&&a,termsUpdateNeeded:null!=c&&c,environment:null!=u?u:"PROD",httpStatusCode:n,rawResponse:t,primaryEmail:null,applications:[],webServices:null,accountCreateEnabled:l,isAppleInternal:!1,isCarryUser:!1,authenticatedUserDetails:null,isAuthenticated:!1,isExtendedLogin:!1,totalAuthenticationSteps:0,completedAuthenticationStep:0,accountType:Wo.UNKNOWN}}function fa(e,t,n){var r,i,o,a,s=e.configBag,c=e.requestInfo,u=e.trustTokens,l=e.hsaTrustedBrowser,d=e.pcsDeleted,p=e.termsUpdateNeeded,f=e.environment;if(!s)throw fr.sharedInstance.recordStat(new ur("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag"})),new Error("[AuthenticationDataResponse] no configBag found");if(!s.urls)throw fr.sharedInstance.recordStat(new ur("incompleteAuthBag",{message:"[AuthenticationDataResponse] fromResponse: missing configBag.urls"})),new Error("[AuthenticationDataResponse] no configBag.urls found");var h=e.dsInfo,m=h.hsaEnabled?2:1,g=h.hsaEnabled?e.hsaChallengeRequired?1:2:1,v=!h.hsaEnabled||!e.hsaChallengeRequired,y=h.hsaEnabled?2===h.hsaVersion?Wo.HSA2:1===h.hsaVersion?Wo.HSA1:0===h.hsaVersion&&h.isManagedAppleID?Wo.MANAGED:null:h.isManagedAppleID?Wo.MANAGED:Wo.SA;if(null===y)throw new Error("[AuthenticationDataResponse] fromSuccessResponse: Unknown hsaVersion "+h.hsaVersion+" from dsInfo");var b="true"===s.accountCreateEnabled||!0===s.accountCreateEnabled,_=Array.isArray(e.requestInfo)?null!=(r=e.requestInfo[0].isAppleInternal)&&r:null!=(i=null==(o=e.requestInfo)?void 0:o.isAppleInternal)&&i,C=e.configBag.urls;if(!e.webservices)throw new Error("[AuthenticationDataResponse] fromSuccessResponse: No services found");var I=new Map;for(var w in e.webservices){var E=e.webservices[w];E.url&&I.set(w,Object.assign({url:E.url},E.status&&{status:E.status},E.iCloudEnv&&{iCloudEnv:E.iCloudEnv},E.pcsRequired&&{pcsRequired:E.pcsRequired}))}var S=e.apps,T=e.appsOrder;if(null!=(a=e.dsInfo.beneficiaryInfo)&&a.isBeneficiary){delete S.find,delete S.settings;var O=T.indexOf("find");O>=0&&T.splice(O,1);var P=T.indexOf("settings");P>=0&&T.splice(P,1)}var x=function(e,t){for(var n,r,i=[],o=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return ta(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ta(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(n=o()).done;){var a=n.value,s=t[a];r=s,na.safeParse(r).success&&i.push({name:a,setupInfo:s})}return i}(e.appsOrder,e.apps),A=function(e){return Object.assign({dsid:e.dsid,aDsID:e.aDsID,firstName:e.firstName,lastName:e.lastName,fullName:e.fullName,locale:e.locale,languageCode:e.languageCode,appleId:e.appleId,isManagedAppleID:e.isManagedAppleID,locked:e.locked,statusCode:e.statusCode,appleIdEntries:e.appleIdEntries,brMigrated:e.brMigrated,brZoneConsolidated:e.brZoneConsolidated,tantorMigrated:e.tantorMigrated,notesMigrated:e.notesMigrated},void 0!==e.countryCode&&{countryCode:e.countryCode},void 0!==e.ContinueOnDeviceEligibleDeviceInfo&&{ContinueOnDeviceEligibleDeviceInfo:e.ContinueOnDeviceEligibleDeviceInfo},void 0!==e.beneficiaryInfo&&{beneficiaryInfo:e.beneficiaryInfo},void 0!==e.isHideMyEmailSubscriptionActive&&{isHideMyEmailSubscriptionActive:e.isHideMyEmailSubscriptionActive},void 0!==e.isCustomDomainTransferSubscriptionActive&&{isCustomDomainTransferSubscriptionActive:e.isCustomDomainTransferSubscriptionActive},void 0!==e.isCustomDomainPurchaseSubscriptionActive&&{isCustomDomainPurchaseSubscriptionActive:e.isCustomDomainPurchaseSubscriptionActive},void 0!==e.isPaidDeveloper&&{isPaidDeveloper:e.isPaidDeveloper},void 0!==e.customEmailDomainServiceEndDate&&{customEmailDomainServiceEndDate:e.customEmailDomainServiceEndDate},void 0!==e.hasUnreleasedOS&&{hasUnreleasedOS:e.hasUnreleasedOS},void 0!==e.isCustomDomainsFeatureAvailable&&{isCustomDomainsFeatureAvailable:e.isCustomDomainsFeatureAvailable},void 0!==e.isHideMyEmailFeatureAvailable&&{isHideMyEmailFeatureAvailable:e.isHideMyEmailFeatureAvailable},{analyticsOptInStatus:e.analyticsOptInStatus},void 0!==e.mailFlags&&{mailFlags:e.mailFlags})}(h),N=e.isCarryUser,R=e.isExtendedLogin,D=e.dsInfo.primaryEmail;return{responseKind:"success",isOK:!0,isError:!1,accountCreateEnabled:b,isAppleInternal:_,urls:C,completedAuthenticationStep:g,primaryEmail:null!=D?D:"",totalAuthenticationSteps:m,isAuthenticated:v,accountType:y,isCarryUser:null!=N&&N,trustTokens:null!=u?u:[],authenticatedUserDetails:A,applications:x,configBag:s,hsaTrustedBrowser:null!=l&&l,termsUpdateNeeded:null!=p&&p,requestInfo:c,webServices:I,rawResponse:t,httpStatusCode:n,environment:null!=f?f:"PROD",isExtendedLogin:R,isPCSKeyDeleted:d}}function ha(e){return e.completedAuthenticationStep>0&&e.completedAuthenticationStep===e.totalAuthenticationSteps}function ma(e){return 4===e.statusCode}function ga(e){return e.isHideMyEmailSubscriptionActive||e.isCustomDomainTransferSubscriptionActive}function va(e){var t=e.appleIdEntries.find((function(e){return e.isPrimary}));return!!t&&"PHONE_NUMBER"===t.type}function ya(e){return e.isManagedAppleID?ca.MAID:ma(e)?ca.LITE:ca.REGULAR}function ba(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.REGULAR="Regular",e.MAID="ManagedAppleID",e.LITE="Lite"}(ca||(ca={}));var _a=function(){function e(){this.authenticatedUserObservers=new Set,this.hsaTrustedBrowser=!1,this.isAuthenticationComplete=!1,this.isTiburonLogin=!1,this.isCarryUser=!1,this.primaryEmail=null,this._details=null,this.isAppleInternal=!1,this.countryCode=null,this.termsUpdateNeeded=!1,this.isExtendedLogin=!1,this.isThreadingAvailable=!1}var t,n;return e.fromAuthenticationDataResponse=function(t){var n,r,i,o,a,s=new e;return s.hsaTrustedBrowser=t.hsaTrustedBrowser,s.termsUpdateNeeded=t.termsUpdateNeeded,s.isCarryUser=t.isCarryUser,s.details=function(e){var t=e.authenticatedUserDetails;if(!t)return null;var n=t.dsid,r=t.aDsID,i=t.firstName,o=t.lastName,a=t.fullName,s=t.appleId,c=t.isManagedAppleID,u=t.statusCode,l=t.brMigrated,d=t.brZoneConsolidated,p=t.tantorMigrated,f=t.notesMigrated,h=t.appleIdEntries,m=t.ContinueOnDeviceEligibleDeviceInfo,g=t.beneficiaryInfo,v=t.isHideMyEmailSubscriptionActive,y=t.isCustomDomainTransferSubscriptionActive,b=t.isCustomDomainPurchaseSubscriptionActive,_=t.isPaidDeveloper,C=t.customEmailDomainServiceEndDate,I=t.hasUnreleasedOS,w=t.isCustomDomainsFeatureAvailable,E=t.isHideMyEmailFeatureAvailable,S=t.mailFlags,T=t.analyticsOptInStatus,O=e.totalAuthenticationSteps;return{dsid:n,alternateDSID:r,firstName:i,lastName:o,fullName:a,appleId:s,isManagedAppleID:c,statusCode:u,brMigrated:l,brZoneConsolidated:d,tantorMigrated:p,notesMigrated:f,appleIdEntries:h,completedAuthenticationStep:e.completedAuthenticationStep,totalAuthenticationSteps:O,accountType:e.accountType,ContinueOnDeviceEligibleDeviceInfo:m,beneficiaryInfo:g,isHideMyEmailSubscriptionActive:!!v,isCustomDomainTransferSubscriptionActive:!!y,isCustomDomainPurchaseSubscriptionActive:!!b,isPaidDeveloper:!!_,customEmailDomainServiceEndDate:C,hasUnreleasedOS:!!I,isCustomDomainsFeatureAvailable:!!w,isHideMyEmailFeatureAvailable:!!E,mailFlags:S,analyticsOptInStatus:T}}(t),s.countryCode=null!=(n=null==(r=t.authenticatedUserDetails)?void 0:r.countryCode)?n:null,s.isAuthenticationComplete=t.isAuthenticated,s.isExtendedLogin=t.isExtendedLogin,s.isAppleInternal=t.isAppleInternal,s.primaryEmail=t.primaryEmail,s.isThreadingAvailable=null!=(i=null==(o=t.authenticatedUserDetails)||null==(a=o.mailFlags)?void 0:a.isThreadingAvailable)&&i,s},t=e,(n=[{key:"isAuthenticated",get:function(){return!!this.details&&ha(this.details)&&this.isAuthenticationComplete}},{key:"details",get:function(){return this._details},set:function(e){e!==this._details&&(this._details=e,this.authenticatedUserObservers.forEach((function(e){return e.authenticatedUserDidChange()})))}}])&&ba(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ia=function(){function e(e){this.status=e,this.user=null,this.environment=null}var t,n;return t=e,(n=[{key:"isOK",get:function(){return this.status}},{key:"isAppleInternal",get:function(){var e,t;return null!=(e=null==(t=this.user)?void 0:t.isAppleInternal)&&e}},{key:"isAuthenticated",get:function(){var e,t;return null!=(e=null==(t=this.user)?void 0:t.isAuthenticated)&&e}}])&&Ca(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wa(e,t){return(wa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ea=function(e){var t,n;function r(t,n,r,i){var o=function(e,t,n,r){n.endsWith("/")&&(n=n.substring(0,n.length-1)),0===n.indexOf("/")&&(n=n.substring(1,n.length));var i,o=function(e,t){if("docws"===e&&t.startsWith("ws/"))for(var n=["upload","update","download","internal"],r=0;r<n.length;r++){var i=t.match("ws/(.*)/"+n[r]);i&&i[1]&&(t=t.replace(i[1],"*"))}if("ckdatabasews"===e&&t.startsWith("database/")||("ckdeviceservice"===e||"ckdevice"===e)&&t.startsWith("device/"))for(var o=["production"],a=0;a<o.length;a++){var s=t.match("/1/(.*)/"+o[a]);s&&s[1]&&(t=t.replace(s[1],"*"))}return ir(t)}(t,n).replace(/\//g,"_"),a=Math.floor(r/100);switch(a){case 0:i=".timeout";break;case 2:i="";break;default:i="."+a+"xx"}return e+"."+t+"."+o+i}(t,n,r,i.statusCode);if(o.length>Sa){var a=new ur("statNameExceedsLimit",{appName:t,serviceName:n,urlPath:r,hubbleStatName:o});fr.sharedInstance.recordStat(a)}var s=Object.assign({},i,{latencyAppName:t,isUsedForLatencyBucketing:!0});return e.call(this,o,s)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,wa(t,n),r}(lr),Sa=80;function Ta(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Oa=function(){function e(){}var t,n,r=e.prototype;return r.recordStat=function(e,t,n,r){this._recordStat(!1,e,!1,t,n,r)},r.recordApplicationStat=function(e,t,n,r){this._recordStat(!0,e,!1,t,n,r)},r.recordLegacyApplicationStat=function(e,t,n,r){this._recordStat(!0,e,!0,t,n,r)},r._recordStat=function(e,t,n,r,i,o){var a=t.appName,s=t.masteringNumber,c=t.buildNumber;if(r){var u,l,d=function(e,t,n,r,i,o){return o||(o={}),Pa(e,t,n,r,"requestInfo",function(e){e.time=(new Date).toString()+"        ("+Math.floor((new Date).getTime())+")";var t=(new Date).toString().match(/.*?\((.*?)\).*/);return t&&2===t.length&&(e.timezone=t[1]),e}(o))}(n,a,s,c,0,r);this._recordWebServiceEndpoint(a,r,o),e?null==(u=this.telemetryClient)||u.recordApplicationStat(a,s,c,"requestInfo",d):null==(l=this.telemetryClient)||l.recordStatRaw("requestInfo",d)}if(function(e,t){if(null!=t&&t.dontReportServerError)return!1;var n=!1;return void 0!==e&&null!==e&&(n=0===e||e>=500),n}(i,r)){var p,f,h=Object(he.c)(o),m=function(e,t){var n=!1;if(e&&t&&t.length>0){var r=e.hostname;if(r){var i=r.split("-")[0];n=-1!==t.indexOf(i)}}return n}(h,xa)?"serverErrorOrTimeout.carry":"serverErrorOrTimeout",g=h.hostname,v=null==r?void 0:r.urlPath,y=Pa(n,a,s,c,m,Object.assign({status:i},v&&{urlPath:v},{serverHostname:g}));e?null==(p=this.telemetryClient)||p.recordApplicationStat(a,s,c,m,y):null==(f=this.telemetryClient)||f.recordStatRaw(m,y)}},r._recordWebServiceEndpoint=function(e,t,n){var r=t.clientTiming,i=t.urlPath,o=t.statusCode,a=t.serviceName;if(i&&r)if(!a&&n&&(a=zn(n)),a){var s=new Ea(e,a,i,{duration:Math.round(r),statusCode:o});fr.sharedInstance.recordPerfStat(s)}else{var c=new ur("UnableToCreateWebServiceRequestPerfStat",{appName:e,url:n});fr.sharedInstance.recordStat(c)}},t=e,(n=[{key:"telemetryClient",get:function(){return fr.sharedInstance}}])&&Ta(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Pa(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=_r.hostname,s=_r.locale,c=Kn.sharedInstance;if(e){var u=Aa(i);o.fullStatName=""+t+u}return tr(t,n,r,c.identifier,a,s,_.sharedInstance.primaryInteractionMode,i,o)}Oa.sharedInstance=new Oa;var xa=["p97","p98"];function Aa(e){return""+e.charAt(0).toUpperCase()+e.slice(1)}var Na=n(590);function Ra(e){return Boolean(e)}function Da(e,t){if(!t)return!1;var n=t.replace(/^Wire/,"");return function(e){if("*"===e)return!0;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!e||!n.length||!n.every(Ra))return!1;var i=e.split(/,\s*/g);return n.some((function(e){return i.includes(e)}))}(e,t,n,ka(t),ka(n))}var ka=function(e){return e.replace(/Response$/,"")};function Ua(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function La(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ua(o,r,i,a,s,"next",e)}function s(e){Ua(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Ma(e){return e instanceof Object&&"validated"in e&&"unvalidatedJson"in e}var ja=function(e,t,n){var r=e.clone();return Object.assign(e,{validated:!0,json:Fa(r,t,n),unvalidatedJson:function(){return r.json()}})};function Fa(e,t,n){var r,i,o=t.schema,a=t.type;return La(regeneratorRuntime.mark((function s(){var c;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0===r){s.next=2;break}return s.abrupt("return",r);case 2:if(void 0===i){s.next=4;break}return s.abrupt("return",Promise.reject(i));case 4:if(!Da(Qo.failSchemas,t.type)){s.next=6;break}return s.abrupt("return",Promise.reject(Na.a.from("manual featureFlag-induced schema failure",t.type)));case 6:return s.prev=6,c=o,s.next=10,Na.c(e,c,a);case 10:return r=s.sent,Da(Qo.logResponses,t.type)&&console.info(t.type+":",r),s.abrupt("return",r);case 15:return s.prev=15,s.t0=s.catch(6),i=Ba(s.t0,a),fr.sharedInstance.recordPerfStat(new lr("schemaFailure",{schemaName:a,message:i.message,duration:window.performance.now()-n})),s.abrupt("return",Promise.reject(i));case 20:case"end":return s.stop()}}),s,null,[[6,15]])})))}function Ba(e,t){return e instanceof Error?e:Na.a.from("SchemaFailure: non-Error thrown",t)}var za=["dontReportServerError","reportingPathname","shouldReportSuccess","shouldReportFailure","timeout","validate"];function Ha(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Wa(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Va(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Wa(o,r,i,a,s,"next",e)}function s(e){Wa(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Za(e,t,n){return qa.apply(this,arguments)}function qa(){return(qa=Va(regeneratorRuntime.mark((function e(t,n,r){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r.maxAttempts,o=1;case 2:return e.next=5,Ga(t,n);case 5:if(a=e.sent,!("validate"in n||null!=a&&a.ok)){e.next=8;break}return e.abrupt("return",a);case 8:if(!a||2!==Math.floor(a.status/100)){e.next=11;break}return e.abrupt("return",a);case 11:if(!(o>=i)){e.next=13;break}return e.abrupt("return",a);case 13:return e.next=15,Xo(200*Math.pow(2,o),"try "+o+" loading "+t);case 15:++o,e.next=2;break;case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ka=document.createElement("a");function Ga(e,t){return Ya.apply(this,arguments)}function Ya(){return(Ya=Va(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,_,C,I,w,E,S,T,O,P,x,A;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(null==n?void 0:n.validate)||{},l=u.type,d=void 0===l?"":l,!Da(Qo.failRequests,d)){e.next=3;break}return e.abrupt("return",Promise.reject(new Error('Manually failed "'+d+'" fetch by featureFlag')));case 3:return Ka.href=t,p=Ka.href,f=hr(p,{clientBuildNumber:_r.buildNumber,clientMasteringNumber:_r.masteringNumber,clientId:_r.clientId,dsid:null==(r=wZ.sharedInstance.cloudOSUser)||null==(i=r.details)?void 0:i.dsid}),m=(h=n||{}).dontReportServerError,g=h.reportingPathname,v=void 0===g?f.pathname:g,y=h.shouldReportSuccess,b=void 0===y||y,_=h.shouldReportFailure,C=void 0===_||_,I=h.timeout,w=h.validate,E=Ha(h,za),S=window.performance.now(),T=f.href,e.next=11,Va(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=window.fetch(T,E),e.next=4,I?Promise.race([t,Xo(I,T,null)]):t;case 4:return e.abrupt("return",e.sent);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",null);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))();case 11:if(O=e.sent,P=window.performance.now(),x=null!=(o=null==O?void 0:O.status)?o:0,A=Qa(x,C,b)?{httpMethod:null!=(a=E.method)?a:"GET",statusCode:x,hostname:f.hostname,serviceName:Xa(f.href),clientTiming:P-S,net_uncompressedResponseSize:null!=(s=null==O||null==(c=O.headers)?void 0:c.get("content-length"))?s:0,timedOut:!1,urlPath:v,dontReportServerError:m}:null,Oa.sharedInstance.recordStat({appName:_r.applicationName,masteringNumber:_r.masteringNumber,buildNumber:_r.buildNumber},A,x,f.href),O){e.next=18;break}return e.abrupt("return",null);case 18:return e.abrupt("return",w?ja(O,w,S):O);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qa(e,t,n){return 330===e||401===e||421===e||423===e||503===e||(e<200?t:e<400?n:t)}function Xa(e){var t=zn(e.toString());if(t)return t;var n=e.match("https://p*[0-9]*-*([a-zA-Z0-9]*).");return n?n[1]:null}function Ja(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function $a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ja(o,r,i,a,s,"next",e)}function s(e){Ja(o,r,i,a,s,"throw",e)}a(void 0)}))}}var es=function(){function e(){}return e.fetchURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ga(e,Object.assign({},t,{credentials:"include"}))},e.fetchJSON=function(){var t=$a(regeneratorRuntime.mark((function t(n,r){var i,o,a,s,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=c.length>2&&void 0!==c[2]?c[2]:{},t.next=3,e.fetchURL(n,i);case 3:if((o=t.sent)&&0!==o.status){t.next=6;break}return t.abrupt("return",{ok:!1,error:"Fetch failed with status "+(null!=(a=null==o?void 0:o.status)?a:0),response:o});case 6:return t.next=8,$a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 8:if(s=t.sent){t.next=11;break}return t.abrupt("return",{ok:!1,error:"Failed to parse JSON",response:o});case 11:if(r(s)){t.next=13;break}return t.abrupt("return",{ok:!1,error:"Failed to validate JSON",response:o});case 13:return t.abrupt("return",{ok:!0,result:s,response:o});case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.fetchURLWithRetry=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{maxAttempts:5};return Za(e,Object.assign({},t,{credentials:"include"}),n)},e.fetchURLWithoutCredentials=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ga(e,Object.assign({},t,{credentials:"omit"}))},e}();function ts(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function ns(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ts(o,r,i,a,s,"next",e)}function s(e){ts(o,r,i,a,s,"throw",e)}a(void 0)}))}}function rs(){return is.apply(this,arguments)}function is(){return(is=ns(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ne.sharedInstance.current.servicesDomain,r="https://setup."+n+"/setup/ws/1/validate",e.next=4,es.fetchURL(r,{method:"POST"});case 4:if(i=e.sent,o=null!=(t=null==i?void 0:i.status)?t:0,i&&0!==o){e.next=8;break}return e.abrupt("return",oa("Timed out or no response"));case 8:return e.next=10,ns(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 10:if(a=e.sent,200!==o){e.next=15;break}if(la(a)){e.next=14;break}return e.abrupt("return",oa("Failed to validate JSON response"));case 14:return e.abrupt("return",fa(a,a,o));case 15:if(401!==o&&421!==o&&403!==o){e.next=19;break}if(sa(a)){e.next=18;break}return e.abrupt("return",oa("Failed to validate JSON response"));case 18:return e.abrupt("return",pa(a,a,o));case 19:return e.abrupt("return",oa("Invalid authentication response code "+o));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function os(e,t,n,r,i){return as.apply(this,arguments)}function as(){return(as=ns(regeneratorRuntime.mark((function e(t,n,r,i,o){var a,s,c,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=Object.assign({},n),n.dsWebAuthToken&&(s.accountCountryCode=r,s.extended_login=i,o&&(s.trustToken=o)),e.next=4,es.fetchURL(t,{method:"POST",body:JSON.stringify(s)});case 4:if(c=e.sent,u=null!=(a=null==c?void 0:c.status)?a:0,c&&0!==u){e.next=8;break}return e.abrupt("return",oa("Timed out or no response"));case 8:return e.next=10,ns(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 10:if(l=e.sent,200!==u){e.next=17;break}if(la(l)){e.next=14;break}return e.abrupt("return",oa("Failed to validate JSON response"));case 14:return e.abrupt("return",fa(l,l,u));case 17:return e.abrupt("return",da(l,u));case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ss(){return cs.apply(this,arguments)}function cs(){return(cs=ns(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>0&&void 0!==c[0]&&c[0],r=c.length>1&&void 0!==c[1]&&c[1],i=Ne.sharedInstance.current.servicesDomain,o="https://setup."+i+"/setup/ws/1/logout",e.next=6,es.fetchURL(o,{method:"POST",body:JSON.stringify({trustBrowser:n,allBrowsers:r})});case 6:return a=e.sent,s=null!=(t=null==a?void 0:a.status)?t:0,e.abrupt("return",new Ia(200===s));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var us=Nn.object({country:Nn.string(),downloadICloudTerms:Nn.string(),locale:Nn.string(),iCloudTerms:Nn.object({summary:Nn.string(),type:Nn.string(),title:Nn.string(),version:Nn.number(),content:Nn.string()})});function ls(e){return us.safeParse(e).success}function ds(e){return{country:e.country,downloadICloudTerms:e.downloadICloudTerms,locale:e.locale,iCloudTerms:{summary:ps(e.iCloudTerms.summary),type:e.iCloudTerms.type,title:ps(e.iCloudTerms.title),version:e.iCloudTerms.version,content:ps(e.iCloudTerms.content)}}}function ps(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function fs(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function hs(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){fs(o,r,i,a,s,"next",e)}function s(e){fs(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ms(e,t,n){return gs.apply(this,arguments)}function gs(){return(gs=hs(regeneratorRuntime.mark((function e(t,n,r){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={},n&&r&&(i.createPayload=r,i.locale=n),e.next=4,es.fetchJSON(t,ls,{method:"POST",body:JSON.stringify(i)});case 4:return o=e.sent,e.abrupt("return",o.ok?{success:!0,termsDetails:ds(o.result)}:{success:!1,error:o.error});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var vs=Nn.object({success:Nn.boolean()});function ys(e){return vs.safeParse(e).success}function bs(e,t){return _s.apply(this,arguments)}function _s(){return(_s=hs(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,es.fetchJSON(t,ys,{method:"POST",body:JSON.stringify({acceptedICloudTerms:n})});case 2:return r=e.sent,e.abrupt("return",!!r.ok&&r.result.success);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Cs=n(632),Is=n.n(Cs);function ws(e){for(var t=[],n=e.split("/"),r=0,i=n.length;r<i;r++){var o=n[r];o&&""!==o&&t.push(o)}return t}var Es,Ss=n(633),Ts=n.n(Ss),Os=r.createContext(void 0);function Ps(e){return r.createElement(Os.Provider,{value:e.value},e.children)}function xs(){var e=r.useContext(Os);if(void 0===e)throw new Error("`useApplicationLauncher` must be used within a ApplicationLaunchProvider");return e}!function(e){e.INTERNAL_APP="internal-theme",e.LOGIN="login-theme",e.HOMEPAGE="homepage-theme"}(Es||(Es={}));var As=r.createContext(void 0),Ns=function(e){return r.createElement(As.Provider,{value:e.value||Es.INTERNAL_APP},e.children)},Rs=function(){var e=r.useContext(As);if(void 0===e)throw new Error("useApplicationToolbarTheme must be used within a ApplicationToolbarThemeProvider");return e},Ds=r.createContext(void 0),ks=function(e){var t;return r.createElement(Ds.Provider,{value:null!=(t=e.value)?t:{ariaLiveText:"",setAriaLiveText:function(){}}},e.children)},Us=function(){var e=r.useContext(Ds);if(void 0===e)throw new Error("useAriaLive must be used within a AriaLiveProvider");return e},Ls=n(634);function Ms(e){return t=this,n=void 0,i=function(){var t,n,r;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e()];case 1:return t=i.sent(),[3,3];case 2:return n=i.sent(),[2,Ls.Result.failure({code:"NetworkUnavailable",context:n.message,retryable:!0})];case 3:if(!t.ok)return[2,Ls.Result.failure({code:"FetchFailed",context:t,retryable:!0})];i.label=4;case 4:return i.trys.push([4,6,,7]),[4,t.json()];case 5:return r=i.sent(),[3,7];case 6:return i.sent(),[2,Ls.Result.failure({code:"MalformedJSON",retryable:!1})];case 7:return[2,Ls.Result.success(r)]}}))},new((r=void 0)||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(t){o(t)}}function s(e){try{c(i.throw(e))}catch(t){o(t)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}var js,Fs=n(635),Bs=n.n(Fs),zs=function(){function e(e,t){void 0===t&&(t=void 0),this._data=void 0,this._expires=0,this.search={},this.ttl=e,this.invalidate(),void 0!==t&&this.update(t)}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expires",{get:function(){return this._expires},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ttlRemaining",{get:function(){return Math.max(this.expires-Date.now(),0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isExpired",{get:function(){return Date.now()>=this.expires},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){return this._expires=Date.now()-1,this},e.prototype.update=function(e){this._data=e;for(var t=0,n=Object.values(this.search);t<n.length;t++){var r=n[t];r.trie.clear(),r.initialized=!1}return this._expires=Date.now()+this.ttl,this},e.prototype.trie=function(e,t){return this.search[e]={trie:new Bs.a,builder:t,initialized:!1},this},e.prototype.find=function(e,t){var n=this.search[e];if(!n.initialized){var r=n.trie;if(this.data)for(var i=function(e,t){for(var n=0,i=Array.isArray(e)?e:[e];n<i.length;n++){var o=i[n];r.update(o,(function(e){return(e||[]).concat(t)}))}},o=0,a=n.builder(this.data);o<a.length;o++){var s=a[o];i(s[0],s[1])}n.initialized=!0}return n.trie.find(t)},e.prototype.findValues=function(e,t){var n=this.find(e,t).flatMap((function(e){return e[0],e[1]})).reduce((function(e,t){return e.add(t)}),new Set);return Array.from(n)},e}();!function(e){e[e.undecided=0]="undecided",e[e.none=1]="none",e[e.immediate=2]="immediate",e[e.background=3]="background"}(js||(js={}));var Hs,Ws=function(){function e(e){if(0===e.length)throw new Error("No policies provided for ReloadAdviser");this.policies=e}return e.prototype.determineAction=function(e,t){var n=this;void 0===t&&(t={}),t=Object.freeze(t);var r=this.policies.length,i=-1,o=function o(a){if((i+=1)>=r)return a;var s=Object.freeze({cache:e,flags:t,action:a});return n.policies[i].recommend(s,o)}(js.undecided)||js.undecided;return o!==js.undecided?o:js.none},e}(),Vs=function(){function e(e){void 0===e&&(e=.75),this.threshold=e}return e.prototype.recommend=function(e,t){if(e.cache.isExpired||e.action===js.immediate)return t(js.immediate);var n=e.cache,r=n.ttl,i=n.expires;return t(Math.max(i-Date.now(),0)<=r*(1-this.threshold)?js.background:e.action)},e}(),Zs=function(){function e(t){this.lastReloadRecommendation=-1/0,this.cooldownPeriod=t||e.defaultCooldownPeriod}return e.prototype.onCooldown=function(){return Date.now()<=this.lastReloadRecommendation+this.cooldownPeriod},e.prototype.recommend=function(e,t){if(e.cache.isExpired||e.action===js.immediate)return this.lastReloadRecommendation=-1/0,t(js.immediate);var n=e.flags.modifiedData;return!0!==(void 0!==n&&n)||this.onCooldown()?t(e.action):(this.lastReloadRecommendation=Date.now(),t(js.immediate))},e.defaultCooldownPeriod=1e4,e}(),qs=function(){function e(){}return e.prototype.recommend=function(e,t){return!1===e.flags.expectLatest&&!0===e.cache.isExpired?t(js.background):t(e.action)},e}(),Ks=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Gs(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function Ys(e){return("+"===e.trim()[0]?"+":"")+e.replace(/[^\d]+/g,"")}function Qs(e,t){return"string"===typeof t[e]?t[e]:""}function Xs(e,t){return Array.isArray(t[e])?t[e]:[]}Hs=Error,Ks((function(e){var t=Hs.call(this,e)||this;return t.name="TimeoutError",t}),Hs);var Js=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},$s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},ec=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},tc=function(){function e(e,t){void 0===t&&(t={}),this.endpoint="/co/addressbook",this.loader=void 0,this.cloudOSDelegate=e,this.cache=new zs(t.cacheTTL||3e5),this.reloadAdviser=new Ws([new Zs(5e3),new Vs(.75),new qs]),this.cache.trie("any",(function(e){return ec(ec([],e.contacts,!0),e.groups,!0).map((function(e){return[ic(e),e]}))})),this.cache.trie("contacts",(function(e){return e.contacts.map((function(e){return[nc(e),e]}))})),this.cache.trie("contactsByEmail",(function(e){return e.contacts.map((function(e){return[oc(e),e]}))})),this.cache.trie("contactsByPhone",(function(e){return e.contacts.map((function(e){return[ac(e),e]}))}))}return Object.defineProperty(e.prototype,"serviceName",{get:function(){return e.serviceName},enumerable:!1,configurable:!0}),e.prototype.buildWebServiceURL=function(e){void 0===e&&(e={});var t,n=this.cloudOSDelegate.urlForService,r=new globalThis.URL(n(this.serviceName,""));return r.pathname=this.endpoint,r.search=(t=e,Object.entries(t).map((function(e){var t=e[0],n=e[1];return void 0!==n&&null!==n&&(""!==(n=String(n))?"".concat(t,"=").concat(n):t)})).filter((function(e){return!!e})).join("&")),r},e.prototype.findAnyMatchingText=function(e,t){return void 0===t&&(t={}),Js(this,void 0,void 0,(function(){var n,r;return $s(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,Ls.Result.success(r.findValues("any",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.findContactsMatchingText=function(e,t){return void 0===t&&(t={}),Js(this,void 0,void 0,(function(){var n,r;return $s(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,Ls.Result.success(r.findValues("contacts",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.findContactsMatchingEmailAddress=function(e,t){return void 0===t&&(t={}),Js(this,void 0,void 0,(function(){var n,r;return $s(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,Ls.Result.success(r.findValues("contactsByEmail",e.toLowerCase()))]):[2,n]}}))}))},e.prototype.findContactsMatchingPhoneNumber=function(e,t){return void 0===t&&(t={}),Js(this,void 0,void 0,(function(){var n,r;return $s(this,(function(i){switch(i.label){case 0:return[4,this.loadData(t)];case 1:return(n=i.sent()).ok?(r=n.value,[2,Ls.Result.success(r.findValues("contactsByPhone",Ys(e.toLowerCase())))]):[2,n]}}))}))},e.prototype.findContactsForGroup=function(e,t){return void 0===t&&(t={}),Js(this,void 0,void 0,(function(){var n,r,i;return $s(this,(function(o){switch(o.label){case 0:return[4,this.loadData(t)];case 1:return!1===(n=o.sent()).ok?[2,n]:(r=n.value.data.groups,i=(void 0===r?[]:r).find((function(t){return t.groupId===e.groupId})),[2,Ls.Result.success(void 0!==i&&i.contacts||[])])}}))}))},e.prototype.getAddressBookContacts=function(e){return void 0===e&&(e={}),Js(this,void 0,void 0,(function(){var t,n;return $s(this,(function(r){switch(r.label){case 0:return[4,this.loadData(e)];case 1:return!0!==(t=r.sent()).ok?[2,t]:(n=t.value.data,[2,Ls.Result.success(n?n.contacts:[])])}}))}))},e.prototype.preload=function(){return Js(this,void 0,void 0,(function(){var e;return $s(this,(function(t){switch(t.label){case 0:return[4,this.loadData()];case 1:return!0!==(e=t.sent()).ok?[2,e]:[2,Ls.Result.success(!0)]}}))}))},e.prototype.loadData=function(e){return void 0===e&&(e={}),Js(this,void 0,void 0,(function(){var t,n=this;return $s(this,(function(r){return(t=this.reloadAdviser.determineAction(this.cache,e))===js.none?[2,Ls.Result.success(this.cache)]:(this.loader||(this.loader=new Promise((function(e){n.fetchData().then((function(t){if(!0!==t.ok)e(t);else{var r=t.value,i=r.contacts,o=void 0===i?[]:i,a=r.groups,s=void 0===a?[]:a;s=function(e,t){var n=new Map(t.map((function(e){return[e.contactId,e]})));return e.map((function(e){var t=new Set;if(void 0!==e.contactIds)for(var r=0,i=e.contactIds;r<i.length;r++){var o=i[r],a=n.get(o);void 0!==a&&t.add(a)}return e.contacts=Array.from(t),e}))}(s,o),n.cache.update({contacts:o,groups:s}),n.loader=void 0,e(Ls.Result.success(n.cache))}}))}))),t===js.background?[2,Ls.Result.success(this.cache)]:[2,this.loader])}))}))},e.prototype.fetchData=function(){return Js(this,void 0,void 0,(function(){var e,t,n,r,i,o=this;return $s(this,(function(a){switch(a.label){case 0:return[4,this.cloudOSDelegate.getLocale()];case 1:return e=a.sent(),t=cc(e),n=sc(e),r={locale:t,order:n,includePhoneNumbers:!0,includePhotos:!0},[4,Ms((function(){var e=o.buildWebServiceURL(r);return o.cloudOSDelegate.fetchWebServiceURL(e.toString(),{})}))];case 2:return(i=a.sent()).ok?[2,Ls.Result.success({contacts:i.value.contacts,groups:i.value.groups})]:[2,i]}}))}))},e.serviceName="contacts",e}(),nc=function(e){return ec(ec(ec([Qs("firstName",e),Qs("lastName",e),Qs("phoneticFirstName",e),Qs("phoneticLastName",e),Qs("companyName",e),Qs("nickName",e)],rc(e),!0),oc(e),!0),ac(e),!0).filter(Boolean).map(Gs)},rc=function(e){return[Qs("firstName",e)&&Qs("lastName",e)?"".concat(Qs("firstName",e)," ").concat(Qs("lastName",e)):"",Qs("phoneticFirstName",e)&&Qs("phoneticLastName",e)?"".concat(Qs("phoneticFirstName",e)," ").concat(Qs("phoneticLastName",e)):""].filter(Boolean).map(Gs)},ic=function(e){return ec([Qs("name",e)],nc(e),!0).filter(Boolean).map(Gs)},oc=function(e){return Xs("emailAddresses",e).flatMap((function(e){return"field"in e&&e.field?[e.field]:[]})).map(Gs)},ac=function(e){return Xs("phones",e).flatMap((function(e){return"field"in e&&e.field?[e.field]:[]})).map(Ys)},sc=function(e){return"ja-jp"===e||"ko-kr"===e||"zh-cn"===e||"zh-tw"===e||"hu-hu"===e?"first,last":"last,first"},cc=function(e){return e.replace(/(.*)-(.*)$/,(function(e,t,n){return"".concat(t,"_").concat(n.toUpperCase())}))};function uc(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}var lc,dc=r.createContext(void 0);function pc(e){var t=new Map;return e.forEach((function(e){e&&e.emailAddresses&&e.emailAddresses.forEach((function(n){n&&!t.has(n.field)&&t.set(n.field,e)}))})),t}function fc(e){var t=e.webServices,n=e.dsid,i=e.children,o=r.useState(),s=o[0],c=o[1],u=a();return r.useEffect((function(){if(n&&t){var e=!0;return function(){var r,i=(r=regeneratorRuntime.mark((function r(){var i,o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=new tc({getLocale:function(){return Promise.resolve(u)},getDSID:function(){return Promise.resolve(n)},urlForService:function(e){return t[e]||""},fetchWebServiceURL:function(e,t){return t.credentials="include",fetch(e,t)}}),r.next=5,i.getAddressBookContacts();case 5:if((o=r.sent).ok&&o.value){r.next=9;break}return e&&c(new Map),r.abrupt("return");case 9:a=o.value,e&&c(pc(a)),r.next=16;break;case 13:r.prev=13,r.t0=r.catch(0),e&&c(new Map);case 16:case"end":return r.stop()}}),r,null,[[0,13]])})),function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){uc(o,n,i,a,s,"next",e)}function s(e){uc(o,n,i,a,s,"throw",e)}a(void 0)}))});return function(){return i.apply(this,arguments)}}()(),function(){e=!1}}}),[u,n,t]),r.createElement(dc.Provider,{value:{contacts:s}},i)}function hc(){var e=r.useContext(dc);if(void 0===e)throw new Error("`useContactsLookupService` must be used within a ContactsLookupProvider");return e}!function(e){e.READY="ready",e.ERROR="error"}(lc||(lc={}));var mc=P(),gc=l();function vc(e,t){return yc(e,t)}function yc(e,t){return gc(function(e,t){return 0===t?e.zero:1===t?e.one:2===t?e.two:e.many}(e,t),{count:new Intl.NumberFormat(a()).format(t)})}n(638);var bc=function(e){var t=e.icon,n=e.ariaHidden,i=void 0!==n&&n,o=e.ariaLabel,a=e.action,s=e.className,c=e.children,u=e.disabled,l=void 0!==u&&u,d=e.hasPopup,p=void 0!==d&&d,f=e.role,h=Ts()("icon-button","unstyled-button",s);return r.createElement("button",{"aria-haspopup":p,"aria-hidden":i,className:h,disabled:i||l,"aria-label":o,onClick:a,role:f},t,c)};function _c(e){var t=e.originalProps,n=e.metadata,r=t.metadata,o=t.layoutMode,a=void 0===o?"layoutBox":o,s=t.desiredFontSize,c=void 0===s?0:s,u=r||n,l=u.svgPath,d=u[a],p=d.viewBox,f=d.height,h=d.width,m=d.translateX,g=d.translateY,v=d.baseline,y=d.capline,b="matrix(1 0 0 1 "+m+" "+g+")",_={viewBox:p,version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:t.style||{},className:t.className||""};if(c>0){var C=c/(v-y),I=f*C;_.style.height=I+"px";var w=h*C;_.style.width=w+"px"}for(var E in _.className+="layoutBox"===a?" layout-box":" glyph-box",t)switch(E){case"layoutMode":case"desiredFontSize":case"className":case"style":case"metadata":break;default:_[E]=t[E]}return i.a.createElement("svg",_,i.a.createElement("g",{transform:b},i.a.createElement("path",{d:l})))}var Cc,Ic=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"minus",svgPath:"M17.8711-29.7363L88.6719-29.7363C91.6016-29.7363 94.0918-32.2266 94.0918-35.2051C94.0918-38.1836 91.6016-40.625 88.6719-40.625L17.8711-40.625C15.0391-40.625 12.4512-38.1836 12.4512-35.2051C12.4512-32.2266 15.0391-29.7363 17.8711-29.7363Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:81.27505615234372,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 82.713623046875 10.9873046875",width:82.713623046875,height:10.9873046875,translateX:-11.378203125000027,translateY:40.7236328125,baseline:40.7236328125,capline:-29.736328125}}})};n(639),function(e){e.USER_LAUNCH="USER_LAUNCH",e.ITEMS_OPENED="ITEMS_OPENED",e.APP_SWITCHER="APP_SWITCHER",e.NOTIFICATION="NOTIFICATION",e.ACCOUNT_MENU="ACCOUNT_MENU",e.ANNOUNCEMENT="ANNOUNCEMENT",e.CREATE="CREATE",e.OPEN_DOCUMENT="OPEN_DOCUMENT"}(Cc||(Cc={}));var wc=function(){function e(){this.childApplications=new Map,this.badgeListeners=new Set}var t=e.prototype;return t.getBadgeCount=function(e){var t,n;return null!=(t=null==(n=this.childApplications.get(e))?void 0:n.badgeCount)?t:null},t.setBadgeCount=function(e,t){var n=this.childApplications.get(e);if(n)n.badgeCount=t;else{var r={badgeCount:t};this.childApplications.set(e,r)}this.badgeListeners.forEach((function(n){return n(e,t)}))},e}();wc.shared=new wc,n(640),n(683);var Ec=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sc=function(e,t){this.key=e,this.payload=t};function Tc(e){return function(t){function n(n){return t.call(this,e,n)||this}return Ec(n,t),n}(Sc)}var Oc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ec(t,e),t}(Tc("labelId")),Pc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ec(t,e),t}(Tc("activationStart")),xc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ec(t,e),t}(Tc("activationEnded")),Ac=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ec(t,e),t}(Tc("activationCompleted")),Nc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ec(t,e),t}(Tc("activationCancelled")),Rc=function(){function e(){this.labelToComponentMap=new Map,this.componentToLabelsMap=new Map,this.componentHandlerMap=new Map}return e.prototype.connectLabel=function(e,t){var n=this.labelToComponentMap,r=this.componentToLabelsMap;n.set(e,t),r.has(t)||r.set(t,new Set),r.get(t).add(e)},e.prototype.disconnectLabel=function(e){var t=this.labelToComponentMap,n=this.componentToLabelsMap,r=t.get(e);Dc(r)&&(t.delete(e),n.get(r).delete(e))},e.prototype.registerLabel=function(e,t){this.connectLabel(e,t),this.passMessage(t,new Oc(e))},e.prototype.unregisterLabel=function(e){var t=this.labelToComponentMap.get(e);this.disconnectLabel(e),Dc(t)&&this.passMessage(t,new Oc(""))},e.prototype.registerComponent=function(e,t){if(this.componentHandlerMap.has(e))throw new Error('A component with id "'+e+'" was already registered.');if(this.componentHandlerMap.set(e,t),this.componentToLabelsMap.get(e))for(var n=this.componentToLabelsMap.get(e),r=0,i=Array.from(n);r<i.length;r++){var o=i[r];this.passMessage(e,new Oc(o))}},e.prototype.unregisterComponent=function(e,t){if(this.componentHandlerMap.has(e)){if(t!==this.componentHandlerMap.get(e))throw new Error('The original callback is required to unregister "'+e+'"');this.componentHandlerMap.delete(e)}},e.prototype.transmitMessage=function(e,t){if(!this.labelToComponentMap.has(e))throw new Error("Label with id '"+e+"' was not registered.");var n=this.labelToComponentMap.get(e);this.passMessage(n,t)},e.prototype.passMessage=function(e,t){this.componentHandlerMap.has(e)&&this.componentHandlerMap.get(e)(t)},e}();function Dc(e){return"string"===typeof e}function kc(){return Math.random().toString(36).substr(2,5)}n(684);var Uc=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lc=function(e){function t(t){var n=e.call(this,t)||this;return n.userActivated=!1,n.touchHover=!1,n.startActivation=function(e){e.nativeEvent.preventDefault(),n.messageTransmitter.transmitMessage(n.labelId,new Pc(e))},n.endActivation=function(e){e.nativeEvent.preventDefault(),n.messageTransmitter.transmitMessage(n.labelId,new xc(e))},n.completeActivation=function(e){e.nativeEvent.preventDefault(),n.messageTransmitter.transmitMessage(n.labelId,new Ac(e))},n.cancelActivation=function(e){e.nativeEvent.preventDefault(),n.messageTransmitter.transmitMessage(n.labelId,new Nc(e))},n.startMouseInteraction=function(e){e.nativeEvent.preventDefault(),n.userActivated=!0,n.startActivation(e),document.addEventListener("mouseup",n.detectDetachedMouseInteraction,!0)},n.endMouseInteraction=function(e){n.userActivated&&(e.nativeEvent.preventDefault(),n.endActivation(e),n.completeActivation(e),n.userActivated=!1,document.removeEventListener("mouseup",n.detectDetachedMouseInteraction,!0))},n.suspendMouseInteraction=function(e){n.userActivated&&(e.nativeEvent.preventDefault(),n.endActivation(e))},n.resumeMouseInteraction=function(e){n.userActivated&&(e.nativeEvent.preventDefault(),n.startActivation(e))},n.detectDetachedMouseInteraction=function(e){var t=n.ref.current;t&&t===e.target&&t.contains(e.target)||(n.userActivated=!1,document.removeEventListener("mouseup",n.detectDetachedMouseInteraction,!0))},n.startTouchInteraction=function(e){e.nativeEvent.preventDefault(),n.userActivated=!0,n.touchHover=!0,n.startActivation(e)},n.endTouchInteraction=function(e){e.nativeEvent.preventDefault(),n.userActivated=!1,n.touchHover=!1,n.endActivation(e),Mc(e.nativeEvent,n.ref.current)?n.completeActivation(e):n.cancelActivation(e)},n.cancelTouchInteraction=function(e){e.nativeEvent.preventDefault(),n.userActivated=!1,n.touchHover=!1,n.endActivation(e),n.cancelActivation(e)},n.detectTouchHover=function(e){var t=e.nativeEvent;if(t.preventDefault(),n.ref.current){var r=Mc(t,n.ref.current);r&&!n.touchHover?(n.touchHover=!0,n.startActivation(e)):!r&&n.touchHover&&(n.touchHover=!1,n.endActivation(e))}},n.labelId=n.props.id||"ui-label-"+kc(),n.ref=r.createRef(),n}return Uc(t,e),t.prototype.componentDidMount=function(){var e,t=this.props;"htmlFor"in t?e=t.htmlFor:(console.warn("The `for` property is deprecated, please use `htmlFor` instead."),e=t.for),this.messageTransmitter.registerLabel(this.labelId,e)},t.prototype.UNSAFE_componentWillUpdate=function(e){var t,n=this.messageTransmitter,r=this.labelId,i=this.props,o=!1;t="htmlFor"in i?i.htmlFor:i.for,"htmlFor"in e&&e.htmlFor!==t?(t=e.htmlFor,o=!0):"for"in e&&e.for!==t&&(t=e.for,o=!0),e.id&&e.id!==i.id&&(n.unregisterLabel(r),this.labelId=e.id,o=!0),o&&n.registerLabel(this.labelId,t)},t.prototype.componentWillUnmount=function(){this.messageTransmitter.unregisterLabel(this.labelId)},Object.defineProperty(t.prototype,"messageTransmitter",{get:function(){return t.messageTransmitter},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e,t=this.props;return e="htmlFor"in t?t.htmlFor:t.for,r.createElement("ui-label",{id:this.labelId,for:e,ref:this.ref,class:t.className,style:t.style,onMouseDown:this.startMouseInteraction,onMouseUp:this.endMouseInteraction,onMouseOut:this.suspendMouseInteraction,onMouseEnter:this.resumeMouseInteraction,onTouchStart:this.startTouchInteraction,onTouchMove:this.detectTouchHover,onTouchEnd:this.endTouchInteraction,onTouchCancel:this.cancelTouchInteraction},t.children)},t.messageTransmitter=new Rc,t}(r.Component);function Mc(e,t){var n=e.changedTouches.item(0);if(!n)return!1;var r=t.getBoundingClientRect(),i=n.clientX>=r.left&&n.clientX<=r.right,o=n.clientY>=r.top&&n.clientY<=r.bottom;return i&&o}function jc(e,t){void 0===t&&(t={});var n=Object(r.useMemo)((function(){return Lc.messageTransmitter}),[]),i=Object(r.useState)(void 0),o=i[0],a=i[1],s=Object(r.useRef)(t);s.current=t;var c=Object(r.useCallback)((function(e){var t=s.current;if(e instanceof Oc){var n=e.payload;t.onLabelId&&t.onLabelId(n),a(n)}else e instanceof Pc?(n=e.payload,t.onActivationStart&&t.onActivationStart(n)):e instanceof xc?(n=e.payload,t.onActivationEnd&&t.onActivationEnd(n)):e instanceof Ac?(n=e.payload,t.onActivationComplete&&t.onActivationComplete(n)):e instanceof Nc&&(n=e.payload,t.onActivationCancel&&t.onActivationCancel(n))}),[]);return Object(r.useEffect)((function(){if(e)return n.registerComponent(e,c),function(){n.unregisterComponent(e,c)}}),[e,n,c]),o}var Fc=null,Bc=null;function zc(e){var t=e.active,n=e.disabled,r=e.className,i=e.onActivate,o=e.onActivationStart,a=e.onActivationEnd,s=e.onActivationCancel,c=e.tabIndex,u=e.variant;return{"aria-disabled":n||void 0,class:Ts()(u,{active:t},r),tabindex:n?void 0:e.hasOwnProperty("tabIndex")?c:0,ontouchstart:"void(0)",onClick:function(e){n||i(e)},onKeyDown:function(e){if(" "===e.key&&e.preventDefault(),!n)switch(e.key){case" ":Fc!==e.target&&(Fc=e.target,o&&o());break;case"Enter":e.stopPropagation(),Bc=e.target}},onKeyUp:function(e){if(!n)switch(e.key){case" ":Fc===e.target&&(Fc=null,i(e),a&&a());break;case"Enter":Bc===e.target&&(Bc=null,e.stopPropagation(),i(e))}},onBlur:function(e){Fc===e.target&&s&&s(),Fc=null,Bc=null}}}var Hc=function(){return(Hc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Wc=i.a.forwardRef((function(e,t){var n=e.variant,o=e.children,a=e.destructive,s=e.onActivate,c=e.submit,u=e.className,l=e.id,d=e.disabled,p=e.style,f=e.tabIndex,h=e.tooltip,m=e.ariaLabel,g=e.ariaHasPopup,v=e.ariaDescribedBy,y=Object(r.useRef)(null),b=Object(r.useState)(!1),_=b[0],C=b[1],I=function(){d||C(!0)},w=function(){d||C(!1)},E=function(){d||C(!1)},S=function(e){e.stopPropagation(),d||y.current.click()},T=jc(l,{onActivationStart:I,onActivationEnd:w,onActivationComplete:S,onActivationCancel:E}),O=zc(Hc(Hc({active:_,disabled:d,className:Ts()(u,a?"destructive":void 0)},e.hasOwnProperty("tabIndex")?{tabIndex:f}:{}),{onActivate:S,onActivationStart:I,onActivationEnd:w,onActivationCancel:E,variant:n||"push primary"}));return i.a.createElement("ui-button",Hc({},O,{id:l,style:p,title:h,role:"button",ref:t,"aria-labelledby":m?void 0:T,"aria-disabled":d,"aria-label":m,"aria-haspopup":g,"aria-describedby":v}),i.a.createElement("button",{ref:y,type:c?"submit":"button",disabled:d,tabIndex:-1,onClick:function(e){e.stopPropagation(),s&&s()}}),o)})),Vc=n(641),Zc=window.matchMedia("(max-width: 666px)");function qc(){return Zc.matches?f.COMPACT:f.REGULAR}function Kc(){var e=Object(Vc.a)();return r.useEffect((function(){return Zc.addEventListener("change",e),function(){return Zc.removeEventListener("change",e)}}),[e]),qc()}var Gc,Yc=window.matchMedia("(max-width: 666px)");function Qc(){return Yc.matches?f.COMPACT:f.REGULAR}function Xc(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Jc(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jc(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $c=new Map(Object.entries({en:"en-us","nb-no":"no-no","nn-no":"no-no",nb:"no-no",nn:"no-no",he:"iw-il","he-il":"iw-il",pt:"pt-pt","vi-vn":"vi-vi","es-419":"es-mx","es-xl":"es-mx",nl:"nl-nl"}));function eu(){for(var e,t=new Map,n=Xc(_r.supportedLocales);!(e=n()).done;){var r=e.value.split("-"),i=r[0],o=r[1],a=t.get(i);if(a)a.add(o);else{var s=new Set;s.add(o),t.set(i,s)}}Gc=t}function tu(e){return e.replace("_","-").toLowerCase()}function nu(){for(var e,t=[],n=Xc(window.navigator.languages);!(e=n()).done;){var r,i=tu(e.value),o=null!=(r=$c.get(i))?r:i,a=o.split("-"),s=a[0],c=a[1];Gc||eu();var u=Gc.get(s);if(u&&!u.has(c)){var l=u.values().next().value;t.push(s+"-"+l)}else t.push(o)}return t}function ru(){for(var e,t=_r.supportedLocales,n=Xc(nu());!(e=n()).done;){var r=e.value;if(t.indexOf(r)>-1)return r}return"en-us"}function iu(e){return e.substring(0,2).toLowerCase()+"_"+e.substring(3,8).toUpperCase()}function ou(e){var t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function au(e){var t=e?e.split("-"):["en","us"],n=t[0].toLowerCase();return t.length>2?(n+="-"+ou(t[1]),n+="-"+t[2].toUpperCase()):t.length>1&&(n+=t[1].length>2?"-"+ou(t[1]):"-"+t[1].toUpperCase()),n}function su(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return cu(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cu(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uu,lu,du,pu={shouldRedirectForDocument:!1,generation:1,supportedDeviceTypes:[p.PHONE,p.TABLET,p.DESKTOP],supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],applicationThemeColor:"rgb(245, 245, 245)",shouldPreloadCoreTypes:!1,allowsUnauthenticatedMode:!1,allowsOneFactorAuthenticationMode:!1,allowsiCloudLiteAccounts:!1,allowsMAIDAccounts:!0,allowsPhoneNumberAsAppleId:!0,hasUIForAcceptedSharesOnMobile:!1,isUsingCloudOSPreferencesAPI:!1,isPCSRequired:!1,allowsFullscreen:!1,shouldShowPushNotifications:!1,shouldAwakeInBackgroundFromPush:!1,isHidden:!1,helpUsesAppleSupportSite:!1,pushTopic:null,requiredServices:[],supportedDomains:[],supportsTile:!0};function fu(e,t){void 0!==t.requiredServices&&(e.requiredServices=t.requiredServices),void 0!==t.supportedFileExtensions&&(e.supportedFileExtensions=t.supportedFileExtensions),void 0!==t.isHidden&&(e.isHidden=t.isHidden),void 0!==t.isPCSRequired&&(e.isPCSRequired=t.isPCSRequired),void 0!==t.pushTopic&&(e.pushTopic=t.pushTopic),void 0!==t.supportedLocales&&(e.supportedLocales=t.supportedLocales),void 0!==t.additionalSupportedLocales&&(e.additionalSupportedLocales=t.additionalSupportedLocales),void 0!==t.radarComponentId&&(e.radarComponentId=t.radarComponentId),void 0!==t.requiresAuth&&(e.allowsUnauthenticatedMode=!t.requiresAuth),void 0!==t.isWWW&&hu(e,Ne.sharedInstance.isDomainCN?ge:me,t.isWWW),void 0!==t.isBeta&&hu(e,ve,t.isBeta),void 0!==t.isFuture&&hu(e,ye,t.isFuture),void 0!==t.isCarry&&hu(e,be,t.isCarry),void 0!==t.shareInfo&&(e.shareAcceptanceInfo=t.shareInfo),t.isQualifiedForBeta,void 0!==t.preloadCoreTypes&&(e.shouldPreloadCoreTypes=t.preloadCoreTypes),void 0!==t.supportsLite&&(e.allowsiCloudLiteAccounts=t.supportsLite),void 0!==t.hasPreferences&&(e.isUsingCloudOSPreferencesAPI=t.hasPreferences),void 0!==t.showsPushNotifications&&(e.shouldShowPushNotifications=t.showsPushNotifications),void 0!==t.awakesInBackgroundFromPush&&(e.shouldAwakeInBackgroundFromPush=t.awakesInBackgroundFromPush),void 0!==t.supportsMAID&&(e.allowsMAIDAccounts=t.supportsMAID),void 0!==t.supportsPhoneNumberBasedAppleId&&(e.allowsPhoneNumberAsAppleId=t.supportsPhoneNumberBasedAppleId),void 0!==t.canLaunchWithOneFactor&&(e.allowsOneFactorAuthenticationMode=t.canLaunchWithOneFactor),e.path||(e.path=e.authBagId);for(var n,r=[],i=su(e.requiredServices);!(n=i()).done;){var o=n.value;Fn(o)&&Bn(o)||r.push(o)}e.missingRequiredServices=r}function hu(e,t,n){var r=e.supportedDomains;if(n)r.includes(t)||r.push(t);else{var i=r.indexOf(t);-1!==i&&r.splice(i,1)}}function mu(e){var t,n=Ne.sharedInstance.findAvailableHostname(e.supportedDomains);return n?Cr(_r.protocol,n,function(e){var t,n=new Set,r=new Set,i=bZ.sharedInstance.locale;i&&n.add(tu(i));var o=_r.locale;n.add(tu(o));var a=_r.secondaryLocale;a&&n.add(tu(a));for(var s,c=su(nu());!(s=c()).done;){var u=s.value;n.add(tu(u))}n.add(tu("en-us"));var l=null!=(t=e.supportedLocales)?t:[];if(l.length>0)for(var d,p=su(l);!(d=p()).done;){var f=d.value;r.add(tu(f))}else for(var h,m=su(_r.childApplicationSupportedLocales);!(h=m()).done;){var g=h.value;r.add(tu(g))}for(var v,y=su(null!=(b=e.additionalSupportedLocales)?b:[]);!(v=y()).done;){var b,_=v.value;r.add(tu(_))}for(var C,I=su(n);!(C=I()).done;){var w=C.value;if(r.has(w))return w}return"en-us"}(e),e.path,null!=(t=bZ.sharedInstance.port)?t:void 0,"index.html",Ne.sharedInstance.current.rootDomain,bZ.sharedInstance.relativePath):null}function gu(e){var t,n=window.devicePixelRatio;return n>2&&e.applicationIconUrl3x?e.applicationIconUrl3x:n>1&&e.applicationIconUrl2x?e.applicationIconUrl2x:null!=(t=e.applicationIconUrl1x)?t:null}function vu(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return yu(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yu(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bu(e){var t,n=null!=(t=e.displayName)?t:"",r=e.displayNameLocKey;return r?Xn(r):n}function _u(e){var t,n=null!=(t=e.titleNameNonLocalized)?t:"",r=e.titleNameLocKey;return r?Xn(r):n}function Cu(e){var t,n,r=e.applicationInfo,i=!1,o=_r.configuration.applications;if(o){for(var a,s=[],c=vu(o);!(a=c()).done;){var u=a.value,l=Iu(e,u.name);l&&(fu(l,u.setupInfo),s.push(l))}if(s.length>1)throw new Error("auth bag returned information for multiple generations");s.length>0&&(r=s[0])}var d=bZ.sharedInstance.applicationIdentifier,p=bZ.sharedInstance.showApps,h=null==p?void 0:p.find((function(t){return t.identifier===e.identifier}));if(h){var m=h.generation;if("number"!==typeof m&&e.generations.length>1)throw new Error("Invalid showApps query entry, a generation must be specified for '"+e.identifier+"'");if("number"===typeof m){var g=function(){for(var t,n=vu(e.generations);!(t=n()).done;){var r=t.value;if(r.generation===m)return r}return null}();if(!g)throw new Error("Invalid showApps query entry, '"+e.identifier+"' does not define generation: "+m);r=g}}(d===e.identifier||h)&&(i=!0),e.applicationInfo=null!=(t=null==e.setApplicationInfoForConfiguration?void 0:e.setApplicationInfoForConfiguration(e,r))?t:r;var v=e.applicationInfo,y=null==(n=wZ.sharedInstance.cloudOSUser)?void 0:n.details;v.missingRequiredServices=[];for(var b,_=vu(v.requiredServices);!(b=_()).done;){var C=b.value;Fn(C)&&Bn(C)||v.missingRequiredServices.push(C)}!function(e,t,n,r){var i;if(!function(e){for(var t,n=_r.primaryInteractionMode,r=qc(),i=Qc(),o=r===f.REGULAR&&i===f.REGULAR?f.REGULAR:f.COMPACT,a=vu(e.supportedDevices);!(t=a()).done;){var s=t.value;if(s.primaryInteractionMode===n&&s.sizeClass===o)return!0}return!1}(t))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE);var o=_r.deviceType;if(null==(i=t.supportedDeviceTypes)||!i.includes(o))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE_TYPE);var a=qc()===f.REGULAR&&Qc()===f.REGULAR?f.REGULAR:f.COMPACT,s=t.supportedSizeClasses;if(s&&!s.includes(a))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_DOES_NOT_SUPPORT_SIZE_CLASS);if(!Ne.sharedInstance.findAvailableHostname(t.supportedDomains))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.NO_SUPPORTED_APPLICATION_INFO_DOMAIN);if(n){var c;if(ma(n)&&!t.allowsiCloudLiteAccounts)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_DOES_NOT_SUPPORT_LITE_ACCOUNT_TYPE);if(n.isManagedAppleID&&!t.allowsMAIDAccounts)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_DOES_NOT_SUPPORT_MAID_ACCOUNT_TYPE);if(va(n)&&!t.allowsPhoneNumberAsAppleId)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_DOES_NOT_SUPPORT_MAKO_ACCOUNT_TYPE);if(null!=(c=n.beneficiaryInfo)&&c.isBeneficiary&&t.shouldHideForBeneficiaryAccount)return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_DOES_NOT_SUPPORT_BENEFICIARY_ACCOUNT_TYPE)}if(r)return e.isHidden=!1,void(e.reasonConfigurationIsHidden=void 0);var u=Ne.sharedInstance.current;if(t.availableFromDomains&&!t.availableFromDomains.includes(u))return e.isHidden=!0,void(e.reasonConfigurationIsHidden=lu.APPLICATION_INFO_SPECIFIED_IS_HIDDEN);e.isHidden=t.isHidden,e.reasonConfigurationIsHidden=t.isHidden?lu.APPLICATION_INFO_SPECIFIED_IS_HIDDEN:void 0}(e,v,null!=y?y:void 0,i);var I=function(){var e=v.missingRequiredServices;return!!e&&0===e.length}();y&&!I&&(e.isDisabled=!0,e.reasonConfigurationIsDisabled=du.APPLICATION_INFO_REQUIRED_SERVICES_NOT_ENABLED,e.missingRequiredServices=v.missingRequiredServices),e.lockType=_r.configuration.isPCSKeyDeleted&&v.isPCSRequired?uu.LOCKED_PCS_DELETED:null==y||!y.completedAuthenticationStep||v.allowsOneFactorAuthenticationMode||ha(y)?void 0:uu.LOCKED_HSA}function Iu(e,t){for(var n,r=vu(e.generations);!(n=r()).done;){var i=n.value;if(i.authBagId===t)return i}return null}!function(e){e.LOCKED_HSA="LOCKED_HSA",e.LOCKED_PCS_DELETED="LOCKED_PCS_DELETED"}(uu||(uu={})),function(e){e.APPLICATION_INFO_SPECIFIED_IS_HIDDEN="APPLICATION INFO SPECIFIED IS HIDDEN",e.NO_SUPPORTED_APPLICATION_INFO_DOMAIN="NO SUPPORTED APPLICATION INFO DOMAIN",e.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE_TYPE="APPLICATION INFO DOES NOT SUPPORT DEVICE TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_SIZE_CLASS="APPLICATION INFO DOES NOT SUPPORT SIZE CLASS",e.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE="APPLICATION INFO DOES NOT SUPPORT DEVICE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_LITE_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT LITE ACCOUNT TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_MAID_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT MAID ACCOUNT TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_MAKO_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT MAKO ACCOUNT TYPE",e.APPLICATION_INFO_DOES_NOT_SUPPORT_BENEFICIARY_ACCOUNT_TYPE="APPLICATION INFO DOES NOT SUPPORT BENEFICIARY ACCOUNT TYPE"}(lu||(lu={})),function(e){e.APPLICATION_INFO_REQUIRED_SERVICES_NOT_ENABLED="ONE OR MORE APPLICATION INFO REQUIRED SERVICES ARE NOT ENABLED"}(du||(du={}));var wu=n(642),Eu=Object.assign({},pu,{authBagId:"compose",applicationName:"compose",path:"compose",generation:1,requiredServices:["mail"],supportedDevices:[{primaryInteractionMode:wu.a.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:wu.a.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:wu.a.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:wu.a.TOUCH,sizeClass:f.COMPACT}],supportedDomains:[me,ge,ve,be,_e],supportedFileExtensions:[],allowsPhoneNumberAsAppleId:!1,radarComponentId:437728,applicationIconUrl1x:n(643),applicationIconUrl2x:n(644),applicationIconUrl3x:n(645),configuration:null,supportsTile:!1}),Su={identifier:"compose",displayNameLocKey:"Mail.DisplayName",titleNameLocKey:"Mail.TitleName",generations:[Eu],applicationInfo:Eu};Eu.configuration=Su;var Tu=Object.assign({},pu,{authBagId:"calendar",applicationName:"calendar",path:"calendar",requiredServices:["calendar","keyvalue"],pushTopic:"dce593a0ac013016a778712b850dc2cf21af8266",shouldShowPushNotifications:!0,shouldAwakeInBackgroundFromPush:!0,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR}],supportedDomains:[me,ge,ve,be,_e],supportedFileExtensions:[],radarComponentId:431865,configuration:null}),Ou={identifier:"calendar",displayNameLocKey:"Calendar.DisplayName",titleNameLocKey:"Calendar.TitleName",generations:[Tu],applicationInfo:Tu};Tu.configuration=Ou;var Pu=Object.assign({},pu,{authBagId:"contacts",applicationName:"contacts",path:"contacts",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR}],supportedDomains:[me,ge,ve,be,_e],supportedFileExtensions:[],allowsiCloudLiteAccounts:!0,applicationIconUrl1x:n(646),applicationIconUrl2x:n(647),applicationIconUrl3x:n(648),radarComponentId:421464,pushTopic:"73f7bfc9253abaaa423eba9a48e9f187994b7bd9",configuration:null}),xu={identifier:"contacts",displayNameLocKey:"Contacts.DisplayName",titleNameLocKey:"Contacts.TitleName",generations:[Pu],applicationInfo:Pu};Pu.configuration=xu;var Au=Object.assign({},pu,{authBagId:"customdomainsettings",applicationName:"customdomainsettings",path:"customdomainsettings",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],supportedDomains:[me,be,ve,ye,_e],supportedFileExtensions:[],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,additionalSupportedLocales:["ar-sa","iw-il"],radarComponentId:578665,configuration:null}),Nu={identifier:"customdomainsettings",displayNameLocKey:"CustomDomainSettings.DisplayName",titleNameLocKey:"CustomDomainSettings.TitleName",generations:[Au],applicationInfo:Au};Au.configuration=Nu;var Ru=Object.assign({},pu,{authBagId:"iclouddrive",applicationName:"iclouddrive",path:"iclouddrive",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],supportedDomains:[me,ge,ve,be,_e],supportedFileExtensions:[],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,additionalSupportedLocales:["ar-sa","iw-il"],applicationIconUrl1x:n(649),applicationIconUrl2x:n(650),radarComponentId:569448,cloudKitInfo:{containerIdentifier:"com.apple.clouddocs",partition:"https://ckdatabasews."+Ne.sharedInstance.current.servicesDomain},configuration:null}),Du={identifier:"iclouddrive",displayNameLocKey:"ICloudDrive.DisplayName",titleNameLocKey:"ICloudDrive.TitleName",generations:[Ru],applicationInfo:Ru};Ru.configuration=Du;var ku=Object.assign({},pu,{authBagId:"iclouddrive",applicationName:"iclouddrive",path:"iclouddrivefilerecovery",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR}],supportedDomains:[me,ge,be,_e],supportedFileExtensions:[],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,additionalSupportedLocales:["ar-sa","iw-il"],radarComponentId:569448,configuration:null}),Uu={identifier:"iclouddrivefilerecovery",displayNameLocKey:"ICloudDriveFileRecovery.DisplayName",titleNameLocKey:"ICloudDriveFileRecovery.TitleName",generations:[ku],applicationInfo:ku};ku.configuration=Uu;var Lu=Object.assign({},pu,{applicationName:"find",authBagId:"find",path:"find",generation:1,requiredServices:["findme"],supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR}],supportedDomains:[me,ge,ve,be,_e],supportedFileExtensions:[],allowsOneFactorAuthenticationMode:!0,shouldShowPushNotifications:!0,shouldAwakeInBackgroundFromPush:!0,applicationIconUrl1x:n(651),applicationIconUrl2x:n(652),radarComponentId:413287,isHidden:!1,allowsUnauthenticatedMode:!1,configuration:null,shouldHideForBeneficiaryAccount:!0}),Mu=Object.assign({},pu,{applicationName:"find-my-iphone",authBagId:"find",path:"find-my-iphone",generation:2,requiredServices:["findme"],supportedDevices:[{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],supportedDomains:[me,ge,ve,be,_e],supportedFileExtensions:[],allowsOneFactorAuthenticationMode:!0,applicationIconUrl1x:n(651),applicationIconUrl2x:n(652),radarComponentId:990584,isHidden:!1,allowsUnauthenticatedMode:!1,configuration:null,shouldHideForBeneficiaryAccount:!0}),ju={identifier:"find",displayNameLocKey:"FMIP.DisplayName",titleNameLocKey:"FMIP.TitleName",generations:[Lu,Mu],applicationInfo:Lu,setApplicationInfoForConfiguration:function(e,t){var n=bZ.sharedInstance.showApps;if(null==n?void 0:n.find((function(t){return t.identifier===e.identifier})))return t;var r=_.sharedInstance.deviceType,i=qc(),o=Qc(),a=i===f.REGULAR&&o===f.REGULAR;return r===p.DESKTOP||a?Lu:Mu}};Lu.configuration=ju,Mu.configuration=ju;var Fu=Object.assign({},pu,{authBagId:"hidemyemail",applicationName:"hidemyemail",path:"hidemyemail",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],supportedDomains:[me,be,ve,ye,ge,_e],supportedFileExtensions:[],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,radarComponentId:578665,configuration:null}),Bu={identifier:"hidemyemail",displayNameLocKey:"HideMyEmail.DisplayName",titleNameLocKey:"HideMyEmail.TitleName",generations:[Fu],applicationInfo:Fu};Fu.configuration=Bu;var zu=Object.assign({},pu,{authBagId:"keynote",applicationName:"keynote",path:"keynote",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT}],supportedDomains:[me,ge,_e],supportedFileExtensions:[],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,additionalSupportedLocales:["ar-sa","iw-il"],radarComponentId:984069,shouldRedirectForDocument:!0,helpUsesAppleSupportSite:!0,applicationIconUrl1x:function(){var e,t=null==(e=_r.configuration)?void 0:e.environment;return["ICLOUD2","ICLOUD3"].indexOf(t)>=0?n(653):n(654)}(),applicationIconUrl2x:function(){var e,t=null==(e=_r.configuration)?void 0:e.environment;return["ICLOUD2","ICLOUD3"].indexOf(t)>=0?n(655):n(656)}(),configuration:null}),Hu={identifier:"keynote",displayNameLocKey:"Keynote.DisplayName",titleNameLocKey:"Keynote.TitleName",generations:[zu],applicationInfo:zu};zu.configuration=Hu;var Wu=Object.assign({},pu,{authBagId:"mail",applicationName:"mail2",path:"mail2",generation:2,requiredServices:["mail"],supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],supportedDomains:[me,ge,ve,be,ye,_e],supportedFileExtensions:[],pushTopic:"e850b097b840ef10ce5a7ed95b171058c42cc435",shouldShowPushNotifications:!0,shouldAwakeInBackgroundFromPush:!0,allowsPhoneNumberAsAppleId:!1,radarComponentId:437728,applicationIconUrl1x:n(643),applicationIconUrl2x:n(644),applicationIconUrl3x:n(645),configuration:null}),Vu={identifier:"mail",displayNameLocKey:"Mail.DisplayName",titleNameLocKey:"Mail.TitleName",generations:[Wu],applicationInfo:Wu};Wu.configuration=Vu;var Zu=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"doc",svgPath:"M27.5879 17.0898L79.4434 17.0898C89.5508 17.0898 94.5801 11.9629 94.5801 1.80664L94.5801-42.5293C94.5801-48.8281 93.8477-51.5625 89.9414-55.5664L63.0371-82.959C59.3262-86.7676 56.25-87.5977 50.7812-87.5977L27.5879-87.5977C17.5293-87.5977 12.4512-82.4219 12.4512-72.2656L12.4512 1.80664C12.4512 12.0117 17.4805 17.0898 27.5879 17.0898ZM27.9297 9.22852C22.9004 9.22852 20.3125 6.54297 20.3125 1.66016L20.3125-72.1191C20.3125-76.9531 22.9004-79.7363 27.9785-79.7363L49.707-79.7363L49.707-51.3672C49.707-45.2148 52.7832-42.1875 58.8867-42.1875L86.7188-42.1875L86.7188 1.66016C86.7188 6.54297 84.1309 9.22852 79.0527 9.22852ZM59.7656-49.5605C57.8125-49.5605 57.0801-50.3418 57.0801-52.2949L57.0801-78.2227L85.2051-49.5605Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:80.49510009765618,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 82.130126953125 104.7353515625",width:82.130126953125,height:104.7353515625,translateX:-12.449907226562573,translateY:87.59765625,baseline:87.59765625,capline:17.1376953125}}})},qu=Object.assign({},pu,{authBagId:"newspublisher",applicationName:"newspublisher",path:"newspublisher",supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT}],supportedDomains:[me,ge,ve],supportedFileExtensions:[],availableFromDomains:[me,ge,ve],supportedLocales:["en-us"],isUsingCloudOSPreferencesAPI:!0,allowsiCloudLiteAccounts:!0,allowsMAIDAccounts:!1,applicationIconUrl1x:n(657),applicationIconUrl2x:n(658),applicationThemeColor:"rgb(255, 255, 254)",radarComponentId:632145,helpButtonConfigs:[{externalURL:function(){return function(){var e=_r.locale;return"https://help.apple.com/newspublisher/icloud/"+("en-us"===e.toLowerCase()?"":"?lang="+e)}()}},{externalURL:function(){return"https://developer.apple.com/news-publisher/"},title:"Newspublisher.ResourcesTitle",symbol:r.createElement(Zu,{"aria-hidden":!0,desiredFontSize:11})}],configuration:null,supportsTile:!1}),Ku={identifier:"newspublisher",displayName:"News Publisher",titleNameNonLocalized:"iCloud - News Publisher",generations:[qu],applicationInfo:qu};qu.configuration=Ku;var Gu=Ne.sharedInstance.current.servicesDomain,Yu=Object.assign({},pu,{authBagId:"notes",applicationName:"notes",path:"notes",generation:1,requiredServices:["mail"],supportedDomains:[me,ge,be,_e],supportedFileExtensions:[],supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT}],pushTopic:"c5292888edbd54273cf7c82fe861b81f0d2b87ef",applicationIconUrl1x:n(659),applicationIconUrl2x:n(660),applicationIconUrl3x:n(660),applicationThemeColor:"rgb(251, 251, 249)",configuration:null,supportsTile:!1}),Qu=Object.assign({},pu,{authBagId:"notes3",applicationName:"notes3",path:"notes3",generation:3,requiredServices:["ckdatabasews"],supportedDomains:[me,ge,ve,be,ye,_e],supportedFileExtensions:[],allowsiCloudLiteAccounts:!0,isPCSRequired:!0,shouldPreloadCoreTypes:!0,applicationIconUrl1x:n(659),applicationIconUrl2x:n(660),applicationIconUrl3x:n(660),shareAcceptanceInfo:{containerIdentifier:"com.apple.notes",partition:"https://ckdatabasews."+Gu,titleFields:[{name:"TitleEncrypted",type:"EncryptedBytes"}]},cloudKitInfo:{containerIdentifier:"com.apple.notes"},configuration:null}),Xu={identifier:"notes",displayNameLocKey:"Notes.DisplayName",titleNameLocKey:"Notes.TitleName",generations:[Yu,Qu],applicationInfo:Qu};Yu.configuration=Xu,Qu.configuration=Xu;var Ju=Object.assign({},pu,{authBagId:"numbers",applicationName:"numbers",path:"numbers",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT}],supportedDomains:[me,ge,_e],supportedFileExtensions:[],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,additionalSupportedLocales:["ar-sa","iw-il"],radarComponentId:984069,shouldRedirectForDocument:!0,helpUsesAppleSupportSite:!0,applicationIconUrl1x:function(){var e,t=null==(e=_r.configuration)?void 0:e.environment;return["ICLOUD2","ICLOUD3"].indexOf(t)>=0?n(661):n(662)}(),applicationIconUrl2x:function(){var e,t=null==(e=_r.configuration)?void 0:e.environment;return["ICLOUD2","ICLOUD3"].indexOf(t)>=0?n(663):n(664)}(),configuration:null}),$u={identifier:"numbers",displayNameLocKey:"Numbers.DisplayName",titleNameLocKey:"Numbers.TitleName",generations:[Ju],applicationInfo:Ju};Ju.configuration=$u;var el=Object.assign({},pu,{authBagId:"pages",applicationName:"pages",path:"pages",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT}],supportedDomains:[me,ge,_e],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,additionalSupportedLocales:["ar-sa","iw-il"],radarComponentId:984069,supportedFileExtensions:[],shouldRedirectForDocument:!0,helpUsesAppleSupportSite:!0,applicationIconUrl1x:function(){var e,t=null==(e=_r.configuration)?void 0:e.environment;return["ICLOUD2","ICLOUD3"].indexOf(t)>=0?n(665):n(666)}(),applicationIconUrl2x:function(){var e,t=null==(e=_r.configuration)?void 0:e.environment;return["ICLOUD2","ICLOUD3"].indexOf(t)>=0?n(667):n(668)}(),configuration:null}),tl={identifier:"pages",displayNameLocKey:"Pages.DisplayName",titleNameLocKey:"Pages.TitleName",generations:[el],applicationInfo:el};el.configuration=tl;var nl=Ne.sharedInstance.current.servicesDomain,rl=Object.assign({},pu,{authBagId:"photos",applicationName:"photos3",path:"photos3",generation:3,requiredServices:["ckdatabasews"],supportedDomains:[me,ge,ve,be,ye,_e],supportedFileExtensions:[],allowsFullscreen:!0,allowsUnauthenticatedMode:!0,applicationIconUrl1x:n(669),applicationIconUrl2x:n(670),applicationIconUrl3x:n(671),radarComponentId:740310,cloudKitInfo:{containerIdentifier:"com.apple.photos.cloud",partition:"https://ckdatabasews."+nl,recoverableErrorTitleLocKey:"Photos.CloudKit.Recoverable.Title",recoverableErrorSubtitleLocKey:"Photos.CloudKit.Recoverable.Subtitle",unrecoverableErrorTitleLocKey:"Photos.CloudKit.Unrecoverable.Title"},configuration:null}),il={identifier:"photos",displayNameLocKey:"Photos.DisplayName",titleNameLocKey:"Photos.TitleName",generations:[rl],applicationInfo:rl};rl.configuration=il;var ol=Ne.sharedInstance.current.servicesDomain,al=Object.assign({},pu,{authBagId:"reminders",applicationName:"reminders",path:"reminders",generation:1,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR}],supportedDomains:[me,ge,be,_e],supportedFileExtensions:[],applicationIconUrl1x:n(672),applicationIconUrl2x:n(673),applicationThemeColor:"rgb(56, 56, 54)",radarComponentId:469667,pushTopic:"8a40cb6b1d3fcd0f5c204504eb8fb9aa64b78faf",configuration:null,supportsTile:!1}),sl=Object.assign({},pu,{authBagId:"reminders",path:"reminders2",applicationName:"reminders2",generation:2,supportedDomains:[me,ve,ge,be,ye,_e],supportedFileExtensions:[],supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],isPCSRequired:!0,applicationIconUrl1x:n(674),applicationIconUrl2x:n(675),radarComponentId:469667,cloudKitInfo:{containerIdentifier:"com.apple.reminders",partition:"https://ckdatabasews."+ol},configuration:null}),cl={identifier:"reminders",displayNameLocKey:"Reminders.DisplayName",titleNameLocKey:"Reminders.TitleName",generations:[al,sl],applicationInfo:al,setApplicationInfoForConfiguration:function(e,t){var n,r=bZ.sharedInstance.showApps;if(null==r?void 0:r.find((function(t){return t.identifier===e.identifier})))return t;var i=null==(n=wZ.sharedInstance.cloudOSUser)?void 0:n.details,o=i&&i.tantorMigrated;return void 0===i||o?sl:al}};al.configuration=cl,sl.configuration=cl;var ul=Object.assign({},pu,{authBagId:"schoolwork2",applicationName:"schoolwork2",path:"schoolwork2",generation:2,supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR}],supportedFileExtensions:[],supportedDomains:[ye],allowsUnauthenticatedMode:!0,applicationIconUrl1x:n(649),applicationIconUrl2x:n(650),radarComponentId:689048,configuration:null}),ll={identifier:"schoolwork2",displayNameLocKey:"Schoolwork.DisplayName",generations:[ul],applicationInfo:ul};ul.configuration=ll;var dl=Object.assign({},pu,{authBagId:"facetime",applicationName:"facetime",path:"facetime",generation:1,supportedDomains:[Ce,Ie,we,Ee,Se,Te],isPCSRequired:!0,allowsiCloudLiteAccounts:!0,allowsUnauthenticatedMode:!0,applicationIconUrl1x:n(676),applicationIconUrl2x:n(677),applicationIconUrl3x:n(678),applicationThemeColor:"rgb(0, 0, 0)",radarComponentId:1138358,isHidden:!0,additionalSupportedLocales:["ar-sa","iw-il"],allowsOneFactorAuthenticationMode:!1,supportedFileExtensions:[],supportedDevices:[{primaryInteractionMode:h.MOUSE,sizeClass:f.REGULAR},{primaryInteractionMode:h.MOUSE,sizeClass:f.COMPACT},{primaryInteractionMode:h.TOUCH,sizeClass:f.REGULAR},{primaryInteractionMode:h.TOUCH,sizeClass:f.COMPACT}],configuration:null}),pl={identifier:"facetime",displayNameLocKey:"FaceTime.DisplayName",titleNameLocKey:"FaceTime.TitleName",generations:[dl],applicationInfo:dl};dl.configuration=pl;var fl=[Ou,xu,Nu,Du,Uu,ju,Bu,Hu,Vu,Ku,Xu,$u,tl,il,cl,ll,pl,Su];function hl(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return ml(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ml(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gl=function(){function e(){this.delegate=null,this.displayOrderObservers=new Set,this.appConfigurationObservers=new Set,this.displayOrder=[],this.configurations=[]}var t=e.prototype;return t.initialize=function(){this.addConfigurations(fl),this.update()},t.update=function(){var e;this.updateConfigurations(),this.updateDisplayOrder(null!=(e=_r.configuration.applications)?e:[])},t.getConfiguration=function(e){for(var t,n=hl(this.configurations);!(t=n()).done;){var r=t.value;if(r.identifier===e)return r}return null},t.getApplicationInfo=function(e){for(var t,n=hl(this.configurations);!(t=n()).done;){var r=t.value;if(r.identifier===e)return r.applicationInfo}return null},t.getApplicationConfiguration=function(e){for(var t,n=hl(this.configurations);!(t=n()).done;){var r=t.value;if(r.identifier===e)return r}return null},t.getApplicationConfigurationByAuthBagId=function(e){for(var t,n=hl(this.configurations);!(t=n()).done;){var r=t.value;if(Iu(r,e))return r}return null},t.getApplicationInfoByAuthBagId=function(e){for(var t,n=hl(this.configurations);!(t=n()).done;){var r=Iu(t.value,e);if(r)return r}return null},t.addConfigurations=function(e){for(var t,n,r=hl(e);!(n=r()).done;){var i=n.value;this.addConfiguration(i)}null==(t=this.delegate)||t.configurationsChanged(this)},t.addConfiguration=function(e){if(this.getConfiguration(e.identifier))throw new Error("A ChildApplicationConfiguration with identifier "+e.identifier+" already registered");this.configurations.push(e)},t.updateConfigurations=function(){for(var e,t=hl(this.configurations);!(e=t()).done;)Cu(e.value);this.appConfigurationObservers.forEach((function(e){return e()}))},t.updateDisplayOrder=function(e){for(var t,n,r=[],i=hl(e);!(n=i()).done;){var o=n.value,a=this.getApplicationConfigurationByAuthBagId(o.name);a&&!0!==a.isHidden&&r.push(a)}this.displayOrder=r,null==(t=this.delegate)||t.displayOrderChanged(this),this.displayOrderObservers.forEach((function(e){return e.displayOrderChanged(r)}))},e}();function vl(e,t,n){var i=r.useState(e),o=i[0],a=i[1];return r.useEffect((function(){var e=n((function(e){a(e)}));return t.add(e),function(){t.delete(e)}}),[t,n]),r.useDebugValue(o),o}function yl(){var e=vl(gl.sharedInstance.displayOrder,gl.sharedInstance.displayOrderObservers,bl);return r.useMemo((function(){return function(e){return e.map((function(e){return{applicationIdentifier:e.identifier,displayName:bu(e)}}))}(e)}),[e])}function bl(e){return{displayOrderChanged:e}}gl.sharedInstance=new gl,n(679),n(680);var _l=n.p+"3d58276e6a1e2b72f3c16a86204fb593.png",Cl=n.p+"2c5e1327b874f593c799b0cfb137e747.png";function Il(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e4,r=arguments.length>3?arguments[3]:void 0;return new Promise((function(i,o){var a=new Image;if(e||t){var s=null,c=function(){a.removeEventListener("load",u),a.removeEventListener("error",l)},u=function(){s&&clearTimeout(s),c(),i(a)},l=function(){s&&clearTimeout(s),c(),o(new Error("loadImage: image failed to load"))};a.addEventListener("load",u),a.addEventListener("error",l),n&&(s=setTimeout((function(){c(),o(new Error("loadImage: image loading timeout"))}),n)),e&&(a.src=e),t&&(a.srcset=t),r&&(a.crossOrigin=r)}else o(new Error("loadImage: missing src or srcset to load"))}))}n(681);var wl="M100,68.7182051 C100,69.9139093 100,71.1074395 99.9913043,72.3009696 C99.9847826,73.3075351 99.973913,74.3141006 99.9478261,75.3184921 C99.920129,77.5191265 99.7268293,79.7145543 99.3695652,81.886169 C98.9978261,84.0601765 98.3043478,86.1646159 97.3108696,88.1320927 C95.2972476,92.0852921 92.0834623,95.2992171 88.1304348,97.3129266 C86.1638623,98.305079 84.0602691,98.9982471 81.8891304,99.3695378 C79.7152174,99.7282491 77.5195652,99.9217357 75.3195652,99.9478238 C74.3139596,99.9737988 73.308105,99.9890177 72.3021739,99.993478 C71.1065217,100 69.9130435,100 68.7195652,100 L31.2804348,100 C30.0869565,100 28.8934783,100 27.6978261,99.993478 C26.6919027,99.9897456 25.6860481,99.9752514 24.6804348,99.9499978 C22.4791037,99.9219121 20.2830235,99.7278754 18.1108696,99.3695378 C15.9391304,98.9999565 13.8347826,98.3042741 11.8695652,97.3129266 C7.91695765,95.2996615 4.70324405,92.0865692 2.68913043,88.1342667 C1.69595654,86.1655631 1.00208487,84.0596773 0.630434783,81.886169 C0.273173217,79.7152845 0.079873167,77.5205795 0.052173913,75.3206661 C0.0260869565,74.3141006 0.0130434783,73.3075351 0.00869565217,72.3009696 C0,71.1052654 0,69.9139093 0,68.7182051 L0,31.2817949 C0,30.0860907 0,28.8903865 0.00869565217,27.6946824 C0.0130434783,26.6902909 0.0260869565,25.6837254 0.052173913,24.6793339 C0.0799060567,22.4794222 0.273205889,20.2847196 0.630434783,18.113831 C1.00217391,15.9398235 1.69565217,13.8353841 2.68913043,11.8657333 C4.7027524,7.91253387 7.91653768,4.69860886 11.8695652,2.68489934 C13.8355813,1.69325138 15.9383812,1.00010324 18.1086957,0.628288186 C20.2826087,0.271750946 22.4782609,0.0782642724 24.6782609,0.050002174 C25.6847826,0.0239140832 26.6913043,0.0108700378 27.6956522,0.0065220227 C28.8913043,0 30.0869565,0 31.2782609,0 L68.7173913,0 C69.9130435,0 71.1086957,0 72.3021739,0.0065220227 C73.3080973,0.0102577353 74.3139519,0.0247519479 75.3195652,0.050002174 C77.5195652,0.0782642724 79.7152174,0.271750946 81.8869565,0.628288186 C84.0608696,1.00004348 86.1630435,1.69355189 88.1304348,2.68489934 C92.0844481,4.69799461 95.2990996,7.91202483 97.3130435,11.8657333 C98.305381,13.8338276 98.9985196,15.9389795 99.3695652,18.111657 C99.7268538,20.2832686 99.9201536,22.4786983 99.9478261,24.6793339 C99.973913,25.6858994 99.9869565,26.6924649 99.9913043,27.6968564 C100,28.8925605 100,30.0860907 100,31.2796209 L100,68.7182051 Z",El=function(e){var t=e.className,n=e.size,i=e.src,o=e.srcSet,a=e.testId;return r.createElement("svg",{className:Ts()("icon-with-border",t),style:{overflow:"visible"},xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 "+n+" "+n,"aria-hidden":!0},r.createElement("switch",null,r.createElement("foreignObject",{x:"0",y:"0",width:n,height:n,requiredFeatures:"http://www.w3.org/TR/SVG11/feature#Extensibility"},r.createElement("img",{draggable:"false",src:i,srcSet:o,width:n,height:n,"aria-hidden":!0,alt:"","data-testid":a})),r.createElement("image",{xlinkHref:i,x:"0",y:"0",width:n,height:n})),r.createElement("path",{d:wl,stroke:"#D2D2D7",strokeWidth:1,fill:"none",transform:"scale("+n/100+")",className:"border","data-testid":"border"}))};function Sl(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Tl(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Sl(o,r,i,a,s,"next",e)}function s(e){Sl(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Ol=function(e){var t=e.className,n=e.iconSize,i=e.testId,o=ym(),s=r.useState(null),c=s[0],u=s[1],l=r.useState(_l),d=l[0],p=l[1],f=r.useState(void 0),h=f[0],m=f[1],g=window.devicePixelRatio,v=n*g,y=.3*n*g,b=Math.floor(11*n/60)*g,_=Math.floor(36*n/60)*g,C=v-.0833*n*g*2,I=.817*n*g,w=r.useRef(0);return r.useLayoutEffect((function(){var e=!0,t=function(){if(e){var t=r;p(Pl(t)),m(function(e){return Pl(e)+", 2x "+Pl(e,"2x")+"}"}(t))}},r=a(),i=++w.current,s=function(e,t){return e.toLocaleDateString(t,{weekday:"short"})}(o,r).toUpperCase(),l=function(e){return e.getDate()}(o);if(s!==(null==c?void 0:c.weekDay)||l!==(null==c?void 0:c.monthDay)){var d=document.createElement("canvas");d.style.width=n+"px",d.style.height=n+"px",d.width=v,d.height=v;var f=d.getContext("2d");if(f)return f.clearRect(0,0,n,n),Tl(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Promise.all([document.fonts.load("500 1em SFText Calendar Day Of Week"),document.fonts.load("200 1em SFDisplay Calendar Day Of Month"),xl()]);case 3:if(r=n.sent,o=r[2],w.current===i){n.next=7;break}return n.abrupt("return");case 7:f.drawImage(o,0,0,v,v),Nl(s,"SFText Calendar Day Of Week","500","#FF3B30",b,y,f,C,v),Nl(String(l),"SFDisplay Calendar Day Of Month","200","#030303",_,I,f,C,v),e&&(p(d.toDataURL()),m(void 0),u({weekDay:s,monthDay:l})),n.next=16;break;case 13:n.prev=13,n.t0=n.catch(0),t();case 16:case"end":return n.stop()}}),n,null,[[0,13]])})))(),function(){e=!1};t()}}),[o,c,n,b,y,_,I,v,C]),r.createElement("div",{className:Ts()("calendar-icon",t),style:{height:n,width:n},role:"none"},r.createElement(El,{src:d,srcSet:h,size:n,testId:i}))};function Pl(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"1x";return null!=(t=null==(n=Rl.get(e))?void 0:n[r])?t:"1x"===r?Pi:xi}function xl(){return Al.apply(this,arguments)}function Al(){return(Al=Tl(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Il(_l,_l+", 2x "+Cl);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nl(e,t,n,r,i,o,a,s,c){a.font=n+" "+i+"px "+t;for(var u=a.measureText(e).width,l=i;u>=s&&l>0;)l-=1,a.font=n+" "+l+"px "+t,u=a.measureText(e).width;a.textAlign="center",a.fillStyle=r,a.fillText(e,c/2,o)}var Rl=new Map(Mo),Dl=n.p+"e1527fd9c00277a5bbfd10c73d9b6763.png",kl=n.p+"dccb81ba3f0f63e9a50c162007f59c4a.png",Ul=n.p+"ff119d58e6ae0186a61b38cb8f0b8fc1.png",Ll=n.p+"a6e032ae59d1fd9d47ac97d7b2e2a3af.png",Ml=n.p+"2f1ff66d81fdb9ca728da30a5f8b44c4.png",jl=n.p+"f777c945a66117d240dacae4f095eb30.png",Fl=n.p+"4b1d90456b68a8d4d4b91adb39e60b70.png",Bl=n.p+"7139df03ca7ca7da2b221a4a190eaf72.png",zl=n.p+"32f4373b61552d0ff80750140f5e9c47.png",Hl=n.p+"1c11f0fa22d4e93f8dc179b8ff84791d.png",Wl=n.p+"3b14278b35f4d2a59e19fe17f42e63ca.png",Vl=n.p+"4a203b658cacef30297cdeb0d0e61f3f.png",Zl=n.p+"ddc3380f93d44a376c586796bb7c16a7.png",ql=n.p+"1caee379424dd2d3a4092d81d7a52eba.png",Kl=n.p+"67bd0ce210c7b7b923b32b974b338a57.png",Gl=n.p+"e1db1c9cef9d856b6f66f5597c242cf7.png",Yl=n.p+"1b5c615b834cbb4d30e0c229e8e099a3.png",Ql=n.p+"fa6d2686977d053f6bdfe29a76948824.png",Xl=n.p+"3c581ce16ec89eedc1d6862e31ccd8b3.png",Jl=n.p+"732984517b05e65deae16bd55b010883.png",$l=n.p+"f5b837094af69a157a6fc7f413e04fb7.png",ed=n.p+"faebdc18a411d624b2d7512c937d9562.png",td=n.p+"43f50d5d6df53dc6bddf56d7ceb257d0.png",nd=n.p+"ebdd87b7a9c033aa8ba806d09f788a6a.png",rd=n.p+"32f2db22e40a7765c151f4d947c2be50.png",id=n.p+"cce181b6d3d5f0588401344325417f95.png",od=n.p+"aa5a588a8abf011f7d4bb0f2a6553b29.png",ad=n.p+"2230ef7bf55ef7a15427c944ca910316.png",sd=n.p+"95f9679c8292cdc2efafbdba8404aa9b.png",cd=n.p+"9edd2ed9ffd78032c85d4a55f6dde79d.png",ud=n.p+"c8308af632973d63f9290de2b9fd4a32.png",ld=n.p+"7b8603e53c2f58ef2a27e64800c94ae7.png",dd=n.p+"0b7a46f07fc079eb5c4d8363ea5b2551.png",pd=n.p+"e442e77891b144a492dcd6e98d450fbb.png",fd=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"square.3.stack.3d",svgPath:"M68.5547 18.0664L106.738-4.10156C110.693-6.39648 112.256-8.20312 112.256-10.8887C112.256-13.5254 110.693-15.332 106.738-17.627L99.0723-22.1191L106.738-26.6113C110.693-28.9062 112.256-30.6641 112.256-33.3496C112.256-36.0352 110.693-37.793 106.738-40.1367L97.7051-45.3613L106.738-50.6348C110.693-52.9297 112.256-54.7363 112.256-57.4219C112.256-60.0586 110.693-61.8652 106.738-64.1602L68.5547-86.3281C66.2109-87.6953 64.3066-88.3301 62.3535-88.3301C60.3516-88.3301 58.4961-87.6953 56.1523-86.3281L17.9199-64.1602C13.9648-61.8652 12.4512-60.0586 12.4512-57.4219C12.4512-54.7363 13.9648-52.9297 17.9199-50.6348L27.002-45.3613L17.9199-40.1367C13.9648-37.793 12.4512-36.0352 12.4512-33.3496C12.4512-30.6641 13.9648-28.9062 17.9199-26.6113L25.6836-22.1191L17.9199-17.627C13.9648-15.332 12.4512-13.5254 12.4512-10.8887C12.4512-8.20312 13.9648-6.39648 17.9199-4.10156L56.1523 18.0664C58.4961 19.4336 60.3516 20.0684 62.3535 20.0684C64.3066 20.0684 66.2109 19.4336 68.5547 18.0664ZM62.3535-34.9609C61.6699-34.9609 60.9863-35.2051 60.1562-35.6445L22.998-56.9336C22.8027-57.0312 22.6562-57.1777 22.6562-57.4219C22.6562-57.6172 22.8027-57.7637 22.998-57.8613L60.1562-79.1504C60.9863-79.5898 61.6699-79.834 62.3535-79.834C63.0371-79.834 63.7207-79.5898 64.502-79.1504L101.66-57.8613C101.904-57.7637 102.051-57.6172 102.051-57.4219C102.051-57.1777 101.904-57.0312 101.66-56.9336L64.502-35.6445C63.7207-35.2051 63.0371-34.9609 62.3535-34.9609ZM62.3535-26.4648C64.3066-26.4648 66.2109-27.0996 68.5547-28.4668L89.6484-40.7227L101.66-33.8379C101.904-33.7402 102.051-33.5938 102.051-33.3496C102.051-33.1055 101.904-33.0078 101.66-32.8613L64.502-11.6211C63.7207-11.1816 63.0371-10.9375 62.3535-10.9375C61.6699-10.9375 60.9863-11.1816 60.1562-11.6211L22.998-32.8613C22.8027-33.0078 22.6562-33.1055 22.6562-33.3496C22.6562-33.5938 22.8027-33.7402 22.998-33.8379L35.0098-40.7227L56.1523-28.4668C58.4961-27.0996 60.3516-26.4648 62.3535-26.4648ZM60.1562 10.8887L22.998-10.4004C22.8027-10.498 22.6562-10.6445 22.6562-10.8887C22.6562-11.084 22.8027-11.2305 22.998-11.3281L33.6914-17.4316L56.1523-4.39453C58.4961-3.02734 60.3516-2.39258 62.3535-2.39258C64.3066-2.39258 66.2109-3.02734 68.5547-4.39453L90.9668-17.4316L101.66-11.3281C101.904-11.2305 102.051-11.084 102.051-10.8887C102.051-10.6445 101.904-10.498 101.66-10.4004L64.502 10.8887C63.7207 11.3281 63.0371 11.5723 62.3535 11.5723C61.6699 11.5723 60.9863 11.3281 60.1562 10.8887Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:71.65510009765626,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.8076171875 110.5966796875",width:99.8076171875,height:110.5966796875,translateX:-12.451162109374991,translateY:90.5283203125,baseline:90.5283203125,capline:20.068359375}}})},hd=["styles"];function md(){return(md=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gd=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,hd);return i.a.createElement("svg",md({viewBox:"0 0 42 42",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"3f9df75022eb1bb4116f771ff663464ea"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"}))),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M30.744.667c3.66 0 4.984.393 6.32 1.108a7.598 7.598 0 013.161 3.16c.715 1.337 1.108 2.66 1.108 6.32v19.49c0 3.66-.393 4.983-1.108 6.32a7.598 7.598 0 01-3.16 3.16c-1.337.715-2.66 1.108-6.32 1.108h-19.49c-3.66 0-4.983-.393-6.32-1.108a7.598 7.598 0 01-3.16-3.16c-.715-1.337-1.108-2.66-1.108-6.32v-19.49c0-3.66.393-4.983 1.108-6.32a7.598 7.598 0 013.16-3.16C6.272 1.06 7.595.667 11.255.667z",stroke:"#D2D2D7",strokeWidth:".667",fill:"#FFF"}),i.a.createElement("path",{d:"M19.346 21.24c.448 0 .843-.209 1.312-.677l9.083-9.01c-.406-.366-1.125-.543-2.135-.543H10.804c-.896 0-1.531.167-1.896.5l9.125 9.053c.458.468.865.677 1.313.677zM7.908 27.542l7.49-7.417-7.48-7.385c-.187.333-.291.885-.291 1.666v11.51c0 .761.094 1.303.281 1.626zm16.052-6.76c.313-.532.802-.949 1.469-1.23.698-.292 2.781-.99 3.281-1.167a3.652 3.652 0 012.136-.125l.187.063v-3.917c0-.76-.104-1.312-.292-1.646l-7.447 7.365.666.656zm6.552 10.5c3.157-1.782 4.427-2.615 4.427-4.772v-4.062c0-.74-.26-1.177-.99-1.49-.624-.26-2.687-.948-3.197-1.145a2.17 2.17 0 00-1.427-.032c-.604.209-2.656.917-3.281 1.177-.73.313-.98.75-.98 1.49v4.062c0 2.157 1.26 3 4.417 4.771.333.188.75.157 1.031 0zm-6.177-1.97c-.541-.78-.812-1.666-.812-2.802v-3.948l-1.354-1.343-.646.635c-.719.698-1.407 1.031-2.177 1.031-.771 0-1.47-.333-2.188-1.03l-.646-.636-7.604 7.552c.406.354 1.136.541 2.146.541h13.281zm5.667.323a.554.554 0 01-.302-.083c-2.354-1.417-3.042-1.781-3.042-3.24v-3.437c0-.302.083-.448.375-.552.27-.099.593-.22.928-.344l.505-.187c.42-.155.82-.302 1.12-.407a1.34 1.34 0 01.416-.083v8.333z",fill:"url(#3f9df75022eb1bb4116f771ff663464ea)",fillRule:"nonzero",transform:"translate(1 1)"})))},vd=["styles"];function yd(){return(yd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var bd,_d,Cd,Id=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,vd);return i.a.createElement("svg",yd({viewBox:"0 0 42 42",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"076b71f2eef45c327c66d400367488f6a"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"}))),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M30.744.667c3.66 0 4.984.393 6.32 1.108a7.598 7.598 0 013.161 3.16c.715 1.337 1.108 2.66 1.108 6.32v19.49c0 3.66-.393 4.983-1.108 6.32a7.598 7.598 0 01-3.16 3.16c-1.337.715-2.66 1.108-6.32 1.108h-19.49c-3.66 0-4.983-.393-6.32-1.108a7.598 7.598 0 01-3.16-3.16c-.715-1.337-1.108-2.66-1.108-6.32v-19.49c0-3.66.393-4.983 1.108-6.32a7.598 7.598 0 013.16-3.16C6.272 1.06 7.595.667 11.255.667z",stroke:"#D2D2D7",strokeWidth:".667",fill:"#FFF"}),i.a.createElement("path",{d:"M30.808 21.406c3.016 0 5.5 2.485 5.5 5.5 0 3.021-2.48 5.505-5.5 5.505-3.016 0-5.5-2.484-5.5-5.505 0-3.015 2.48-5.5 5.5-5.5zm0 7.219c-1.39 0-2.526.51-3.172 1.427.766.844 2.057 1.307 3.172 1.307 1.115 0 2.406-.463 3.172-1.307-.656-.927-1.797-1.427-3.172-1.427zm-8.22-7.406l2.18 2.162a6.936 6.936 0 00-.96 3.525c0 .836.149 1.64.422 2.386H11.473c-.936 0-1.618-.15-2.038-.447l-.108-.085 7.594-7.541.646.646c.729.698 1.417 1.02 2.187 1.02.707 0 1.344-.27 1.998-.854l.18-.166.656-.646zm8.22 2.463c-1.037 0-1.86.917-1.854 1.99 0 1.135.807 2.02 1.854 2.026 1.047.01 1.854-.89 1.854-2.026 0-1.073-.818-1.99-1.854-1.99zM8.348 12.76l7.458 7.365-7.468 7.417c-.167-.287-.26-.747-.278-1.38l-.004-.245v-11.51c0-.772.105-1.324.292-1.647zm22.792.021c.166.287.259.747.278 1.38l.003.245v5.527a6.984 6.984 0 00-5.707 2.187l-2.012-1.995 7.438-7.344zm-3.136-1.76c.936 0 1.618.157 2.038.456l.108.085-9.083 9.021c-.469.459-.865.667-1.313.667-.389 0-.753-.165-1.158-.523l-.154-.144-9.125-9.052c.331-.312.887-.478 1.658-.506l.238-.004h16.791z",fill:"url(#076b71f2eef45c327c66d400367488f6a)",fillRule:"nonzero",transform:"translate(1 1)"})))},wd=function(e){var t=e.className,n=e.iconSize,i=e.symbolSize,o=e.symbolWidth,a=e.symbolHeight,s=e.backgroundColor,c=e.symbol,u=e.ariaLabel,l=e.symbolFillColor,d=(n-(o||i))/2,p=(n-(a||i))/2;return r.createElement("svg",{className:Ts()("squircled-symbol",t),style:{overflow:"visible"},xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 "+n+" "+n,"aria-label":u,"aria-hidden":!u},r.createElement("path",{d:wl,fill:s?"#"+s:"",transform:"scale("+n/100+")",className:"border","data-testid":"border"}),r.createElement("g",null,r.createElement(c,{layoutMode:"glyphBox",x:d,y:p,width:i,height:i,fill:null!=l?l:"#FFF"})))},Ed=function(e){var t=e.appIconSize,n=e.count,i=Math.round(Math.max(.37*t,20)),o=Math.max(.20574*t,11),s=-i/4;return r.createElement("div",{className:"app-icon-badge",style:{top:s+"px",right:T(a())?void 0:s+"px",left:T(a())?s+"px":void 0,height:i,fontSize:o,borderRadius:i,minWidth:i}},r.createElement("span",{className:"number"},n))},Sd=function(e){var t,n,i=Ts()("app-icon",e.className),o=e.iconSize,a=e.isBadgeVisible,s=e.applicationIdentifier,c=null!=(t=null==(n=gl.sharedInstance.getApplicationInfo(s))?void 0:n.applicationName)?t:s,u=function(e){var t=r.useState(null),n=t[0],i=t[1];return r.useEffect((function(){if(e){i(wc.shared.getBadgeCount(e));var t=function(t,n){e===t&&i(n)};return wc.shared.badgeListeners.add(t),function(){wc.shared.badgeListeners.delete(t)}}}),[e]),n}(gl.sharedInstance.getApplicationInfo(s)),l=a&&null!==u&&u>0;switch(e.applicationIdentifier){case"docs":return r.createElement(El,{className:i,size:o,src:Dl,srcSet:Dl+", "+kl+" 2x",testId:s+"-app-icon"});case"backup":return r.createElement("img",{src:ad,srcSet:ad+", "+sd+" 2x, "+cd+" 3x",className:i,key:c,style:{width:o,height:o},"aria-hidden":"true",alt:"","data-testid":s+"-app-icon"});case"messages":return r.createElement("img",{src:ud,srcSet:ud+", "+ld+" 2x",className:i,key:c,style:{width:o,height:o},"aria-hidden":"true",alt:"","data-testid":s+"-app-icon"});case"family":return r.createElement("img",{src:dd,srcSet:dd+", "+pd+" 2x",className:i,key:c,style:{width:o,height:o},"aria-hidden":"true",alt:"","data-testid":s+"-app-icon"});case"appLibrary":return r.createElement(wd,{className:"app-icon",iconSize:o,symbolSize:o/2,backgroundColor:"FFF",symbol:fd,symbolFillColor:"#86868B"});case"hidemyemail":return r.createElement(gd,{width:o,height:o});case"customdomainsettings":return r.createElement(Id,{width:o,height:o})}if("calendar"===c)return r.createElement(Ol,{className:i,iconSize:o,testId:"calendar-app-icon"});var d=function(e){var t,n;switch(e){case"mail":case"mail2":t=Ul,n=Ul+", "+Ll+" 2x, "+Ml+" 3x";break;case"contacts":t=jl,n=jl+", "+Fl+" 2x, "+Bl+" 3x";break;case"photos":case"photos3":t=zl,n=zl+", "+Hl+" 2x, "+Wl+" 3x";break;case"iclouddrive":t=Dl,n=Dl+", "+kl+" 2x";break;case"notes":case"notes3":t=Vl,n=Vl+", "+Zl+" 2x";break;case"reminders":t=ql,n=ql+", "+Kl+" 2x";break;case"reminders2":t=Gl,n=Gl+", "+Yl+" 2x";break;case"pages":t=Ql,n=Ql+", "+Xl+" 2x";break;case"numbers":t=Jl,n=Jl+", "+$l+" 2x";break;case"keynote":t=ed,n=ed+", "+td+" 2x";break;case"newspublisher":t=id,n=id+", "+od+" 2x";break;case"find":case"find-my-iphone":t=nd,n=nd+", "+rd+" 2x";break;default:throw new Error("No icon for application name or identifier: "+e)}return{icon:t,iconSrcSet:n}}(c),p=d.icon,f=d.iconSrcSet;switch(c){case"reminders":case"reminders2":case"notes":case"notes3":case"photos":case"photos3":case"iclouddrive":return r.createElement("div",{className:i},r.createElement(El,{size:o,src:p,srcSet:f,testId:s+"-app-icon"}),l&&r.createElement(Ed,{appIconSize:o,count:u}));default:return r.createElement("div",{className:i},r.createElement("img",{src:p,srcSet:f,key:s,style:{width:o,height:o},"aria-hidden":"true",alt:"","data-testid":s+"-app-icon"}),l&&r.createElement(Ed,{appIconSize:o,count:u}))}},Td=function(e){var t=e.applicationIdentifier,n=e.appDisplayName,i=e.ariaHidden,o=void 0!==i&&i,a=e.disabled,s=void 0!==a&&a,c=e.ariaLabelKey,u=void 0===c?"VoiceOver.AppIconButton.Launcher.Label":c,l=e.showDisplayName,d=e.iconSize,p=e.action,f=e.className,h=e.role,m=Ts()("app-icon-button",f),g=mc(u,{appName:n}),v=function(e,t){var n=document.createElement("canvas").getContext("2d"),r=mc("Ellipsis");n.font="normal 12px SFUIText";var i=0;if("-0.12px".search(/(^-?\d+(\.\d+)?)px$/)>-1&&(i+=parseFloat("-0.12px")),n.measureText(e).width+(e.length-1)*i<=80)return e;for(var o=80-n.measureText(r).width,a=0,s="";n.measureText(s+e[a]).width+(a+1)*i<=o;)s+=e[a],a+=1;return s.trimRight()+r}(n),y=xs();return r.createElement(bc,{ariaHidden:o,className:m,disabled:s,ariaLabel:g,action:p||function(){return y.launchApp(t)},icon:r.createElement(Sd,{applicationIdentifier:t,iconSize:d}),role:h},l&&r.createElement("div",{className:"app-displayname",role:"presentation"},v))},Od=Nn.object({identifier:Nn.literal(il.identifier),uuid:Nn.string()}),Pd=Nn.object({identifier:Nn.literal(Vu.identifier),uuid:Nn.string()}),xd=Nn.object({identifier:Nn.literal(Du.identifier),uuid:Nn.string()}),Ad=Nn.object({identifier:Nn.literal(Xu.identifier),uuid:Nn.string()}),Nd=Nn.object({identifier:Nn.literal(Ou.identifier),uuid:Nn.string()}),Rd=Nn.object({identifier:Nn.literal($u.identifier),uuid:Nn.string()}),Dd=Nn.object({identifier:Nn.literal(tl.identifier),uuid:Nn.string()}),kd=Nn.object({identifier:Nn.literal(Hu.identifier),uuid:Nn.string()}),Ud=Nn.object({identifier:Nn.literal(cl.identifier),uuid:Nn.string()}),Ld=Nn.object({identifier:Nn.literal("appLibrary"),uuid:Nn.string()}),Md=Nn.object({identifier:Nn.literal(Bu.identifier),uuid:Nn.string()}),jd=Nn.object({identifier:Nn.literal(Nu.identifier),uuid:Nn.string()}),Fd=Nn.discriminatedUnion("identifier",[Od,Pd,xd,Ad,Nd,Rd,Dd,kd,Ud,Ld,Md,jd]),Bd=Nn.object({configurations:Nn.array(Fd),defaultOrder:Nn.array(Fd),version:Nn.number()}),zd=Nn.object({url:Nn.string(),method:Nn.string().optional(),requestPayload:Nn.array(Nn.unknown()).optional()});function Hd(e,t,n){var r=function(e){try{var t=Object(he.c)(e);return t.searchParams.delete("clientId"),t.searchParams.delete("clientBuildNumber"),t.searchParams.delete("clientMasteringNumber"),t.href}catch(n){return null}}(e);return r?{url:r,method:t,requestPayload:n}:null}function Wd(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Vd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vd(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Vd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zd(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function qd(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Zd(o,r,i,a,s,"next",e)}function s(e){Zd(o,r,i,a,s,"throw",e)}a(void 0)}))}}!function(e){e[e.REG_ALL=1]="REG_ALL",e[e.REG_PARTIAL=2]="REG_PARTIAL",e[e.REG_ERR_SERVER=3]="REG_ERR_SERVER",e[e.REG_ERR_APP_UNKNOWN=4]="REG_ERR_APP_UNKNOWN",e[e.REG_ERR_APP_BLACKLIST=5]="REG_ERR_APP_BLACKLIST"}(bd||(bd={})),function(e){e[e.UPDATE_OK=0]="UPDATE_OK",e[e.UPDATE_VER_MISMATCH=1]="UPDATE_VER_MISMATCH",e[e.UPDATE_QUOTA_EXCEEDED=2]="UPDATE_QUOTA_EXCEEDED",e[e.UPDATE_READ_ONLY=3]="UPDATE_READ_ONLY",e[e.UPDATE_RESUBMIT=4]="UPDATE_RESUBMIT"}(_d||(_d={})),function(e){e.HTTP_ERROR="HTTP_ERROR",e.KEY_VALUE_SERVICE_ERROR="KEY_VALUE_SERVICE_ERROR",e.KEY_REGISTRY_ERROR="KEY_REGISTRY_ERROR",e.KEY_VALUE_SERVICE_NO_RESPONSE="KEY_VALUE_SERVICE_NO_RESPONSE",e.KEY_VALUE_SERVICE_EMPTY_RESPONSE="KEY_VALUE_SERVICE_EMPTY_RESPONSE",e.KEY_VALUE_SERVICE_KEY_NOT_FOUND="KEY_VALUE_SERVICE_KEY_NOT_FOUND",e.KEY_VALUE_SERVICE_UPDATE_FAILED="KEY_VALUE_SERVICE_UPDATE_FAILED"}(Cd||(Cd={}));var Kd=Nn.object({"app-id":Nn.string(),"registry-version":Nn.string(),"registry-status":Nn.number(),keys:Nn.object({name:Nn.string(),data:Nn.unknown()}).array()}),Gd=Nn.object({"app-id":Nn.string(),"registry-version":Nn.string(),"registry-status":Nn.number(),keys:Nn.object({name:Nn.string(),data:Nn.unknown(),"update-status":Nn.number()}).array()}),Yd=Nn.object({status:Nn.number(),timestamp:Nn.number(),apps:Kd.array()});function Qd(e){return Yd.safeParse(e).success}var Xd=Nn.object({status:Nn.number(),apps:Gd.array()});function Jd(e){return Xd.safeParse(e).success}function $d(e){return ep.apply(this,arguments)}function ep(){return(ep=qd(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new Set(t),r=[],i=regeneratorRuntime.mark((function e(){var t,i,o,a,s,c,u,l,d,p,f,h,m,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n.forEach((function(e){return t.push({"app-id":e,"registry-version":""})})),i=JSON.stringify({"service-id":"appleprefs",apps:t}),o=jn("keyvalue","json/sync"),e.next=6,es.fetchURL(o,{method:"POST",body:i});case 6:if(null!=(a=e.sent)&&a.ok){e.next=9;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.HTTP_ERROR,errorInfo:status}}});case 9:return e.next=11,qd(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 11:if(s=e.sent){e.next=14;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_NO_RESPONSE}}});case 14:if(Qd(s)){e.next=16;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_EMPTY_RESPONSE}}});case 16:if(0===s.status){e.next=18;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_ERROR,errorInfo:s.status}}});case 18:c=Wd(s.apps);case 19:if((u=c()).done){e.next=29;break}if(l=u.value,(d=l["registry-status"])===bd.REG_ALL){e.next=24;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_REGISTRY_ERROR,errorInfo:d}}});case 24:if(p=l["app-id"],n.has(p)){e.next=27;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_KEY_NOT_FOUND,errorInfo:p}}});case 27:e.next=19;break;case 29:for(f=Wd(s.apps);!(h=f()).done;)m=h.value,g=m["app-id"],n.delete(g),r.push(m);if(0!==n.size){e.next=32;break}return e.abrupt("return",{v:{isOK:!0,data:r}});case 32:case"end":return e.stop()}}),e)}));case 3:return e.delegateYield(i(),"t0",5);case 5:if("object"!==typeof(o=e.t0)){e.next=8;break}return e.abrupt("return",o.v);case 8:e.next=3;break;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tp(e){return np.apply(this,arguments)}function np(){return(np=qd(regeneratorRuntime.mark((function e(t){var n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],r=2,i=function(e){for(var n,r=Wd(t);!(n=r()).done;){var i=n.value;if(e===i["app-id"])return i}return null},o=regeneratorRuntime.mark((function e(){var o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,_,C;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=JSON.stringify({"service-id":"appleprefs",apps:t}),e.next=3,es.fetchURL(jn("keyvalue","json/sync"),{method:"POST",body:o});case 3:if(null!=(a=e.sent)&&a.ok){e.next=6;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.HTTP_ERROR,errorInfo:status}}});case 6:return e.next=8,qd(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 8:if(s=e.sent){e.next=11;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_NO_RESPONSE}}});case 11:if(Jd(s)){e.next=13;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_EMPTY_RESPONSE}}});case 13:if(0===s.status){e.next=15;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_ERROR,errorInfo:s.status}}});case 15:if(!(s.apps.length<1)){e.next=17;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_UPDATE_FAILED,errorInfo:{appsCount:0}}}});case 17:c=Wd(s.apps);case 18:if((u=c()).done){e.next=39;break}if(l=u.value,d=l.keys,(p=l["registry-status"])===bd.REG_PARTIAL||p===bd.REG_ALL){e.next=24;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_REGISTRY_ERROR,errorInfo:p}}});case 24:if(f=l["app-id"],i(f)){e.next=27;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_KEY_NOT_FOUND,errorInfo:f}}});case 27:h=Wd(d);case 28:if((m=h()).done){e.next=37;break}g=m.value,v=g["update-status"],e.t0=v,e.next=e.t0===_d.UPDATE_QUOTA_EXCEEDED||e.t0===_d.UPDATE_READ_ONLY?34:35;break;case 34:return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_UPDATE_FAILED,errorInfo:v}}});case 35:e.next=28;break;case 37:e.next=18;break;case 39:for(y=[],b=function(){var e=C.value,t=function(){for(var t,n=Wd(e.keys);!(t=n()).done;)switch(t.value["update-status"]){case _d.UPDATE_VER_MISMATCH:case _d.UPDATE_RESUBMIT:return!0}return!1}(),r=i(e["app-id"]);t?r&&(r["registry-version"]=e["registry-version"],y.push(r)):r&&n.push({keys:r.keys.slice(),"app-id":e["app-id"],"registry-version":e["registry-version"]})},_=Wd(s.apps);!(C=_()).done;)b();if(0!==y.length){e.next=44;break}return e.abrupt("return",{v:{isOK:!0,data:n}});case 44:if(0!==r){e.next=46;break}return e.abrupt("return",{v:{isOK:!1,error:{error:Cd.KEY_VALUE_SERVICE_UPDATE_FAILED}}});case 46:t=[].concat(y),y.length=0,r--;case 49:case"end":return e.stop()}}),e)}));case 4:return e.delegateYield(o(),"t0",6);case 6:if("object"!==typeof(a=e.t0)){e.next=9;break}return e.abrupt("return",a.v);case 9:e.next=4;break;case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rp(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return ip(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ip(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function op(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function ap(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){op(o,r,i,a,s,"next",e)}function s(e){op(o,r,i,a,s,"throw",e)}a(void 0)}))}}var sp,cp=Nn.object({locale:Nn.string().optional(),secondaryLocale:Nn.string().nullable().optional(),regionFormat:Nn.string().optional(),startupUrls:Nn.record(Nn.string().nullable()).optional(),timeZone:Nn.string().optional(),HMEandCEDPromotionBannerDismissed:Nn.boolean().optional(),tilesConfigurations:Bd.optional(),seenOnboardingVersion:Nn.number().optional()});!function(e){e[e.NONE=0]="NONE",e[e.APP_SWITCHER_MENU=1]="APP_SWITCHER_MENU"}(sp||(sp={}));var up=new(function(){function e(){var e=this;this.delegate=null,this.preferencesStore={},this.registry=[],this.registryVersions={},this.isReady=void 0,this.isReadyResolve=void 0,this.isAppPreferencesReady=void 0,this.isAppPreferencesReadyResolve=void 0,this.isReady=new Promise((function(t){e.isReadyResolve=t})),this.isAppPreferencesReady=new Promise((function(t){e.isAppPreferencesReadyResolve=t}))}var t=e.prototype;return t.initialize=function(){var e=ap(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$d(["account"]);case 2:return(n=e.sent).isOK&&this.preferencesDidUpdate(n.data),null==(t=this.isReadyResolve)||t.call(this),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.initializeAppPreferences=function(){var e=ap(regeneratorRuntime.mark((function e(){var t,n,r,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>0&&void 0!==i[0]?i[0]:[],e.next=3,$d([].concat(n));case 3:(r=e.sent).isOK&&this.preferencesDidUpdate(r.data),null==(t=this.isAppPreferencesReadyResolve)||t.call(this,r);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.getPreferences=function(e){var t,n;return null!=(t=null==(n=this.preferencesStore)?void 0:n[e])?t:null},t.setPreferences=function(e,t){var n=[],r=[];for(var i in t)r.push({name:i,data:t[i]});return n.push({"app-id":e,"registry-version":this.registryVersions[e],keys:r}),this.setRawPreferences(n)},t.preferencesDidUpdate=function(e){var t;this.updateDataInPlace(e),null==(t=this.delegate)||t.preferencesDidUpdate()},t.updateDataInPlace=function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=rp(t);!(e=n()).done;){for(var r,i=e.value,o=!1,a=rp(this.registry);!(r=a()).done;){var s=r.value;if(i["app-id"]===s["app-id"]){s["registry-version"]=i["registry-version"],s.keys=i.keys,o=!0;break}}o||this.registry.push(i),this.registryVersions[i["app-id"]]=i["registry-version"]}for(var c,u={},l=rp(t);!(c=l()).done;){for(var d,p=c.value,f={},h=rp(p.keys);!(d=h()).done;){var m=d.value;f[m.name]=m.data}u[p["app-id"]]=f}for(var g in u)this.preferencesStore[g]=u[g]},t.getAccountPreferences=function(){var e,t=this.getPreferences("account");return e=t,cp.safeParse(e).success?(t.timeZone||(t.timeZone="US/Pacific"),t.regionFormat||(t.regionFormat="en-us"),t):null},t.setAccountPreferences=function(e){return this.setPreferences("account",Object.assign({},e))},t.getStartupInfoForApp=function(e){var t=this.getAccountPreferences();if(!t)return null;var n=t.startupUrls;if(!n)return null;var r,i=n[e];if(!i)return null;try{var o=JSON.parse(i);return r=o,zd.safeParse(r).success?o:null}catch(a){return i?Hd(i):null}},t.setStartupInfoForApp=function(e,t){var n,r,i=null!=(n=this.getAccountPreferences())?n:{},o=null!=(r=i.startupUrls)?r:{};return o[e]=t?JSON.stringify({url:t.url,method:t.method,requestPayload:t.requestPayload}):null,i.startupUrls=o,this.setAccountPreferences(i)},t.clearStartupInfoForApp=function(e){return this.setStartupInfoForApp(e,null)},t.invalidate=function(){this.registry=[],this.registryVersions={},this.preferencesStore={},this.preferencesDidUpdate([])},t.setRawPreferences=function(){var e=ap(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tp(t);case 2:return(n=e.sent).isOK&&(this.updateDataInPlace(n.data),null==(r=this.delegate)||r.preferencesDidUpdate()),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),e}()),lp=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,o)}),n)}},dp=lp((function(e){up.setAccountPreferences(e)}),2e3);function pp(e,t){var n,r,i=up.getAccountPreferences();e?(null!=(n=i)&&n.tilesConfigurations?(i.tilesConfigurations.configurations=e,t&&(i.tilesConfigurations.defaultOrder=t)):i=Object.assign({},i,{tilesConfigurations:{configurations:e,defaultOrder:null!=t?t:[],version:2}}),dp(i)):null!=(r=i)&&r.tilesConfigurations&&(delete i.tilesConfigurations,up.setAccountPreferences(i))}var fp,hp=["operationLabel"],mp=r.createContext({configurations:void 0,maxTiles:21}),gp=r.createContext((function(){}));function vp(e,t){return"appLibrary"===e.identifier||e.identifier===Bu.identifier||e.identifier===Nu.identifier||-1!==t.indexOf(e.identifier)}function yp(e){var t=r.useReducer(Cp,void 0,(function(){try{if(window.localStorage.getItem("iCloud.User.Tiles.Customization.ForceRun"))return;return function(){var e,t,n,r=up.getAccountPreferences(),i=null==r||null==(e=r.tilesConfigurations)?void 0:e.version;if(!(i&&i<2)){var o=Up(),a=!1,s=!1,c=null==r||null==(t=r.tilesConfigurations)?void 0:t.configurations.filter((function(e){var t=vp(e,o);return t||(a=!0),t})),u=null==r||null==(n=r.tilesConfigurations)?void 0:n.defaultOrder.filter((function(e){var t=vp(e,o);return t||(s=!0),t}));return(a||s)&&c&&pp(c,u),c}pp(void 0)}()}catch(e){return}})),n=t[0],i=t[1];return r.createElement(mp.Provider,{value:{configurations:n,maxTiles:21}},r.createElement(gp.Provider,{value:i},e.children))}function bp(){var e=r.useContext(mp);if(void 0===e)throw new Error("useTileConfigurationStore must be used within a TileConfigurationStoreProvider");return e}function _p(){var e=r.useContext(gp);if(void 0===e)throw new Error("useTileConfigurationStoreDispatch must be used within a TileConfigurationStoreProvider");return e}function Cp(e,t){switch(t.type){case fp.SET:var n=[].concat(t.configurations);return pp(n,t.defaultOrder),n;case fp.DELETE:if(!e||!wp(e,t.index)||e.length<=1)return e;var r=[].concat(e);return Ip({operationLabel:"delete-tile",tileName:r[t.index].identifier,tileIndex:t.index}),r.splice(t.index,1),pp(r,void 0),r;case fp.MOVE:var i=t.fromIndex,o=t.toIndex;if(!e||!wp(e,i)||!wp(e,o)||i===o)return e;var a=[].concat(e),s=a[i];return a.splice(i,1),a.splice(o,0,s),Ip({operationLabel:"move-tile",tileName:a[t.toIndex].identifier,tileIndex:t.toIndex,previousTileIndex:t.fromIndex}),pp(a,void 0),a;case fp.INSERT:if(!e||(d=e,!((p=t.index)>=0&&p<=d.length))||e.length>=21)return e;var c=[].concat(e.slice(0,t.index),[t.configuration],e.slice(t.index));return Ip({operationLabel:"insert-tile",tileName:t.configuration.identifier,tileIndex:t.index}),pp(c,void 0),c;case fp.UPDATE:if(!e||!wp(e,t.index))return e;var u=e[t.index].identifier,l=[].concat(e.slice(0,t.index),[t.configuration],e.slice(t.index+1));return Ip({operationLabel:"update-tile",tileName:t.configuration.identifier,previousTileName:u,tileIndex:t.index}),pp(l,void 0),l;default:throw new Error("Reached unexpected case in exhaustive check")}var d,p}function Ip(e){var t=e.operationLabel,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,hp);ur.withEventAndLabel("workflow",t,Object.assign({statCategory:B.USER},n)).record()}function wp(e,t){return t>=0&&t<e.length}!function(e){e.SET="SET",e.UPDATE="UPDATE",e.DELETE="DELETE",e.INSERT="INSERT",e.MOVE="MOVE"}(fp||(fp={}));var Ep=r.createContext({scope:[],currentBaseline:[]}),Sp=function(e){var t=e.scope,n=e.children,i=e.baseline,o=r.useContext(Ep);if(void 0===t)throw new Error("TelemetryProvider requires a scope to be provided");if(t.includes("."))throw new Error("A TelemetryProvider scope cannot contain the '.' character.");var a=r.useRef(Op(t,o));r.useMemo((function(){fr.sharedInstance.mark(a.current)}),[]);var s=r.useRef([].concat(o.scope,[t])),c=r.useMemo((function(){return{scope:s.current,currentBaseline:i||0===o.currentBaseline.length?s.current:o.currentBaseline}}),[i,o.currentBaseline]);return r.createElement(Ep.Provider,{value:c},n)},Tp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"load",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{measureFromBaseline:!1},i=r.useContext(Ep);if(void 0===i)throw new Error("useTelemetry must be used within a TelemetryProvider");void 0===n.baselineName&&(n.baselineName=Pp(i));var o=Ap(e,n.baselineName,n.measureFromBaseline,t),a=r.useRef(o(!0)),s=r.useRef(o(!1));return[a.current,s.current]},Op=function(e,t){return[].concat(t.scope,[e]).join(".")},Pp=function(e){return[].concat(e.currentBaseline).join(".")};function xp(e){return null==e?void 0:e.replace(/ +/g,"-").toLowerCase()}var Ap=function(e,t,n,r){var i=_r.applicationName,o=r?e+"_"+xp(r):e;return function(e){return function(r,a){fr.sharedInstance.mark(o,{baselineName:t,applicationName:i,measureFromBaseline:n,contextLabel:xp(r),success:e,additionalProperties:a})}}};function Np(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Rp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dp(e){switch(e){case lu.APPLICATION_INFO_SPECIFIED_IS_HIDDEN:case lu.NO_SUPPORTED_APPLICATION_INFO_DOMAIN:case lu.APPLICATION_INFO_DOES_NOT_SUPPORT_LITE_ACCOUNT_TYPE:case lu.APPLICATION_INFO_DOES_NOT_SUPPORT_MAID_ACCOUNT_TYPE:case lu.APPLICATION_INFO_DOES_NOT_SUPPORT_MAKO_ACCOUNT_TYPE:case void 0:return!0;default:return!1}}var kp=[il.identifier,Vu.identifier,Du.identifier,Xu.identifier,Ou.identifier,$u.identifier,tl.identifier,cl.identifier,Hu.identifier];function Up(){for(var e,t=[],n=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Rp(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rp(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(kp);!(e=n()).done;){var r=e.value,i=gl.sharedInstance.getApplicationConfiguration(r);i&&i.applicationInfo.supportsTile&&(i.isHidden&&Dp(i.reasonConfigurationIsHidden)||t.push(r))}return t}function Lp(){var e=r.useState(Up()),t=e[0],n=e[1];return r.useEffect((function(){var e=function(){return n(Up())};return gl.sharedInstance.appConfigurationObservers.add(e),function(){gl.sharedInstance.appConfigurationObservers.delete(e)}}),[]),t}function Mp(e,t){return kp.findIndex((function(t){return t===e}))-kp.findIndex((function(e){return e===t}))}var jp,Fp,Bp,zp=n(685),Hp=(n(687),n(688),n(689),function(){return(Hp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)}),Wp=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};!function(e){e[e.ESCAPE=0]="ESCAPE",e[e.MOUSE_UP=1]="MOUSE_UP"}(jp||(jp={})),function(e){e[e.IN=0]="IN",e[e.OUT=1]="OUT",e[e.IN_AND_OUT=2]="IN_AND_OUT",e[e.NONE=3]="NONE"}(Fp||(Fp={})),function(e){e.IN="in",e.OUT="out",e.NOT="not"}(Bp||(Bp={}));var Vp,Zp=function(e){var t=e.children,n=e.allowNesting,o=void 0!==n&&n,a=Object(r.useContext)(af);return Object(r.useRef)(!!a).current&&!o?i.a.createElement(i.a.Fragment,null,t):i.a.createElement(Jp,null,t)};function qp(){return Kp(of.Modal)}function Kp(e){var t=Object(r.useContext)(af);sf(t,e===of.Dismissible?"useShowPane":"useShowModalPane");var n=Object(r.useState)((function(){return rf()}))[0],o=i.a.useCallback((function(e){t({type:Vp.HidePane,key:n,transitionOptions:e})}),[t,n]),a=Object(r.useRef)((function(r,i){var a=r({hidePane:o});s.current=void 0!==(null===i||void 0===i?void 0:i.unmountWithPresenter)?null===i||void 0===i?void 0:i.unmountWithPresenter:void 0!==(null===i||void 0===i?void 0:i.unmountWithParent)&&(null===i||void 0===i?void 0:i.unmountWithParent);var c=Hp({onRequestClose:function(){return o()}},i);t({type:Vp.ShowPane,key:n,paneType:(null===i||void 0===i?void 0:i.paneType)||e,pane:a,options:c})})),s=Object(r.useRef)(!1);return Object(r.useLayoutEffect)((function(){return function(){!0===s.current&&o()}}),[t,n,o]),a.current}function Gp(e,t){return function(e,t,n){var i=Object(r.useContext)(af);sf(i,tf(t));var o=Object(r.useState)((function(){return rf()}))[0],a=Object(r.useCallback)((function(e){l({transitionOptions:e})}),[]),s=Object(r.useCallback)((function(e){i({type:Vp.HidePane,transitionOptions:e,key:o})}),[i,o]),c=Object(r.useState)(),u=c[0],l=c[1];Object(r.useLayoutEffect)((function(){if(u){var r=Hp({},n);r.onRequestClose||(r.onRequestClose=function(){return s()}),i(Hp(Hp({},u),{type:Vp.ShowPane,pane:e,paneType:t,key:o,options:r})),l(void 0)}else i({type:Vp.UpdatePane,pane:e,key:o,options:n||{}})}),[n,i,e,t,o,s,u]);var d=void 0!==(null===n||void 0===n?void 0:n.unmountWithPresenter)?null===n||void 0===n?void 0:n.unmountWithPresenter:void 0===(null===n||void 0===n?void 0:n.unmountWithParent)||(null===n||void 0===n?void 0:n.unmountWithParent),p=Object(r.useRef)(d);return Object(r.useLayoutEffect)((function(){p.current=d}),[d]),Object(r.useLayoutEffect)((function(){return function(){p.current&&i({type:Vp.HidePane,key:o})}}),[i,o]),[a,s]}(e,(null===t||void 0===t?void 0:t.paneType)||of.Dismissible,t)}!function(e){e.ShowPane="showpane",e.UpdatePane="updatepane",e.HidePane="hidepane",e.AnimatedIn="animatedin",e.AnimatedOut="animatedout"}(Vp||(Vp={}));var Yp=function(e,t){switch(t.type){case Vp.ShowPane:var n=t.pane,r=t.key,i=t.paneType,o=t.options,a=t.transitionOptions,s=Bp.IN;return o.animates!==Fp.NONE&&o.animates!==Fp.OUT&&!1!==(null===a||void 0===a?void 0:a.animate)||(s=Bp.NOT),Xp(f={pane:n,key:r,type:i,onRequestClose:o.onRequestClose,animates:Fp.IN_AND_OUT,animating:s},o),-1!==(d=(h=Wp(e)).findIndex((function(e){return e.key===r})))?h[d]=f:h.push(f),h;case Vp.UpdatePane:var c=t.key,u=t.pane,l=t.options;return Qp(e,c,(function(e){var t=Hp(Hp({},e),{pane:u});return Xp(t,l),t}));case Vp.HidePane:var d,p=t.key;if(a=t.transitionOptions,-1===(d=e.findIndex((function(e){return e.key===p}))))return e;var f,h,m=(f=e[d]).animates===Fp.IN_AND_OUT||f.animates===Fp.OUT,g=!a||a.animate;return m&&g?((h=Wp(e))[d]=Hp(Hp({},f),{animating:Bp.OUT}),h):((h=Wp(e)).splice(d,1),h);case Vp.AnimatedIn:return Qp(e,c=t.key,(function(e){return Hp(Hp({},e),{animating:Bp.NOT})}));case Vp.AnimatedOut:var v=t.key;return e.filter((function(e){return e.key!==v}))}};function Qp(e,t,n){var r=e.findIndex((function(e){return e.key===t}));if(-1===r)return e;var i=e.slice();return i.splice(r,1,n(e[r])),i}function Xp(e,t){void 0!==t.animates&&(e.animates=t.animates),t.initialFocus&&(e.initialFocus=t.initialFocus),t.onClose&&(e.onClose=t.onClose),t.onRequestClose&&(e.onRequestClose=t.onRequestClose),e.dir=t.dir,e.classNameFromOptions=t.className,e.ariaClosePaneDescription=t.ariaClosePaneDescription,e.onKeyDownOption=t.onKeyDown,e.hasVisibleBackdropOption=t.__spi__hasVisibleBackdrop,e.hasMenuBehavior=t.__spi__hasMenuBehavior}var Jp=function(e){var t=e.children,n=Object(r.useReducer)(Yp,[]),o=n[0],a=n[1],s=Object(r.useRef)(o);s.current=o;var c=Object(r.useState)((function(){return function(e){(e.type!==Vp.UpdatePane||s.current.find((function(t){return t.key===e.key})))&&a(e)}}))[0],u=Object(r.useRef)(o);Object(r.useEffect)((function(){u.current.forEach((function(e){e.onClose&&!o.find((function(t){return t.key===e.key}))&&e.onClose()})),u.current=o}),[o]);for(var l=o.length-1,d=-1,p=!1,f=l;f>=0;f--)if((m=o[f]).type===of.Modal||m.hasVisibleBackdropOption){d=f,m.animating===Bp.OUT&&(p=!0);break}var h=-1;for(f=d-1;f>=0;f--){var m;if((m=o[f]).type===of.Modal||m.hasVisibleBackdropOption){h=f;break}}function g(e){a({type:Vp.AnimatedIn,key:e})}function v(e){a({type:Vp.AnimatedOut,key:e})}var y=Object(r.useRef)(null),b=o.length>0;return Object(r.useLayoutEffect)((function(){var e,t,n=null!==(t=null===(e=y.current)||void 0===e?void 0:e.ownerDocument)&&void 0!==t?t:window.document;n.getElementsByTagName("ui-pane").length?(n.body.classList.add("ui-pane-container-has-open-panes"),n.body.classList.add("ui-pane-provider-has-open-panes")):(n.body.classList.remove("ui-pane-container-has-open-panes"),n.body.classList.remove("ui-pane-provider-has-open-panes"))}),[b]),i.a.createElement(af.Provider,{value:c},i.a.createElement("ui-main-pane",{inert:l<0?void 0:"",ref:y},t),o.map((function(e,t){return i.a.createElement($p,{key:e.key,paneFinishedAnimatingIn:g,paneFinishedAnimatingOut:v,paneDef:e,isTopPane:t>=l,isTopVisibleBackdropPane:t===d,isBecomingTopVisibleBackdropPaneAgain:t===h&&p})})))};function $p(e){var t,n=e.paneDef,o=e.paneFinishedAnimatingIn,a=e.paneFinishedAnimatingOut,s=e.isTopPane,c=e.isTopVisibleBackdropPane,u=e.isBecomingTopVisibleBackdropPaneAgain,l=n.pane,d=n.key,p=n.type,f=n.animating,h=void 0===f?Bp.NOT:f,m=n.onRequestClose,g=n.classNameFromOptions,v=n.ariaClosePaneDescription,y=n.onKeyDownOption,b=n.hasVisibleBackdropOption,_=n.hasMenuBehavior,C=n.dir,I=Object(r.useRef)(null),w=Object(r.useRef)(null),E=Object(r.useContext)(af),S=function(e){E({type:Vp.HidePane,key:d,transitionOptions:e})};function T(e){return e===I.current||e.parentElement===I.current}h===Bp.IN?t=function(e){T(e.target)&&(P(),o(d))}:h===Bp.OUT&&(t=function(e){T(e.target)&&(P(),a(d))});var O=Object(r.useRef)();function P(){void 0!==O.current&&(window.clearTimeout(O.current),O.current=void 0)}Object(r.useEffect)((function(){return h!==Bp.NOT&&(O.current=window.setTimeout((function(){console.error(function(e,t){var n=tf(e);return n+" animate-"+t+" 2.5s timeout:\n- If your pane doesn\u2019t have any animation (or doesn\u2019t animate "+t+"), you must call "+n+" with `{ animates: PaneAnimates.NONE }` (or `{ animates: PaneAnimates."+(t===Bp.IN?"OUT":"IN")+" }`).\n- If your pane has an animation, it must be on the `ui-pane` element or the outermost element of its content.\nFor more, see the \u201cAnimating Panes\u201d section in the `UIPaneContainer` docs."}(n.type,h))}),2500)),P}),[h,n.type]);var x=Object(r.useRef)(n.initialFocus),A=Object(r.useRef)(document.activeElement);Object(r.useEffect)((function(){var e,t=x.current;if(t instanceof HTMLElement)e=t;else if("function"===typeof t)e=t();else if("object"===typeof t&&"current"in t)e=t.current;else if("string"===typeof t){var n=document.querySelector(t);n instanceof HTMLElement&&(e=n)}e||(e=I.current),e.focus({preventScroll:!0}),"INPUT"===e.tagName&&e.select&&e.select();var r=A.current;return function(){setTimeout((function(){document.activeElement===document.body&&r&&document.body.contains(r)&&r instanceof HTMLElement&&r.focus({preventScroll:!0})}),0)}}),[]);var N=p===of.Dismissible,R=p===of.Modal,D=v;v||(D="Close pane");var k=null!==b&&void 0!==b?b:R,U=s&&R,L=u&&R;return i.a.createElement(i.a.Fragment,null,i.a.createElement("ui-pane-backdrop",{ref:w,dir:C,role:N?"button":void 0,"aria-label":N?D:void 0,class:Ts()(ef(p),k?"is-visible":null,s?"top":null,U?"top-modal":null,c?"top-visible":null,u?"becoming-top-visible-again":null,L?"becoming-top-modal-again":null,h===Bp.IN?"is-opening":null,h===Bp.OUT?"is-closing":null,g),onMouseUp:function(){_&&p===of.Dismissible&&m(jp.MOUSE_UP,S)},onMouseDown:function(e){p===of.Dismissible?m(jp.MOUSE_UP,S):e.preventDefault()}}),i.a.createElement("ui-pane",{ref:I,dir:C,class:Ts()(ef(p),h===Bp.IN?"is-opening":null,h===Bp.OUT?"is-closing":null,g),inert:s?void 0:"true",tabindex:-1,"aria-modal":p===of.Modal,onKeyDown:function(e){switch(y&&y(e),e.key){case"Escape":p===of.Dismissible&&m(jp.ESCAPE,S)}},onTransitionEnd:t,onAnimationEnd:t},l))}function ef(e){switch(e){case of.Modal:return"modal";case of.Dismissible:return"dismissible dismissable"}}function tf(e){switch(e){case of.Dismissible:return"usePane";case of.Modal:return"useModalPane"}}var nf=0;function rf(){return nf++}var of,af=i.a.createContext(void 0);function sf(e,t){if(!e)throw new Error("`"+t+"` must be called from within a `UIPaneContainer`.")}!function(e){e.Modal="Modal",e.Dismissible="dismissible"}(of||(of={}));var cf,uf=function(){return(uf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},lf=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"xmark",svgPath:"M13.7207 2.24609C15.4297 3.90625 18.2617 3.90625 19.9219 2.24609L51.1719-29.0039L82.4219 2.24609C84.082 3.90625 86.9629 3.95508 88.623 2.24609C90.2832 0.537109 90.2832-2.24609 88.623-3.90625L57.373-35.2051L88.623-66.4551C90.2832-68.1152 90.332-70.9473 88.623-72.6074C86.9141-74.3164 84.082-74.3164 82.4219-72.6074L51.1719-41.3574L19.9219-72.6074C18.2617-74.3164 15.3809-74.3652 13.7207-72.6074C12.0605-70.8984 12.0605-68.1152 13.7207-66.4551L44.9707-35.2051L13.7207-3.90625C12.0605-2.24609 12.0117 0.585938 13.7207 2.24609Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:82.83503906250007,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 77.4356689453125 77.479248046875",width:77.4356689453125,height:77.479248046875,translateX:-12.457197265624927,translateY:73.9696044921875,baseline:73.9696044921875,capline:3.5096435546875}}})};function df(){return(df=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pf(e,t){var n=t.menuProps,o=t.cardProps,a=o.title,s=o.titleId,c=void 0===s?"card-title":s,u=o.className,l=o.closeAriaLabel,d=o.onKeyDown,p=o.onClose,f=r.useRef(null),h=mc("VoiceOver.Menu.Close"),m=function(e,t){void 0===t&&(t={});var n=t.variant,r=t.ariaLabelledBy,o=t.ariaDescribedBy,a=t.ariaLabel,s=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(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(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}(t,["variant","ariaLabelledBy","ariaDescribedBy","ariaLabel"]);return Gp(i.a.createElement("ui-card",{role:"dialog","aria-labelledby":r,"aria-describedby":o,"aria-label":a},e),uf(uf({},s),{paneType:s.paneType||of.Modal,className:Ts()("for-ui-card",s.className,n||"standard")}))}(r.createElement(r.Fragment,null,r.createElement("header",{className:"compact-menu-header"},r.createElement(Wc,{onActivate:function(){return v()},className:"close-button",ariaLabel:null!=l?l:h},r.createElement(lf,{layoutMode:"glyphBox",desiredFontSize:12})),a&&r.createElement("div",{className:"header-title",id:c},a)),r.createElement(e,df({},n,{onClose:function(){return v()},ref:Object(zp.a)(f,null==n?void 0:n.ref)}))),{paneType:of.Dismissible,ariaLabelledBy:a&&c,className:u,onKeyDown:d,onClose:p}),g=m[0],v=m[1];return[g,v]}n(682),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right",e[e.None=4]="None"}(cf||(cf={}));var ff=function(){return(ff=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},hf={sidePreference:[yf,vf,_f,bf],inset:{left:7,right:7,top:7,bottom:7},anchorMargin:4};function mf(e){var t,n=(t=e.sidePreference,function(e,n,r,i,o){if(0===t.length)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};for(var a=new Array(t.length),s=0;s<t.length;s++){var c=(0,t[s])(e,n,r,i,o);if(a[s]=c,void 0!==c.contentRect&&void 0!==c.arrowRect&&e&&e.width===c.contentRect.width&&e.height===c.contentRect.height)return c}var u=a[0],l=u.contentRect?u.contentRect.width*u.contentRect.height:0;for(s=1;s<a.length;s++){var d=(c=a[s]).contentRect?c.contentRect.width*c.contentRect.height:0;d>l&&(l=d,u=c)}return 0===l?function(e,t,n,r){if(void 0===e||void 0===t)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var i=Of(r.left+r.width/2-e.width/2,r),o=Sf(i+e.width,r)-i,a=Of(r.top+r.height/2-e.height/2,r),s=wf(a+e.height,r)-a;return{contentRect:{top:a,left:i,right:Pf(i,o,r),bottom:xf(a,s,r),width:o,height:s},arrowRect:{top:0,left:0,right:Pf(0,t.width,r),bottom:xf(0,t.height,r),width:t.width,height:t.height},arrowDirection:cf.None}}(e,n,0,i):u});return function(t,r,i,o,a){return n(t,r,Cf(i,function(e){if("number"===typeof e)return-e;var t,n=ff({},e);for(t in n){var r=n[t];"number"===typeof r&&(n[t]=-r)}return n}(e.anchorMargin)),Cf(o,e.inset),a)}}var gf={left:bf,right:_f,inlineStart:function(e,t,n,r,i){return"rtl"===i?_f(e,t,n,r):bf(e,t,n,r)},inlineEnd:function(e,t,n,r,i){return"rtl"===i?bf(e,t,n,r):_f(e,t,n,r)},above:yf,below:vf};function vf(e,t,n,r){if(void 0===e||void 0===t)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var i=Af(e,t,n,r),o=i[0],a=i[1];if(void 0===o||void 0===a)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var s=Tf(n.top+n.height,r),c=wf(s+t.height,r),u=wf(c+e.height,r)-c;return{contentRect:{left:o.left,right:o.right,width:o.width,top:c,height:u,bottom:xf(c,u,r)},arrowRect:{left:a.left,right:a.right,width:a.width,top:s,height:t.height,bottom:xf(s,t.height,r)},arrowDirection:cf.Up}}function yf(e,t,n,r){if(void 0===e||void 0===t)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var i=Af(e,t,n,r),o=i[0],a=i[1];if(void 0===o||void 0===a)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var s=Tf(n.top,r),c=If(s-t.height,r),u=c,l=If(u-e.height,r),d=u-l;return{contentRect:{left:o.left,right:o.right,width:o.width,top:l,height:d,bottom:xf(l,d,r)},arrowRect:{left:a.left,right:a.right,width:a.width,top:c,height:t.height,bottom:xf(c,t.height,r)},arrowDirection:cf.Down}}function bf(e,t,n,r){if(void 0===e||void 0===t)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var i=Nf(e,t,n,r),o=i[0],a=i[1];if(void 0===o||void 0===a)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var s=Of(n.left,r),c=Ef(s-t.height,r),u=c,l=Ef(u-e.width,r),d=u-l;return{contentRect:{top:o.top,bottom:o.bottom,height:o.height,left:l,width:d,right:Pf(l,d,r)},arrowRect:{top:a.top,bottom:a.bottom,height:a.height,left:c,width:t.width,right:Pf(c,t.width,r)},arrowDirection:cf.Right}}function _f(e,t,n,r){if(void 0===e||void 0===t)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var i=Nf(e,t,n,r),o=i[0],a=i[1];if(void 0===o||void 0===a)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var s=Of(n.left+n.width,r),c=Sf(s+t.height,r),u=Sf(c+e.width,r)-c;return{contentRect:{top:o.top,bottom:o.bottom,height:o.height,left:c,width:u,right:Pf(c,u,r)},arrowRect:{top:a.top,bottom:a.bottom,height:a.height,left:s,width:t.width,right:Pf(s,t.width,r)},arrowDirection:cf.Left}}function Cf(e,t){var n,r,i,o;return"number"===typeof t?n=r=i=o=t:(n=t.left||0,r=t.right||0,i=t.top||0,o=t.bottom||0),{width:e.width-n-r,height:e.height-i-o,left:e.left+n,right:e.right+r,top:e.top+i,bottom:e.bottom+o}}var If=function(e,t){return Math.max(e,t.top)},wf=function(e,t){return Math.min(e,t.top+t.height)},Ef=function(e,t){return Math.max(e,t.left)},Sf=function(e,t){return Math.min(e,t.left+t.width)},Tf=function(e,t){return wf(If(e,t),t)},Of=function(e,t){return Sf(Ef(e,t),t)},Pf=function(e,t,n){return n.left+n.right+n.width-(e+t)},xf=function(e,t,n){return n.top+n.bottom+n.height-(e+t)};function Af(e,t,n,r){var i=Of(n.left+n.width/2,r),o=Ef(i-e.width/2,r),a=Sf(o+e.width,r);a-o<e.width&&(o=Ef(a-e.width,r));var s=a-o,c={left:o,right:Pf(o,s,r),width:s},u=i-t.width/2;u+t.width>a&&(u=a-t.width),u<o&&(u=o);var l=u+t.width/2;return l-4<n.left||l+4>n.left+n.width?[void 0,void 0]:[c,{width:t.width,left:u,right:Pf(u,t.width,r)}]}function Nf(e,t,n,r){var i=Tf(n.top+n.height/2,r),o=If(i-e.height/2,r),a=wf(o+e.height,r);a-o<e.height&&(o=If(a-e.height,r));var s=a-o,c={top:o,bottom:xf(o,s,r),height:s},u=i-t.width/2;u+t.width>a&&(u=a-t.width),u<o&&(u=o);var l=u+t.width/2;return l-4<n.top||l+4>n.top+n.height?[void 0,void 0]:[c,{height:t.height,top:u,bottom:xf(u,t.height,r)}]}n(690);var Rf=["styles"];function Df(){return(Df=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var kf=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Rf);return i.a.createElement("svg",Df({className:n.icon||"icon",width:"32",height:"13",fill:"#fff",xmlns:"http://www.w3.org/2000/svg"},r),i.a.createElement("path",{className:n.arrow||"arrow",d:"M0-.5h32v1c-1.835 0-3.582.754-4.805 2.072l-7.873 8.492c-1.775 1.915-4.869 1.915-6.644 0L4.805 2.572A6.554 6.554 0 000 .5v-1z",strokeOpacity:".1",stroke:"#000",fill:"inherit"}))},Uf=["styles"];function Lf(){return(Lf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Mf,jf=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Uf);return i.a.createElement("svg",Lf({className:n.icon||"icon",width:"32",height:"13",fill:"#fff",xmlns:"http://www.w3.org/2000/svg"},r),i.a.createElement("path",{className:n.arrow||"arrow",d:"M-.5-1.5h32V.221l-.164.15-11.645 10.57c-1.126.98-2.395 1.559-3.657 1.559a5.025 5.025 0 01-3.695-1.595l-7.89-8.492C3.319 1.196 1.7.5 0 .5h-.5v-2z",strokeOpacity:".1",stroke:"#000",fill:"inherit"}))},Ff=function(){return(Ff=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Bf=i.a.forwardRef((function(e,t){var n,o,a,s=e.arrowAsset||i.a.createElement(kf,null),c=e.cornerArrowAsset||i.a.createElement(jf,null),u=Object(r.useRef)(null),l=Object(r.useState)(),d=l[0],p=l[1],f=Object(r.useState)(),h=f[0],m=f[1],g=e.remeasureToken,v=Object(r.useRef)(g),y=g!==v.current?void 0:d;Object(r.useLayoutEffect)((function(){v.current=g;var e=u.current,t=e.getBoundingClientRect(),n=t.width,r=t.height,i=getComputedStyle(e).direction;p({width:n,height:r}),m(i)}),[g]);var b=Object(r.useState)(),_=b[0],C=b[1];Object(r.useLayoutEffect)((function(){var e=getComputedStyle(u.current),t=parseFloat(e.getPropertyValue("border-bottom-left-radius"));isNaN(t)||t<1.5||C(t)}),[]);var I=Object(r.useRef)(null),w=Object(r.useState)(),E=w[0],S=w[1];Object(r.useLayoutEffect)((function(){var e=I.current.getBoundingClientRect(),t=e.width,n=e.height;S({width:t,height:n})}),[]);var T,O=e.anchorRef;e.anchorRect?T=e.anchorRect:O&&null!=O.current&&(T=O.current.getBoundingClientRect());var P,x,A,N=function(e){var t=Object(r.useState)({width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=function(){i({width:e.documentElement.clientWidth,height:e.documentElement.clientHeight})},n=e.defaultView;if(n)return n.addEventListener("resize",t),function(){n.removeEventListener("resize",t)}}),[e]),n}(null!==(a=null===(o=null===O||void 0===O?void 0:O.current)||void 0===o?void 0:o.ownerDocument)&&void 0!==a?a:window.document),R={width:N.width,height:N.height,top:0,left:0,bottom:0,right:0};if(void 0===y||void 0===T)P=Wf,A=cf.None;else{var D=(e.positioner?e.positioner:Hf)(y,E,T,R,h);P=D.contentRect||Wf,x=D.arrowRect,A=D.arrowDirection}var k,U,L,M,j,F=P,B={top:0,left:0},z={top:0,left:0},H=s;if(null!=P&&null!=x&&Vf(P)){var W=P,V=A===cf.Up,Z=A===cf.Down,q=A===cf.Left,K=A===cf.Right,G=A===cf.None;K?k="arrow-direction-right":q?k="arrow-direction-left":Z?k="arrow-direction-down":V?k="arrow-direction-up":G&&(k="arrow-hidden"),F={width:V||Z||G?W.width:W.width+x.height,height:q||K||G?W.height:W.height+x.height},z={width:x.width,height:x.height},B={width:W.width,height:W.height};var Y=e.pinPosition||Mf.TopLeft;if(G)Y===Mf.TopLeft||Y===Mf.TopRight?F.top=W.top:Y!==Mf.BottomLeft&&Y!==Mf.BottomRight||(F.bottom=W.bottom),Y===Mf.TopLeft||Y===Mf.BottomLeft?F.left=W.left:Y!==Mf.TopRight&&Y!==Mf.BottomRight||(F.right=W.right);else{Y===Mf.TopLeft||Y===Mf.TopRight?(F.top=Math.min(x.top,W.top),z.top=x.top-F.top,B.top=W.top-F.top):Y!==Mf.BottomLeft&&Y!==Mf.BottomRight||(F.bottom=Math.min(x.bottom,W.bottom),z.bottom=x.bottom-F.bottom,B.bottom=W.bottom-F.bottom),Y===Mf.TopLeft||Y===Mf.BottomLeft?(F.left=Math.min(x.left,W.left),z.left=x.left-F.left,B.left=W.left-F.left):Y!==Mf.TopRight&&Y!==Mf.BottomRight||(F.right=Math.min(x.right,W.right),z.right=x.right-F.right,B.right=W.right-F.right);var Q=0;null!=z.left?V||Z?Q=z.left+x.width/2:q?Q=z.left:K&&(Q=z.left+x.height):null!=z.right&&null!=F.width&&(V||Z?Q=F.width-z.right-x.width/2:q?Q=F.width-z.right-x.height:K&&(Q=F.width-z.right));var X=0;null!=z.top?q||K?X=z.top+x.width/2:V?X=z.top:Z&&(X=z.top+x.height):null!=z.bottom&&null!=F.height&&(q||K?X=F.height-(z.bottom+x.width/2):V?X=F.height-z.bottom-x.height:Z&&(X=F.height-z.bottom)),L=Math.round(Q)+"px "+Math.round(X)+"px";var J=void 0!==_?_-1.5:0,$=void 0,ee=void 0,te=void 0,ne=void 0;if(V||Z?($=x.left,ee=x.width,te=W.left,ne=W.width):(q||K)&&($=x.top,ee=x.width,te=W.top,ne=W.height),void 0!==$&&void 0!==ee&&void 0!==te&&void 0!==ne){var re=$-te,ie=te+ne-($+ee);re<J?M=Math.max(0,re)+1.5:ie<J&&(M=Math.max(0,ie)+1.5),(re<J||ie<J)&&(V&&re<J||q&&re<J?(j="borderTopLeftRadius",U="arrow-position-top-left"):Z&&re<J||q&&ie<J?(j="borderBottomLeftRadius",U="arrow-position-bottom-left"):Z&&ie<J||K&&ie<J?(j="borderBottomRightRadius",U="arrow-position-bottom-right"):(V&&ie<J||K&&re<J)&&(j="borderTopRightRadius",U="arrow-position-top-right"),H=c)}}}var oe=e.style?e.style:{};return oe=Ff(Ff(Ff({},oe),Zf(B)),{boxSizing:"border-box"}),j&&(oe=Ff(Ff({},oe),((n={})[j]=M,n))),i.a.createElement("ui-popover",{ref:t,class:Ts()(e.variant||"standard",k,U,Vf(P)?void 0:"is-measuring",e.className),style:Ff(Ff(Ff({maxWidth:R.width,transformOrigin:L},Zf(F)),e.outerWrapperStyle||{}),{position:"fixed"})},i.a.createElement("ui-popover-content",{ref:u,style:oe},e.children),i.a.createElement("ui-popover-arrow",{ref:I,style:Zf(z)},H))}));Bf.displayName="UIPopover",function(e){e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomRight=2]="BottomRight",e[e.BottomLeft=3]="BottomLeft"}(Mf||(Mf={}));var zf,Hf=mf(hf),Wf={top:-9999,left:-9999};function Vf(e){return"width"in e&&"height"in e}function Zf(e){var t=Ff({},e);return void 0!==t.left&&(t.left=Math.round(t.left)),void 0!==t.top&&(t.top=Math.round(t.top)),void 0!==t.right&&(t.right=Math.round(t.right)),void 0!==t.bottom&&(t.bottom=Math.round(t.bottom)),t}function qf(){return vl(wZ.sharedInstance.cloudOSUser,wZ.sharedInstance.cloudOSUserObservers,Kf)}function Kf(e){return{cloudOSUserDidChange:function(){e(wZ.sharedInstance.cloudOSUser)}}}function Gf(){var e,t=qf(),n=r.useState(null!=(e=null==t?void 0:t.details)?e:null),i=n[0],o=n[1];return r.useEffect((function(){var e;o(null!=(e=null==t?void 0:t.details)?e:null)}),[t]),r.useEffect((function(){if(t){var e={authenticatedUserDidChange:function(){var e;o(null!=(e=null==t?void 0:t.details)?e:null)}};return t.authenticatedUserObservers.add(e),function(){t.authenticatedUserObservers.delete(e)}}}),[t]),r.useDebugValue(i),i}function Yf(){var e=Gf();if(e){if(ga(e))return zf.Plus;if(ma(e))return zf.Lite}return zf.Standard}function Qf(){return Yf()===zf.Plus}!function(e){e.Lite="lite",e.Standard="standard",e.Plus="plus"}(zf||(zf={}));var Xf=function(e,t,n,i,o,a,s){var c=Kc()===f.COMPACT,u=r.useCallback((function(){c?(e(),s.current=n):(i(),s.current=a)}),[c,e,i,n,a,s]);return r.useLayoutEffect((function(){var e;(null==(e=s.current)?void 0:e.current)&&(a.current&&o(),n.current&&t(),u())}),[u,o,t,n,a,s]),u},Jf=["appIconAriaLabelLocKey","currentApplicationIdentifier","action","onClose"];function $f(){return($f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eh(e){var t=e.currentApplicationIdentifier,n=e.buttonRef,i=e.labelLocKey,o=e.action,a=e.appIconAriaLabelLocKey,s=e.onClose,c=r.useRef(null),u=r.useRef(null),l=r.useRef(null),d=r.useCallback((function(e){var t,n,r,i=null==(t=l.current)?void 0:t.current,o=Array.from(null!=(n=null==i?void 0:i.children)?n:[]),a=o.length-1;if(0!==o.length){var s=o.findIndex((function(e){return e===document.activeElement})),c=0;switch(e.key){case"ArrowDown":c=1;break;case"ArrowUp":c=-1}var u=s+c;u<0&&(u=a),u>a&&(u=0),o[u].hasAttribute("disabled")&&(u+=c),null==(r=o[u])||r.focus()}}),[]),p=mc(i),f=mc("HomePage.CustomizeDashboard.TilePicker.Close.AriaLabel"),h=Gp(r.createElement(Bf,{anchorRef:n,className:"widget-picker"},r.createElement("h2",{id:"widget-picker-label"},p),r.createElement(th,{action:o,currentApplicationIdentifier:t,onClose:function(){return g()},"aria-labelledby":"widget-picker-label",appIconAriaLabelLocKey:a,ref:c})),{ariaClosePaneDescription:f,className:"widget-picker-pane",initialFocus:"[role=label]",onKeyDown:d,onClose:s}),m=h[0],g=h[1],v=pf(th,{menuProps:{action:o,currentApplicationIdentifier:t,"aria-labelledby":"widget-picker-label",appIconAriaLabelLocKey:a,ref:u},cardProps:{closeAriaLabel:f,title:p,titleId:"widget-picker-label",onKeyDown:d,onClose:s}}),y=v[0],b=v[1];return Xf(y,b,u,m,g,c,l)}var th=r.forwardRef((function(e,t){var n=e.appIconAriaLabelLocKey,i=e.currentApplicationIdentifier,o=e.action,a=e.onClose,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,Jf),c=Lp(),u=Qf(),l=(Ne.sharedInstance.isDomainCN?[Bu]:[Bu,Nu]).map((function(e){return{applicationIdentifier:e.identifier,displayName:bu(e)}})),d=r.useMemo((function(){var e={applicationIdentifier:"appLibrary",displayName:gc("AppLibraryHomeTile.Heading")};return u?[].concat(l,[e]):[e]}),[u,l]),p=r.useMemo((function(){return c.map((function(e){var t=gl.sharedInstance.getApplicationConfiguration(e);return{applicationIdentifier:e,displayName:t?bu(t):""}})).concat(d)}),[c,d]).map((function(e){var t=e.applicationIdentifier,s=e.displayName,c=i===t;return r.createElement(Td,{iconSize:60,action:function(){o(t),a()},className:c?"current-app":"",applicationIdentifier:t,appDisplayName:s,key:t,showDisplayName:!0,ariaLabelKey:n,disabled:c,role:"menuitem"})}));return r.createElement("div",$f({role:"menu",className:"widget-picker-container",tabIndex:-1,ref:t},s),p)})),nh=function(e){var t=e.applicationIdentifier,n=e.className,i=e.heading,o=e.index,a=r.useRef(null),s=mc("Tile.Edit"),c=mc("VoiceOver.Tile.EditAriaLabel",{tileName:i}),u=_p(),l=eh({currentApplicationIdentifier:t,buttonRef:a,labelLocKey:"HomePage.CustomizeDashboard.TilePicker.Label",action:function(e){u({type:fp.UPDATE,configuration:{identifier:e,uuid:Np()},index:o})},appIconAriaLabelLocKey:"VoiceOver.AppIconButton.TilePicker.Label"});return r.createElement(Wc,{className:Ts()("widget-picker","dropdown-button",n),onActivate:l,ref:a,ariaLabel:c,ariaHasPopup:"menu"},s)},rh=n(695),ih=n(698);function oh(){return i.a.createElement("ui-alert-actions-divider",{"aria-hidden":"true"})}n(697);var ah=i.a.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.id,a=e.mode,s=e.style,c=e.variant,u=function(e){return i.a.Children.map(e,(function(e,t){var n=e.props.variant;return n?e:(n=0===t?"push primary":"push secondary",i.a.cloneElement(e,{variant:n}))}))}(function(e){var t=0,n=[];if(i.a.Children.forEach(e,(function(e){if(r=e,!Object(ih.a)(r)||r.type!==Wc)throw new Error("UIAlertActions must be rendered with only UIButtons for children.");var r;n.push(e),t++})),t<1)throw new Error("UIAlertActions may not be rendered empty. Please provide at least one UIButton.");if(t>3)throw new Error("UIAlertActions may not be rendered with more than three buttons.");return n}(n)),l=u[0],d=u.length>1?u[1]:null,p=u.length>2?u[2]:null,f=i.a.createElement(i.a.Fragment,null,p,i.a.createElement("div",null,d,d?i.a.createElement(oh,null):null,l)),h=i.a.createElement(i.a.Fragment,null,i.a.createElement(oh,null),l,d?i.a.createElement(oh,null):null,d,p?i.a.createElement(oh,null):null,p);return i.a.createElement("ui-alert-actions",{class:Ts()(c||"standard",r,a),id:o,ref:t,style:s},"compact"===a?h:f)}));ah.displayName="UIAlertActions",n(694);var sh=function(){return(sh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ch(e,t){return void 0===t&&(t={}),Gp(i.a.createElement(lh,{options:t},e),dh(t))}function uh(){var e=Kp(of.Dismissible);return function(t,n){return void 0===n&&(n={}),e((function(e){var r=e.hidePane,o=t({hidePopup:r});return i.a.createElement(lh,{options:n},o)}),dh(n))}}function lh(e){var t,n=e.children,r=e.options,o=Object(rh.d)();return i.a.createElement("ui-popup",{role:null!==(t=r.ariaRole)&&void 0!==t?t:"dialog","aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,"aria-label":r.ariaLabel,tabindex:-1,class:o},n)}function dh(e){return sh(sh({initialFocus:"ui-popup",__spi__hasVisibleBackdrop:!0},e),{paneType:e.paneType||of.Modal,className:Ts()("for-ui-popup",e.className,e.variant||"standard")})}n(693);var ph=["styles"];function fh(){return(fh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var hh=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,ph);return i.a.createElement("svg",fh({width:"66",height:"61",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M7.8 61h50.4c4.7 0 7.8-3.517 7.8-7.839 0-1.306-.4-2.612-1.1-3.818L39.7 3.919C38.3 1.306 35.6 0 33 0c-2.6 0-5.3 1.306-6.7 3.92L1 49.342c-.7 1.206-1 2.512-1 3.818C0 57.483 3 61 7.8 61z",fill:"#FCD330"}),i.a.createElement("path",{d:"M33 38.7c-1.7 0-2.6-1-2.7-2.7l-.4-15.8c-.1-1.7 1.3-3 3.1-3s3.2 1.3 3.1 3L35.6 36c0 1.8-1 2.7-2.6 2.7zM33 50.6c-1.9 0-3.6-1.5-3.6-3.5s1.7-3.5 3.6-3.5c1.9 0 3.6 1.5 3.6 3.5s-1.7 3.5-3.6 3.5z"}))},mh=function(){return(mh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function gh(){var e=uh();return function(t){var n,r=function(e,t,n){var r,o,a,s,c=e.buttons,u=e.defaultAction,l=e.cancelAction,d=t+"-label",p=t+"-description";if(yh(c))o=void 0,a=void 0,s=void 0;else{var f=c[0];void 0===l?(a=f.action,s=f.title):(a=l,s=null===(r=c.find((function(e){return e.action===a})))||void 0===r?void 0:r.title),o=void 0===u?f.destructive?a:f.action:u}function h(t){var r;null!==t&&(void 0!==t&&(null===(r=e.onActionSelected)||void 0===r||r.call(e,t)),n())}return{jsx:i.a.createElement(vh,{options:e,hidePane:n,ariaLabelledById:d,ariaDescribedById:p,_defaultAction:o,_cancelAction:a}),popupOptions:mh(mh({ariaClosePaneDescription:s},e),{onKeyDown:function(e){switch(e.key){case"Enter":h(o);break;case"Escape":h(a)}},ariaRole:e.ariaRole||"alertdialog",variant:e.variant||"standard",className:Ts()("for-ui-alert",c.length>2?"has-tertiary-button":null,e.className),ariaLabelledBy:d,ariaDescribedBy:p})}}(t,"ui-alert-"+bh++,(function(){return n()})),o=r.jsx,a=r.popupOptions;return e((function(e){var t=e.hidePopup;return n=t,o}),a)}}function vh(e){var t,n,r=e.options,o=r.title,a=r.buttons,s=r.description,c=r.icon,u=r.accessory,l=r.onActionSelected,d=Object(rh.d)();if(yh(a)){var p=a[0];t=[i.a.createElement(Wc,{key:"0",onActivate:function(){return e.hidePane()},variant:"push primary"},p)]}else{var f=a;if("compact"===d){var h=a.find((function(t){return t.action===e._cancelAction}));h&&(f=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}(a.filter((function(e){return e!==h})),[h]))}t=f.map((function(t,n){var r=e._defaultAction===t.action;return i.a.createElement(Wc,{key:n,onActivate:function(){null===l||void 0===l||l(t.action),e.hidePane()},destructive:t.destructive,ariaLabel:t.ariaLabel,variant:r?"push primary":"push secondary"},t.title)}))}return n=null===c?null:c||i.a.createElement(hh,null),i.a.createElement(i.a.Fragment,null,i.a.createElement("ui-alert-icon",null,n),i.a.createElement("ui-alert-content",null,i.a.createElement("h1",{id:e.ariaLabelledById,className:"title"},o),i.a.createElement("p",{id:e.ariaDescribedById,className:"description"},s),u),i.a.createElement(ah,{mode:d},t))}function yh(e){return 1===e.length&&"string"===typeof e[0]}var bh=0;var _h=["styles"];function Ch(){return(Ch=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ih=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,_h);return i.a.createElement("svg",Ch({width:"46",height:"46",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{fill:"#1D1D1F",d:"M20.195 0c-.784 0-1.422.638-1.422 1.422 0 .785.638 1.422 1.422 1.422.784 0 1.422-.637 1.422-1.422C21.617.638 20.98 0 20.195 0m5.312 2.805A1.426 1.426 0 0027.25 1.8c.099-.367.047-.75-.142-1.08A1.417 1.417 0 0025.165.2a1.423 1.423 0 00.342 2.605m-10.09-1.153a1.408 1.408 0 00-1.08-.142 1.413 1.413 0 00-.863.663c-.19.328-.24.712-.142 1.078.099.368.334.674.663.864a1.413 1.413 0 001.08.142 1.423 1.423 0 00.342-2.605m15.232 2.49a1.42 1.42 0 002.084-1.6 1.413 1.413 0 00-.662-.863 1.409 1.409 0 00-1.079-.142 1.416 1.416 0 00-.864.662c-.19.33-.24.713-.142 1.08.099.367.334.674.663.863M9.414 7.089a1.42 1.42 0 001.08-.142 1.423 1.423 0 10-1.944-.52c.19.329.497.564.864.662m26.86.091c.365 0 .73-.139 1.006-.415a1.425 1.425 0 000-2.013 1.425 1.425 0 00-2.011 0 1.422 1.422 0 001.006 2.428M5.758 11.147c.364 0 .729-.139 1.005-.415a1.425 1.425 0 000-2.013 1.425 1.425 0 00-2.01 0 1.422 1.422 0 001.006 2.428m34.527.057a1.413 1.413 0 001.371-1.054c.098-.368.048-.75-.142-1.079a1.413 1.413 0 00-.864-.662c-.368-.1-.75-.049-1.078.141-.33.19-.564.497-.663.864a1.423 1.423 0 001.376 1.79M2.2 15.873a1.424 1.424 0 001.943-.522 1.424 1.424 0 00-1.601-2.084 1.417 1.417 0 00-.863.662 1.41 1.41 0 00-.142 1.08c.099.366.334.674.663.864m39.543-.799a1.425 1.425 0 001.741 1.005 1.423 1.423 0 001.007-1.741 1.425 1.425 0 00-2.606-.344c-.19.33-.24.713-.142 1.08m-40.68 6.424a1.42 1.42 0 10.736-2.747 1.426 1.426 0 00-1.74 1.006c-.1.367-.05.75.14 1.079.19.329.497.564.865.662m42.092-1.303c0 .784.638 1.422 1.422 1.422.785 0 1.422-.638 1.422-1.422 0-.784-.637-1.422-1.422-1.422-.784 0-1.422.638-1.422 1.422m-40.312 5.61c0-.784-.638-1.422-1.422-1.422-.784 0-1.422.638-1.422 1.422 0 .784.638 1.422 1.422 1.422.784 0 1.422-.638 1.422-1.422m42.093-1.303a1.428 1.428 0 00-1.742 1.005 1.425 1.425 0 001.373 1.79 1.425 1.425 0 001.233-2.133 1.415 1.415 0 00-.864-.662m-40.68 6.424a1.413 1.413 0 00-.662-.863 1.41 1.41 0 00-1.08-.142 1.414 1.414 0 00-.863.662c-.19.329-.24.713-.142 1.08.097.366.334.673.662.863a1.413 1.413 0 001.08.142 1.41 1.41 0 00.863-.663c.19-.328.24-.712.142-1.079m39.544-.798a1.41 1.41 0 00-1.08-.142 1.414 1.414 0 00-.863.663c-.19.328-.24.711-.143 1.079a1.416 1.416 0 001.372 1.054 1.431 1.431 0 001.234-.711c.19-.329.24-.713.142-1.08a1.413 1.413 0 00-.662-.863M6.084 34.845a1.419 1.419 0 00-1.6 2.085 1.423 1.423 0 101.6-2.085m33.152.424a1.412 1.412 0 00-.416 1.005c0 .38.147.738.416 1.006.277.278.641.416 1.006.416a1.418 1.418 0 001.422-1.422c0-.38-.148-.737-.417-1.005-.537-.537-1.474-.54-2.01 0M8.72 39.235a1.413 1.413 0 00-.418 1.006c0 .38.149.738.418 1.006a1.419 1.419 0 002.011-.001 1.424 1.424 0 000-2.01c-.538-.538-1.474-.538-2.011 0m27.865-.325a1.414 1.414 0 00-1.08.142 1.417 1.417 0 00-.519 1.943 1.417 1.417 0 001.943.52 1.425 1.425 0 00.52-1.943 1.415 1.415 0 00-.864-.662m-21.234 2.947a1.41 1.41 0 00-1.08-.142 1.414 1.414 0 00-.863.663c-.19.328-.24.711-.143 1.078a1.416 1.416 0 001.372 1.055 1.431 1.431 0 001.234-.711c.19-.33.24-.713.142-1.08a1.413 1.413 0 00-.662-.863m16.653.027a1.408 1.408 0 00-1.078-.142 1.413 1.413 0 00-.864.662c-.19.33-.24.713-.142 1.08.097.367.334.673.662.863a1.413 1.413 0 001.08.142 1.41 1.41 0 00.863-.663c.19-.328.24-.712.142-1.078a1.413 1.413 0 00-.663-.864m-11.512 1.31a1.426 1.426 0 00-1.742 1.005 1.425 1.425 0 001.373 1.79c.628 0 1.205-.419 1.375-1.054a1.424 1.424 0 00-1.006-1.741m5.312-.04c-.784 0-1.422.64-1.422 1.423 0 .784.638 1.422 1.422 1.422.784 0 1.422-.638 1.422-1.422 0-.784-.638-1.422-1.422-1.422m-2.87-37.02c.272 0 .536-.09.754-.261a1.225 1.225 0 00.212-1.728 1.223 1.223 0 00-.82-.463 1.21 1.21 0 00-.907.251c-.26.203-.424.494-.464.82-.04.327.05.649.252.908a1.223 1.223 0 00.972.473m3.527-1.097a1.242 1.242 0 00.686 1.615 1.243 1.243 0 001.607-1.635 1.242 1.242 0 00-2.293.02m-8.22 1.772a1.234 1.234 0 00.992-.494c.2-.264.284-.59.238-.919a1.23 1.23 0 00-.481-.819 1.232 1.232 0 00-.92-.237 1.236 1.236 0 00-1.056 1.402c.087.62.62 1.067 1.228 1.067m13.575-.758a1.237 1.237 0 00-.818.482 1.244 1.244 0 00.988 1.988 1.235 1.235 0 00.994-.495 1.237 1.237 0 00-.244-1.737 1.242 1.242 0 00-.92-.238M13.892 8.65a1.244 1.244 0 001.14-1.726 1.243 1.243 0 00-1.626-.656c-.63.267-.924.997-.658 1.626.2.473.661.756 1.144.756m21.716 2.712a1.227 1.227 0 00.915-.254 1.243 1.243 0 00-.614-2.208 1.225 1.225 0 00-.915.253 1.231 1.231 0 00-.467.827c-.04.33.05.654.254.915.204.26.498.427.827.467m-25.294-2.28a1.22 1.22 0 00-.915.253 1.23 1.23 0 00-.468.827c-.04.329.05.654.254.914a1.23 1.23 0 00.98.477 1.243 1.243 0 00.148-2.472m27.207 5.263a1.24 1.24 0 001.626.658c.63-.269.925-.998.658-1.628-.13-.305-.37-.54-.678-.665a1.229 1.229 0 00-.95.009c-.304.129-.54.369-.665.676-.124.307-.12.645.009.95m2.98 5.108a1.242 1.242 0 001.23-1.413 1.247 1.247 0 00-1.401-1.057h-.001a1.243 1.243 0 00-1.056 1.402c.087.619.62 1.068 1.228 1.068m-34.964.25a1.246 1.246 0 001.15-.778 1.242 1.242 0 00-.685-1.615 1.241 1.241 0 10-.465 2.392m36.781 3.38c.04-.325-.05-.648-.252-.906a1.225 1.225 0 00-.82-.465 1.21 1.21 0 00-.907.251 1.227 1.227 0 00-.212 1.728 1.225 1.225 0 00.971.474 1.226 1.226 0 001.22-1.082m-38.634-.026c-.04.326.05.649.252.907a1.225 1.225 0 00.97.474c.613 0 1.145-.457 1.222-1.08v-.001a1.233 1.233 0 00-1.98-1.12 1.23 1.23 0 00-.464.82m36.419 5.675a1.243 1.243 0 001.607-1.635 1.227 1.227 0 00-.678-.665 1.225 1.225 0 00-.95.009c-.304.129-.54.369-.664.677-.124.307-.121.645.008.95.13.304.37.541.677.664m-34.5.34a1.242 1.242 0 001.23-1.413 1.245 1.245 0 00-1.402-1.058 1.235 1.235 0 00-.818.482 1.243 1.243 0 00.99 1.988m34.18 3.636c.41-.546.3-1.326-.244-1.738a1.244 1.244 0 00-1.739.244c-.2.265-.284.591-.238.92.046.328.218.618.482.817a1.234 1.234 0 00.92.239c.328-.046.618-.217.818-.482m-31.19-.06a1.226 1.226 0 00-.008-.948 1.227 1.227 0 00-.677-.666 1.236 1.236 0 00-1.615.685c-.124.307-.121.644.009.95a1.231 1.231 0 001.141.756c.165 0 .33-.033.484-.1.306-.129.543-.369.667-.676m27.197 4.312a1.227 1.227 0 00.915-.254 1.243 1.243 0 00-.613-2.208 1.243 1.243 0 00-.302 2.462m-25.294-2.28a1.243 1.243 0 00-1.129 1.995 1.23 1.23 0 00.98.476 1.243 1.243 0 00.148-2.472m21.234 2.81c-.63.268-.925.998-.658 1.627a1.242 1.242 0 001.628.658 1.241 1.241 0 00-.97-2.284M14.11 39.999a1.233 1.233 0 00.994-.495c.2-.264.284-.59.238-.918a1.231 1.231 0 00-.482-.818 1.25 1.25 0 00-.92-.239 1.23 1.23 0 00-.817.482c-.2.266-.284.592-.238.92.045.328.217.62.482.819.217.164.476.25.743.25m13.577-.76a1.23 1.23 0 00-.817.483 1.23 1.23 0 00-.239.918c.047.33.217.62.483.819a1.228 1.228 0 00.918.237 1.237 1.237 0 00.575-2.218c-.265-.2-.59-.285-.92-.238M19.641 41a1.243 1.243 0 00-.685-1.616 1.242 1.242 0 10-.467 2.392c.491 0 .958-.294 1.152-.776m3.714-1.128a1.23 1.23 0 10-.301 2.443 1.23 1.23 0 00.301-2.443M6.322 13.335c-.2.264-.284.59-.238.92.046.327.218.617.482.817a1.234 1.234 0 00.92.238c.328-.046.618-.217.818-.482.411-.547.301-1.326-.245-1.737a1.242 1.242 0 00-1.737.244m18.146 3.918c-.445.233-.865.35-1.262.35-.081 0-.16-.007-.234-.02a1.327 1.327 0 01-.037-.316c0-.446.098-.88.294-1.304.195-.422.417-.772.665-1.052a3.881 3.881 0 011.193-.93c.478-.249.933-.383 1.368-.401.025.105.037.223.037.354 0 .447-.086.883-.26 1.308a4.483 4.483 0 01-.661 1.132c-.292.353-.66.646-1.103.88m2.299.581c.264.025.563.09.894.196.332.106.672.276 1.02.512s.667.565.96.988l-.327.237c-.192.14-.41.342-.652.61a3.763 3.763 0 00-.633 1.015c-.18.41-.27.894-.27 1.452 0 .646.115 1.194.344 1.644.23.45.496.812.797 1.085.301.273.571.473.81.6l.377.201c0 .018-.042.148-.126.391a9.928 9.928 0 01-.386.917c-.173.37-.4.76-.68 1.169-.249.353-.506.695-.773 1.024-.266.33-.557.6-.87.81a1.867 1.867 0 01-1.067.317c-.397 0-.722-.06-.978-.177a27.72 27.72 0 00-.786-.349c-.27-.116-.632-.172-1.085-.172-.447 0-.818.058-1.113.176-.295.118-.576.238-.843.36-.267.12-.58.18-.94.18-.546 0-1.026-.217-1.438-.65a14.553 14.553 0 01-1.272-1.565 9.66 9.66 0 01-.917-1.663 11.15 11.15 0 01-.656-2.002 9.442 9.442 0 01-.243-2.118c0-1.125.213-2.072.638-2.84.426-.77.973-1.353 1.643-1.747.672-.395 1.366-.591 2.087-.591.384 0 .746.061 1.085.186.338.124.653.25.945.377.291.127.561.191.81.191.223 0 .49-.066.8-.2.31-.133.657-.267 1.039-.401.381-.133.79-.2 1.224-.2.124 0 .318.013.582.037",fillRule:"evenodd"}))};function wh(){var e=gh();return function(t){e(Object.assign({icon:r.createElement(Ih,null)},t,{variant:"modern"}))}}n(691),n(692);var Eh,Sh=[];!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Eh||(Eh={}));var Th,Oh=function(e){return Object.freeze(e)},Ph=function(e,t){this.inlineSize=e,this.blockSize=t,Oh(this)},xh=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Oh(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Ah=function(e){return e instanceof SVGElement&&"getBBox"in e},Nh=function(e){if(Ah(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},Rh=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null===e||void 0===e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Dh="undefined"!==typeof window?window:{},kh=new WeakMap,Uh=/auto|scroll/,Lh=/^tb|vertical/,Mh=/msie|trident/i.test(Dh.navigator&&Dh.navigator.userAgent),jh=function(e){return parseFloat(e||"0")},Fh=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Ph((n?t:e)||0,(n?e:t)||0)},Bh=Oh({devicePixelContentBoxSize:Fh(),borderBoxSize:Fh(),contentBoxSize:Fh(),contentRect:new xh(0,0,0,0)}),zh=function(e,t){if(void 0===t&&(t=!1),kh.has(e)&&!t)return kh.get(e);if(Nh(e))return kh.set(e,Bh),Bh;var n=getComputedStyle(e),r=Ah(e)&&e.ownerSVGElement&&e.getBBox(),i=!Mh&&"border-box"===n.boxSizing,o=Lh.test(n.writingMode||""),a=!r&&Uh.test(n.overflowY||""),s=!r&&Uh.test(n.overflowX||""),c=r?0:jh(n.paddingTop),u=r?0:jh(n.paddingRight),l=r?0:jh(n.paddingBottom),d=r?0:jh(n.paddingLeft),p=r?0:jh(n.borderTopWidth),f=r?0:jh(n.borderRightWidth),h=r?0:jh(n.borderBottomWidth),m=d+u,g=c+l,v=(r?0:jh(n.borderLeftWidth))+f,y=p+h,b=s?e.offsetHeight-y-e.clientHeight:0,_=a?e.offsetWidth-v-e.clientWidth:0,C=i?m+v:0,I=i?g+y:0,w=r?r.width:jh(n.width)-C-_,E=r?r.height:jh(n.height)-I-b,S=w+m+_+v,T=E+g+b+y,O=Oh({devicePixelContentBoxSize:Fh(Math.round(w*devicePixelRatio),Math.round(E*devicePixelRatio),o),borderBoxSize:Fh(S,T,o),contentBoxSize:Fh(w,E,o),contentRect:new xh(d,c,w,E)});return kh.set(e,O),O},Hh=function(e,t,n){var r=zh(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Eh.DEVICE_PIXEL_CONTENT_BOX:return a;case Eh.BORDER_BOX:return i;default:return o}},Wh=function(e){var t=zh(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Oh([t.borderBoxSize]),this.contentBoxSize=Oh([t.contentBoxSize]),this.devicePixelContentBoxSize=Oh([t.devicePixelContentBoxSize])},Vh=function(e){if(Nh(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Zh=function(){var e=1/0,t=[];Sh.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Wh(t.target),i=Vh(t.target);r.push(n),t.lastReportedSize=Hh(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++)(0,r[n])();return e},qh=function(e){Sh.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Vh(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Kh=[],Gh=0,Yh={attributes:!0,characterData:!0,childList:!0,subtree:!0},Qh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Xh=function(e){return void 0===e&&(e=0),Date.now()+e},Jh=!1,$h=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Jh){Jh=!0;var n,r=Xh(e);n=function(){var n=!1;try{n=function(){var e=0;for(qh(e);Sh.some((function(e){return e.activeTargets.length>0}));)e=Zh(),qh(e);return Sh.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"===typeof ErrorEvent?e=new ErrorEvent("error",{message:"ResizeObserver loop completed with undelivered notifications."}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message="ResizeObserver loop completed with undelivered notifications."),window.dispatchEvent(e)}(),e>0}()}finally{if(Jh=!1,e=r-Xh(),!Gh)return;n?t.run(1e3):e>0?t.run(e):t.start()}},function(e){if(!Th){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Kh.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Th=function(){n.textContent="".concat(t?t--:t++)}}Kh.push(e),Th()}((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Yh)};document.body?t():Dh.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Qh.forEach((function(t){return Dh.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Qh.forEach((function(t){return Dh.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),em=function(e){!Gh&&e>0&&$h.start(),!(Gh+=e)&&$h.stop()},tm=function(){function e(e,t){this.target=e,this.observedBox=t||Eh.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Hh(this.target,this.observedBox,!0);return e=this.target,Ah(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),nm=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},rm=new WeakMap,im=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},om=function(){function e(){}return e.connect=function(e,t){var n=new nm(e,t);rm.set(e,n)},e.observe=function(e,t,n){var r=rm.get(e),i=0===r.observationTargets.length;im(r.observationTargets,t)<0&&(i&&Sh.push(r),r.observationTargets.push(new tm(t,n&&n.box)),em(1),$h.schedule())},e.unobserve=function(e,t){var n=rm.get(e),r=im(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&Sh.splice(Sh.indexOf(n),1),n.observationTargets.splice(r,1),em(-1))},e.disconnect=function(e){var t=this,n=rm.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),am=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!==typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");om.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rh(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");om.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rh(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");om.unobserve(this,e)},e.prototype.disconnect=function(){om.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function sm(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}window.ResizeObserver||(window.ResizeObserver=am);var cm,um=function(e){void 0===e&&(e={});var t=e.onResize,n=Object(r.useRef)(void 0);n.current=t;var i=e.round||Math.round,o=Object(r.useRef)(),a=Object(r.useState)({width:void 0,height:void 0}),s=a[0],c=a[1],u=Object(r.useRef)(!1);Object(r.useEffect)((function(){return u.current=!1,function(){u.current=!0}}),[]);var l=Object(r.useRef)({width:void 0,height:void 0}),d=function(e,t){var n=Object(r.useRef)(null),i=Object(r.useRef)(null);i.current=t;var o=Object(r.useRef)(null);Object(r.useEffect)((function(){a()}));var a=Object(r.useCallback)((function(){var t=o.current,r=i.current,a=t||(r?r instanceof Element?r:r.current:null);n.current&&n.current.element===a&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:a,subscriber:e,cleanup:a?e(a):void 0})}),[e]);return Object(r.useEffect)((function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}}),[]),Object(r.useCallback)((function(e){o.current=e,a()}),[a])}(Object(r.useCallback)((function(t){return o.current&&o.current.box===e.box&&o.current.round===i||(o.current={box:e.box,round:i,instance:new ResizeObserver((function(t){var r=t[0],o="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",a=sm(r,o,"inlineSize"),s=sm(r,o,"blockSize"),d=a?i(a):void 0,p=s?i(s):void 0;if(l.current.width!==d||l.current.height!==p){var f={width:d,height:p};l.current.width=d,l.current.height=p,n.current?n.current(f):u.current||c(f)}}))}),o.current.instance.observe(t,{box:e.box}),function(){o.current&&o.current.instance.unobserve(t)}}),[e.box,i]),e.ref);return Object(r.useMemo)((function(){return{ref:d,width:s.width,height:s.height}}),[d,s.width,s.height])},lm=r.createContext(null);!function(e){e.Small="small",e.Large="large"}(cm||(cm={}));var dm=function(e){var t=e.icon,n=e.appId,i=e.url,o=e.tileIndex,a=e.children,s=e.isLoading,c=e.description,u=e.heading,l=e.ariaLabel,d=e.ariaLevel,p=void 0===d?2:d,f=e.primaryAction,h=e.tileSize,m=e.onTileClick,g=e.error,v=xm().isInCustomizationMode,y=Ts()("banner",{"banner-with-primary-action":!(null==f||!f.description)||v}),b=mc("VoiceOver.HomeTile.LoadingComplete"),_=r.useRef(null),C=Us().setAriaLiveText;r.useEffect((function(){c&&document.activeElement===_.current&&C(b+" "+c)}),[c,b,C]);var I=xs(),w=Tp("launch-app",n+"-tile")[0],E=Tp("launch-for-create",n+"-tile")[0],S=r.createElement(pm,{heading:u,description:c,icon:t,ariaLevel:p,isLoading:s}),T=r.createElement(r.Fragment,null,r.createElement("div",{className:y},i&&!v?r.createElement("a",{href:i,className:"link header-content unstyled-link",onClick:function(e){n&&!m&&(e.preventDefault(),e.stopPropagation(),w(),I.launchApp(n,void 0,{presentationStyle:"fullscreen"}))},ref:_},S):r.createElement("div",{className:Ts()("header-content",v&&"customization")},S)),!v&&f&&n&&r.createElement(bc,{ariaLabel:f.description,className:"primary-action",icon:f.icon,action:function(){f.callback?f.callback():(E(),I.launchApp(n,{options:{source:{reason:Cc.CREATE}}}))}}),v&&r.createElement(nh,{applicationIdentifier:n||"",heading:u,index:o}),r.createElement("div",{className:"content","aria-hidden":v},a));return r.createElement("div",{className:Ts()("tile-container",{customize:v})},r.createElement("article",{"aria-label":null!=l?l:u,style:{userSelect:"none"},className:"tile-article"},r.createElement("div",{draggable:v,className:Ts()(e.className,"tile",h,{customize:v,error:g})},r.createElement(lm.Provider,{value:h},m&&!g&&r.createElement("button",{className:"unstyled-button tile-button","aria-haspopup":"dialog","aria-label":"Show more options for "+(null!=l?l:u),onClick:m}),T),r.createElement("div",{className:"tile-border"})),r.createElement(hm,{heading:u,tileIndex:o})))};function pm(e){var t=e.heading,n=e.description,i=e.icon,o=e.ariaLevel,a=e.isLoading,s=um(),c=um(),u=void 0!==s.width&&void 0!==c.width&&void 0!==c.height?[s.width>c.width,c.height>25]:[!1,!1],l=u[0],d=u[1];return r.createElement(r.Fragment,null,r.createElement("div",{className:"icon-wrapper"},i),r.createElement("div",{className:"text",title:d?n:void 0,role:"presentation"},r.createElement("div",{className:Ts()("heading",l&&"shrink"),role:"heading","aria-level":o,ref:c.ref},t),r.createElement("div",{className:"heading offscreen-measure","aria-hidden":!0,ref:s.ref},t),r.createElement("div",{className:Ts()("description",d&&"hidden"),title:n,role:"presentation"},r.createElement("span",{className:"description-content"},n),a&&r.createElement(fm,null))))}function fm(){var e=mc("HomeTile.Loading");return r.createElement("div",{className:"ellipsis","aria-label":e},r.createElement("div",{className:"dots"}))}function hm(e){var t,n,i=e.heading,o=e.tileIndex,a=xm().isInCustomizationMode,s=wh(),c=_p(),u=r.useCallback((function(){s({className:"remove-tile-confirmation-alert",animates:Fp.IN,title:gc("RemoveTileAlert.Title",{tileName:i}),description:gc("RemoveTileAlert.Description",{tileName:i}),buttons:[{title:gc("RemoveTileAlert.Remove"),action:"remove"},{title:gc("RemoveTileAlert.Cancel"),action:"cancel"}],defaultAction:"cancel",cancelAction:"cancel",onActionSelected:function(e){"remove"===e&&c({type:fp.DELETE,index:o})}})}),[s,c,i,o]),l=(null!=(t=null==(n=bp().configurations)?void 0:n.length)?t:0)>1,d=mc("VoiceOver.Tile.RemoveAriaLabel",{tileName:i}),p=r.useState(!1),f=p[0],h=p[1];return r.useLayoutEffect((function(){h(a)}),[a]),a?r.createElement(Wc,{onActivate:u,className:Ts()("remove-button",f&&l?"show":"hide"),ariaLabel:d,disabled:!l},r.createElement(Ic,{layoutMode:"glyphBox",width:"12",height:"12"})):null}var mm,gm=window.matchMedia("(max-width: 1164px)");function vm(e){var t=Object(r.useState)(new Date),n=t[0],i=t[1],o=Object(r.useRef)(null);return Object(r.useEffect)((function(){if(o.current&&clearTimeout(o.current),e)return o.current=setTimeout((function(){i(new Date)}),e),function(){o.current&&clearTimeout(o.current)}}),[e]),n}function ym(){var e=new Date,t=e.getTime(),n=6e4*e.getTimezoneOffset();return vm((864e5*Math.ceil((t-n)/864e5)-(t-n)||864e5)+1)}!function(e){e.ERROR="error",e.LOADING="loading",e.SUCCESS_WITH_DATA="data",e.SUCCESS_NO_DATA="no data"}(mm||(mm={}));var bm,_m=function(e){var t=e.data,n=e.error;return e.isLoading?mm.LOADING:n?"Not Found"===(null==n?void 0:n.message)?mm.SUCCESS_NO_DATA:mm.ERROR:t&&t.length>0?mm.SUCCESS_WITH_DATA:mm.SUCCESS_NO_DATA},Cm=function(e){var t=Object(r.useState)(_m(e)),n=t[0],i=t[1];return Object(r.useEffect)((function(){i(_m(e))}),[e]),n};function Im(){var e=r.useState(1)[1];return r.useEffect((function(){var t=function(t){e((function(e){return e+1}))};return _r.configuration.observers.add(t),function(){_r.configuration.observers.delete(t)}}),[]),_r.configuration}function wm(){var e=Im();return r.useMemo((function(){var t=e.webServices;if(!t)return{};var n={};return t.forEach((function(e,t){"active"===e.status&&(n[t]=e.url)})),n}),[e.webServices])}function Em(e){var t=Object(r.useRef)(null);return Object(r.useEffect)((function(){t.current=e})),t.current}!function(e){e.SM="SM",e.MD="MD",e.LG="LG"}(bm||(bm={}));var Sm={SM:matchMedia("(max-width: 759px)"),MD:matchMedia("(min-width: 760px)"),LG:matchMedia("(min-width: 1165px)")};function Tm(){var e=Object(Vc.a)();return r.useEffect((function(){var t=Object.keys(Sm).map((function(t){return Sm[t].addEventListener("change",e),t}));return function(){t.forEach((function(t){Sm[t].removeEventListener("change",e)}))}}),[e]),Sm.SM.matches?bm.SM:Sm.LG.matches?bm.LG:bm.MD}var Om=r.createContext({canCustomize:!1,isInCustomizationMode:!1,toggleCustomizationMode:function(){}});function Pm(e){var t,n=Us().setAriaLiveText,i=r.useState(null!=(t=e.isInCustomizationMode)&&t),o=i[0],a=i[1],s=r.useRef(null),c=r.useCallback((function(){var e=gc(o?"VoiceOver.CustomizeDashboard.ClosingPage":"VoiceOver.CustomizeDashboard.OpeningPage");o?s.current&&(s.current.end(),s.current.record()):s.current=ur.withEventAndLabel("workflow","customize",{statCategory:B.USER}).time(),a((function(e){return!e})),n(e)}),[n,o]),u=r.useMemo((function(){return{canCustomize:!0,isInCustomizationMode:o,toggleCustomizationMode:c}}),[o,c]);return r.createElement(Om.Provider,{value:u},e.children)}function xm(){return r.useContext(Om)}var Am=r.createContext(void 0);function Nm(e){var t;return r.createElement(Am.Provider,{value:null!=(t=e.value)?t:{modalToOpen:"",setModalToOpen:function(){}}},e.children)}function Rm(){var e=r.useContext(Am);if(void 0===e)throw new Error("useOpenModal must be used within a OpenModalProvider");return e}function Dm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function km(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Um=function(){function e(e,t,n,r,i,o){this.zoneName=e,this.applicationName=t,this.creationDate=n,this.supportedExtensions=r,this.supportedTypes=i,this.icons=o,this.claimProcessed=!1}var t,n;return t=e,(n=[{key:"iconMap",get:function(){var e={sizes:[],urls:[]},t={sizes:[],urls:[]},n=this.icons;n.sort((function(e,t){return e.size-t.size}));for(var r,i=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Dm(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dm(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(r=i()).done;){var o=r.value;switch(o.type){case"OSX":e.sizes.push(o.size),e.urls.push(o.url);break;case"IOS":t.sizes.push(o.size),t.urls.push(o.url)}}return Object.assign({},e.sizes.length>0&&{OSX:e},t.sizes.length>0&&{IOS:t})}}])&&km(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Lm=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.uniformTypeIdentifier=e,this.iconPlatforms=t,this.supportedExtensions=n,this.parentNodes=r,this.isAppleType=i,this.importedDeclarations=o},Mm={"com.adobe.pdf":{supportedExtensions:["pdf"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["ios","mac"]},"com.adobe.edn":{supportedExtensions:["edn"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.adobe.etd":{supportedExtensions:["etd"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.adobe.xfdf":{supportedExtensions:["xfdf"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.adobe.fdf":{supportedExtensions:["fdf"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.adobe.postscript":{supportedExtensions:["ps"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.adobe.encapsulated-postscript":{supportedExtensions:["eps"],parentUTIs:["com.adobe.postscript"],iconPlatforms:["mac"]},"com.compuserve.gif":{supportedExtensions:["gif"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.microsoft.bmp":{supportedExtensions:["bmp"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.microsoft.ico":{supportedExtensions:["ico"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.adobe.raw-image":{supportedExtensions:["dng"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.canon.crw-raw-image":{supportedExtensions:["crw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.canon.cr2-raw-image":{supportedExtensions:["cr2"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.canon.tif-raw-image":{parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.epson.raw-image":{supportedExtensions:["erf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.fuji.raw-image":{supportedExtensions:["raf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.hasselblad.fff-raw-image":{supportedExtensions:["fff"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.hasselblad.3fr-raw-image":{supportedExtensions:["3fr"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.kodak.raw-image":{supportedExtensions:["dcr"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.konicaminolta.raw-image":{supportedExtensions:["mrw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leafamerica.raw-image":{supportedExtensions:["mos"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leica.pwl-raw-image":{supportedExtensions:["pwl"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.nikon.raw-image":{supportedExtensions:["nef"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.nikon.nrw-raw-image":{supportedExtensions:["nrw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.olympus.raw-image":{supportedExtensions:["orf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.panasonic.raw-image":{supportedExtensions:["raw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.panasonic.rw2-raw-image":{supportedExtensions:["rw2"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leica.raw-image":{supportedExtensions:["raw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.leica.rwl-raw-image":{supportedExtensions:["rwl"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.pentax.raw-image":{supportedExtensions:["pef"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.sony.raw-image":{supportedExtensions:["srf"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.sony.arw-raw-image":{supportedExtensions:["arw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.sony.sr2-raw-image":{supportedExtensions:["sr2"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"com.olympus.sr-raw-image":{supportedExtensions:["orf"],parentUTIs:["com.olympus.raw-image"],iconPlatforms:["mac"]},"com.olympus.or-raw-image":{supportedExtensions:["orf"],parentUTIs:["com.olympus.raw-image"],iconPlatforms:["mac"]},"com.samsung.raw-image":{supportedExtensions:["srw"],parentUTIs:["public.camera-raw-image"],iconPlatforms:["mac"]},"org.openoffice.text":{supportedExtensions:["sxw","sdw"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.openoffice.text-template":{supportedExtensions:["stw"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text":{supportedExtensions:["odt"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text-template":{supportedExtensions:["ott"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.openoffice.graphics":{supportedExtensions:["sxd","sda"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.openoffice.graphics-template":{supportedExtensions:["std"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.graphics":{supportedExtensions:["odg"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.graphics-template":{supportedExtensions:["otg"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.openoffice.presentation":{supportedExtensions:["sxi","sdd","sdp"],parentUTIs:["public.data","public.content","public.presentation"],iconPlatforms:["mac"]},"org.openoffice.presentation-template":{supportedExtensions:["sti"],parentUTIs:["public.data","public.content","public.presentation"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.presentation":{supportedExtensions:["odp"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.presentation"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.presentation-template":{supportedExtensions:["otp"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.presentation"],iconPlatforms:["mac"]},"org.openoffice.spreadsheet":{supportedExtensions:["sxc","sdc"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"org.openoffice.spreadsheet-template":{supportedExtensions:["stc"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.spreadsheet":{supportedExtensions:["ods"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.spreadsheet-template":{supportedExtensions:["ots"],parentUTIs:["org.oasis-open.opendocument","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.chart":{supportedExtensions:["odc"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.chart-template":{supportedExtensions:["otc"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.image":{supportedExtensions:["odi"],parentUTIs:["org.oasis-open.opendocument","public.image"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.image-template":{supportedExtensions:["oti"],parentUTIs:["org.oasis-open.opendocument","public.image"],iconPlatforms:["mac"]},"org.openoffice.formula":{supportedExtensions:["sxm","smf"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.formula":{supportedExtensions:["odf"],parentUTIs:["org.oasis-open.opendocument","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.formula-template":{supportedExtensions:["otf"],parentUTIs:["org.oasis-open.opendocument","public.content"],iconPlatforms:["mac"]},"org.openoffice.text-master":{supportedExtensions:["sxg"],parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text-master":{supportedExtensions:["odm"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.text-web":{supportedExtensions:["oth"],parentUTIs:["org.oasis-open.opendocument","public.composite-content"],iconPlatforms:["mac"]},"org.oasis-open.opendocument.database":{supportedExtensions:["odb"],parentUTIs:["public.data","public.content","public.database"],iconPlatforms:["mac"]},"com.microsoft.word.wordml":{supportedExtensions:["xml"],parentUTIs:["public.xml","public.composite-content"],iconPlatforms:["mac"]},"org.openxmlformats.wordprocessingml.document":{supportedExtensions:["docx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content"],iconPlatforms:["mac","web"]},"org.openxmlformats.wordprocessingml.document.macroenabled":{supportedExtensions:["docm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.wordprocessingml.template":{supportedExtensions:["dotx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content"],iconPlatforms:["mac"]},"org.openxmlformats.wordprocessingml.template.macroenabled":{supportedExtensions:["dotm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.spreadsheetml.sheet":{supportedExtensions:["xlsx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet"],iconPlatforms:["mac","web"]},"org.openxmlformats.spreadsheetml.sheet.macroenabled":{supportedExtensions:["xlsm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet","public.executable"],iconPlatforms:["mac"]},"com.microsoft.excel.sheet.binary.macroenabled":{supportedExtensions:["xlsb"],parentUTIs:["public.zip-archive","public.composite-content","public.spreadsheet","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.spreadsheetml.template":{supportedExtensions:["xltx"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"org.openxmlformats.spreadsheetml.template.macroenabled":{supportedExtensions:["xltm"],parentUTIs:["org.openxmlformats.openxml","public.composite-content","public.spreadsheet","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.presentation":{supportedExtensions:["pptx"],parentUTIs:["org.openxmlformats.openxml","public.presentation"],iconPlatforms:["mac","web"]},"org.openxmlformats.presentationml.presentation.macroenabled":{supportedExtensions:["pptm"],parentUTIs:["org.openxmlformats.openxml","public.presentation","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.slideshow":{supportedExtensions:["ppsx"],parentUTIs:["org.openxmlformats.openxml","public.presentation"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.slideshow.macroenabled":{supportedExtensions:["ppsm"],parentUTIs:["org.openxmlformats.openxml","public.presentation","public.executable"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.template":{supportedExtensions:["potx"],parentUTIs:["org.openxmlformats.openxml","public.presentation"],iconPlatforms:["mac"]},"org.openxmlformats.presentationml.template.macroenabled":{supportedExtensions:["potm"],parentUTIs:["org.openxmlformats.openxml","public.presentation","public.executable"],iconPlatforms:["mac"]},"com.microsoft.word.doc":{supportedExtensions:["doc"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["web","ios","mac"]},"com.microsoft.word.dot":{supportedExtensions:["dot"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.microsoft.excel.xls":{supportedExtensions:["xls"],parentUTIs:["public.data","public.composite-content","public.spreadsheet"],iconPlatforms:["web","ios","mac"]},"com.microsoft.excel.xlt":{supportedExtensions:["xlt"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"com.microsoft.excel.xlw":{supportedExtensions:["xlw"],parentUTIs:["public.data","public.spreadsheet"],iconPlatforms:["mac"]},"com.microsoft.excel.xla":{supportedExtensions:["xla"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.microsoft.powerpoint.ppt":{supportedExtensions:["ppt"],parentUTIs:["public.data","public.presentation"],iconPlatforms:["web","ios","mac"]},"com.microsoft.powerpoint.pot":{supportedExtensions:["pot"],parentUTIs:["public.data","public.presentation"],iconPlatforms:["mac"]},"com.microsoft.powerpoint.pps":{supportedExtensions:["pps"],parentUTIs:["public.data","public.presentation"],iconPlatforms:["mac"]},"com.apple.keynote.key":{parentUTIs:["com.apple.package","public.presentation"],iconPlatforms:["mac"]},"com.apple.keynote.kth":{parentUTIs:["com.apple.package","public.presentation"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.key":{supportedExtensions:["key"],parentUTIs:["com.apple.package","public.presentation","com.apple.keynote.key"],iconPlatforms:["mac","web"]},"com.apple.iWork.Keynote.key-tef":{supportedExtensions:["key-tef"],parentUTIs:["com.apple.package","public.presentation","com.apple.keynote.key"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.sffkey":{supportedExtensions:["key"],parentUTIs:["public.zip-archive","public.presentation"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.kth":{supportedExtensions:["kth"],parentUTIs:["com.apple.package","public.presentation","com.apple.keynote.kth"],iconPlatforms:["mac"]},"com.apple.iWork.Keynote.sffkth":{supportedExtensions:["kth"],parentUTIs:["public.zip-archive","public.presentation"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.pages":{supportedExtensions:["pages"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac","web"]},"com.apple.iWork.Pages.pages-tef":{supportedExtensions:["pages-tef"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.sffpages":{supportedExtensions:["pages"],parentUTIs:["public.zip-archive","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.template":{supportedExtensions:["template"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Pages.sfftemplate":{supportedExtensions:["template"],parentUTIs:["public.zip-archive","public.composite-content"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.numbers":{supportedExtensions:["numbers"],parentUTIs:["com.apple.package","public.composite-content","public.spreadsheet"],iconPlatforms:["mac","web"]},"com.apple.iWork.Numbers.numbers-tef":{supportedExtensions:["numbers-tef"],parentUTIs:["com.apple.package","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.sffnumbers":{supportedExtensions:["numbers"],parentUTIs:["public.zip-archive","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.template":{supportedExtensions:["nmbtemplate"],parentUTIs:["com.apple.package","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.iWork.Numbers.sfftemplate":{supportedExtensions:["nmbtemplate"],parentUTIs:["public.zip-archive","public.composite-content","public.spreadsheet"],iconPlatforms:["mac"]},"com.apple.garageband.project":{supportedExtensions:["band","gbProj"],parentUTIs:["com.apple.package","public.audiovisual-content"],iconPlatforms:["mac"]},"com.adobe.photoshop-image":{supportedExtensions:["psd"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.adobe.illustrator.ai-image":{supportedExtensions:["ai"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.truevision.tga-image":{supportedExtensions:["tga"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.sgi.sgi-image":{supportedExtensions:["sgi"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.ilm.openexr-image":{supportedExtensions:["exr"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.kodak.flashpix-image":{supportedExtensions:["fpx"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.j2.jfx-fax":{supportedExtensions:["jfx"],parentUTIs:["public.fax"],iconPlatforms:["mac"]},"com.j2.efx-fax":{supportedExtensions:["efx"],parentUTIs:["public.fax"],iconPlatforms:["mac"]},"com.digidesign.sd2-audio":{supportedExtensions:["sd2"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.microsoft.waveform-audio":{supportedExtensions:["wav","wave","bwf"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.microsoft.advanced-systems-format":{supportedExtensions:["asf"],parentUTIs:["public.audiovisual-content"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wm":{supportedExtensions:["wm"],parentUTIs:["public.movie","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wmv":{supportedExtensions:["wmv"],parentUTIs:["public.movie","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wmp":{supportedExtensions:["wmp"],parentUTIs:["public.movie","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wma":{supportedExtensions:["wma"],parentUTIs:["public.audio","com.microsoft.advanced-systems-format"],iconPlatforms:["mac"]},"com.microsoft.advanced-stream-redirector":{supportedExtensions:["asx"],parentUTIs:["public.audiovisual-content","public.xml"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wmx":{supportedExtensions:["wmx"],parentUTIs:["public.movie","com.microsoft.advanced-stream-redirector"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wvx":{supportedExtensions:["wvx"],parentUTIs:["public.movie","com.microsoft.advanced-stream-redirector"],iconPlatforms:["mac"]},"com.microsoft.windows-media-wax":{supportedExtensions:["wax"],parentUTIs:["public.audio","com.microsoft.advanced-stream-redirector"],iconPlatforms:["mac"]},"com.real.realmedia":{supportedExtensions:["rm"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"com.real.realmedia-vbr":{supportedExtensions:["rmvb"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"com.real.realaudio":{supportedExtensions:["ram","ra"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.real.smil":{supportedExtensions:["smil","smi","sml"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.soundblaster.soundfont":{supportedExtensions:["sf2"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.avid.open-media-framework":{supportedExtensions:["omf"],parentUTIs:["public.audiovisual-content"],iconPlatforms:["mac"]},"com.allume.stuffit-archive":{parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.stuffit.archive.sitx":{supportedExtensions:["sitx"],parentUTIs:["com.allume.stuffit-archive"],iconPlatforms:["mac"]},"com.stuffit.archive.sidx":{supportedExtensions:["sidx"],parentUTIs:["com.allume.stuffit-archive"],iconPlatforms:["mac"]},"com.stuffit.archive.sit":{supportedExtensions:["sit","sea"],parentUTIs:["com.allume.stuffit-archive"],iconPlatforms:["mac"]},"com.adobe.flash.video":{supportedExtensions:["flv","f4v","f4p","f4a","f4b"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"org.khronos.collada.digital-asset-exchange":{supportedExtensions:["dae"],parentUTIs:["public.xml","public.audiovisual-content","public.3d-content"],iconPlatforms:["mac"]},"com.apple.iMovieLibrary":{supportedExtensions:["imovielibrary"],parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"com.apple.iMovieTheater":{supportedExtensions:["theater"],parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"public.item":{iconPlatforms:["mac","web"]},"public.data":{parentUTIs:["public.item"],iconPlatforms:["mac"]},"public.directory":{parentUTIs:["public.item"],iconPlatforms:["mac"]},"public.content":{iconPlatforms:["mac"]},"public.composite-content":{parentUTIs:["public.content"],iconPlatforms:["mac"]},"public.executable":{iconPlatforms:["mac"]},"public.unix-executable":{parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.apple.application":{parentUTIs:["public.executable"],iconPlatforms:["mac"]},"public.archive":{iconPlatforms:["mac"]},"public.bookmark":{iconPlatforms:["mac"]},"public.database":{iconPlatforms:["mac"]},"public.presentation":{parentUTIs:["public.composite-content"],iconPlatforms:["mac"]},"public.spreadsheet":{parentUTIs:["public.content"],iconPlatforms:["mac"]},"com.apple.iCloud":{parentUTIs:["public.item"],iconPlatforms:["mac"]},"public.3d-content":{parentUTIs:["public.content"],iconPlatforms:["mac"]},"public.alembic":{supportedExtensions:["abc"],parentUTIs:["public.3d-content","public.data"],iconPlatforms:["mac"]},"public.message":{iconPlatforms:["mac"]},"public.email-message":{parentUTIs:["public.message"],iconPlatforms:["mac"]},"public.to-do-item":{iconPlatforms:["mac"]},"public.calendar-event":{iconPlatforms:["mac"]},"com.apple.ical.vcs":{supportedExtensions:["vcs","vcal"],parentUTIs:["public.text","public.item","public.calendar-event"],iconPlatforms:["mac"]},"com.apple.ical.ics":{supportedExtensions:["ics"],parentUTIs:["public.text","public.item","public.calendar-event"],iconPlatforms:["web","ios","mac"]},"public.contact":{iconPlatforms:["mac"]},"public.vcard":{supportedExtensions:["vcf","vcard"],parentUTIs:["public.text","public.contact"],iconPlatforms:["web","ios","mac"]},"public.text":{parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"public.plain-text":{supportedExtensions:["txt","text"],parentUTIs:["public.text"],iconPlatforms:["web","ios","mac"]},"public.utf8-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.utf16-external-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.utf16-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"com.apple.traditional-mac-plain-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.case-insensitive-text":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.shutdownStall":{supportedExtensions:["shutdownStall"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.gpuRestart":{supportedExtensions:["gpuRestart"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.crashreport":{supportedExtensions:["crash"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.hangreport":{supportedExtensions:["hang"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.spinreport":{supportedExtensions:["spin"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"com.apple.panicreport":{supportedExtensions:["panic"],parentUTIs:["public.utf8-plain-text","public.log"],iconPlatforms:["mac"]},"public.filename-extension":{parentUTIs:["public.case-insensitive-text"],iconPlatforms:["mac"]},"public.mime-type":{parentUTIs:["public.case-insensitive-text"],iconPlatforms:["mac"]},"com.apple.ostype":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.nspboard-type":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.device-model-code":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.pasteboard.promised-file-url":{iconPlatforms:["mac"]},"com.apple.pasteboard.promised-file-content-type":{iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.color":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.sound":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.character-formatting":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.paragraph-formatting":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.multiple-text-selection":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.cocoa.pasteboard.find-panel-search-options":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.resolvable":{iconPlatforms:["mac"]},"public.symlink":{parentUTIs:["public.item","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.mount-point":{parentUTIs:["public.item","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.bookmark":{parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.alias-file":{parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.alias-record":{parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.icloud-file-fault":{supportedExtensions:["icloud"],parentUTIs:["public.data","com.apple.resolvable"],iconPlatforms:["mac"]},"com.apple.finder.clipping":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.finder.textclipping":{supportedExtensions:["textclipping"],parentUTIs:["com.apple.finder.clipping"],iconPlatforms:["mac"]},"com.apple.finder.pictclipping":{supportedExtensions:["pictclipping"],parentUTIs:["com.apple.finder.clipping","public.image"],iconPlatforms:["mac"]},"com.apple.finder.burn-folder":{supportedExtensions:["fpbf"],parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.iconset":{supportedExtensions:["iconset"],parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.finder.smart-folder":{supportedExtensions:["savedSearch"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.object-code":{supportedExtensions:["o"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.apple.mach-o-binary":{parentUTIs:["public.unix-executable"],iconPlatforms:["mac"]},"com.apple.mach-o-object":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-executable":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.x11-mach-o-executable":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-core":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-dylib":{supportedExtensions:["dylib"],parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.mach-o-bundle":{parentUTIs:["com.apple.mach-o-binary"],iconPlatforms:["mac"]},"com.apple.pef-binary":{parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"public.elf-binary":{parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.microsoft.windows-executable":{supportedExtensions:["exe"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.microsoft.windows-dynamic-link-library":{supportedExtensions:["dll"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.sun.java-class":{supportedExtensions:["class"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.sun.java-archive":{supportedExtensions:["jar"],parentUTIs:["public.zip-archive","public.executable"],iconPlatforms:["mac"]},"com.sun.web-application-archive":{supportedExtensions:["war"],parentUTIs:["com.sun.java-archive"],iconPlatforms:["mac"]},"com.apple.quartz-composer-composition":{supportedExtensions:["qtz"],parentUTIs:["public.data","public.executable"],iconPlatforms:["mac"]},"com.apple.bom-archive":{parentUTIs:["public.archive"],iconPlatforms:["mac"]},"public.disk-image":{parentUTIs:["public.archive"],iconPlatforms:["mac"]},"org.gnu.gnu-tar-archive":{supportedExtensions:["gtar"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.tar-archive":{supportedExtensions:["tar"],parentUTIs:["org.gnu.gnu-tar-archive"],iconPlatforms:["mac"]},"org.gnu.gnu-zip-archive":{supportedExtensions:["gz","gzip"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"org.gnu.gnu-zip-tar-archive":{supportedExtensions:["tgz"],parentUTIs:["org.gnu.gnu-zip-archive"],iconPlatforms:["mac"]},"public.bzip2-archive":{supportedExtensions:["bz2","bz"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.tar-bzip2-archive":{supportedExtensions:["tbz2","tbz"],parentUTIs:["public.bzip2-archive"],iconPlatforms:["mac"]},"com.apple.binhex-archive":{supportedExtensions:["hqx"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.macbinary-archive":{supportedExtensions:["bin"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.applesingle-archive":{supportedExtensions:["as"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.uuencoded-archive":{supportedExtensions:["uu"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.z-archive":{supportedExtensions:["z"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.bom-compressed-cpio":{supportedExtensions:["cpgz"],parentUTIs:["public.data","com.apple.bom-archive"],iconPlatforms:["mac"]},"public.cpio-archive":{supportedExtensions:["cpio","pax"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.pkware.zip-archive":{parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.zip-archive":{supportedExtensions:["zip"],parentUTIs:["com.pkware.zip-archive"],iconPlatforms:["ios","mac"]},"com.apple.xar-archive":{supportedExtensions:["xar"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"com.apple.xip-archive":{supportedExtensions:["xip"],parentUTIs:["com.apple.xar-archive"],iconPlatforms:["mac"]},"com.apple.installer-package-archive":{supportedExtensions:["pkg","mpkg"],parentUTIs:["public.data","public.archive"],iconPlatforms:["mac"]},"public.url":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.file-url":{parentUTIs:["public.url"],iconPlatforms:["mac"]},"public.url-name":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.internet-location":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.web-internet-location":{supportedExtensions:["webloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.mail-internet-location":{supportedExtensions:["mailloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.afp-internet-location":{supportedExtensions:["afploc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.file-internet-location":{supportedExtensions:["fileloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.ftp-internet-location":{supportedExtensions:["ftploc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.news-internet-location":{supportedExtensions:["newsloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.apple.generic-internet-location":{supportedExtensions:["inetloc"],parentUTIs:["com.apple.internet-location"],iconPlatforms:["mac"]},"com.microsoft.internet-shortcut":{supportedExtensions:["url"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.itunes.store-url":{supportedExtensions:["itms"],parentUTIs:["public.url"],iconPlatforms:["mac"]},"public.delimited-values-text":{parentUTIs:["public.text"],iconPlatforms:["mac"]},"public.comma-separated-values-text":{supportedExtensions:["csv"],parentUTIs:["public.delimited-values-text"],iconPlatforms:["web","ios","mac"]},"public.tab-separated-values-text":{supportedExtensions:["tsv"],parentUTIs:["public.delimited-values-text"],iconPlatforms:["mac"]},"public.utf8-tab-separated-values-text":{parentUTIs:["public.tab-separated-values-text","public.utf8-plain-text"],iconPlatforms:["mac"]},"public.rtf":{supportedExtensions:["rtf"],parentUTIs:["public.text"],iconPlatforms:["web","ios","mac"]},"public.html":{supportedExtensions:["html","htm","shtml","shtm"],parentUTIs:["public.text"],iconPlatforms:["ios","mac"]},"public.xml":{supportedExtensions:["xml"],parentUTIs:["public.text"],iconPlatforms:["mac"]},"public.xhtml":{supportedExtensions:["xhtml","xhtm","xht"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.rss":{supportedExtensions:["rss"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.xfd":{supportedExtensions:["xfd"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.patch-file":{supportedExtensions:["patch","diff"],parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.json":{supportedExtensions:["json"],parentUTIs:["public.text"],iconPlatforms:["mac"]},"com.apple.property-list":{supportedExtensions:["plist"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.xml-property-list":{supportedExtensions:["plist"],parentUTIs:["public.xml","com.apple.property-list"],iconPlatforms:["mac"]},"com.apple.binary-property-list":{supportedExtensions:["plist"],parentUTIs:["com.apple.property-list"],iconPlatforms:["mac"]},"com.apple.ascii-property-list":{supportedExtensions:["plist"],parentUTIs:["public.text","com.apple.property-list"],iconPlatforms:["mac"]},"public.source-code":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"public.source-code.preprocessed":{parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-source":{supportedExtensions:["c"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-source.preprocessed":{supportedExtensions:["i"],parentUTIs:["public.c-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.objective-c-source":{supportedExtensions:["m"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.objective-c-source.preprocessed":{supportedExtensions:["mi"],parentUTIs:["public.objective-c-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.c-plus-plus-source":{supportedExtensions:["cp","cpp","c++","cc","cxx"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-plus-plus-source.preprocessed":{supportedExtensions:["ii"],parentUTIs:["public.c-plus-plus-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.objective-c-plus-plus-source":{supportedExtensions:["mm"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.objective-c-plus-plus-source.preprocessed":{supportedExtensions:["mii"],parentUTIs:["public.objective-c-plus-plus-source","public.source-code.preprocessed"],iconPlatforms:["mac"]},"public.c-header":{supportedExtensions:["h"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.precompiled-c-header":{supportedExtensions:["pch"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-plus-plus-header":{supportedExtensions:["hh","hp","hpp","hxx","h++"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.c-plus-plus-inline-header":{supportedExtensions:["inl"],parentUTIs:["public.c-plus-plus-header"],iconPlatforms:["mac"]},"public.precompiled-c-plus-plus-header":{supportedExtensions:["pch++"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.sun.java-source":{supportedExtensions:["java","jav"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.script":{parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.assembly-source":{supportedExtensions:["s"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.apple.rez-source":{supportedExtensions:["r"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.lex-source":{supportedExtensions:["l","lm","lmm","lpp","lxx"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.yacc-source":{supportedExtensions:["y","ym","ymm","ypp","yxx"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.mig-source":{supportedExtensions:["defs","mig"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.apple.symbol-export":{supportedExtensions:["exp"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.fortran-source":{supportedExtensions:["f","for"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.fortran-77-source":{supportedExtensions:["f77"],parentUTIs:["public.fortran-source"],iconPlatforms:["mac"]},"public.fortran-90-source":{supportedExtensions:["f90"],parentUTIs:["public.fortran-source"],iconPlatforms:["mac"]},"public.fortran-95-source":{supportedExtensions:["f95"],parentUTIs:["public.fortran-source"],iconPlatforms:["mac"]},"public.pascal-source":{supportedExtensions:["pas"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.ada-source":{supportedExtensions:["ada","adb","ads"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"public.dylan-source":{supportedExtensions:["dlyan","lid"],parentUTIs:["public.source-code"],iconPlatforms:["mac"]},"com.netscape.javascript-source":{supportedExtensions:["js","jscript","javascript"],parentUTIs:["public.script","public.executable"],iconPlatforms:["mac"]},"public.shell-script":{supportedExtensions:["sh"],parentUTIs:["public.script"],iconPlatforms:["mac"]},"public.bash-script":{supportedExtensions:["bash"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.csh-script":{supportedExtensions:["csh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.ksh-script":{supportedExtensions:["ksh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.tcsh-script":{supportedExtensions:["tcsh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.zsh-script":{supportedExtensions:["zsh"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.perl-script":{supportedExtensions:["pl","pm"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.python-script":{supportedExtensions:["py"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.ruby-script":{supportedExtensions:["rb","rbw"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"public.php-script":{supportedExtensions:["php","php3","php4","ph3","ph4","phtml"],parentUTIs:["public.shell-script"],iconPlatforms:["mac"]},"com.sun.java-web-start":{supportedExtensions:["jnlp"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"public.image":{parentUTIs:["public.data","public.content"],iconPlatforms:["web","ios","mac"]},"public.fax":{parentUTIs:["public.image","public.message"],iconPlatforms:["mac"]},"public.camera-raw-image":{parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.jpeg":{supportedExtensions:["jpeg","jpg","jpe"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.jpeg-2000":{supportedExtensions:["jp2","jpf","jpx","j2k","j2c"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.tiff":{supportedExtensions:["tiff","tif"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.pict":{supportedExtensions:["pict","pct","pic"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.macpaint-image":{supportedExtensions:["pntg"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.png":{supportedExtensions:["png"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.svg-image":{supportedExtensions:["svg","svgz"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.quicktime-image":{supportedExtensions:["qtif","qti"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"com.apple.icns":{supportedExtensions:["icns"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.xbitmap-image":{supportedExtensions:["xbm"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"public.mpo-image":{supportedExtensions:["mpo"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"ca.mcgill.mni.bic.mnc":{supportedExtensions:["mnc","minc"],parentUTIs:["public.image"],iconPlatforms:["mac"]},"org.nema.dicom":{supportedExtensions:["dcm"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"gov.nih.nifti-1":{supportedExtensions:["nii"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.audiovisual-content":{parentUTIs:["public.data","public.content"],iconPlatforms:["mac"]},"public.movie":{parentUTIs:["public.audiovisual-content"],iconPlatforms:["web","ios","mac"]},"public.video":{parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.audio":{parentUTIs:["public.audiovisual-content"],iconPlatforms:["web","ios","mac"]},"com.apple.quicktime-movie":{supportedExtensions:["mov","qt"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.mpeg":{supportedExtensions:["mpg","mpeg","mpe","m75","m15"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.mpeg-2-video":{supportedExtensions:["m2v"],parentUTIs:["public.video"],iconPlatforms:["mac"]},"public.mpeg-4":{supportedExtensions:["mp4","mpg4"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"com.apple.m4v-video":{supportedExtensions:["m4v"],parentUTIs:["public.mpeg-4"],iconPlatforms:["mac"]},"com.apple.protected-mpeg-4-video":{parentUTIs:["com.apple.m4v-video"],iconPlatforms:["mac"]},"public.dv-movie":{supportedExtensions:["dv","dif"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.avi":{supportedExtensions:["avi","vfw"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.3gpp":{supportedExtensions:["3gp","3gpp","sdv"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.3gpp2":{supportedExtensions:["3g2","3gp2"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.flc-animation":{supportedExtensions:["flc","fli","cel"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.mpeg-2-transport-stream":{supportedExtensions:["ts"],parentUTIs:["public.movie"],iconPlatforms:["mac"]},"public.audiovisual-content-collection":{iconPlatforms:["mac"]},"public.avchd-collection":{supportedExtensions:["avchd"],parentUTIs:["com.apple.package","public.audiovisual-content-collection"],iconPlatforms:["mac"]},"com.apple.audio-unit-preset":{supportedExtensions:["aupreset"],parentUTIs:["com.apple.xml-property-list"],iconPlatforms:["mac"]},"public.mp2":{supportedExtensions:["mp2"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.mp3":{supportedExtensions:["mp3","mpga"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.playlist":{iconPlatforms:["mac"]},"public.m3u-playlist":{supportedExtensions:["m3u","m3u8"],parentUTIs:["public.plain-text","public.playlist"],iconPlatforms:["mac"]},"public.pls-playlist":{supportedExtensions:["pls"],parentUTIs:["public.text","public.playlist"],iconPlatforms:["mac"]},"public.mpeg-4-audio":{supportedExtensions:["mp4","mpg4"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.apple.m4a-audio":{supportedExtensions:["m4a"],parentUTIs:["public.mpeg-4-audio"],iconPlatforms:["mac"]},"com.apple.mpeg-4-ringtone":{supportedExtensions:["m4r"],parentUTIs:["public.mpeg-4-audio"],iconPlatforms:["mac"]},"com.apple.protected-mpeg-4-audio":{supportedExtensions:["m4p","m4b"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.ulaw-audio":{supportedExtensions:["ul","ulw","ulaw"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.au-audio":{supportedExtensions:["au","snd"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.aifc-audio":{supportedExtensions:["aifc","aiff","aif","cdda"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.aiff-audio":{supportedExtensions:["aiff","aif"],parentUTIs:["public.aifc-audio"],iconPlatforms:["mac"]},"public.midi-audio":{supportedExtensions:["midi","mid","smf","kar"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.downloadable-sound":{supportedExtensions:["dls"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.apple.coreaudio-format":{supportedExtensions:["caf"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.ac3-audio":{supportedExtensions:["ac3"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"org.3gpp.adaptive-multi-rate-audio":{supportedExtensions:["amr"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"public.aac-audio":{supportedExtensions:["aac","adts"],parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.audible.aa-audio":{parentUTIs:["public.audio"],iconPlatforms:["mac"]},"com.apple.itunes.audible":{supportedExtensions:["aa","aax"],parentUTIs:["com.audible.aa-audio"],iconPlatforms:["mac"]},"public.font":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.truetype-font":{parentUTIs:["public.font"],iconPlatforms:["mac"]},"com.adobe.postscript-font":{parentUTIs:["public.font"],iconPlatforms:["mac"]},"com.apple.truetype-datafork-suitcase-font":{supportedExtensions:["dfont"],parentUTIs:["public.truetype-font"],iconPlatforms:["mac"]},"public.opentype-font":{supportedExtensions:["otf"],parentUTIs:["public.font"],iconPlatforms:["mac"]},"public.opentype-collection-font":{supportedExtensions:["otc"],parentUTIs:["public.opentype-font"],iconPlatforms:["mac"]},"public.truetype-ttf-font":{supportedExtensions:["ttf"],parentUTIs:["public.truetype-font"],iconPlatforms:["mac"]},"public.truetype-collection-font":{supportedExtensions:["ttc"],parentUTIs:["public.truetype-font"],iconPlatforms:["mac"]},"com.apple.font-suitcase":{supportedExtensions:["suit"],parentUTIs:["public.font"],iconPlatforms:["mac"]},"com.adobe.postscript-lwfn-font":{parentUTIs:["com.adobe.postscript-font"],iconPlatforms:["mac"]},"com.adobe.postscript-pfb-font":{supportedExtensions:["pfb"],parentUTIs:["com.adobe.postscript-font"],iconPlatforms:["mac"]},"com.adobe.postscript-pfa-font":{supportedExtensions:["pfa"],parentUTIs:["com.adobe.postscript-font"],iconPlatforms:["mac"]},"com.apple.applescript.text":{supportedExtensions:["applescript"],parentUTIs:["public.script"],iconPlatforms:["mac"]},"com.apple.applescript.script":{supportedExtensions:["scpt"],parentUTIs:["public.data","public.script"],iconPlatforms:["mac"]},"com.apple.applescript.script-bundle":{supportedExtensions:["scptd"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"public.folder":{parentUTIs:["public.directory"],iconPlatforms:["mac","web"]},"com.apple.drop-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.applications-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.server-applications-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.library-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"com.apple.servers-folder":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"public.volume":{parentUTIs:["public.folder"],iconPlatforms:["mac"]},"public.file-sharepoint":{iconPlatforms:["mac"]},"com.apple.network-neighborhood":{iconPlatforms:["mac"]},"com.apple.dot-mac":{iconPlatforms:["mac"]},"com.apple.package":{parentUTIs:["public.directory"],iconPlatforms:["mac"]},"com.apple.bundle":{parentUTIs:["public.directory"],iconPlatforms:["mac"]},"com.apple.generic-bundle":{supportedExtensions:["bundle"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.systempreference.prefpane":{supportedExtensions:["prefPane"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.systempreference.screen-saver":{supportedExtensions:["saver"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.systempreference.screen-slide-saver":{supportedExtensions:["slideSaver"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.menu-extra":{supportedExtensions:["menu"],parentUTIs:["com.apple.package","com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.localizable-name-bundle":{parentUTIs:["com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.framework":{supportedExtensions:["framework"],parentUTIs:["com.apple.bundle"],iconPlatforms:["mac"]},"com.apple.application-bundle":{supportedExtensions:["app"],parentUTIs:["com.apple.application","com.apple.localizable-name-bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.application-file":{supportedExtensions:["app"],parentUTIs:["com.apple.application","public.data"],iconPlatforms:["mac"]},"com.apple.deprecated-application-file":{parentUTIs:["com.apple.application-file"],iconPlatforms:["mac"]},"com.apple.flat-rtfd":{parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.installer-package":{supportedExtensions:["pkg"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.installer-distribution-package":{supportedExtensions:["dist","distz"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.installer-meta-package":{supportedExtensions:["mpkg"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.rtfd":{supportedExtensions:["rtfd"],parentUTIs:["com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"com.apple.plugin":{supportedExtensions:["plugin"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.xpc-service":{supportedExtensions:["xpc"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.application-and-system-extension":{supportedExtensions:["appex"],parentUTIs:["com.apple.xpc-service"],iconPlatforms:["mac"]},"com.apple.pluginkit":{supportedExtensions:["pluginkit"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.webkit-plugin":{supportedExtensions:["webplugin"],parentUTIs:["com.apple.plugin"],iconPlatforms:["mac"]},"com.apple.metadata-importer":{supportedExtensions:["mdimporter"],parentUTIs:["com.apple.plugin"],iconPlatforms:["mac"]},"com.apple.quicklook-generator":{supportedExtensions:["qlgenerator"],parentUTIs:["com.apple.plugin"],iconPlatforms:["mac"]},"com.apple.dashboard-widget":{supportedExtensions:["wdgt"],parentUTIs:["com.apple.localizable-name-bundle","com.apple.package"],iconPlatforms:["mac"]},"public.dvd-video-disc":{parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"public.bd-video-disc":{parentUTIs:["com.apple.package"],iconPlatforms:["mac"]},"org.openxmlformats.openxml":{parentUTIs:["public.zip-archive"],iconPlatforms:["mac"]},"org.oasis-open.opendocument":{parentUTIs:["public.zip-archive"],iconPlatforms:["mac"]},"com.rsa.pkcs-12":{supportedExtensions:["p12","pfx"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.x509-certificate":{supportedExtensions:["cer","der","crt","pem"],parentUTIs:["public.data"],iconPlatforms:["web","ios","mac"]},"com.apple.webarchive":{supportedExtensions:["webarchive"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"org.idpf.epub-container":{supportedExtensions:["epub"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.localized-pdf-bundle":{supportedExtensions:["lpdf"],parentUTIs:["com.apple.localizable-name-bundle","com.apple.package","public.composite-content"],iconPlatforms:["mac"]},"org.aafassociation.advanced-authoring-format":{supportedExtensions:["aaf"],parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.txn.text-multimedia-data":{parentUTIs:["public.data","public.composite-content"],iconPlatforms:["mac"]},"com.apple.colorsync-profile":{supportedExtensions:["icc","icm","pf"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.ink.inktext":{parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.mobileconfig":{supportedExtensions:["mobileconfig","mobile"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.apple.provisionprofile":{supportedExtensions:["provisionprofile"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.apple.configprofile":{supportedExtensions:["configprofile"],parentUTIs:["public.xml"],iconPlatforms:["mac"]},"com.apple.user":{iconPlatforms:["mac"]},"com.apple.user-group":{iconPlatforms:["mac"]},"com.apple.user-unknown":{iconPlatforms:["mac"]},"com.apple.airdrop":{iconPlatforms:["mac"]},"com.apple.bonjour":{iconPlatforms:["mac"]},"com.apple.notifications":{iconPlatforms:["mac"]},"com.apple.SetupAssistant.internet-signup":{supportedExtensions:["inss"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"com.apple.mobileprovision":{supportedExtensions:["mobileprovision"],parentUTIs:["public.data"],iconPlatforms:["web","ios","mac"]},"com.apple.pkpass":{supportedExtensions:["pkpass"],parentUTIs:["com.apple.bundle","com.apple.package"],iconPlatforms:["mac"]},"com.apple.pkpass-data":{supportedExtensions:["pkpass"],parentUTIs:["public.data"],iconPlatforms:["mac"]},"public.device":{iconPlatforms:["mac"]},"public.display":{iconPlatforms:["mac"]},"public.computer":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"public.generic-pc":{parentUTIs:["public.computer"],iconPlatforms:["mac"]},"com.apple.mac":{parentUTIs:["public.computer"],iconPlatforms:["mac"]},"com.apple.mac.laptop":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.mac.tower":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.powerbook":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-titanium":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-12":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-15":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.powerbook-g4-17":{parentUTIs:["com.apple.powerbook"],iconPlatforms:["mac"]},"com.apple.ibook-g4":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.powermac":{parentUTIs:["com.apple.mac.tower"],iconPlatforms:["mac"]},"com.apple.powermac-g4-quicksilver":{parentUTIs:["com.apple.powermac"],iconPlatforms:["mac"]},"com.apple.powermac-g4-mirrored-drive-doors":{parentUTIs:["com.apple.powermac"],iconPlatforms:["mac"]},"com.apple.powermac-g5":{parentUTIs:["com.apple.powermac"],iconPlatforms:["mac"]},"com.apple.xserve":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.xserve-g4":{parentUTIs:["com.apple.xserve"],iconPlatforms:["mac"]},"com.apple.xserve-g5":{parentUTIs:["com.apple.xserve"],iconPlatforms:["mac"]},"com.apple.xserve-xeon":{parentUTIs:["com.apple.xserve"],iconPlatforms:["mac"]},"com.apple.macmini":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.macmini-g4":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.macmini-core-duo":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.macmini-unibody":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.macmini-unibody-no-optical":{parentUTIs:["com.apple.macmini"],iconPlatforms:["mac"]},"com.apple.emac":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.imac":{parentUTIs:["com.apple.mac"],iconPlatforms:["mac"]},"com.apple.imac-g4-15":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g4-17":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g4-20":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g5":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-g5-isight":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-core-duo":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-core-2-duo":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-iSight-24":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-aluminum-20":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-aluminum-24":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody-21":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody-21-no-optical":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-unibody-27-no-optical":{parentUTIs:["com.apple.imac"],iconPlatforms:["mac"]},"com.apple.imac-15-1":{parentUTIs:["com.apple.imac-unibody-27-no-optical"],iconPlatforms:["mac"]},"com.apple.macbook":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.macbook-white":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbook-black":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbook-unibody":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbook-unibody-plastic":{parentUTIs:["com.apple.macbook"],iconPlatforms:["mac"]},"com.apple.macbookpro-13-unibody":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-13-retina-display":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.macbookpro-15":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-15-unibody":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-15-retina-display":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-17-unibody":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookpro-17":{parentUTIs:["com.apple.macbookpro"],iconPlatforms:["mac"]},"com.apple.macbookair":{parentUTIs:["com.apple.mac.laptop"],iconPlatforms:["mac"]},"com.apple.macbookair-11-unibody":{parentUTIs:["com.apple.macbookair"],iconPlatforms:["mac"]},"com.apple.macbookair-13-unibody":{parentUTIs:["com.apple.macbookair"],iconPlatforms:["mac"]},"com.apple.macpro":{parentUTIs:["com.apple.mac.tower"],iconPlatforms:["mac"]},"com.apple.macpro-cylinder":{parentUTIs:["com.apple.macpro"],iconPlatforms:["mac"]},"com.apple.apple-tv":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.iphone":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.iphone-3g":{parentUTIs:["com.apple.iphone"],iconPlatforms:["mac"]},"com.apple.iphone-3gs":{parentUTIs:["com.apple.iphone"],iconPlatforms:["mac"]},"com.apple.iphone-4":{parentUTIs:["com.apple.iphone"],iconPlatforms:["mac"]},"com.apple.ipod":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.ipod-touch":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipod-touch-2":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipod-touch-3":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipod-touch-4":{parentUTIs:["com.apple.ipod"],iconPlatforms:["mac"]},"com.apple.ipad":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.watch":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.airport-express":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.airport":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.time-capsule":{parentUTIs:["public.device"],iconPlatforms:["mac"]},"com.apple.airport-extreme-tower":{parentUTIs:["com.apple.airport"],iconPlatforms:["mac"]},"com.apple.airport-time-capsule-tower":{parentUTIs:["com.apple.time-capsule"],iconPlatforms:["mac"]},"com.apple.cinema-display":{parentUTIs:["public.display"],iconPlatforms:["mac"]},"com.apple.led-cinema-display-24":{parentUTIs:["public.display"],iconPlatforms:["mac"]},"com.apple.led-cinema-display-27":{parentUTIs:["public.display"],iconPlatforms:["mac"]},"public.storage":{iconPlatforms:["mac"]},"com.apple.storage-external":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"com.apple.storage-internal":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"com.apple.storage-removable":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"public.optical-storage-media":{parentUTIs:["public.storage"],iconPlatforms:["mac"]},"public.cd-based-media":{parentUTIs:["public.optical-storage-media"],iconPlatforms:["mac"]},"public.cd-media":{parentUTIs:["public.cd-based-media"],iconPlatforms:["mac"]},"public.cd-r-media":{parentUTIs:["public.cd-based-media"],iconPlatforms:["mac"]},"public.cd-rw-media":{parentUTIs:["public.cd-based-media"],iconPlatforms:["mac"]},"public.dvd-based-media":{parentUTIs:["public.optical-storage-media"],iconPlatforms:["mac"]},"public.dvd-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-r-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-rw-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-ram-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-plus-r-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.dvd-plus-rw-media":{parentUTIs:["public.dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-based-media":{parentUTIs:["public.optical-storage-media"],iconPlatforms:["mac"]},"public.hd-dvd-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-r-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-rw-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.hd-dvd-ram-media":{parentUTIs:["public.hd-dvd-based-media"],iconPlatforms:["mac"]},"public.app-category":{iconPlatforms:["mac"]},"public.app-category.business":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.developer-tools":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.education":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.entertainment":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.finance":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.games":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.action-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.adventure-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.arcade-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.board-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.card-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.casino-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.dice-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.educational-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.family-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.kids-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.music-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.puzzle-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.racing-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.role-playing-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.simulation-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.sports-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.strategy-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.trivia-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.word-games":{parentUTIs:["public.app-category.games"],iconPlatforms:["mac"]},"public.app-category.graphics-design":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.healthcare-fitness":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.lifestyle":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.medical":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.music":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.news":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.photography":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.productivity":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.reference":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.social-networking":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.sports":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.travel":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.utilities":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.video":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"public.app-category.weather":{parentUTIs:["public.app-category"],iconPlatforms:["mac"]},"com.apple.structured-text":{parentUTIs:["public.plain-text"],iconPlatforms:["mac"]},"com.apple.structured-text.date":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.structured-text.address":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.structured-text.telephone-number":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.structured-text.transit-information":{parentUTIs:["com.apple.structured-text"],iconPlatforms:["mac"]},"com.apple.active-webpage":{iconPlatforms:["mac"]},"com.apple.mail.email":{iconPlatforms:["mac"]},"com.apple.disk-image-udif":{iconPlatforms:["mac"]}};function jm(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Fm(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fm(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Bm=["public.folder","public.directory"],zm=function(){function e(){this.bindingTable={},this.claimRecords=[];var e=this.bindingTable;for(var t in Mm){var n,r=Mm[t],i=t.startsWith("com.apple."),o=new Lm(t,r.iconPlatforms,null!=(n=r.supportedExtensions)?n:[],[],i,{});e[t]=o;for(var a,s=jm(null!=(c=r.supportedExtensions)?c:[]);!(a=s()).done;){var c,u=a.value;e[u]||(e[u]=e[t])}}for(var l in Mm){var d,p,f=Mm[l];e[l].parentNodes=null!=(d=null==(p=f.parentUTIs)?void 0:p.map((function(t){return e[t]})))?d:[]}}var t=e.prototype;return t.getUTINode=function(e){var t;return null!=(t=this.bindingTable[e])?t:null},t.getPublicItemUTINode=function(){return this.bindingTable["public.item"]},t.createClaim=function(e){this.claimRecords.push(e)},t.processClaims=function(){for(var e,t=this,n=jm(this.claimRecords);!(e=n()).done;){var r=e.value;r.supportedTypes=r.supportedTypes.filter((function(e){var n;return!(null!=(n=t.bindingTable[e])&&n.isAppleType)})),r.supportedExtensions=r.supportedExtensions.filter((function(e){var n;return!(null!=(n=t.bindingTable[e])&&n.isAppleType)}))}for(var i,o=jm(this.claimRecords);!(i=o()).done;){var a=i.value;a.supportedTypes=a.supportedTypes.filter((function(e){return!Bm.includes(e)}))}this.claimRecords.sort((function(e,t){return e.creationDate.valueOf()-t.creationDate.valueOf()}));for(var s,c=jm(this.claimRecords);!(s=c()).done;){for(var u,l=s.value,d=jm(l.supportedTypes);!(u=d()).done;){var p=u.value,f=this.bindingTable[p];f?f.importedDeclarations[p]||(f.importedDeclarations[p]=l):this.bindingTable[p]=new Lm(p,[],[],[this.bindingTable["public.item"]],!1,{"*":l})}for(var h,m=[],g=jm(l.supportedExtensions);!(h=g()).done;){var v=h.value,y=this.bindingTable[v];y?y.importedDeclarations[v]||(y.importedDeclarations[v]=l):m.push(v)}if(m.length>0){var b="__PROXY__."+l.zoneName,_=new Lm(b,[],m,[this.bindingTable["public.item"]],!1,{"*":l});this.bindingTable[b]=_;for(var C,I=jm(m);!(C=I()).done;){var w=C.value;this.bindingTable[w]=_}}}},e}();function Hm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Wm=new Date("Thu, 01-Jan-1970 00:00:01 GMT;"),Vm=function(){function e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];this.name=e,this.value=t,this.path=n,this.domain=r,this.expirationDate=i,this.isSecure=o}var t,n;return e.prototype.expire=function(){this.value="",this.expirationDate=Wm},t=e,(n=[{key:"cookieString",get:function(){var e=this.name,t=this.value,n=this.path,r=this.domain;return e+"="+t+";path="+n+";"+(r?"domain="+r+";":"")+this._expirationDateStringGMT+this._sslString}},{key:"_expirationDateStringGMT",get:function(){var e=this.expirationDate;return e?"expires="+new Date(e).toUTCString()+";":""}},{key:"_sslString",get:function(){return this.isSecure?"Secure;":""}}])&&Hm(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Zm=function(){function e(e){this.defaultDomain=e,this._cookies=new Map}var t=e.prototype;return t.readCookieValue=function(e){var t=this._fetchCookie(e);return t?t.value:""},t.readCookie=function(e){return this._fetchCookie(e)},t.writeCookie=function(e,t,n){var r,i,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,c=null,u=null;return void 0!==t&&null!==t||(u=this._fetchCookie(e))&&u.expire(),s&&(r=1e3*s*60*60,c=new Date((new Date).getTime()+r)),u||(u=this._createCookie(e,null!=t?t:"",n,a,null!=(i=c)?i:void 0,o)),document.cookie=u.cookieString,u},t.updateCookie=function(e){var t=this._cookies;if(this._fetchCookie(e.name))return t.set(e.name,e),this.writeCookie(e.name,e.value);throw"Unable to find the cookie provided to update"},t.deleteCookie=function(e){var t=this._cookies,n=null;return this._fetchCookie(e)&&(n=this.writeCookie(e,""),t.delete(e)),n},t.deleteAllCookies=function(){var e=this;this._cookies.forEach((function(t){e.deleteCookie(t.name)}))},t._fetchCookie=function(e){var t,n=this,r=null!=(t=this._cookies.get(e))?t:null;return r||document.cookie.split(";").forEach((function(t){var i=t.match(e+"=(.*)");if(i&&i[1]){var o=i[1];r=n._createCookie(e,o)}})),r},t._createCookie=function(e,t,n,r,i,o){r||(r=this.defaultDomain);var a=new Vm(e,t,n,r="."+r,i,o);return this._cookies.set(a.name,a),a},e}();function qm(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Km(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Km(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Km(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gm(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Ym(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Gm(o,r,i,a,s,"next",e)}function s(e){Gm(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Xm=function(){function e(e){this.domainProperty=e,this.utiRegistry=new zm,this.cookieManager=void 0,this.cookieManager=new Zm(this.domainProperty.cookiesDomain)}e.createSharedInstance=function(){return new e(Ne.sharedInstance.current)};var t,n,r,i=e.prototype;return i.setupThirdPartyAppIcons=function(){var e=Ym(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$m();case 2:if(t=e.sent){e.next=6;break}return fr.sharedInstance.recordStat(new ur("CoreTypes",{error:"Failed to get App Libraries from DriveWS"})),e.abrupt("return");case 6:n=qm(t.items);case 7:if((r=n()).done){e.next=14;break}if(!(s=r.value).zone.startsWith("com.apple.")){e.next=11;break}return e.abrupt("continue",12);case 11:this.utiRegistry.createClaim(new Um(s.zone,s.applicationName,new Date(null!=(i=s.dateCreated)?i:0),null!=(o=s.supportedExtensions)?o:[],null!=(a=s.supportedTypes)?a:[],s.icons));case 12:e.next=7;break;case 14:this.utiRegistry.processClaims();case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),i.fetchIcon=function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=null!=(r=this.utiRegistry.getUTINode(e))?r:this.utiRegistry.getPublicItemUTINode();if(Array.isArray(i)&&i.length>1){var a=this.getClaimRecordForPlatforms(o,i);if(a)return this.constructThirdPartyIconResponseWithPriority(a,t,n,i);var s=this.getNodeWithIconForPlatforms(o,i);return this.constructIconResponseWithPriority(s,t,n,i)}var c=Array.isArray(i)?i[0]:i,u=o.importedDeclarations[e];if(u){var l=function(){switch(c){case"ios":return"IOS";case"mac":return"OSX";case"web":return"web";default:return null}}(),d=u.iconMap;if(!l||l in d)return this.constructThirdPartyIconResponse(u,t,n,c);var p=this.getNodeWithIconForPlatforms(o,c?[c]:[]);return this.constructIconResponse(p,t,n,c)}var f=o.importedDeclarations["*"];if(f)return this.constructThirdPartyIconResponse(f,t,n,c);var h=this.getNodeWithIconForPlatforms(o,c?[c]:[]);return this.constructIconResponse(h,t,n,c)},i.getConformingTypes=function(e){var t=this.utiRegistry.getUTINode(e);if(!t)return[];for(var n=[];t.parentNodes[0];)t=t.parentNodes[0],n.push(t.uniformTypeIdentifier);return n},i.getNodeWithIconForPlatforms=function(e,t){if(0===t.length)for(;;){if(e.iconPlatforms.length>0)return e;if(0===e.parentNodes.length)return e;e=e.parentNodes[0]}for(;;){for(var n,r=qm(t);!(n=r()).done;){var i=n.value;if(e.iconPlatforms.includes(i))return e}if(0===e.parentNodes.length)return this.utiRegistry.getPublicItemUTINode();e=e.parentNodes[0]}},i.constructIconResponse=function(e,t,n,r){var i=function(){if(r&&e.iconPlatforms.includes(r))return r;if(r)return null;if(1===e.iconPlatforms.length)return e.iconPlatforms[0];for(var t=0,n=["web","ios","mac"];t<n.length;t++){var i=n[t];if(e.iconPlatforms.includes(i))return i}return null}();if(!i)return null;var o=n>=2?2:1,a=Jm(t,[32,128,256]);return{iconURL:""+this.iconUrlPrefix+i+"/"+e.uniformTypeIdentifier+"_"+a+"@"+o+"x.png",iconSize:Math.round(a*o/o),isAppIcon:!1,isDefaultIcon:"public.item"===e.uniformTypeIdentifier}},i.constructIconResponseWithPriority=function(e,t,n,r){for(var i,o=qm(r);!(i=o()).done;){var a=i.value;if(-1!==e.iconPlatforms.indexOf(a))return this.constructIconResponse(e,t,n,a)}return null},i.constructThirdPartyIconResponse=function(e,t,n,r){var i=function(){switch(r){case"ios":return"IOS";case"mac":return"OSX";case"web":default:return null}}(),o=e.iconMap,a=i&&o[i]?i:r?null:o.IOS?"IOS":o.OSX?"OSX":null;if(!a)return null;var s=o[a];if(!s)return null;var c=s.sizes,u=Jm(t*n,c),l=c.indexOf(u),d=s.urls[l];return{iconURL:d+="&validateToken="+this.getValidateToken(),iconSize:Math.round(u/n),isAppIcon:!0,isDefaultIcon:!1}},i.constructThirdPartyIconResponseWithPriority=function(e,t,n,r){for(var i,o=this,a=[],s=qm(e.icons);!(i=s()).done;)switch(i.value.type){case"OSX":a.push("mac");break;case"IOS":a.push("ios")}for(var c,u=function(){var r=c.value;if(!a.includes(r))return"continue";var i=function(){switch(r){case"ios":return"IOS";case"mac":return"OSX";case"web":default:return null}}();if(!i)return"continue";var s=e.iconMap[i];if(!s)return"continue";var u=s.sizes,l=Jm(t*n,u),d=u.indexOf(l);return{v:{iconURL:s.urls[d]+"&validateToken="+o.getValidateToken(),iconSize:Math.ceil(l/n),isAppIcon:!0,isDefaultIcon:!1}}},l=qm(r);!(c=l()).done;){var d=u();if("continue"!==d&&"object"===typeof d)return d.v}return null},i.getClaimRecordForPlatforms=function(e,t){for(var n in e.importedDeclarations){for(var r,i=e.importedDeclarations[n],o=[],a=qm(i.icons);!(r=a()).done;)switch(r.value.type){case"OSX":o.push("mac");break;case"IOS":o.push("ios")}for(var s,c=qm(t);!(s=c()).done;){var u=s.value;if(o.includes(u))return i}}return null},i.getValidateToken=function(){var e=this.cookieManager.readCookieValue("X-APPLE-WEBAUTH-VALIDATE");return e.substring(1,e.length-1)},t=e,r=[{key:"sharedInstance",get:function(){var e=this._internalSharedInstance;return e||(e=this._internalSharedInstance=this.createSharedInstance()),e}}],(n=[{key:"iconUrlPrefix",get:function(){return"https://"+this.domainProperty.url.hostname+"/coretypes/"}}])&&Qm(t.prototype,n),r&&Qm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Jm(e,t){if(0===t.length)return e;if(t.includes(e))return e;for(var n,r=qm(t);!(n=r()).done;){var i=n.value;if(i>e)return i}return t[t.length-1]}function $m(){return eg.apply(this,arguments)}function eg(){return(eg=Ym(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=jn("drivews","retrieveAppLibraries"),e.next=3,es.fetchJSON(t,ng);case 3:if(null!=(n=e.sent)&&n.ok){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",n.result);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Xm._internalSharedInstance=void 0;var tg=Nn.object({items:Nn.object({zone:Nn.string(),applicationName:Nn.string(),dateCreated:Nn.number().optional(),supportedExtensions:Nn.string().array().optional(),supportedTypes:Nn.string().array().optional(),icons:Nn.object({size:Nn.number(),type:Nn.union([Nn.literal("OSX"),Nn.literal("IOS")]),url:Nn.string()}).array()}).array()});function ng(e){return tg.safeParse(e).success}function rg(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function ig(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){rg(o,r,i,a,s,"next",e)}function s(e){rg(o,r,i,a,s,"throw",e)}a(void 0)}))}}function og(e){return Nn.record(Nn.unknown()).safeParse(e).success}var ag=function(){function e(e,t,n){this.instance=e,this.containerIdentifier=t,this.partition=n}var t=e.prototype;return t.resolveShortGUID=function(){var e=ig(regeneratorRuntime.mark((function e(t){var n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.instance.getDefaultContainer(),r=new ur("resolveShortGUID").time(),e.prev=2,e.next=5,n.fetchRecordInfos([t]);case 5:if(!(i=e.sent).hasErrors){e.next=9;break}return fr.sharedInstance.recordStat(r.failure({errorCode:i.errors[0]})),e.abrupt("return",i);case 9:return o=i.results[0].containerIdentifier,r.addAdditionalProperties({containerIdentifier:o}),fr.sharedInstance.recordStat(r.success()),e.abrupt("return",i);case 15:return e.prev=15,e.t0=e.catch(2),a=og(e.t0)?e.t0.ckErrorCode:void 0,fr.sharedInstance.recordStat(r.failure({errorCode:a})),e.abrupt("return",null);case 20:case"end":return e.stop()}}),e,this,[[2,15]])})));return function(t){return e.apply(this,arguments)}}(),t.acceptShortGUID=function(){var e=ig(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.instance.getDefaultContainer(),r=new ur("acceptShortGUID").time(),e.prev=2,e.next=5,n.acceptShares({value:t});case 5:if(!(i=e.sent).hasErrors){e.next=9;break}return fr.sharedInstance.recordStat(r.failure({errorCode:i.errors[0]})),e.abrupt("return",i);case 9:return fr.sharedInstance.recordStat(r.success()),e.abrupt("return",i);case 13:return e.prev=13,e.t0=e.catch(2),o=og(e.t0)?e.t0.ckErrorCode:void 0,fr.sharedInstance.recordStat(r.failure({errorCode:o})),e.abrupt("return",null);case 18:case"end":return e.stop()}}),e,this,[[2,13]])})));return function(t){return e.apply(this,arguments)}}(),e}();function sg(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function cg(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){sg(o,r,i,a,s,"next",e)}function s(e){sg(o,r,i,a,s,"throw",e)}a(void 0)}))}}var ug,lg=function(){function e(){this.loadPromise=null,this.cloudkitInstances={}}var t=e.prototype;return t.load=function(){var e=cg(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.CloudKit){e.next=2;break}return e.abrupt("return",!0);case 2:if(!(t=this.loadPromise)){e.next=5;break}return e.abrupt("return",t);case 5:return n=cg(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new ur("ckjsLoad").time(),r=function(){for(var e=0,t=document.scripts.length;e<t;++e){var n=document.scripts[e];if(n.src&&n.src.endsWith("cloudkit.js"))return n}return null}(),i=null!=(t=null==r?void 0:r.src)?t:"https://cdn.apple-cloudkit.com/ck/2/cloudkit.js",o=0,a=null,s=regeneratorRuntime.mark((function e(){var t,r,s,c,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=null==(t=a)?void 0:t.parentNode)&&r.removeChild(t),s=document.createElement("script"),a=s,c=new Promise((function(e){s.addEventListener("error",(function(){return e(!1)}))})),u=new Promise((function(e){s.addEventListener("load",(function(){return e(!0)}))})),document.head.appendChild(s),s.src=i,e.next=11,Promise.race([c,u]);case 11:if(!(l=e.sent)||!window.CloudKit){e.next=15;break}return n&&(n.addAdditionalProperties({retryCount:o}),fr.sharedInstance.recordStat(n.success())),e.abrupt("return",{v:!0});case 15:if(!l||window.CloudKit){e.next=17;break}return e.abrupt("return",{v:!1});case 17:if(n&&(n.addAdditionalProperties({retryCount:o}),o+1>6&&fr.sharedInstance.recordStat(n.failure())),!(o+1>6)){e.next=20;break}return e.abrupt("return",{v:!1});case 20:return e.next=22,Xo(Math.min(8e3,1e3*Math.pow(2,o)));case 22:o++;case 23:case"end":return e.stop()}}),e)}));case 7:return e.delegateYield(s(),"t0",9);case 9:if("object"!==typeof(c=e.t0)){e.next=12;break}return e.abrupt("return",c.v);case 12:e.next=7;break;case 14:case"end":return e.stop()}}),e)})))(),this.loadPromise=n,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.instanceForContainer=function(){var e=cg(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:if(i=t+"."+n+"."+(r="production"),o=this.cloudkitInstances,!(a=o[i])){e.next=8;break}return e.abrupt("return",a);case 8:return s=window.CloudKit.configure({containers:[{containerIdentifier:t,environment:r,privateDatabasePartition:n,publicDatabasePartition:n,sharedDatabasePartition:n}],services:{Promise:Promise,fetch:function(){var e=cg(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="string"===typeof t?t:t.url,i="string"===typeof t?n:Object.assign({},t,n),e.next=4,es.fetchURL(r,i);case 4:if(o=e.sent){e.next=7;break}return e.abrupt("return",new Response(null,{status:408}));case 7:return e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}}),c=new ag(s,t,n),o[i]=c,e.abrupt("return",c);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),e}(),dg=n(709),pg=n(716),fg=n(1297),hg=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},mg=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hg(arguments[t]));return e};function gg(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return fg.b.apply(void 0,mg([e],t))}function vg(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];fg.a.apply(void 0,mg([e],t))}function yg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.NONE="NONE",e.BACKGROUND="BACKGROUND",e.INACTIVE_FOREGROUND="INACTIVE_FOREGROUND",e.ACTIVE_FOREGROUND="ACTIVE_FOREGROUND"}(ug||(ug={}));var bg=function(){function e(e){this.remoteInstanceName=void 0,this.remoteInstanceTitle=void 0,this.src=void 0,this._window=void 0,this.remoteInstanceName=e.remoteInstanceName,this.remoteInstanceTitle=e.remoteInstanceTitle,this.src=e.src}var t,n,r=e.prototype;return r.open=function(e){var t;e&&(t=JSON.stringify(e).slice(1,-1).replaceAll('"',"").replaceAll(":","="));var n=Object(he.c)(this.src);this.window=globalThis.window.open(n.toString(),"_blank",t)},r.close=function(){var e=this.window;e&&e.close()},t=e,(n=[{key:"window",get:function(){return this._window},set:function(e){this._window=e}}])&&yg(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_g=n(699),Cg=n(700),Ig=n(705),wg=n(706),Eg=new Ig.a("MessagingFromUIChildProtocol",new Set(Object(wg.a)()(["isReadyToBeDisplayed"]))),Sg=new Ig.a("MessagingToUIChildProtocol",new Set(Object(wg.a)()(["didBecomeActive","willResignActive","willEnterForeground","didEnterBackground","didReceiveSyntheticBrowserEvent"]))),Tg=n(707),Og=n(1298),Pg=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xg=function(e){function t(t){var n=e.call(this,{allowedRemoteOrigins:t.allowedRemoteOrigins,autoconnect:t.autoconnect,remoteOrigin:t.remoteOrigin,outgoingWindow:t.outgoingWindow})||this;return n._iframeIsLoaded=new Tg.a,n.onIframeReady=t.onIframeReady||function(){},n._iframeIsLoaded.addListener(n.outgoingWindowDidChange.bind(n)),n.iframe=t.iframe,n}return Pg(t,e),Object.defineProperty(t.prototype,"iframe",{get:function(){return this._iframe},set:function(e){var t=this,n=this._iframe;if(e!==n){this._iframe=e;var r=this._iframeDidLoad;if(n&&e!==n&&(r&&n.removeEventListener("load",r),this._iframeDidLoad=void 0),e)if(this.outgoingWindow)this.onIframeReady(e);else{var i=this._iframeDidLoad=function(){t._iframeDidLoad&&e.removeEventListener("load",t._iframeDidLoad),t._iframeDidLoad=void 0,t._iframeIsLoaded.dispatch(),t.onIframeReady(e)};e.addEventListener("load",i)}this.outgoingWindowDidChange()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"outgoingWindow",{get:function(){var e,t=null===(e=this.iframe)||void 0===e?void 0:e.contentWindow;return this._lastOutgoingWindowReturnValueDependencyValue===(this._lastOutgoingWindowReturnValueDependencyValue=t)?this._lastReturnedOutgoingWindowValue:this._lastReturnedOutgoingWindowValue=t?{actualOutgoingWindow:t,postMessage:function(e,t){var n=this.actualOutgoingWindow;if(n.postMessage)return n.postMessage(e,t)}}:null},enumerable:!1,configurable:!0}),t}(Og.a),Ag=function(e){function t(t){var n=e.call(this,{allowedRemoteOrigins:t.allowedRemoteOrigins,autoconnect:t.autoconnect,remoteOrigin:t.remoteOrigin,outgoingWindow:t.outgoingWindow})||this;return n.remoteWindow=t.remoteWindow,n}return Pg(t,e),Object.defineProperty(t.prototype,"remoteWindow",{get:function(){return this._remoteWindow},set:function(e){var t=this,n=this._remoteWindow;if(window!==n){this._remoteWindow=e;var r=this._remoteWindowDidLoad;if(n&&e!==n&&r&&n.removeEventListener("load",r),e&&!this.outgoingWindow){var i=this._remoteWindowDidLoad=function(){t._remoteWindowDidLoad&&window.removeEventListener("load",t._remoteWindowDidLoad),t._remoteWindowDidLoad=void 0};window.addEventListener("load",i)}this.outgoingWindowDidChange()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"outgoingWindow",{get:function(){var e=this._remoteWindow;return this._lastOutgoingWindowReturnValueDependencyValue===(this._lastOutgoingWindowReturnValueDependencyValue=e)?this._lastReturnedOutgoingWindowValue:this._lastReturnedOutgoingWindowValue=e?{actualOutgoingWindow:e,postMessage:function(e,t){var n=this.actualOutgoingWindow;if(n.postMessage)return n.postMessage(e,t)}}:null},enumerable:!1,configurable:!0}),t}(Og.a),Ng=n(710),Rg=n(708),Dg=n(720),kg=n(1299),Ug=n(1300),Lg=n(715),Mg=n(711),jg=n(1305),Fg=n(714),Bg=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localProtocol=Mg.a,t.remoteProtocol=Fg.a,t._private_processState=dg.a.NONE,t._internal_isReadyToTerminate=!1,t}return Bg(t,e),Object.defineProperty(t.prototype,"isReadyToTerminate",{get:function(){return this._isReadyToTerminate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"processId",{get:function(){var e=this.processInfo;return e?e.processId:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localProtocolTarget",{get:function(){return this},enumerable:!1,configurable:!0}),t.prototype.messagingResponseErrorTerminationMethod=function(e,t){return this.terminateWithReasonAndInfo(e,t)},t.prototype.run=function(e,t,n){var r=this;Object(dg.b)(this.processState,dg.a.LOADED);var i=this.processInfo,o=this.remoteProxy;n.launchReason||Object(Rg.a)("Invalid launch options were passed to ChildProcessReference.run"),i.launchOptions=n,o.beginLaunching(e,t,i).then((function(e){return r.terminateIfMessagingResponseError(e)}))},t.prototype.terminateWithReasonAndInfo=function(e,t){var n=this;return(this.isConnected?this.disconnect():Promise.resolve()).then((function(){n.isTerminated||(n._isReadyToTerminate=!0,n.terminate(),n.delegate.childProcessReferenceDidTerminate(n,e,t))}))},t.prototype.isReadyToReceiveMessages=function(){var e=this;Object(dg.b)(this.processState,dg.a.LOADING),this._processState=dg.a.LOADED;var t=this.delegate,n={launchReason:Lg.a.USER_LAUNCH};this.invokeLater((function(){return t.childProcessReferenceWillFinishLaunching(e,n)}))},t.prototype.didFinishLaunching=function(e){var t=this;Object(dg.b)(this.processState,dg.a.LOADED),this._processState=dg.a.RUNNING;var n=this.delegate,r=this.processInfo,i=(void 0===r?{}:r).launchOptions||{};i.launchData=e,this.invokeLater((function(){n.childProcessReferenceDidFinishLaunching(t,i)}))},t.prototype.isReadyToTerminateDidChange=function(e){this._isReadyToTerminate=e},t.prototype.didEnd=function(e,t){var n=this,r=function(){n.terminateWithReasonAndInfo(e,Object(jg.a)(t))};e===pg.a.UNCAUGHT_EXCEPTION?(this.isInvokeLaterScheduled("terminateWithReasonAndInfo")&&this.cancelInvokeLater("terminateWithReasonAndInfo"),r()):this.isInvokeLaterScheduled("terminateWithReasonAndInfo")||this.invokeLater(r,0,"terminateWithReasonAndInfo")},t.prototype.reportNonFatalError=function(e,t){this.delegate.childProcessReferenceReportNonFatalError(this,e,t)},t.prototype.recordException=function(e){this.delegate.childProcessReferenceRecordException(this,e)},t.prototype.willUnload=function(e){this.delegate.childProcessReferenceWillUnload(this,e)},t.prototype.wantsReload=function(){var e=this;this._isReadyToTerminate=!0,this.invokeLater((function(){e.delegate.childProcessReferenceWantsReload(e)}))},Object.defineProperty(t.prototype,"_processState",{get:function(){return this._private_processState},set:function(e){var t=this.delegate;this._private_processState=e,t&&t.childProcessReferenceStateDidChange(this,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isReadyToTerminate",{get:function(){return this._internal_isReadyToTerminate},set:function(e){var t=this.delegate;this._internal_isReadyToTerminate!==e&&(this._internal_isReadyToTerminate=e,t&&t.childProcessReferenceIsReadyToTerminateDidChange(this,e))},enumerable:!1,configurable:!0}),t.mixins=[kg.a],t}(Ug.a),Hg=n(1307),Wg=n(702),Vg=n(1295),Zg=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qg=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Kg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remoteInstanceStateChanged=new Tg.a(t),t.remoteInstanceLoadTimeout=3e4,t.childProcessReferenceClass=zg,t._remoteInstanceState=dg.a.NONE,t._remoteInstanceIsReadyToTerminate=!1,t._remoteInstanceTimeoutMethodIdentifers=["REMOTE_INSTANCE_LOAD_TIMEOUT_IDENTIFIER"],t}return Zg(t,e),Object.defineProperty(t.prototype,"remoteInstanceState",{get:function(){return this._remoteInstanceState},set:function(e){this._remoteInstanceState=e,this.remoteInstanceStateChanged.dispatch(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"remoteInstanceIsReadyToTerminate",{get:function(){return this._remoteInstanceIsReadyToTerminate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"messagingResponseErrorTerminationMethod",{get:function(){return this.remoteInstanceDidFatalError},enumerable:!1,configurable:!0}),t.prototype.remoteInstanceWillConnect=function(){},t.prototype.remoteInstanceWillDisconnect=function(){},t.prototype.loadRemoteInstance=function(e){var t;Object(dg.b)(this.remoteInstanceState,dg.a.NONE);var n=this.remoteInstanceLoadTimeout,r=this._scheduledTimeoutWasInvokedMethod;null===(t=this.delegate)||void 0===t||t.remoteInstanceWillBeginLaunching(this),this._createChildProcessReference(e),this.invokeLater(r,n,"REMOTE_INSTANCE_LOAD_TIMEOUT_IDENTIFIER")},t.prototype.runRemoteInstance=function(e){Object(dg.b)(this.remoteInstanceState,dg.a.LOADED);var t=this._childProcessReference,n=this._hostInfo,r=this._sessionInfo;t.run(r,n,e)},t.prototype.terminateRemoteInstance=function(e){var t=this;void 0===e&&(e=!1),Object(dg.b)(this.remoteInstanceState,dg.a.LOADING,dg.a.LOADED,dg.a.RUNNING,dg.a.TERMINATED);var n=this._channel;return this.cancelInvokeLaterMethods(),this._terminateChildProcessReference(e).then((function(){n&&!n.isDisconnected&&n.disconnect(),t._channel=void 0}))},t.prototype.reloadRemoteInstance=function(e){var t=this;void 0===e&&(e=!1);var n=this._reloadPromise||Promise.resolve();return this._reloadPromise=n.then((function(){return t.terminateRemoteInstance(e)})).then((function(){return t.loadRemoteInstance()}))},t.prototype.remoteInstanceDidFatalError=function(e,t){return Object(dg.b)(this.remoteInstanceState,dg.a.LOADING,dg.a.LOADED,dg.a.RUNNING),t&&!Object(Wg.d)(t)&&Object(Rg.a)("remoteInstanceDidFatalError optional info argument should be a hash"),this._childProcessReference.terminateWithReasonAndInfo(e,t&&t.calleeStack?t:Object(jg.a)(t,2))},t.prototype.createMessagingChannel=function(e,t,n){var r=this._childProcessReference;return r&&r.channel||Object(Rg.a)("Unable to connect to child. Can not create MessagingChannel"),r.createMessagingChannel(e,t,n),r.remoteProxy},t.prototype.childProcessReferenceWillFinishLaunching=function(e,t){var n;null===(n=this.delegate)||void 0===n||n.remoteInstanceWillFinishLaunching(this,t)},t.prototype.childProcessReferenceDidFinishLaunching=function(e,t){var n;this.cancelInvokeLater("REMOTE_INSTANCE_LOAD_TIMEOUT_IDENTIFIER"),null===(n=this.delegate)||void 0===n||n.remoteInstanceDidFinishLaunching(this,t)},t.prototype.childProcessReferenceDidTerminate=function(e,t,n){var r;this._cancelAllScheduledTimeoutMethods(),null===(r=this.delegate)||void 0===r||r.remoteInstanceDidTerminate(this,t,n)},t.prototype.childProcessReferenceWantsReload=function(e){this.reloadRemoteInstance()},t.prototype.childProcessReferenceWillUnload=function(e,t){},t.prototype.childProcessReferenceReportNonFatalError=function(e,t,n){},t.prototype.childProcessReferenceRecordException=function(e,t){},t.prototype.childProcessReferenceIsReadyToTerminateDidChange=function(e,t){this._remoteInstanceIsReadyToTerminate=t},t.prototype.childProcessReferenceStateDidChange=function(e,t){this.remoteInstanceState=t},Object.defineProperty(t.prototype,"_childProcessReferences",{get:function(){return Gg().childProcessReferences},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_parentProcessId",{get:function(){return Gg().processId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_sessionInfo",{get:function(){return Gg().sessionInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_hostInfo",{get:function(){return Gg().hostInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_scheduledTimeoutWasInvokedMethod",{get:function(){var e=this;return function(t){return e._scheduledTimeoutWasInvoked(t)}},enumerable:!1,configurable:!0}),t.prototype._scheduledTimeoutWasInvoked=function(e){"REMOTE_INSTANCE_LOAD_TIMEOUT_IDENTIFIER"===e?this._terminateDueToTimeoutError("Remote instance failed to complete loading before timeout was triggered."):Object(Rg.a)("_scheduledTimeoutWasInvoked called with unknown methodToInvokeIdentifier "+e)},t.prototype._terminateDueToTimeoutError=function(e){this.remoteInstanceDidFatalError(pg.a.TIMEOUT,{errorMessage:e,terminatedProcessState:this.remoteInstanceState})},t.prototype._pendingTimeoutMethodsAreScheduled=function(){var e,t,n=this._remoteInstanceTimeoutMethodIdentifers;try{for(var r=qg(n),i=r.next();!i.done;i=r.next()){var o=i.value;if(this.isInvokeLaterScheduled(o))return!0}}catch(a){e={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return!1},t.prototype._cancelAllScheduledTimeoutMethods=function(){var e,t,n=this._remoteInstanceTimeoutMethodIdentifers;try{for(var r=qg(n),i=r.next();!i.done;i=r.next()){var o=i.value;this.isInvokeLaterScheduled(o)&&this.cancelInvokeLater(o)}}catch(a){e={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype._createChildProcessReference=function(e){var t=this._channel,n=this._childProcessReferences,r=this._parentProcessId,i=this.childProcessReferenceClass,o=this._childProcessReference=new i;return o.delegate=this,o.processInfo={parentProcessId:r,processId:Object(Vg.a)(),processName:e},o.channel=t,this.remoteInstanceWillConnect(),o.connect(),n.add(o),o},t.prototype._terminateChildProcessReference=function(e){var t,n=this;void 0===e&&(e=!1);var r=this._childProcessReference,i=this._childProcessReferences;return e||!1!==r.isReadyToTerminate||Object(Rg.a)("Aborting termination of the ChildProcessReference. It's isReadyToTerminate flag is false"),i.delete(r),r.isConnected?(this.remoteInstanceWillDisconnect(),t=r.disconnect()):t=Promise.resolve(),t.then((function(){r.isTerminated||r.terminate(),n._childProcessReference=void 0,n.remoteInstanceState=dg.a.NONE}))},t.mixins=[kg.a,Dg.a],t}(Hg.a);function Gg(){return n(1294).Application.application}function Yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xg(e,t){return(Xg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Jg,$g=function(){function e(e){this.targetUIStateWhenFinished=void 0,this.operationPromise=void 0,this.operationResolve=void 0,this.targetUIStateWhenFinished=e.targetUIStateWhenFinished,this.operationPromise=e.operationPromise,this.operationResolve=e.operationResolve}return e.prototype.cancel=function(){(0,this.operationResolve)(new _g.a({status:Cg.a.CANCELED}))},e}();!function(e){e[e.IFRAME=0]="IFRAME",e[e.WINDOW=1]="WINDOW"}(Jg||(Jg={}));var ev=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).delegate=void 0,n.allowedRemoteOrigins=void 0,n.remoteOrigin=void 0,n.url=void 0,n.remoteInstanceName=void 0,n.remoteInstanceTitle=void 0,n.remoteInstanceIsReadyToBeDisplayedTimeout=2e4,n.enableSpinnerViewForRemoteInstance=!0,n.displayMedium=Jg.IFRAME,n.windowParameters=void 0,n._isConnected=!1,n.iframe=void 0,n.applicationWindow=void 0,n._remoteUIState=ug.NONE,n._willEnterForegroundPromise=void 0,n._willEnterForegroundResolve=void 0,n._inProgressUIStateTransitionsOperation=void 0,n._pendingUIStateTransitionsOperation=void 0,n.allowedRemoteOrigins=t.allowedRemoteOrigins,n.url=t.url,n.remoteInstanceName=t.remoteInstanceName,n.remoteInstanceTitle=t.remoteInstanceTitle,n.remoteOrigin=Object(he.c)(t.url).origin,n._remoteInstanceTimeoutMethodIdentifers=[].concat(n._remoteInstanceTimeoutMethodIdentifers,["IS_READY_TO_BE_DISPLAYED_TIMEOUT_IDENTIFIER"]),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Xg(t,n);var i,o,a=r.prototype;return a.connectedCallback=function(){this.loadRemoteInstance()},a.disconnectedCallback=function(){this.terminateRemoteInstance(!0)},a.remoteInstanceWillConnect=function(){this.createMessagingChannel(Eg,this,Sg)},a.loadRemoteInstance=function(){var e=this.url,t=this.remoteInstanceName,n=this.remoteInstanceTitle,r=this.allowedRemoteOrigins,i=this.windowParameters,o=Object(he.c)(e).origin;if(this.displayMedium===Jg.IFRAME&&this.iframe){var a=this.iframe;null==a||a.setAttribute("data-name",null!=t?t:""),null==a||a.setAttribute("data-title",null!=n?n:""),this._channel=new xg({allowedRemoteOrigins:r,iframe:a,remoteOrigin:o}),a.src=e}else{var s=new bg({remoteInstanceName:t,remoteInstanceTitle:n,src:e});s.open(i),this.applicationWindow=s;var c=s.window;c&&(this._channel=new Ag({allowedRemoteOrigins:r,remoteWindow:c,remoteOrigin:o}))}this._super.loadRemoteInstance(t)},a.terminateRemoteInstance=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._willEnterForegroundResolve&&(this._willEnterForegroundResolve(new _g.a({status:Cg.a.DISCONNECTED})),this._willEnterForegroundPromise=void 0,this._willEnterForegroundResolve=void 0),this._inProgressUIStateTransitionsOperation&&(this._inProgressUIStateTransitionsOperation.cancel(),this._inProgressUIStateTransitionsOperation=void 0),this._pendingUIStateTransitionsOperation&&(this._pendingUIStateTransitionsOperation.cancel(),this._pendingUIStateTransitionsOperation=void 0);var t=this.iframe,n=this.applicationWindow;return n?n.close():t&&(this.iframe=document.createElement("iframe")),this.remoteUIState=ug.NONE,this._super.terminateRemoteInstance(e)},a.transitionRemoteInstanceToActiveForeground=function(){var e,t,n;Object(dg.b)(this.remoteInstanceState,dg.a.RUNNING);var r=new Promise((function(e){n=e})),i=new $g({targetUIStateWhenFinished:ug.ACTIVE_FOREGROUND,operationPromise:r,operationResolve:n});return null==(e=this.iframe)||null==(t=e.contentWindow)||t.focus(),this._performUIStateTransitionsOperation(i),i.operationPromise},a.transitionRemoteInstanceToInactiveForeground=function(){var e;Object(dg.b)(this.remoteInstanceState,dg.a.RUNNING);var t=new Promise((function(t){e=t})),n=new $g({targetUIStateWhenFinished:ug.INACTIVE_FOREGROUND,operationPromise:t,operationResolve:e});return this._performUIStateTransitionsOperation(n),n.operationPromise},a.transitionRemoteInstanceToBackground=function(){var e;Object(dg.b)(this.remoteInstanceState,dg.a.RUNNING);var t=new Promise((function(t){e=t})),n=new $g({targetUIStateWhenFinished:ug.BACKGROUND,operationPromise:t,operationResolve:e});return this._performUIStateTransitionsOperation(n),n.operationPromise},a.isReadyToBeDisplayed=function(){Object(dg.b)(this.remoteInstanceState,dg.a.RUNNING);var e=this._willEnterForegroundResolve;if(!e)throw new Error("isReadyToBeDisplayed missing willEnterForegroundPromise instance");this._willEnterForegroundPromise=void 0,this._willEnterForegroundResolve=void 0,this._cancelAllScheduledTimeoutMethods(),e(new _g.a({status:Cg.a.OK}))},a._performUIStateTransitionsOperation=function(e){var t=this;Object(dg.b)(this.remoteInstanceState,dg.a.RUNNING);var n=this.remoteUIState,r=e.targetUIStateWhenFinished,i=e.operationResolve;if(this._inProgressUIStateTransitionsOperation)this._pendingUIStateTransitionsOperation&&this._pendingUIStateTransitionsOperation.cancel(),this._pendingUIStateTransitionsOperation=e;else if(gg(n,r))console.warn("_performUIStateTransitionsOperation: remote instance is already in target UIState "+r),i(new _g.a({status:Cg.a.OK}));else{this._inProgressUIStateTransitionsOperation=e;var o=this._getUIStateTransitionsFor(r);this._performUIStateTransitions(o,i).then((function(e){var n=t._pendingUIStateTransitionsOperation;t._inProgressUIStateTransitionsOperation=void 0,t._pendingUIStateTransitionsOperation=void 0,e.isOK&&n&&t.invokeLater((function(){return t._performUIStateTransitionsOperation(n)}))}))}},a._performUIStateTransitions=function(e,t){var n=this;Object(dg.b)(this.remoteInstanceState,dg.a.RUNNING);for(var r,i=Promise.resolve(new _g.a({status:Cg.a.OK})),o=function(){var e=r.value;i=i.then((function(t){return t.isOK?n._performUIStateTransition(e):t}))},a=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Yg(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yg(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(r=a()).done;)o();return i.then((function(e){return t(e),e}))},a.childProcessReferenceIsReadyToTerminateDidChange=function(e,t){var n;this._super.childProcessReferenceIsReadyToTerminateDidChange(e,t),null==(n=this.delegate)||n.remoteInstanceIsReadyToTerminateDidChange(this,t)},a._performUIStateTransition=function(e){var t=this,n=this._childProcessReference,r=e.remoteMethodName,i=e.targetUIState,o=e.setUIStateBeforeMethodCall;return Promise.resolve().then((function(){return t._animateViewToTargetRemoteUIState(i)})).then((function(){return function(){var a;o&&(t.remoteUIState=i);var s=null==n||null==(a=n.remoteProxy)?void 0:a[r];if(e===iv){var c=t.remoteInstanceIsReadyToBeDisplayedTimeout,u=t._scheduledTimeoutWasInvokedMethod;return t.invokeLater(u,c,"IS_READY_TO_BE_DISPLAYED_TIMEOUT_IDENTIFIER"),s().then((function(e){return e.isOK?(t._willEnterForegroundPromise=new Promise((function(e){t._willEnterForegroundResolve=e})),t._willEnterForegroundPromise):e}))}return e===ov?s().then((function(e){return t._pendingTimeoutMethodsAreScheduled()&&e.isOK&&t._cancelAllScheduledTimeoutMethods(),e})):s()}()})).then((function(e){return e.isOK&&!o&&(t.remoteUIState=i),e}))},a._getUIStateTransitionsFor=function(e){var t=this.remoteUIState,n=[];if(gg(e,ug.BACKGROUND))gg(t,ug.ACTIVE_FOREGROUND)&&n.push(sv),n.push(ov);else if(gg(e,ug.INACTIVE_FOREGROUND))gg(t,ug.NONE,ug.BACKGROUND)?n.push(iv):gg(t,ug.ACTIVE_FOREGROUND)&&n.push(sv);else{if(!gg(e,ug.ACTIVE_FOREGROUND))throw new Error("Invalid => no support for transitioning to "+e);gg(t,ug.NONE,ug.BACKGROUND)&&n.push(iv),n.push(av)}return n},a._scheduledTimeoutWasInvoked=function(e){"IS_READY_TO_BE_DISPLAYED_TIMEOUT_IDENTIFIER"===e?this._terminateDueToTimeoutError("Remote instance failed to send the isReadyToBeDisplayed message before timeout was triggered."):this._super._scheduledTimeoutWasInvoked(e)},a._animateViewToTargetRemoteUIState=function(e){},i=r,(o=[{key:"remoteUIState",get:function(){return this._remoteUIState},set:function(e){this._remoteUIState=e}},{key:"isConnected",get:function(){return this._isConnected},set:function(e){!this.isConnected&&e?(this._isConnected=!0,this.connectedCallback()):this.isConnected&&!e&&(this._isConnected=!1,this.disconnectedCallback())}}])&&Qg(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(Ng.a);ev.mixins=[Kg];var tv,nv,rv=function(e){var t;this.remoteMethodName=void 0,this.targetUIState=void 0,this.setUIStateBeforeMethodCall=void 0,this.remoteMethodName=e.remoteMethodName,this.targetUIState=e.targetUIState,this.setUIStateBeforeMethodCall=null!=(t=e.setUIStateBeforeMethodCall)&&t},iv=new rv({remoteMethodName:"willEnterForeground",targetUIState:ug.INACTIVE_FOREGROUND}),ov=new rv({remoteMethodName:"didEnterBackground",targetUIState:ug.BACKGROUND,setUIStateBeforeMethodCall:!0}),av=new rv({remoteMethodName:"didBecomeActive",targetUIState:ug.ACTIVE_FOREGROUND,setUIStateBeforeMethodCall:!0}),sv=new rv({remoteMethodName:"willResignActive",targetUIState:ug.INACTIVE_FOREGROUND}),cv=n(701);function uv(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function lv(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){uv(o,r,i,a,s,"next",e)}function s(e){uv(o,r,i,a,s,"throw",e)}a(void 0)}))}}function dv(e,t,n){return pv.apply(this,arguments)}function pv(){return(pv=lv(regeneratorRuntime.mark((function e(t,n,r){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=2,o=regeneratorRuntime.mark((function e(){var o,a,s,c,u,l,d,p,f,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r,a=function(){switch(o){case"no":return"nb";case"no-no":return"nb-no";default:return o}}(),s=Object(he.c)(t),c="en-us","/"!==(u=s.pathname).charAt(u.length-1)&&(s.pathname=u+"/"),l=au(a),s.pathname=s.pathname+l+".json",e.next=11,lv(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Za(s.href,n,{maxAttempts:3});case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 11:if(null==(d=e.sent)||!d.ok){e.next=18;break}return e.next=15,lv(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 15:if(!(p=e.sent)){e.next=18;break}return e.abrupt("return",{v:{regionFormat:a,formattingRules:p}});case 18:if(f=a.split("-"),h=404===(null==d?void 0:d.status)&&a!==c&&f.length>1?(f.pop(),f.join("-")):c,0!==i){e.next=22;break}throw new Error('Cannot load region formatting rules for "'+a+'".');case 22:h===c&&(i-=1),r=h;case 24:case"end":return e.stop()}}),e)}));case 2:return e.delegateYield(o(),"t0",4);case 4:if("object"!==typeof(a=e.t0)){e.next=7;break}return e.abrupt("return",a.v);case 7:e.next=2;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.EXIT_NON_FATAL=0]="EXIT_NON_FATAL",e[e.EXIT_FATAL_ERROR=1]="EXIT_FATAL_ERROR",e[e.EXIT_STARTUP_ERROR=2]="EXIT_STARTUP_ERROR",e[e.EXIT_PCS_MISSING=3]="EXIT_PCS_MISSING",e[e.EXIT_PCS_INVALID=4]="EXIT_PCS_INVALID"}(tv||(tv={}));var fv=null!=(nv=document.currentScript)&&nv.src?"https://www.icloud.com/system/icloud.com/current/en-us/main.js":"",hv=new URL(fv).pathname.replace(/\/[^/]+\/?$/,""),mv=function(e){this.publicPath=void 0,this.rootContentPath=void 0;var t=ws(e);this.publicPath=t.join("/"),this.rootContentPath=t.slice(0,t.length-1).join("/")};function gv(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function vv(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){gv(o,r,i,a,s,"next",e)}function s(e){gv(o,r,i,a,s,"throw",e)}a(void 0)}))}}function yv(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return bv(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bv(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cv(e){return Nn.record(Nn.string()).safeParse(e).success}mv.sharedInstance=new mv(hv);var Iv=function(){function e(e,t){this.delegates=[],this.regionFormatRulesVersion=5,this.regionFormatBaseUrl=void 0,this.regionFormatterLocaleMap={no:"nb","no-NO":"nb-NO","iw-IL":"he-IL","vi-VI":"vi","zh-CN":"zh-Hans-CN","zh-TW":"zh-Hant-TW","zh-Hant-CN":"zh-Hant"},this.hasSecondaryLocales=["ar-SA","he-IL","iw-IL"],this.locale=null,this.regionFormat=null,this.cachedFormattingRules=null,this.regionFormatBaseUrl="https://www."+e+"/locales/",this.locale=t}var t,n,r=e.prototype;return r.setSecondaryLocale=function(e){_r.secondaryLocale=e;for(var t,n=yv(this.delegates);!(t=n()).done;)t.value.localeOrRegionFormatChanged()},r.setCurrentLocaleAndRegionFormat=function(){var e=vv(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],this.locale!==t&&(r.push(this.fetchStringsJson(t)),this.locale=t),this.regionFormat!==n&&null!==n&&(r.push(this.loadRegionFormattingRules(n)),this.regionFormat=n),e.next=5,Promise.all(r);case 5:if(e.sent.every((function(e){return e})))for(i=yv(this.delegates);!(o=i()).done;)o.value.localeOrRegionFormatChanged();case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),r.fetchStringsJson=function(){var e=vv(regeneratorRuntime.mark((function e(t){var n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=_r.protocol,r=_r.hostname,i=mv.sharedInstance.rootContentPath,o=n+"//"+r+"/"+i+"/"+t+"/strings.json",e.next=6,es.fetchJSON(o,Cv);case 6:if(null!=(a=e.sent)&&a.ok){e.next=9;break}return e.abrupt("return",!1);case 9:return c(t,a.result),s(t),e.abrupt("return",!0);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r.loadRegionFormattingRules=function(){var e=vv(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=""+this.regionFormatBaseUrl+this.regionFormatRulesVersion,e.next=3,dv(n,{credentials:"same-origin"},t);case 3:if(r=e.sent,i=r.formattingRules){e.next=7;break}return e.abrupt("return",!1);case 7:return this.cachedFormattingRules=i,e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t=e,(n=[{key:"regionFormattingRules",get:function(){return this.cachedFormattingRules}}])&&_v(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();Iv.sharedInstance=new Iv(Ne.sharedInstance.current.servicesDomain,a());var wv,Ev=[{dispName:"English (U.S.)",locale:"en-us"},{dispName:"English (Australia)",locale:"en-au"},{dispName:"English (Canada)",locale:"en-ca"},{dispName:"English (New Zealand)",locale:"en-nz"},{dispName:"English (U.K.)",locale:"en-gb"},{dispName:"Fran\xe7ais",locale:"fr-fr"},{dispName:"Fran\xe7ais (Canada)",locale:"fr-ca"},{dispName:"Deutsch",locale:"de-de"},{dispName:"\u7b80\u4f53\u4e2d\u6587",locale:"zh-cn"},{dispName:"\u7e41\u9ad4\u4e2d\u6587\uff08\u9999\u6e2f\uff09",locale:"zh-hk"},{dispName:"\u7e41\u9ad4\u4e2d\u6587\uff08\u53f0\u7063\uff09",locale:"zh-tw"},{dispName:"\u65e5\u672c\u8a9e",locale:"ja-jp"},{dispName:"Espa\xf1ol",locale:"es-es"},{dispName:"Espa\xf1ol (M\xe9xico)",locale:"es-mx"},{dispName:"Italiano",locale:"it-it"},{dispName:"Nederlands",locale:"nl-nl"},{dispName:"\ud55c\uad6d\uc5b4",locale:"ko-kr"},{dispName:"Portugu\xeas (Brasil)",locale:"pt-br"},{dispName:"Portugu\xeas (Portugal)",locale:"pt-pt"},{dispName:"Dansk",locale:"da-dk"},{dispName:"Suomi",locale:"fi-fi"},{dispName:"Norsk bokm\xe5l",locale:"no-no"},{dispName:"Svenska",locale:"sv-se"},{dispName:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",locale:"ru-ru"},{dispName:"Polski",locale:"pl-pl"},{dispName:"T\xfcrk\xe7e",locale:"tr-tr"},{dispName:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",locale:"ar-sa"},{dispName:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",locale:"th-th"},{dispName:"\u010ce\u0161tina",locale:"cs-cz"},{dispName:"Magyar",locale:"hu-hu"},{dispName:"Catal\xe0",locale:"ca-es"},{dispName:"Hrvatski",locale:"hr-hr"},{dispName:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",locale:"el-gr"},{dispName:"\u05e2\u05d1\u05e8\u05d9\u05ea",locale:"iw-il"},{dispName:"Rom\xe2n\u0103",locale:"ro-ro"},{dispName:"Sloven\u010dina",locale:"sk-sk"},{dispName:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",locale:"uk-ua"},{dispName:"Bahasa Indonesia",locale:"id-id"},{dispName:"Bahasa Melayu",locale:"ms-my"},{dispName:"Ti\u1ebfng Vi\u1ec7t",locale:"vi-vi"},{dispName:"\u0939\u093f\u0928\u094d\u0926\u0940",locale:"hi-in"}];function Sv(){return window.visualViewport?{offsetLeft:window.visualViewport.offsetLeft,offsetTop:window.visualViewport.offsetTop,pageLeft:window.visualViewport.pageLeft,pageTop:window.visualViewport.pageTop,width:window.visualViewport.width,height:window.visualViewport.height,scale:window.visualViewport.scale}:{offsetLeft:0,offsetTop:0,pageLeft:0,pageTop:0,width:window.innerWidth,height:window.innerHeight,scale:1}}function Tv(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Ov(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ov(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e[e.NOT_AUTHENTICATED=0]="NOT_AUTHENTICATED",e[e.PARTIALLY_AUTHENTICATED_HSA=1]="PARTIALLY_AUTHENTICATED_HSA",e[e.AUTHENTICATED=2]="AUTHENTICATED",e[e.PARTIALLY_AUTHENTICATED_MANAGED_APPLE_ID=3]="PARTIALLY_AUTHENTICATED_MANAGED_APPLE_ID"}(wv||(wv={}));var Pv=function(){function e(){}return e.getAppPreferences=function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n={},r=Tv(t);!(e=r()).done;){var i,o=e.value;n[o]=null!=(i=up.getPreferences(o))?i:{}}return n},e.getLocales=function(e){var t=new Set(e);return Ev.filter((function(e){return t.has(e.locale)}))},e.getCloudOSActions=function(){return["fetchAppUrl","resolveCKShortGUID","fetchIcon","getConformingTypes","meCardUpdated","requestMeCard","deleteMeCardPhoto","storeMeCardPhoto","refreshAppPreferences","setAccountPreference","setAppPreferences","refreshQuotaData","loadRulesForRegions","setStartupInfo","setStartupUrl","startupDataIsLoaded","beginStat","didReceiveSpecialResponse","endStat","recordApplicationMessage","recordStat","recordPerfStat","requestSent","requestReceived","completeAuthentication","logoutFromAllBrowsers","performLogout","performSecondaryAuth","replaceCurrentApp","revalidateUser","sendLocalNotification","setAppBanner","setBadgeCount","setRoute","setTitle","showAccountSettings","showAppSwitcher","showAccountMenu","showLocalNotification","showSpringBoard","switchToApplication","applicationIsReady","appWillUnload","exit","handleApplicationCrash","isReadyToTerminateDidChange","relayKeyboardShortcut","relayMouseMove","reload","reloadWhenCanTerminate","showCreationMenu","showStorageUsageWarning","didBecomeInteractive"]},e.getCloudOSState=function(e,t,n,r,i){var o,a,s,c,u,l,d,p=Kn.sharedInstance,h=_r.hostname,m=_r.clientId,g=_r.configuration.rawConfiguration,v=!!g&&g.isCarryUser,y=g&&g.dsInfo&&g.dsInfo.statusCode,b={horizontal:qc(),vertical:Qc()},_=window.hasEnteredLimitedExperienceMode,C=Sv(),I=Ne.sharedInstance.current.servicesDomain,w=Ne.sharedInstance.current,E="www."+I,S=w===ve,T=w===be,O=w===ye,P=I===ge.servicesDomain?"cn":"",x=Iv.sharedInstance.regionFormattingRules,A=Iv.sharedInstance.regionFormatBaseUrl,N=Iv.sharedInstance.regionFormatRulesVersion,R=_r.supportedLocales,D=_r.childApplicationSupportedLocales,k=this.getLocales(R),U=this.getLocales(D),L=null!=(o=t.identifier)?o:null,M=bu(t);"find"===t.identifier&&b.horizontal===f.REGULAR&&(M=Xn("CloudOS.LandingPage.Find.DisplayName"));var j=gl.sharedInstance.configurations.map((function(e){return e.applicationInfo.authBagId})),F=this.getAppPreferences(j)||{},B=up.getAccountPreferences()||{},z=up.getStartupInfoForApp(e.path),H=null,W=null;z&&(H=z.url,W=z);var V,Z,q=null!=(a=null==(s=wZ.sharedInstance.cloudOSUser)?void 0:s.details)?a:null,K=(V=null!=(c=null==q?void 0:q.completedAuthenticationStep)?c:0,Z=null!=(u=null==q?void 0:q.totalAuthenticationSteps)?u:0,0===V?wv.NOT_AUTHENTICATED:V<Z?wv.PARTIALLY_AUTHENTICATED_HSA:wv.AUTHENTICATED),G=YV.cloudOSApplication.quotaController.getMostRecentQuotaData(),Y=G?{overQuota:G.quotaStatus.overQuota,haveMaxQuotaTier:G.quotaStatus.haveMaxQuotaTier,"almost-full":G.quotaStatus["almost-full"],paidQuota:G.quotaStatus.paidQuota,compStorageInBytes:G.storageUsageInfo.compStorageInBytes,usedStorageInBytes:G.storageUsageInfo.usedStorageInBytes,totalStorageInBytes:G.storageUsageInfo.totalStorageInBytes,commerceStorageInBytes:G.storageUsageInfo.commerceStorageInBytes,storageUsageByMedia:G.storageUsageByMedia,familyStorageUsageInfo:G.storageUsageInfo}:void 0,Q=YV.cloudOSApplication.meCardController.meCard,X=_r.configuration.environment,J=null!=(l=null==n?void 0:n.applicationRelativePath)?l:null,$=null!=(d=null==n?void 0:n.applicationHash)?d:null;return{accountMenu:{items:[{title:Xn("CloudOS.AccountMenu.Settings.Title"),target:"CloudOS",action:"showAccountSettings",disableWhenCurrentApp:"settings"},{title:Xn("CloudOS.Authentication.SignOutButton.Title"),target:"CloudOS",action:"performLogout"}],width:200},accountPreferences:B,additionalClassNamesForBody:P,appPreferences:F,appsInfo:null,authBag:g,availableLocales:k,clientId:m,currentlyActiveApplication:L,defaultAssetHostname:E,displayName:M,environment:X,hostname:h,isBeta:S,isCarry:T,isCarryUser:v,isFuture:O,isCloudOS2:!0,limitedExperienceMode:_,primaryInteractionMode:_r.primaryInteractionMode,isOnSupportedMobile:null,localesSupportedByAllApps:U,meCard:Q,mininumWindowSize:{width:320,height:240},pushToken:null,quotaData:Y,sizeClass:b,visualViewport:C,regionFormattingRules:x,regionFormattingRulesBaseUrl:A,regionFormattingRulesVersion:N,requestedStartupUrl:H,requestedStartupInfo:W,route:J,routeHash:$,secureChannelInfoData:null,sessionID:p.identifier,userAuthenticationState:K,userStatusCode:y,versions:null,launchItem:r,launchReason:i}},e}(),xv=n(1292),Av=n(718);function Nv(e,t){var n,r;e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n=e,r=t,(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(n,r)}var Rv,Dv,kv=function(e){function t(){return e.apply(this,arguments)||this}Nv(t,e);var n=t.prototype;return n._constructRPCMethodName=function(e,t){return t},n._createJsonRpcListener=function(t){var n=e.prototype._createJsonRpcListener.call(this,t);return n.serializer=new Uv,n},n._createJsonRpcCaller=function(t){var n=e.prototype._createJsonRpcCaller.call(this,t);return n.serializer=new Uv,n},t}(xv.a),Uv=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).isWindowApplicationMessage=!1,t}Nv(t,e);var n=t.prototype;return n.encode=function(e){if("string"===typeof e)return e;try{var t,n=e,r=n.method,i=n.params,o=n.result;if(r)t={methodName:r,args:i||[],id:e.id,isCloudOSMessage:!0},this.isWindowApplicationMessage&&(t.isWindowApplicationMessage=!0);else if(o){var a=o.data,s=[e.id];Array.isArray(a)?s.push.apply(s,a):a&&s.push(a),t={methodName:"RPC_RESPONSE",args:s,id:e.id,isCloudOSMessage:!0}}e=JSON.stringify(t)}catch($O){throw new Error("[LegacyCloudOSJsonSerializer] Could not encode object to JSON.")}return e},n.decode=function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch($O){e=null}if(e&&e.isCloudOSMessage){var t=e,n=t.args,r=t.buildNumber,i=t.id,o=t.masteringNumber,a=t.methodName,s=n?Array.from(n):[],c={buildNumber:r,masteringNumber:o};s.unshift(c),e={method:a,id:i,params:s,jsonrpc:"2.0"}}return e},t}(Av.a);function Lv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mv(e,t){return(Mv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e[e.LOAD_REASON_USER_CLICK=1]="LOAD_REASON_USER_CLICK",e[e.LOAD_REASON_LOCATION_HASH=2]="LOAD_REASON_LOCATION_HASH",e[e.LOAD_REASON_APP_SWITCH=3]="LOAD_REASON_APP_SWITCH",e[e.LOAD_REASON_NOTIFICATION=4]="LOAD_REASON_NOTIFICATION",e[e.LOAD_REASON_RELOAD=5]="LOAD_REASON_RELOAD",e[e.LOAD_REASON_SHARE_ACCEPTED=6]="LOAD_REASON_SHARE_ACCEPTED",e[e.LOAD_REASON_APP_REPLACED=7]="LOAD_REASON_APP_REPLACED"}(Rv||(Rv={})),function(e){e.USER_INITIATED="USER_INITIATED",e.UNCAUGHT_EXCEPTION="UNCAUGHT_EXCEPTION",e.LAUNCH_DEPENDENCY_UNAVAILABLE="LAUNCH_DEPENDENCY_UNAVAILABLE",e.CANNOT_LOAD_STARTUP_DATA="CANNOT_LOAD_STARTUP_DATA",e.TIMEOUT="TIMEOUT",e.MESSAGING_TIMEOUT="MESSAGING_TIMEOUT",e.DISCONNECTED="DISCONNECTED",e.BROWSER_UNSUPPORTED="BROWSER_UNSUPPORTED",e.PCS_REQUIRED="PCS_REQUIRED"}(Dv||(Dv={}));var jv=new Ig.a("MessagingFromLegacyCloudOSApplicationProtocol",new Set(["applicationIsReady","appWillUnload","exit","handleApplicationCrash","isReadyToTerminateDidChange","relayKeyboardShortcut","relayMouseMove","reload","reloadWhenCanTerminate"])),Fv=new Ig.a("MessagingToLegacyCloudOSApplicationProtocol",new Set(["_applicationShouldInvokeMain","_clearUserState","_cloudOSStateChange","_hasReceivedFocus","_mouseMove","_mouseUp","_sleep","_wake","applicationWillBecomeActive","applicationDidBecomeActive","applicationWillSuspend","applicationDidSuspend","routeDidChange"])),Bv=new _g.a({status:Cg.a.OK});function zv(){return Promise.resolve(Bv)}var Hv=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).legacyMessagingChannelClass=kv,t.applicationInfo=void 0,t.applicationConfiguration=void 0,t.historyState=void 0,t.messagingFromUIChildDelegate=void 0,t.iframe=void 0,t.applicationWindow=void 0,t.remoteOrigin=void 0,t.connectionTimeout=3e4,t.isLegacyApplication=!1,t._legacyMessagingChannel=null,t.legacyChannelLocalProtocol=jv,t.legacyChannelRemoteProtocol=Fv,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Mv(t,n);var i,o,a=r.prototype;return a.createLegacyMessagingChannel=function(){var e=this.legacyChannelLocalProtocol,t=this.legacyChannelLocalProtocolTarget,n=this.legacyChannelRemoteProtocol,r=this.connectionTimeout,i=this.legacyMessagingChannelClass;return this._legacyMessagingChannel=this.createMessagingChannel(e,t,n,r,i),this._isReadyToTerminate=!0,this._legacyMessagingChannel},a.sendInvokeMainMessage=function(e){var t=this.applicationInfo,n=this.applicationConfiguration,r=this.historyState,i=this.remoteProxy,o=this._legacyMessagingChannel,a=Pv.getCloudOSActions(),s=e.applicationContext,c=s.launchSource,u=s.launchItem,l=(null==c?void 0:c.reason)||Rv.LOAD_REASON_USER_CLICK,d=Pv.getCloudOSState(t,n,r,u,l);o&&i._applicationShouldInvokeMain(a,d,l)},a.beginLaunching=function(){return this.isLegacyApplication?zv():this._super.beginLaunching()},a.hostingStateDidChange=function(e,t){if(this.isLegacyApplication){var n=this.applicationInfo,r=this.applicationConfiguration,i=this.historyState,o=this.remoteProxy,a=Pv.getCloudOSState(n,r,i);return o._cloudOSStateChange(a),o.routeDidChange(a.route,a.routeHash),zv()}return this._super.hostingStateDidChange(e,t)},a.openItems=function(e){return this.isLegacyApplication?zv():this._super.openItems(e)},a.applicationIsReady=function(e,t){var n=this;this.isLegacyApplication=!0,Object(dg.c)(this.processState,dg.a.LOADED,dg.a.RUNNING)?console.warn("ChildProcessReferenceWithMultipleChannels did receive redundant `applicationIsReady` message"):(this.isReadyToReceiveMessages(),this.invokeLater((function(){n.didFinishLaunching(t)})),this._mapProcessKitLifeCycleMethods(),this.primaryMessagingChannel.stop())},a.appWillUnload=function(e,t){this.willUnload(t)},a.handleApplicationCrash=function(e,t,n){this.terminateWithReasonAndInfo(pg.a.UNCAUGHT_EXCEPTION,{buildInfo:{buildNumber:t.buildNumber,masteringNumber:t.masteringNumber,locale:t.locale},stack:t.stack,context:n,lineNumber:t.line,message:t.error,type:pg.a.UNCAUGHT_EXCEPTION})},a.isReadyToTerminateDidChange=function(){this.isLegacyApplication?e.prototype.isReadyToTerminateDidChange.call(this,arguments.length<=1?void 0:arguments[1]):e.prototype.isReadyToTerminateDidChange.call(this,arguments.length<=0?void 0:arguments[0])},a.exit=function(e,t,n){var r;switch(t){case tv.EXIT_NON_FATAL:r=Dv.USER_INITIATED;break;case tv.EXIT_STARTUP_ERROR:r=Dv.CANNOT_LOAD_STARTUP_DATA;break;case tv.EXIT_PCS_MISSING:case tv.EXIT_PCS_INVALID:r=Dv.PCS_REQUIRED;break;case tv.EXIT_FATAL_ERROR:default:r=Dv.UNCAUGHT_EXCEPTION}var i=new Error,o=Object(cv.b)(i),a={stack:Object(jg.b)(i.stack,0),context:n,message:r,lineNumber:o,buildInfo:e};this.terminateWithReasonAndInfo(r,a)},a.reload=function(e){this.wantsReload()},a.relayKeyboardShortcut=function(){},a.relayMouseMove=function(){},a.reloadWhenCanTerminate=function(){},a.isReadyToReceiveMessages=function(){e.prototype.isReadyToReceiveMessages.call(this),this._legacyMessagingChannel&&!this.isLegacyApplication&&(this._legacyMessagingChannel.stop(),this._legacyMessagingChannel=null,YV.cloudOSApplication.setupAdditionalServices(this,this.applicationConfiguration,this.historyState))},a.didBecomeActive=function(){var e=this.remoteProxy;return e.applicationWillBecomeActive(),e.applicationDidBecomeActive(),zv()},a.willResignActive=function(){var e=this.remoteProxy;return e.applicationWillSuspend(),e.applicationDidSuspend(),zv()},a.willEnterForeground=function(){var e=this;return this.invokeLater((function(){var t=e.messagingFromUIChildDelegate;if(!t)throw new Error("ChildProcessReferenceWithMultipleChannels: missing messagingFromUIChildDelegate");t.isReadyToBeDisplayed()})),zv()},a.didEnterBackground=function(){return zv()},a.didReceiveSyntheticBrowserEvent=function(){return zv()},a._mapProcessKitLifeCycleMethods=function(){var e=this.remoteProxy;e.beginLaunching=this.beginLaunching.bind(this),e.hostingStateDidChange=this.hostingStateDidChange.bind(this),e.openItems=this.openItems.bind(this),e.didBecomeActive=this.didBecomeActive.bind(this),e.willResignActive=this.willResignActive.bind(this),e.willEnterForeground=this.willEnterForeground.bind(this),e.didEnterBackground=this.didEnterBackground.bind(this),e.didReceiveSyntheticBrowserEvent=this.didReceiveSyntheticBrowserEvent.bind(this)},i=r,(o=[{key:"legacyChannelLocalProtocolTarget",get:function(){return this}}])&&Lv(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(zg);function Wv(e,t){return(Wv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Vv=function(e){var t,n;function r(t,n,r,i,o){var a;return(a=e.call(this,{allowedRemoteOrigins:Ne.sharedInstance.allowedRemoteOrigins,url:n,remoteInstanceName:t.applicationInfo.applicationName,remoteInstanceTitle:bu(t.applicationInfo.configuration)})||this).childProcessReferenceClass=Hv,a.controller=void 0,a.remoteInstanceLoadTimeout=12e4,a.historyState=void 0,a.windowParameters=void 0,a.iframeDidLoad=function(){var e=a._childProcessReference;e&&e.sendInvokeMainMessage(a.controller)},a.isPresentedViewController=!1,a.controller=t,a.delegate=t,a.historyState=r,a.displayMedium=i||Jg.IFRAME,a.displayMedium===Jg.IFRAME&&(a.iframe=document.createElement("iframe"),a.iframe.classList.add("child-application")),a.windowParameters=o,a._remoteInstanceTimeoutMethodIdentifers=[].concat(a._remoteInstanceTimeoutMethodIdentifers,[Qv]),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Wv(t,n);var i=r.prototype;return i.loadRemoteInstance=function(){var t=e.prototype.loadRemoteInstance.call(this),n=this.iframe,r=this.applicationWindow;if(n||r){var i=this._childProcessReference;if(i.remoteOrigin=this.remoteOrigin,i.historyState=this.historyState,n){i.iframe=n;var o=i.applicationInfo.allowsFullscreen;n.addEventListener("load",this.iframeDidLoad),o&&(n.setAttribute("allowfullscreen","true"),n.setAttribute("allow","fullscreen"))}else if(r&&r.window){var a;i.applicationWindow=r.window,null==(a=r.window)||a.addEventListener("load",this.iframeDidLoad)}return i.createLegacyMessagingChannel(),t}},i.terminateRemoteInstance=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.iframe,i=this.applicationWindow,o=this.remoteInstanceState;null==r||r.removeEventListener("load",this.iframeDidLoad),null==i||null==(t=i.window)||t.removeEventListener("load",this.iframeDidLoad),(Object(dg.c)(o,dg.a.RUNNING,dg.a.LOADING,dg.a.LOADED)||i)&&e.prototype.terminateRemoteInstance.call(this,n)},i.remoteInstanceWillConnect=function(){var t=this._childProcessReference;t.applicationInfo=this.controller.applicationInfo,t.applicationConfiguration=this.controller.applicationConfiguration,t.messagingFromUIChildDelegate=this,e.prototype.remoteInstanceWillConnect.call(this)},i.sendNotificationToRemoteInstance=function(e){var t=this._childProcessReference,n=t.remoteProxy;return t.isLegacyApplication?n.didReceiveNotification(e):n.didReceiveRemoteNotification(e)},i.preferencesDidUpdate=function(e){var t=this._childProcessReference,n=t.remoteProxy;return t.isLegacyApplication?Promise.resolve():n.preferencesDidUpdate(e)},i.didFetchStartup=function(e,t){this._childProcessReference.remoteProxy.didFetchStartup(e,t)},i.tileDataDidUpdate=function(e){this._childProcessReference.remoteProxy.tileDataDidUpdate(e)},i.launchOptionsDidChange=function(e){this._childProcessReference.remoteProxy.launchOptionsDidChange(e)},r}(ev);function Zv(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function qv(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Zv(o,r,i,a,s,"next",e)}function s(e){Zv(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Kv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gv(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Yv(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yv(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Yv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qv="IS_APPLICATION_LOADING_SLOWLY_TIMEOUT_IDENTIFIER",Xv=function(){function e(){this._promises=new Map}var t=e.prototype;return t.all=function(){for(var e,t=[],n=[],r=Gv(this._promises.entries());!(e=r()).done;){var i=e.value,o=i[0],a=i[1];t.push(o),n.push(a)}return Promise.all(n).then((function(e){for(var n=new Map,r=0,i=e.length;r<i;r++){var o=t[r],a=e[r];n.set(o,a)}return n}))},t.clear=function(){this._promises.clear()},t.register=function(e,t){this._promises.set(e,t)},e}(),Jv=function(){var e,t,n=r.prototype;function r(e,t){this.currentHistoryState=void 0,this._currentTitleName=void 0,this.applicationSlowLoadingTimeout=15e3,this.badgeCount=void 0,this.delegate=void 0,this.remoteApplicationViewController=void 0,this._applicationConfiguration=void 0,this._applicationContext=void 0,this._dependentOperationsForLaunchPromise=void 0,this._pendingNotifications=[],this._pendingStartupResponse=null,this._applicationConfiguration=e,this.delegate=t,this.initializeBrowserHistoryState(e)}return n.remoteInstanceIsReadyToTerminateDidChange=function(e,t){var n;null==(n=this.delegate)||n.childApplicationIsReadyToTerminateDidChange(this,t)},n.initializeBrowserHistoryState=function(e){var t=e.identifier,n=e&&e.applicationInfo&&e.applicationInfo.authBagId;if(n){var r=window.history.state;if(r&&r.applicationAuthBagId===n)this.currentHistoryState=r,this.currentTitleName=r.applicationTitleName;else{var i;this.currentHistoryState={applicationAuthBagId:n};var o=bZ.sharedInstance,a=o.applicationIdentifier,s=o.hash,c=o.relativePath,u=o.shortGuid,l=o.applicationParameter;a===t&&c?(this.currentHistoryState.applicationRelativePath=c,this.currentHistoryState.applicationHash=s):a===t&&u?this.currentHistoryState.applicationHash="#"+u:"/icloudplus"===a&&"customdomain"===(null==(i=l.informationalPageDetails)?void 0:i.relativePath)&&(this.currentHistoryState.applicationHash=l.informationalPageDetails.hash)}}else this.currentHistoryState=void 0},n.launchRemoteApplicationWithContext=function(e){this.remoteApplicationViewController&&this.remoteApplicationViewController.url===e.launchUrl||(this.clearForReuse(),this.remoteApplicationViewController=new Vv(this,e.launchUrl,this.currentHistoryState,e.displayMedium,e.windowParameters));var t=this.applicationInfo.applicationName,n=e.didBecomeInteractiveStat;return e.didBecomeInteractiveStat=void 0===n?new ur(t+".didBecomeInteractive").time():new ur(t+".didBecomeInteractive_next").time(),this._applicationContext=Object.assign({},this._applicationContext,e),this.remoteApplicationViewController},n.reloadRemoteApplication=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1;if(this.remoteApplicationViewController){var r=this.remoteApplicationViewController.remoteInstanceIsReadyToTerminate;(t||r)&&(this.remoteApplicationViewController.url=e,this.remoteApplicationViewController.reloadRemoteInstance(t),this.applicationContext&&(this.applicationContext.launchUrl=e),n=!0)}return n},n.clearForReuse=function(){var e=this.remoteApplicationViewController;e&&e.isConnected&&this.delegate.childApplicationWantsToRemoveViewController(this),this.remoteApplicationViewController=void 0,this._applicationContext=void 0,this._dependentOperationsForLaunchPromise=void 0,this._pendingStartupResponse=null,this.currentHistoryState||this.currentHistoryState||(this._currentTitleName=void 0)},n.handlePushNotification=function(e){var t=e.badgeCount;void 0!==t&&(this.badgeCount=t),this.sendNotification(e.payload)},n.sendNotification=function(e){var t=this.remoteApplicationViewController;if(t){var n=t.remoteInstanceState;Object(dg.c)(n,dg.a.RUNNING)?this._sendNotification(e):this._pendingNotifications.push(e)}},n.preferencesDidUpdate=function(e){var t=this.remoteApplicationViewController.remoteInstanceState;Object(dg.c)(t,dg.a.RUNNING)&&this._sendPreferences(e)},n.tileDataDidUpdate=function(e){var t=this.remoteApplicationViewController;if(t){var n=t.remoteInstanceState;Object(dg.c)(n,dg.a.RUNNING)&&this._sendTileData(e)}},n.remoteInstanceWillBeginLaunching=function(e){var t=this,n=this.applicationInfo,r=this.applicationContext,i=this.applicationSlowLoadingTimeout,o=this.delegate;o&&e.invokeLater((function(){return o.childApplicationIsLoadingSlowly(t)}),i,Qv);var a=n.applicationName;r.childLoadStat=new ur("childLoad",{childName:a}).time(),r.didFinishLaunchingStat=new ur(a+".didFinishLaunching").time(),r.willFinishLaunchingStat=new ur(a+".willFinishLaunching").time(),this._performDependentOperationsForLaunch(),this._performNonBlockingOperationsWhileLaunching()},n.remoteInstanceWillFinishLaunching=function(e,t){var n=this.applicationContext,r=void 0===n?{}:n,i=this.applicationInfo,o=this._dependentOperationsForLaunchPromise,a=r.callDetails,s=r.relativePath,c=r.hash,u=r.launchItem,l=r.willFinishLaunchingStat;t.callDetails=a,t.relativePath=s,t.hash=c,t.launchItem=u,t.isSprinkles=!0,void 0!==r.timeBeforeLaunch&&(t.timeBeforeLaunch=r.timeBeforeLaunch),o.then((function(n){if(Object(dg.c)(e.remoteInstanceState,dg.a.LOADED)){var o=n.get("RESOLVE_SHORT_GUID"),a=!o||null!=o&&o.hasErrors?void 0:o.results[0];a?(r.launchItem=a,t.launchReason=Cc.ITEMS_OPENED,t.itemsToOpen=[{type:"CLOUDKIT_RECORD_INFO",item:a}]):r.launchSource&&r.launchSource.reason&&(t.launchReason=r.launchSource.reason),r.launchItem&&!t.launchItem&&(t.launchItem=r.launchItem);var s=i.applicationName,c=up.getStartupInfoForApp(s);if(c&&(t.startupInfo=c),l){l.end();var u=new lr(l.statName,{duration:l.duration});fr.sharedInstance.recordPerfStat(u)}e.runRemoteInstance(t)}}),(function(e){throw e}))},n.remoteInstanceDidFinishLaunching=function(e,t){var n,r=this.applicationInfo,i=this.applicationContext,o=i.childLoadStat,a=i.didFinishLaunchingStat,s=fr.sharedInstance;if(t){var c=t.launchData,u=t.launchReason;if(c){var l=r.applicationName,d=c.windowPerfStats||{};o.addAdditionalProperties(d);var p=d.mainProcessDuration,f=d.mainFetchDuration+d.mainProcessDelay,h=d.tcpTime+d.timeToFirstByteOfDocument;if(!isNaN(p)){var m=new lr(l+".loadSuccess.mainProcessDuration",{duration:p});s.recordPerfStat(m)}if(!isNaN(f)){var g=new lr(l+".loadSuccess.timeTillExecution",{duration:f});s.recordPerfStat(g)}if(!isNaN(h)){var v=new lr(l+".loadSuccess.timeTillFetch",{duration:h});s.recordPerfStat(v)}}u&&o.addAdditionalProperties({launchReason:u})}if(t&&t.launchReason)o.addAdditionalProperties({launchReason:t.launchReason});else{var y=r.applicationName,b=new ur("invalidLaunchOptions",{applicationName:y});s.recordStat(b)}if(s.recordStat(o.success()),a){a.end();var _=new lr(a.statName,{duration:a.duration});s.recordPerfStat(_)}var C=o,I=C.additionalProperties.childName,w=C.duration,E=new lr(I+".loadSuccess",{duration:w,isUsedForLoadBucketing:!0,loadedAppName:I});s.recordPerfStat(E),null==(n=this.delegate)||n.childApplicationDidFinishLaunching(this),this._sendPendingNotifications(),this._sendPendingStartupResponse();var S=up.registry;this._sendPreferences(S)},n.remoteInstanceDidBecomeInteractive=function(e,t){var n,r,i=null==(n=this.applicationContext)?void 0:n.didBecomeInteractiveStat,o=fr.sharedInstance;if(null==(r=this.delegate)||r.childApplicationDidBecomeInteractive(this),i&&void 0===i.endTimestamp){var a,s;i.end();var c=i.statName;e&&(c=c+"."+e);var u={duration:i.duration,launchReason:null==(a=this.applicationContext)||null==(s=a.launchSource)?void 0:s.reason};t&&(u=Object.assign({},u,{additionalProperties:t}));var l=new lr(c,u);o.recordPerfStat(l)}},n.remoteInstanceDidTerminate=function(e,t,n){var r;t!==pg.a.USER_INITIATED&&console.error("remoteInstanceDidTerminate:\nREASON: "+t+"\nINFO: "+(n?le(n):""));var i=n.terminatedProcessState||"UNKNOWN",o=this.applicationInfo.applicationName,a=this.applicationContext.childLoadStat;if(a&&a.status===Gn.NOT_SET&&t!==pg.a.LAUNCH_DEPENDENCY_UNAVAILABLE){fr.sharedInstance.recordStat(a.failure({reason:t,processState:i}));var s=a.duration,c=o+".loadFailure",u=new lr(c,{reason:t,duration:s});fr.sharedInstance.recordPerfStat(u);var l=new lr(c+"."+t,{duration:s});fr.sharedInstance.recordPerfStat(l)}else{var d=o+".terminated",p=new ur(d,{reason:t,processState:i});fr.sharedInstance.recordStat(p);var f=new ur(d+"."+t,{processState:i});fr.sharedInstance.recordStat(f)}null==(r=this.delegate)||r.childApplicationDidTerminate(this,t,n)},n._performNonBlockingOperationsWhileLaunching=function(){this._fetchStartup()},n._fetchStartup=function(){var e,t=this;e=this.applicationInfo,up.getStartupInfoForApp(e.applicationName)&&function(e){var t=up.getStartupInfoForApp(e.applicationName);if(!t)return Promise.resolve(null);var n={method:t.method,body:JSON.stringify(t.requestPayload)};return es.fetchURL(t.url,n).then((function(e){return e.json().then((function(t){return{payload:t,status:e.status}}))}))}(this.applicationInfo).then((function(e){t._sendStartupResponseIfPossible(e)}),(function(e){t._sendStartupResponseIfPossible(null)}))},n._sendStartupResponseIfPossible=function(e){if(e){var t=this.remoteApplicationViewController;this._pendingStartupResponse=e,t&&Object(dg.c)(t.remoteInstanceState,dg.a.RUNNING)&&this._sendPendingStartupResponse()}},n._sendPendingStartupResponse=function(){var e=this.remoteApplicationViewController;if(!e)throw new Error("The internal _sendPendingStartupResponse should only be called when there is a running remote instance");var t=this._pendingStartupResponse;if(t){this._pendingStartupResponse=null;var n=t.payload||null;e.didFetchStartup(n,t.status)}},n._performDependentOperationsForLaunch=function(){var e=new Xv;e.register("PRELOAD_APP_PREFERENCES",this._loadAppPreferences()),e.register("PRELOAD_CORE_TYPES",this._preloadCoreTypesIfNeeded()),e.register("RESOLVE_SHORT_GUID",this._resolveShortGuidIfNeeded()),this._dependentOperationsForLaunchPromise=e.all()},n._loadAppPreferences=function(){var e,t,n,r=null==(e=wZ.sharedInstance.cloudOSUser)?void 0:e.details;return null!=r&&r.completedAuthenticationStep||!this.applicationInfo.allowsUnauthenticatedMode?null!=r&&r.completedAuthenticationStep&&null!=r&&r.totalAuthenticationSteps&&(null==r?void 0:r.completedAuthenticationStep)>0&&(null==r?void 0:r.completedAuthenticationStep)<(null==r?void 0:r.totalAuthenticationSteps)&&this.applicationInfo.allowsOneFactorAuthenticationMode?Promise.resolve():null!=(t=null==(n=up.isAppPreferencesReady)?void 0:n.then((function(e){return e.isOK?e:Promise.reject(new Error(e.error.error))})))?t:Promise.reject(new Error("App preferences are not initialized")):Promise.resolve()},n._preloadCoreTypesIfNeeded=function(){var e,t=this.applicationInfo.shouldPreloadCoreTypes,n=null==(e=wZ.sharedInstance.cloudOSUser)?void 0:e.details;return t&&n&&n.brMigrated?Xm.sharedInstance.setupThirdPartyAppIcons():Promise.resolve()},n._resolveShortGuidIfNeeded=function(){var e=this.applicationContext,t=this.applicationInfo,n=this.remoteApplicationViewController,r=this.applicationInfo.cloudKitInfo,i=new lg;if(!e.launchItem&&function(e){var t=e.cloudKitInfo;return t&&t.partition&&t.containerIdentifier}(t)){var o=e,a=o.shortGuid,s=o.shareRecord,c=a||s&&s.shortGuid;if(c){var u=r;return function(e,t,n,r){return $v.apply(this,arguments)}(i,c,u.containerIdentifier,u.partition).then((function(e){if(e&&!Object(dg.c)(n.remoteInstanceState,dg.a.TERMINATED))if(e.hasErrors){var t,i;!function(e){if(!e.hasErrors)return!1;switch(e.errors[0].ckErrorCode){case CloudKit.CKError.SERVICE_UNAVAILABLE:case CloudKit.CKError.NETWORK_ERROR:case CloudKit.CKError.TRY_AGAIN_LATER:case CloudKit.CKError.THROTTLED:return!0;default:return!1}}(e)?t=gc(r.unrecoverableErrorTitleLocKey):(t=gc(r.recoverableErrorTitleLocKey),i=gc(r.recoverableErrorSubtitleLocKey)),n.remoteInstanceDidFatalError(pg.a.LAUNCH_DEPENDENCY_UNAVAILABLE,{title:t,subtitle:i,errorMessage:"Could not resolve the short guid"})}else{var o=bZ.sharedInstance,a=o.redirectedAuthDetails,s="";if(a){var c=a.accountName;c&&(s=c),o.redirectedAuthDetails=null,wZ.sharedInstance.authenticateUser(s,!0);var u=new ur("userWasRedirectToCorrectDomainToAuthenticate");fr.sharedInstance.recordStat(u)}}return e}))}}return Promise.resolve()},n._sendNotification=function(e){var t=this.remoteApplicationViewController;if(!t)throw new Error("The internal _sendNotification should only be called when there is a running remote instance");t.sendNotificationToRemoteInstance(e)},n._sendPendingNotifications=function(){var e=this._pendingNotifications;if(e){for(var t,n=Gv(e);!(t=n()).done;){var r=t.value;this._sendNotification(r)}e.splice(0,e.length)}},n._sendPreferences=function(e){var t=this.remoteApplicationViewController;if(!t)throw new Error("The internal _sendPreferences should only be called when there is a running remote instance");t.preferencesDidUpdate(e)},n._sendTileData=function(e){var t=this.remoteApplicationViewController;if(!t)throw new Error("The internal _sendTileData should only be called when there is a running remote instance");t.tileDataDidUpdate(e)},e=r,(t=[{key:"applicationConfiguration",get:function(){return this._applicationConfiguration}},{key:"applicationInfo",get:function(){return this._applicationConfiguration.applicationInfo}},{key:"applicationContext",get:function(){return this._applicationContext}},{key:"applicationIsReadyToTerminate",get:function(){var e=this.remoteApplicationViewController;return!e||e.remoteInstanceIsReadyToTerminate}},{key:"currentTitleName",get:function(){return this._currentTitleName?this._currentTitleName:_u(this.applicationConfiguration)},set:function(e){this._currentTitleName=e}},{key:"isLoading",get:function(){var e,t,n=null!=(e=null==(t=this.remoteApplicationViewController)?void 0:t.remoteInstanceState)?e:dg.a.NONE;return Object(dg.c)(n,dg.a.LOADING,dg.a.LOADED)}},{key:"isLoadingForPresentation",get:function(){var e;return this.isLoading&&(null==(e=this.applicationContext)?void 0:e.targetUIStateWhenLaunched)===ug.ACTIVE_FOREGROUND}},{key:"isActiveForeground",get:function(){var e;return(null==(e=this.applicationContext)?void 0:e.targetUIStateWhenLaunched)===ug.ACTIVE_FOREGROUND}},{key:"isActive",get:function(){var e=this.remoteApplicationViewController;return!!e&&e.isPresentedViewController}}])&&Kv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function $v(){return($v=qv(regeneratorRuntime.mark((function e(t,n,r,i){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.instanceForContainer(r,i);case 2:return o=e.sent,e.abrupt("return",o.resolveShortGUID(n));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ey(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function ty(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ey(o,r,i,a,s,"next",e)}function s(e){ey(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ny(e,t,n){return ry.apply(this,arguments)}function ry(){return(ry=ty(regeneratorRuntime.mark((function e(t,n,r){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new lg,e.next=3,i.instanceForContainer(n,r);case 3:return o=e.sent,e.abrupt("return",o.resolveShortGUID(t));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function iy(e,t,n,r){return oy.apply(this,arguments)}function oy(){return(oy=ty(regeneratorRuntime.mark((function e(t,n,r,i){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.instanceForContainer(r,i);case 2:return o=e.sent,e.abrupt("return",o.acceptShortGUID(n));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ay=[[4352,4607],[11904,12031],[12032,12255],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[63744,64255],[65072,65103]],sy=function(e){var t,n=ay;if(!e)return!1;for(var r=0,i=n.length;r<i;++r)if(e>=(t=n[r])[0]&&e<=t[1])return!0;return!1},cy=function(e){if(0===(e=e.trim()).length)return!1;for(var t=0,n=e.length-1;t<=n;)if(!sy(e.charCodeAt(t++))||!sy(e.charCodeAt(n--)))return!1;return!0};function uy(e){var t=void 0,n=e.familyName,r=e.nickname||e.givenName;function i(e){return e&&!/^\s*$/.test(e)?e:""}return r&&n&&(t=cy(r)&&cy(n)?Xn("Name.Display.NameIsCJK.FirstAndFamilyNames",{firstName:r,familyName:n}):Xn("Name.Display.FirstAndFamilyNames",{firstName:r,familyName:n})),i(t)||(t=i(r)||i(n)||i(e.emailAddress)||i(e.phoneNumber)||i(e.companyName)),t}function ly(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var dy,py=function(){function e(e,t,n,r,i,o,a,s,c,u,l){this.applicationIdentifier=e,this.guid=t,this.pGuid=n,this.shareURL=r,this.inviteToken=i,this.shareTitle=o,this.initiatedByFirstName=a,this.initiatedByLastName=s,this.initiatedByEmail=c,this.fileType=u,this._iconURL=l}var t,n;return t=e,(n=[{key:"iconURL",get:function(){var e,t=this._iconURL;if(t)return t;var n=this.applicationIdentifier;if(!n)return"";var r=gl.sharedInstance.getApplicationInfo(n);return r&&null!=(e=gu(r))?e:""}},{key:"initiatedBy",get:function(){return uy({givenName:this.initiatedByFirstName,familyName:this.initiatedByLastName})}}])&&ly(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function fy(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function hy(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){fy(o,r,i,a,s,"next",e)}function s(e){fy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function my(e){switch(e){case"calendar":return Xn("CloudOS.calendar.FileType");case"reminders":return Xn("CloudOS.reminders.FileType");default:return""}}!function(e){e.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS="NoLongerShared",e.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS="AlreadyAccepted",e.UNEXPECTED_ERROR=""}(dy||(dy={}));var gy=Nn.object({initiatedByFirstName:Nn.string(),initiatedByLastName:Nn.string(),initiatedByEmail:Nn.string(),inviteToken:Nn.string(),shareTitle:Nn.string(),pGuid:Nn.string(),guid:Nn.string(),shareURL:Nn.string(),iconURL:Nn.string().optional()});function vy(e){return gy.safeParse(e).success}function yy(e,t){return by.apply(this,arguments)}function by(){return(by=hy(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=my(n),Fn("calendar")){e.next=3;break}return e.abrupt("return",{status:"error",applicationIdentifier:n,fileType:i,error:dy.UNEXPECTED_ERROR});case 3:return o=jn("calendar","calendar"===n?"ca/sharerequest/"+t:"rd/sharerequest/"+t),a="calendar"===n?"ca/sharerequest/REDACTED":"rd/sharerequest/REDACTED",e.next=7,es.fetchURL(o,{reportingPathname:a});case 7:if(s=e.sent,c=null!=(r=null==s?void 0:s.status)?r:0,s&&0!==c){e.next=11;break}return e.abrupt("return",{status:"error",applicationIdentifier:n,fileType:i,error:dy.UNEXPECTED_ERROR});case 11:return e.next=13,hy(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 13:if(vy(u=e.sent)){e.next=16;break}return e.abrupt("return",{status:"error",applicationIdentifier:n,fileType:i,error:dy.UNEXPECTED_ERROR});case 16:if(200!==c){e.next=20;break}return e.abrupt("return",{status:"success",legacyAppShare:new py(n,u.guid,u.pGuid,u.shareURL,u.inviteToken,u.shareTitle,u.initiatedByFirstName,u.initiatedByLastName,u.initiatedByEmail,my(n),u.iconURL)});case 20:return e.abrupt("return",{status:"error",applicationIdentifier:n,fileType:my(n),error:function(){switch(c){case 403:return dy.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS;case 406:return dy.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS;default:return dy.UNEXPECTED_ERROR}}()});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _y(e,t){return Cy.apply(this,arguments)}function Cy(){return(Cy=hy(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.guid,o=t.applicationIdentifier,a="calendar"===o?"ca/sharereply/oon/"+i+"?usertz="+encodeURIComponent(n)+"}":"rd/sharereply/oon/"+i+"?usertz="+encodeURIComponent(n)+"}",s=jn("calendar",a),e.next=6,es.fetchURL(s,{method:"POST",body:JSON.stringify({guid:i,status:"ACCEPTED",shareURL:t.shareURL,inviteToken:t.inviteToken,shareTitle:t.shareTitle,emailNotification:"immediately"})});case 6:if(c=e.sent,u=null!=(r=null==c?void 0:c.status)?r:0,c&&0!==u){e.next=10;break}return e.abrupt("return",{status:"error",error:"Timeout",applicationIdentifier:o});case 10:e.t0=u,e.next=200===e.t0?13:404===e.t0?14:406===e.t0?15:16;break;case 13:return e.abrupt("return",{status:"success",applicationIdentifier:o});case 14:return e.abrupt("return",{status:"error",applicationIdentifier:o,error:dy.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS});case 15:return e.abrupt("return",{status:"error",applicationIdentifier:o,error:dy.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS});case 16:return e.abrupt("return",{status:"error",applicationIdentifier:o,error:dy.UNEXPECTED_ERROR});case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Iy,wy=function(e,t,n,r){var i,o,a,s,c,u,l,d,p,f;if(this.applicationIdentifier=void 0,this.databaseScope=void 0,this.downloadURL="",this.fileType=void 0,this.fileExtension=void 0,this.iconURL="",this.thumbnailIconURL="",this.isIWorkThumbnailUrl=!1,this.isFolderSharing=!1,this.isPackage=!1,this.isPublicShare=!1,this.isThirdPartyShare=void 0,this.thirdPartyShareRedirectUrl=void 0,this.ownerName="",this.ownerFirstName="",this.ownerLastName="",this.ownerEmail="",this.shareeAcceptanceStatus=void 0,this.shortGuid=void 0,this.title=void 0,this.outOfNetworkParticipantList=[],this.dsid=void 0,this.shortGuid=t,this.dsid=r,this.isThirdPartyShare=!1,n)this.applicationIdentifier=n;else{var h,m,g=e.results[0].containerIdentifier,v=null==(h=e.results[0].rootRecord)||null==(m=h.fields)?void 0:m.extension,y=e.results[0].webpageURL;if(y&&t){var b=Object(he.c)(""+y+t);"http:"!==b.protocol&&"https:"!==b.protocol||(this.isThirdPartyShare=!0,this.thirdPartyShareRedirectUrl=b)}var _="string"===typeof(null==v?void 0:v.value)?v.value:void 0;this.applicationIdentifier=function(e,t,n){switch(e){case"com.apple.clouddocs":switch(t){case"pages":return tl.identifier;case"numbers":return $u.identifier;case"key":return Hu.identifier;default:return Du.identifier}case"com.apple.notes":return Xu.identifier;case"com.apple.reminders":return cl.identifier;default:if(!n)throw"ShareRecord: Unable to find applicationIdentifier for containerId = "+e+" and fileExtension = "+t;return""}}(g,_,this.isThirdPartyShare)}var C=e.results[0].databaseScope;this.databaseScope=C;var I=null==(i=e.results[0].share)?void 0:i.fields;if(I){var w=I["cloudkit.title"];w&&"string"!==typeof w&&"string"===typeof w.value&&(this.title=w.value)}var E=null==(o=e.results[0].ownerIdentity)?void 0:o.nameComponents;if(E){var S=E.givenName,T=E.familyName,O=uy({givenName:S,familyName:T});O&&(this.ownerName=O),this.ownerFirstName=S,this.ownerLastName=T}this.ownerEmail=(null==(a=e.results[0].ownerIdentity)?void 0:a.lookupInfo.emailAddress)||"";var P=null==(s=e.results[0].rootRecord)||null==(c=s.fields)?void 0:c.extension,x="string"===typeof(null==P?void 0:P.value)?P.value:"";if(this.fileExtension=x,x){var A=Xm.sharedInstance.fetchIcon(x,128,window.devicePixelRatio,["web","ios"]);switch(A&&(this.thumbnailIconURL=A.iconURL),x){case"pages":case"numbers":case"key":var N=function(e,t){var n;if(Fn("iworkthumbnailws")){var r=128*(null!=(n=window.devicePixelRatio)?n:1);return jn("iworkthumbnailws","iw/ws/thumbnail")+"?short_token="+e+"&width="+r+"&height="+r+"&dsid="+t}fr.sharedInstance.recordStat(new ur("missingWebService",{serviceName:"iworkthumbnailws"}))}(this.shortGuid,this.dsid);N&&(this.thumbnailIconURL=N,this.isIWorkThumbnailUrl=!0)}}var R=null==(u=e.results[0].rootRecord)?void 0:u.recordName,D=R&&R.includes("directory");D&&(this.isFolderSharing=!0),P||!n||D||(this.iconURL=function(e){var t=gl.sharedInstance.getApplicationInfo(e);return(t?gu(t):null)||""}(n));var k,U,L,M,j=this.title+"."+x,F=null==(l=e.results[0].rootRecord)||null==(d=l.fields)||null==(p=d.fileContent)?void 0:p.value,B=(k=F,Nn.record(Nn.unknown()).safeParse(k).success&&"string"===typeof F.downloadURL?F.downloadURL:void 0);B?this.downloadURL=B.replace("${f}",j):(null==(U=e.results[0].rootRecord)||null==(L=U.fields)||null==(M=L.pkgManifest)?void 0:M.value)&&(this.isPackage=!0);var z=null==(f=e.results[0].share)?void 0:f.publicPermission;z&&"NONE"!==z&&(this.isPublicShare=!0);var H=e.results[0].participantStatus;this.shareeAcceptanceStatus=H||"UNKNOWN";var W=e.results[0].potentialMatchList;if(W&&W.length>0)for(var V=0;V<W.length;V++)this.outOfNetworkParticipantList.push({id:W[V].participantId,emailAddress:W[V].contactInformation.emailAddress,phoneNumber:W[V].contactInformation.phoneNumber});this.fileType=Ey(this.applicationIdentifier,this.isFolderSharing)};function Ey(e,t){if(t)return Xn("CloudOS.iclouddrive.folder.FileType");switch(e){case"iclouddrive":return Xn("CloudOS.iclouddrive.FileType");case"notes":return Xn("CloudOS.notes.FileType");case"pages":return Xn("CloudOS.pages.FileType");case"numbers":return Xn("CloudOS.numbers.FileType");case"keynote":return Xn("CloudOS.keynote.FileType");case"iclouddrive.folder":return Xn("CloudOS.iclouddrive.folder.FileType");case"reminders":return Xn("CloudOS.reminders.FileType");case"calendar":return Xn("CloudOS.calendar.FileType");default:return""}}function Sy(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Ty(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Sy(o,r,i,a,s,"next",e)}function s(e){Sy(o,r,i,a,s,"throw",e)}a(void 0)}))}}!function(e){e[e.NetworkError=0]="NetworkError",e[e.ResponseError=1]="ResponseError",e[e.SchemaParsingError=2]="SchemaParsingError",e[e.VettingError=3]="VettingError"}(Iy||(Iy={}));var Oy=function(){function e(){this.currentShareRecord=null,this.delegate=null}var t=e.prototype;return t.shouldResolveShortGuidForUnauthenticatedUser=function(e){return e!==Ou.identifier&&e!==cl.identifier&&e!==il.identifier},t.shouldResolveShortGuidForAuthenticatedUser=function(e){return e!==il.identifier},t.resolveShortGuidForUnauthenticatedUser=function(){var e=Ty(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.currentShareRecord instanceof wy)){e.next=4;break}if(this.currentShareRecord.shortGuid===t){e.next=4;break}throw"[ShareAcceptanceController] - Resolving the previous shared record";case 4:if(n!==Ou.identifier){e.next=7;break}return this.resolveLegacyShare(!1,t,n),e.abrupt("return");case 7:return i=Ne.sharedInstance.current.servicesDomain,o="https://ckdatabasews."+i,e.next=11,ny(t,"com.apple.cloudkit",o);case 11:if((a=e.sent)&&!a.hasErrors){e.next=16;break}return null==(s=this.delegate)||s.signInAndShowShareUnavailable(this),this.currentShareRecord=null,e.abrupt("return");case 16:if(c=new wy(a,t,null!=n?n:null,""),this.currentShareRecord=c,!c.isThirdPartyShare||!c.thirdPartyShareRedirectUrl){e.next=22;break}return fr.sharedInstance.recordStat(new ur("thirdPartyShareOpened")),Object(Qn.a)(c.thirdPartyShareRedirectUrl.href),e.abrupt("return");case 22:if(a.results[0].share){e.next=25;break}return null==(u=this.delegate)||u.shareWasInvalid(this),e.abrupt("return");case 25:null==(r=this.delegate)||r.authenticateWithShareInfo(this,c,!1),c.isPublicShare||(this.currentShareRecord=null);case 28:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.resolveShortGuidForAuthenticatedUser=function(){var e=Ty(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c,u,l,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.currentShareRecord instanceof wy)){e.next=4;break}if(this.currentShareRecord.shortGuid===n){e.next=4;break}throw"[ShareAcceptanceController] - Resolving the previous shared record";case 4:if(r!==Ou.identifier&&(r!==cl.identifier||t.tantorMigrated)){e.next=7;break}return this.resolveLegacyShare(!0,n,r),e.abrupt("return");case 7:if(r!==Du.identifier&&r!==tl.identifier&&r!==$u.identifier&&r!==Hu.identifier||t.brMigrated){e.next=10;break}return null==(i=this.delegate)||i.upgradeToiCloudDrive(this),e.abrupt("return");case 10:if(r!==Xu.identifier||t.notesMigrated){e.next=13;break}return null==(o=this.delegate)||o.upgradeToNotes(this),e.abrupt("return");case 13:return a=jn("ckdatabasews"),e.next=16,ny(n,"com.apple.cloudkit",a);case 16:if((s=e.sent)&&!s.hasErrors){e.next=21;break}return null==(c=this.delegate)||c.shareUnavailable(this,null!=r?r:void 0,Ey(r,!1)),this.currentShareRecord=null,e.abrupt("return");case 21:if(u=new wy(s,n,null!=r?r:null,t.dsid),this.currentShareRecord=u,!u.isThirdPartyShare||!u.thirdPartyShareRedirectUrl){e.next=27;break}return fr.sharedInstance.recordStat(new ur("thirdPartyShareOpened")),Object(Qn.a)(u.thirdPartyShareRedirectUrl.href),e.abrupt("return");case 27:if(s.results[0].share){e.next=30;break}return null==(l=this.delegate)||l.shareWasInvalid(this),e.abrupt("return");case 30:(u.isPublicShare||"INVITED"===u.shareeAcceptanceStatus||u.outOfNetworkParticipantList.length>0)&&"ACCEPTED"!==u.shareeAcceptanceStatus?null==(d=this.delegate)||d.acceptShare(this,u,!0):"ACCEPTED"===u.shareeAcceptanceStatus&&(null==(p=this.delegate)||p.shareWasAccepted(this,u));case 31:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),t.acceptShare=function(){var e=Ty(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d,p,f,h,m,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this.currentShareRecord){e.next=3;break}throw"[ShareAcceptanceController]: No current share record to accept share";case 3:if(!(o instanceof py)){e.next=23;break}return a=up.getAccountPreferences()||{},s=a.timeZone,e.next=7,_y(o,s||"");case 7:if("success"!==(c=e.sent).status){e.next=12;break}null==(u=this.delegate)||u.shareWasAccepted(this,o),e.next=21;break;case 12:l=c.error,e.t0=l,e.next=e.t0===dy.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS||e.t0===dy.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS||e.t0===dy.UNEXPECTED_ERROR?16:18;break;case 16:return null==(r=this.delegate)||r.legacyShareUnavailable(this,o.applicationIdentifier,o.fileType,l),e.abrupt("break",21);case 18:return this.currentShareRecord=null,null==(i=this.delegate)||i.shareWasInvalid(this),e.abrupt("break",21);case 21:return this.currentShareRecord=null,e.abrupt("return",void 0);case 23:if(!o.isPublicShare||t){e.next=26;break}return null==(d=this.delegate)||d.signInAndAcceptShare(this,o),e.abrupt("return",void 0);case 26:return p=new lg,f=jn("ckdatabasews"),e.next=30,iy(p,o.shortGuid,"com.apple.cloudkit",f);case 30:if((h=e.sent)&&!h.hasErrors){e.next=35;break}return null==(m=this.delegate)||m.shareUnavailable(this,o.applicationIdentifier,o.fileType),this.currentShareRecord=null,e.abrupt("return",h);case 35:return n?Object(Qn.a)(n):null==(g=this.delegate)||g.shareWasAccepted(this,o),e.abrupt("return",h);case 37:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.verifyAccess=function(){var e;null==(e=this.delegate)||e.verifyAccess(this)},t.declineShare=function(){var e,t=this.currentShareRecord;t&&(null==(e=this.delegate)||e.shareWasNotAccepted(this,t))},t.clearShare=function(){this.currentShareRecord=null},t.sendVerificationLink=function(){var e=Ty(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=jn("cksharews","ws/v1/com.apple.cloudkit/production/share/vetting/initiate"),e.next=3,es.fetchURL(r,{method:"POST",body:JSON.stringify({shortGUID:t,participantId:n})});case 3:if(null!=(i=e.sent)&&i.ok){e.next=6;break}return e.abrupt("return",Ls.Result.failure(Iy.NetworkError));case 6:return e.next=8,Ty(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 8:if(o=e.sent){e.next=11;break}return e.abrupt("return",Ls.Result.failure(Iy.ResponseError));case 11:if(Ay(o)){e.next=13;break}return e.abrupt("return",Ls.Result.failure(Iy.SchemaParsingError));case 13:if(o.vettingError){e.next=17;break}return e.abrupt("return",Ls.Result.success(!0));case 17:return e.abrupt("return",Ls.Result.failure(Iy.VettingError));case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t.resolveVettingTokenForUnauthenticatedUser=function(){var e;null==(e=this.delegate)||e.signInAndResolveVettingToken(this)},t.resolveVettingTokenForAuthenticatedUser=function(){var e=Ty(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d,p,f,h,m,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.vettingToken,i=n.vettingStatus,o=jn("cksharews","ws/v1/com.apple.cloudkit/production/share/token/getPermission"),e.next=5,es.fetchURL(o,{method:"POST",body:JSON.stringify({vettingToken:r})});case 5:if(null!=(a=e.sent)&&a.ok){e.next=9;break}return null==(s=this.delegate)||s.shareUnavailable(this,void 0,Ey(void 0,!1)),e.abrupt("return");case 9:return e.next=11,Ty(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 11:if(Ay(c=e.sent)&&!c.error){e.next=15;break}return null==(u=this.delegate)||u.shareUnavailable(this,void 0,Ey(void 0,!1)),e.abrupt("return");case 15:if("updated"!==i){e.next=21;break}if(Ay(c.share)&&"string"===typeof c.share.shortGUID){e.next=19;break}return null==(l=this.delegate)||l.shareUnavailable(this,void 0,Ey(void 0,!1)),e.abrupt("return");case 19:return this.resolveShortGuidForAuthenticatedUser(t,c.share.shortGUID),e.abrupt("return");case 21:if(v=c.share,Py.safeParse(v).success){e.next=24;break}return null==(d=this.delegate)||d.shareUnavailable(this,void 0,Ey(void 0,!1)),e.abrupt("return");case 24:if(p=c.share.potentialMatchList[0].contactInformation.phoneNumber,f=_r.configuration.urls,h=p?null==f?void 0:f.vettingUrlForPhone:null==f?void 0:f.vettingUrlForEmail){e.next=30;break}return null==(m=this.delegate)||m.shareUnavailable(this,void 0,Ey(void 0,!1)),e.abrupt("return");case 30:g=h+"?key="+r+"&id="+t.alternateDSID,Object(ae.a)(g,{target:"_self",features:[]});case 32:case"end":return e.stop()}var v}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.resolveLegacyShare=function(){var e=Ty(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yy(n,r);case 2:if("success"!==(a=e.sent).status){e.next=7;break}return this.currentShareRecord=a.legacyAppShare,null==(s=this.delegate)||s.acceptShare(this,a.legacyAppShare,t),e.abrupt("return");case 7:this.currentShareRecord=null,c=a.error,e.t0=c,e.next=e.t0===dy.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS||e.t0===dy.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS||e.t0===dy.UNEXPECTED_ERROR?12:14;break;case 12:return null==(i=this.delegate)||i.legacyShareUnavailable(this,a.applicationIdentifier,a.fileType,c),e.abrupt("break",16);case 14:return null==(o=this.delegate)||o.shareWasInvalid(this),e.abrupt("break",16);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),e}();Oy.sharedInstance=new Oy;var Py=Nn.object({potentialMatchList:Nn.object({contactInformation:Nn.object({phoneNumber:Nn.string().optional()})}).array()}),xy=Nn.record(Nn.unknown());function Ay(e){return xy.safeParse(e).success}function Ny(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Ry(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ry(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ky=function(){function e(){this.delegate=null,this.__currentChildApplicationInfo=void 0,this._controllersWithRemoteInstances=[],this._applicationControllers=new Map}var t,n,r=e.prototype;return r.setCurrentChildApplicationIdentifier=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=bZ.sharedInstance,a=gl.sharedInstance,s=void 0;e&&(t=a.getApplicationInfo(e),s=(n=this.getChildApplicationController(t)).currentHistoryState,r=n.currentTitleName);var c,u,l,d,p=Jn();e!==o.applicationIdentifier||p?(u=p&&pl.identifier===e?void 0:e,o.setChildApplication(null!=(c=s)?c:{},r,u,i)):o.replaceHistoryState(s,r,e,null==(l=s)?void 0:l.applicationRelativePath,null==(d=s)?void 0:d.applicationHash,i?"":void 0),this.__currentChildApplicationInfo=t},r.switchToApplication=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.hash,r=t.queryParameters,i=t.source,o=t.route,a=t.launchItem,s=t.serializedTileData,c=gl.sharedInstance,u=c.getApplicationInfo(e);if(u){var l=null==u?void 0:u.missingRequiredServices,d=u.configuration,p=bZ.sharedInstance,f=p.shortGuid,h=p.applicationIdentifier;if(f&&h===e&&u.shouldRedirectForDocument){var m=this.getChildApplicationController(u);if(!m)throw new Error("Unable to launch "+u.configuration.identifier+". No ChildApplicationController exists.");this.delegate.redirectChildApplicationForDocument(m,f,r)}else if(this.canLaunchChildApplication(u)){var g={launchSource:i||{reason:Cc.USER_LAUNCH},relativePath:o,hash:n,serializedTileData:s,launchItem:a};this.launchChildApplication(u,g,void 0)}else Array.isArray(l)&&1===l.length&&"mail"===l[0]?this.delegate.showAlertForUnavailableMailService(d):d.lockType===uu.LOCKED_PCS_DELETED?this.delegate.showAlertForLockedApplication(d):d.isHidden?YV.cloudOSApplication.couldNotLaunchApplication(d):(bZ.sharedInstance.pushHistoryState({},_u(d),e,o,n),YV.cloudOSApplication.showHomeLoginViewController())}},r.setTitle=function(e,t){var n=e.authBagId,r=this.currentChildApplicationInfo;r&&n===r.authBagId&&(_r.title=t),this.updateApplicationTitle(n,t)},r.updateApplicationTitle=function(e,t){var n=gl.sharedInstance.getApplicationInfoByAuthBagId(e);if(n){var r=this.getChildApplicationController(n);r&&(r.currentTitleName=t)}},r.pushHistoryState=function(e,t,n,r,i){var o=e.authBagId,a={applicationAuthBagId:o,applicationHistoryState:t,applicationRelativePath:r,applicationHash:i,applicationTitleName:n},s=this.currentChildApplicationInfo,c=this.currentChildApplicationIdentifier;s&&o===s.authBagId&&bZ.sharedInstance.pushHistoryState(a,n,c,r,i),this.updateApplicationHistoryState(a)},r.replaceHistoryState=function(e,t,n,r,i){var o=e.authBagId,a={applicationAuthBagId:o,applicationHistoryState:t,applicationRelativePath:r,applicationHash:i,applicationTitleName:n},s=this.currentChildApplicationInfo,c=this.currentChildApplicationIdentifier;s&&o===s.authBagId&&bZ.sharedInstance.replaceHistoryState(a,n,c,r,i,void 0),this.updateApplicationHistoryState(a)},r.updateApplicationHistoryState=function(e){if(e&&e.applicationAuthBagId){var t=gl.sharedInstance,n=e.applicationAuthBagId;if(n){var r=t.getApplicationInfoByAuthBagId(n);if(r){var i=this.getChildApplicationController(r);if(i){i.currentHistoryState=e;var o=e.applicationTitleName;o&&(i.currentTitleName=o)}}}}},r.canLaunchChildApplication=function(e){var t,n=null==(t=wZ.sharedInstance.cloudOSUser)?void 0:t.details,r=bZ.sharedInstance.shortGuid,i=!1,o=e.configuration;if(!o.isHidden&&!o.lockType&&!o.isDisabled){var a=o.identifier;if(e.allowsUnauthenticatedMode&&(r||a===pl.identifier))i=!0;else if(n){var s=n.completedAuthenticationStep;s===n.totalAuthenticationSteps?i=!0:s>0&&(i=e.allowsOneFactorAuthenticationMode&&!ma(n))}}return i},r.launchChildApplicationInWindow=function(e,t,n){var r=gl.sharedInstance,i=wZ.sharedInstance,o=r.getApplicationInfo(e);if(o){var a=o.configuration,s=o.missingRequiredServices;if(o&&this.canLaunchChildApplication(o)){var c=$n(),u={launchSource:{reason:Cc.OPEN_DOCUMENT},displayMedium:Jg.WINDOW,windowParameters:n,launchItem:t,instanceId:c};return this.launchChildApplicationInstance(o,u),c}Array.isArray(s)&&1===s.length&&"mail"===s[0]?this.delegate.showAlertForUnavailableMailService(a):a.lockType===uu.LOCKED_PCS_DELETED?this.delegate.showAlertForLockedApplication(a):i.authenticateUser()}},r.launchChildApplicationInstance=function(e,t){if(!this.canLaunchChildApplication(e))throw"Child application "+e.configuration.identifier+" does not have permissions to be launched. Use the canLaunchChildApplication API prior to executing this method.";var n=this.createApplicationController(e,t.instanceId);if(!n)throw"Unable to launch "+e.configuration.identifier+". No ChildApplicationController exists.";var r=mu(e);return t.launchUrl=r,n.launchRemoteApplicationWithContext(t),this.delegate.insertChildApplicationRemoteViewController(n),this._addControllerToRemoteInstancesArray(n),this._pruneControllersWithRemoteInstancesArrayAsNeeded(),n},r.terminateChildApplicationInstance=function(e,t){if(!e)throw"ChildApplicationsController: Need to pass an applicationIdentifier";if(!t)throw"ChildApplicationsController: Need to pass an instanceId";var n=gl.sharedInstance.getApplicationInfo(e);if(n){var r=this.getChildApplicationController(n,t);r&&this.terminateChildApplication(r,!0)}},r.launchChildApplication=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ug.ACTIVE_FOREGROUND,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.delegate)throw new Error("A delegate instance implementing the ChildApplicationsControllerDelegateProtocol is required");if(!gg(n,ug.BACKGROUND,ug.INACTIVE_FOREGROUND,ug.ACTIVE_FOREGROUND))throw new Error("The target ui state parameter must be an instance of UIState and does not support UIState.NONE");if(!this.canLaunchChildApplication(e))throw new Error("Child application "+e.configuration.identifier+" does not have permissions to be launched. Use the canLaunchChildApplication API prior to executing this method.");var i=this.getChildApplicationController(e);if(!i)throw new Error("Unable to launch "+e.configuration.identifier+". No ChildApplicationController exists.");var o=i.currentHistoryState;if(t){var a=t.hash,s=t.relativePath;void 0!==a&&(o.applicationHash=a),void 0!==s&&(o.applicationRelativePath=s)}var c=o.applicationRelativePath,u=o.applicationHash,l=bZ.sharedInstance,d=l.shortGuid,p=l.applicationIdentifier,f=mu(e);this._cancelCurrentlyLoadingChildApplicationIfExists(e.applicationName);var h=Oy.sharedInstance,m=h.currentShareRecord;m&&h.clearShare(),t.launchUrl=null!=f?f:void 0,t.relativePath=c,t.hash=u,t.shareRecord=null!=m?m:void 0,t.targetUIStateWhenLaunched=n,p===e.configuration.identifier&&(t.shortGuid=null!=d?d:void 0);var g,v=i.launchRemoteApplicationWithContext(t);return Object(dg.c)(v.remoteInstanceState,dg.a.RUNNING)?(this.delegate.showChildApplicationRemoteViewController(i),this.setCurrentChildApplicationIdentifier(i.applicationConfiguration.identifier),r||v.launchOptionsDidChange({launchReason:(null==(g=t.launchSource)?void 0:g.reason)||Cc.USER_LAUNCH,launchItem:t.launchItem})):this.delegate.insertChildApplicationRemoteViewController(i),this._addControllerToRemoteInstancesArray(i),this._pruneControllersWithRemoteInstancesArrayAsNeeded(),i},r.terminateChildApplication=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._controllersWithRemoteInstances,i=!1;if(r.includes(e)){var o,a,s=e.applicationInfo,c=null!=(o=null==(a=e.remoteApplicationViewController)?void 0:a.remoteInstanceIsReadyToTerminate)&&o;if(t||c){var u,l=null==(u=e.remoteApplicationViewController)?void 0:u.displayMedium;this._removeControllerFromRemoteInstancesArray(e),!n&&Uy(e)&&this.delegate.redirectToHomeScreen(),i=!0,l===Jg.IFRAME&&this._resetHistoryState(s)}}return i},r.reloadChildApplications=function(){var e=this._controllersWithRemoteInstances;this._pruneControllersWithRemoteInstancesArrayAsNeeded(1);for(var t,n=Ny(e);!(t=n()).done;){var r=t.value,i=mu(r.applicationInfo);r.reloadRemoteApplication(i,!0)}},r.reloadChildApplication=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1,r=this._controllersWithRemoteInstances;if(r.includes(e)){var i=mu(e.applicationInfo);n=e.reloadRemoteApplication(i,t)}return n},r.getChildApplicationController=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=this._applicationControllers,r=n.get(e.configuration);if(!r){var i=new Jv(e.configuration,this);(r=new Map).set(t,i),n.set(e.configuration,r)}var o=r.get(t);if(o)return o;throw"No ChildAppController found for the corresponding instanceId"},r.createApplicationController=function(e,t){var n=new Jv(e.configuration,this),r=this._applicationControllers,i=r.get(e.configuration);return i?i.set(t,n):r.set(e.configuration,(new Map).set(t,n)),n},r.hasChildApplicationWithUnsavedChanges=function(){for(var e,t=Ny(this._controllersWithRemoteInstances);!(e=t()).done;){var n=e.value;if(!n.applicationIsReadyToTerminate)return n}},r.terminateAllChildApplications=function(){for(var e=this._controllersWithRemoteInstances;0<e.length;)this.terminateChildApplication(e[0],!0,!0)},r.childApplicationIsLoadingSlowly=function(e){if(!this.delegate)throw new Error("A delegate instance implementing the ChildApplicationsControllerDelegateProtocol is required");this.delegate.childApplicationIsLoadingSlowly(e)},r.childApplicationDidFinishLaunching=function(e){var t=e.remoteApplicationViewController;if(!this.delegate)throw new Error("A delegate instance implementing the ChildApplicationsControllerDelegateProtocol is required");e.isActiveForeground?t.isPresentedViewController?t.transitionRemoteInstanceToActiveForeground():(this.delegate.showChildApplicationRemoteViewController(e),this.setCurrentChildApplicationIdentifier(e.applicationConfiguration.identifier)):t.transitionRemoteInstanceToBackground()},r.childApplicationIsReadyToTerminateDidChange=function(e,t){this.delegate.childApplicationIsReadyToTerminateDidChange(e,t)},r.childApplicationWantsToRemoveViewController=function(e){this.delegate.removeChildApplicationController(e)},r.childApplicationDidTerminate=function(e,t,n){var r;if(!this.delegate)throw new Error("A delegate instance implementing the ChildApplicationsControllerDelegateProtocol is required");if(t===Dv.USER_INITIATED||t===Dv.DISCONNECTED)Uy(e)&&this.delegate.redirectToHomeScreen();else if(t===Dv.BROWSER_UNSUPPORTED&&Jn())this.delegate.showFaceTimeUnsupportedViewController(!0);else if(t===Dv.TIMEOUT||t===Dv.LAUNCH_DEPENDENCY_UNAVAILABLE){if(gg(e.applicationContext.targetUIStateWhenLaunched,ug.ACTIVE_FOREGROUND)){var i,o=null==n?void 0:n.title,a=null!=(i=null==n?void 0:n.subtitle)?i:"",s=e.applicationConfiguration;if(!o){var c=bu(s);o=gc("Error.AppNotLoading.Title",{appName:c}),a=gc("Error.AppNotLoading.Description",{appName:c})}this.delegate.showChildApplicationErrorViewController(e,o,a)}}else if(t===Dv.PCS_REQUIRED){var u=e.applicationInfo.configuration;this.delegate.showChildApplicationErrorViewController(e,gc("CloudOS.Error.AppPCSRequired.Title",{applicationName:bu(u)}),gc("CloudOS.Error.AppPCSRequired.Description"))}else this.delegate.showChildApplicationDidFatalErrorDialog(e,t,n);var l=null==(r=e.remoteApplicationViewController)?void 0:r.displayMedium;this._removeControllerFromRemoteInstancesArray(e),l===Jg.IFRAME&&this._resetHistoryState(e.applicationInfo)},r.childApplicationDidBecomeInteractive=function(){var e,t=wZ.sharedInstance,n=!(null==(e=t.cloudOSUser)||!e.details),r=t.authenticationState===vZ.PARTIALLY_AUTHENTICATED;n&&!r&&(YV.cloudOSApplication.triggerPrefetchTileData(),YV.cloudOSApplication.initializePushConnection())},r._cancelCurrentlyLoadingChildApplicationIfExists=function(e){if(this._controllersWithRemoteInstances.length){var t=this._controllersWithRemoteInstances[0];t.isLoading&&t.applicationInfo.applicationName!==e&&this._removeControllerFromRemoteInstancesArray(t)}},r._addControllerToRemoteInstancesArray=function(e){var t=this._controllersWithRemoteInstances;t.includes(e)&&this._removeControllerFromRemoteInstancesArray(e,!1),t.unshift(e)},r._removeControllerFromRemoteInstancesArray=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this._controllersWithRemoteInstances;if(!n.includes(e)){var r=e.applicationConfiguration.identifier;throw new Error("Can not remove a controller that is not in the remote instances array ("+r+")")}var i=n.indexOf(e);n.splice(i,1),t&&e.clearForReuse()},r._pruneControllersWithRemoteInstancesArrayAsNeeded=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.maximumNumberOfRemoteInstances,t=this._controllersWithRemoteInstances;if(t.length>e)for(var n,r=t.slice(e),i=Ny(r);!(n=i()).done;){var o=n.value,a=o.remoteApplicationViewController;if(a){var s=a.isPresentedViewController,c=a.remoteInstanceIsReadyToTerminate;c&&!s&&this._removeControllerFromRemoteInstancesArray(o)}}},r._resetHistoryState=function(e){this.replaceHistoryState(e,{},void 0,"","")},t=e,(n=[{key:"currentChildApplicationIdentifier",get:function(){var e=this._currentChildApplicationInfo;return null==e?void 0:e.configuration.identifier}},{key:"currentChildApplicationInfo",get:function(){return this._currentChildApplicationInfo}},{key:"currentChildApplicationConfiguration",get:function(){var e;return null==(e=this.currentChildApplicationInfo)?void 0:e.configuration}},{key:"currentLoadingChildApplicationInfo",get:function(){var e=this._controllersWithRemoteInstances[0];return e&&e.isLoading?this._controllersWithRemoteInstances[0].applicationInfo:null}},{key:"currentLoadingChildApplicationConfiguration",get:function(){var e;return null==(e=this.currentLoadingChildApplicationInfo)?void 0:e.configuration}},{key:"maximumNumberOfRemoteInstances",get:function(){return _.sharedInstance.primaryInteractionMode===h.TOUCH?3:5}},{key:"_currentChildApplicationInfo",get:function(){return this.__currentChildApplicationInfo}}])&&Dy(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Uy(e){return ky.sharedInstance.currentChildApplicationIdentifier===e.applicationConfiguration.identifier}function Ly(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function My(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ly(o,r,i,a,s,"next",e)}function s(e){Ly(o,r,i,a,s,"throw",e)}a(void 0)}))}}ky.sharedInstance=new ky;var jy=function(){function e(){this.currentPromise=null}return e.prototype.performRevalidate=function(){var e=My(regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=YV.cloudOSApplication.currentChildApplicationIdentifier,fr.sharedInstance.recordStat(new ur("didPerformRevalidate",{revalidateCalledFrom:t})),!(n=this.currentPromise)){e.next=5;break}return e.abrupt("return",n);case 5:return r=My(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,wZ.sharedInstance.validateUser();case 3:return e.prev=3,i.currentPromise=null,e.finish(3);case 6:case"end":return e.stop()}}),e,null,[[0,,3,6]])})))(),this.currentPromise=r,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),e}();function Fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}jy.sharedInstance=new jy;var By=new Ig.a("AuthenticationServiceFromChildProtocol",new Set(["authenticateUser","unauthenticateUser","reauthenticateUser","retrieveSession","revalidateUser","unauthenticate"])),zy=new Ig.a("AuthenticationServiceProtocol_v_0_0_1",new Set(["authenticate","unauthenticate"])),Hy=new Ig.a("AuthenticationServiceToChildProtocol",new Set(["retrieveSessionDidComplete","retrieveSessionDidCancel","authenticationStepDidComplete","authenticationDidComplete","authenticationDidCancel"])),Wy=function(){function e(e,t){this.processReference=t,this.authenticationController=void 0,this.backwardsCompatibilityAuthenticationResolve=null,this.authenticationController=e,t.createMessagingChannel(By,this,Hy,void 0,t.messagingChannelClass),t.createListenerOnlyMessagingChannel(zy,this,void 0,t.messagingChannelClass)}var t,n,r=e.prototype;return r.serviceWasRegistered=function(){},r.serviceWasRemoved=function(){},r.updateAuthenticationState=function(e){if(!this.isBackwardsCompatibleMode){var t,n=Vy(e);null==(t=this.processReference.remoteProxy)||t.authenticationStepDidComplete(n)}},r.updateAuthenticationDidComplete=function(e){var t,n,r=Vy(e);this.isBackwardsCompatibleMode?null==(t=this.backwardsCompatibilityAuthenticationResolve)||t.call(this,r):null==(n=this.processReference.remoteProxy)||n.authenticationDidComplete(r)},r.updateAuthenticationDidCancel=function(){var e,t;this.isBackwardsCompatibleMode?null==(e=this.backwardsCompatibilityAuthenticationResolve)||e.call(this):null==(t=this.processReference.remoteProxy)||t.authenticationDidCancel()},r.authenticate=function(){var e=this;new Promise((function(t){return e.backwardsCompatibilityAuthenticationResolve=t})),this.authenticationController.authenticateUser()},r.unauthenticate=function(){this.authenticationController.unauthenticateUser(!1,!1)},r.authenticateUser=function(){this.authenticationController.authenticateUser()},r.unauthenticateUser=function(){this.authenticationController.unauthenticateUser(!1,!1)},r.reauthenticateUser=function(e){var t=this;this.authenticationController.reauthenticateUser(e).then((function(e){var n,r;e?null==(n=t.processReference.remoteProxy)||n.retrieveSessionDidComplete():null==(r=t.processReference.remoteProxy)||r.retrieveSessionDidCancel()}))},r.revalidateUser=function(){return jy.sharedInstance.performRevalidate()},r.retrieveSession=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=arguments.length>2?arguments[2]:void 0;Object(Wg.e)(n)||(n=1/0),this.authenticationController.retrieveSession(e,n,r).then((function(e){var n,r;e?null==(n=t.processReference.remoteProxy)||n.retrieveSessionDidComplete(e):null==(r=t.processReference.remoteProxy)||r.retrieveSessionDidCancel()}))},t=e,(n=[{key:"isBackwardsCompatibleMode",get:function(){return null!==this.backwardsCompatibilityAuthenticationResolve}}])&&Fy(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Vy(e){return{dsid:e.dsid,aDsID:e.alternateDSID,firstName:e.firstName,lastName:e.lastName,fullName:e.fullName,appleId:e.appleId,statusCode:e.statusCode,appleIdEntries:e.appleIdEntries,isManagedAppleID:e.isManagedAppleID,brMigrated:e.brMigrated,brZoneConsolidated:e.brZoneConsolidated,tantorMigrated:e.tantorMigrated,notesMigrated:e.notesMigrated,completedAuthenticationStep:e.completedAuthenticationStep,totalAuthenticationSteps:e.totalAuthenticationSteps,accountType:e.accountType,ContinueOnDeviceEligibleDeviceInfo:e.ContinueOnDeviceEligibleDeviceInfo,beneficiaryInfo:e.beneficiaryInfo,isHideMyEmailSubscriptionActive:e.isHideMyEmailSubscriptionActive,isCustomDomainTransferSubscriptionActive:e.isCustomDomainTransferSubscriptionActive,isCustomDomainPurchaseSubscriptionActive:e.isCustomDomainPurchaseSubscriptionActive,isPaidDeveloper:e.isPaidDeveloper,customEmailDomainServiceEndDate:e.customEmailDomainServiceEndDate,hasUnreleasedOS:e.hasUnreleasedOS,isCustomDomainsFeatureAvailable:e.isCustomDomainsFeatureAvailable,isHideMyEmailFeatureAvailable:e.isHideMyEmailFeatureAvailable,mailFlags:e.mailFlags,analyticsOptInStatus:e.analyticsOptInStatus}}var Zy=new Ig.a("ComposeServiceFromChildProtocol",new Set(["composeEmail","close"])),qy=new Ig.a("ComposeServiceToChildProtocol",new Set(["addParticipants","didCompleteSendMessage"])),Ky=function(){function e(e){this._instanceIds=[],e.createMessagingChannel(Zy,this,qy,void 0,e.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.composeEmail=function(e){var t=function(e){var t=e%10,n=20+20*t,r=20+20*t+e/10*20;return{left:window.screenX+r,top:window.screenY+n,width:810,height:644}}(this._instanceIds.length);t.width=810,t.height=644;var n=ky.sharedInstance.launchChildApplicationInWindow("compose",e,Object.assign({},t,{resizable:"yes",scrollbars:"auto",status:"no",menubar:"no",toolbar:"no",location:"no",directories:"no"}));return n?(this._instanceIds.push(n),n):null},t.close=function(e){if(!e)throw"ComposeService: Need to pass instanceId";ky.sharedInstance.terminateChildApplicationInstance("compose",e),this._instanceIds=this._instanceIds.filter((function(t){return e!==t}))},e}(),Gy=new Ig.a("URLRequestServiceProtocol",new Set(["didReceiveSpecialResponse","requestReceived","requestSent"])),Yy=function(){function e(e,t,n){this.validateCount=0,this.httpRequestReportingController=void 0,this.applicationInfo=void 0,this.httpRequestReportingController=e,this.applicationInfo=t.applicationInfo,n.createListenerOnlyMessagingChannel(Gy,this,void 0,n.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.didReceiveSpecialResponse=function(e,t,n,r){var i=this;switch(t){case 330:if(this.validateCount=this.validateCount?++this.validateCount:1,this.validateCount>3)return void window.setTimeout((function(){i.validateCount=0}),1e4);wZ.sharedInstance.validateUser();break;case 403:case 421:case 401:wZ.sharedInstance.cloudOSUser&&wZ.sharedInstance.unauthenticateUser(!0,!1);break;case 503:fr.sharedInstance.recordStat(new ur("childApplicationDisabled",{childAppIdentifier:this.applicationInfo.applicationName,serviceName:r.serviceName}));var o="number"===typeof r.retryAfter?r.retryAfter:0;YV.cloudOSApplication.terminateAndDisableCurrentChildApplication(o)}},t.requestSent=function(){},t.requestReceived=function(e,t,n,r){this.httpRequestReportingController.recordApplicationStat(e,t,n,r)},e}();function Qy(e){var t="function"===typeof Map?new Map:void 0;return(Qy=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Xy(e,arguments,eb(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),$y(r,e)})(e)}function Xy(e,t,n){return(Xy=Jy()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&$y(i,n.prototype),i}).apply(null,arguments)}function Jy(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function $y(e,t){return($y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eb(e){return(eb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tb(e){return Object.entries(e).map((function(e){var t=e[0],n=e[1];return void 0!==n&&null!==n&&(""!==(n=String(n))?t+"="+n:t)})).filter((function(e){return!!e})).join("&")}var nb=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).name="TimeoutError",n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,$y(t,n),r}(Qy(Error));function rb(e,t){return Promise.race([t,new Promise((function(t,n){setTimeout((function(){n(new nb("Promise timed out"))}),e)}))]).finally((function(){return clearTimeout(void 0)}))}function ib(e){return e.reduce((function(e,t){return!0===t.ok?e.success.push(t):e.failure.push(t),e}),{success:[],failure:[]})}function ob(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function ab(e){return("+"===e.trim()[0]?"+":"")+e.replace(/[^\d]+/g,"")}function sb(e,t){return"string"===typeof t[e]?t[e]:""}function cb(e,t){return Array.isArray(t[e])?t[e]:[]}function ub(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function lb(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ub(o,r,i,a,s,"next",e)}function s(e){ub(o,r,i,a,s,"throw",e)}a(void 0)}))}}function db(e,t){return pb.apply(this,arguments)}function pb(){return(pb=lb(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,rb(t,n);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),!(e.t0 instanceof rb.PromiseTimeoutError)){e.next=12;break}return e.abrupt("return",Ls.Result.success([]));case 12:return e.abrupt("return",Ls.Result.failure({code:"ServiceUnavailable",context:e.t0.message,retryable:!0}));case 13:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}rb.PromiseTimeoutError=nb;var fb=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.dataProviders=void 0,this.timeLimit=void 0,this.dataProviders=e,this.timeLimit=t.backendTimeLimit||1e3}var t=e.prototype;return t.preload=function(){var e=lb(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.dataProviders.map((function(e){return e.preload()})));case 2:if(t=e.sent,n=ib(t),(r=n.failure).length!==t.length){e.next=6;break}return e.abrupt("return",Ls.Result.failure({code:"PreloadFailed",retryable:!0}));case 6:return e.abrupt("return",Ls.Result.success({complete:0===r.length}));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.findAnyMatchingText=function(){var e=lb(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c=this,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},r=this.dataProviders,e.next=4,Promise.all(r.map((function(e){return db(c.timeLimit,e.findAnyMatchingText(t,n))})));case 4:if(i=e.sent,o=ib(i),a=o.success,(s=o.failure).length!==i.length){e.next=8;break}return e.abrupt("return",Ls.Result.failure({code:"LookupFailed",retryable:!0}));case 8:return e.abrupt("return",Ls.Result.success({complete:0===s.length,items:a.flatMap((function(e){return e.value}))}));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.findContactsMatchingText=function(){var e=lb(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c=this,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},r=this.dataProviders,e.next=4,Promise.all(r.map((function(e){return db(c.timeLimit,e.findContactsMatchingText(t,n))})));case 4:if(i=e.sent,o=ib(i),a=o.success,(s=o.failure).length!==i.length){e.next=8;break}return e.abrupt("return",Ls.Result.failure({code:"LookupFailed",retryable:!0}));case 8:return e.abrupt("return",Ls.Result.success({complete:0===s.length,items:a.flatMap((function(e){return e.value}))}));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.findContactsMatchingEmailAddress=function(){var e=lb(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c=this,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},r=this.dataProviders.filter((function(e){return"function"===typeof e.findContactsMatchingEmailAddress})),e.next=4,Promise.all(r.map((function(e){return db(c.timeLimit,e.findContactsMatchingEmailAddress(t,n))})));case 4:if(i=e.sent,o=ib(i),a=o.success,(s=o.failure).length!==i.length){e.next=8;break}return e.abrupt("return",Ls.Result.failure({code:"LookupFailed",retryable:!0}));case 8:return e.abrupt("return",Ls.Result.success({complete:0===s.length,items:a.flatMap((function(e){return e.value}))}));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.findContactsMatchingPhoneNumber=function(){var e=lb(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c=this,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},r=this.dataProviders.filter((function(e){return"function"===typeof e.findContactsMatchingPhoneNumber})),e.next=4,Promise.all(r.map((function(e){return db(c.timeLimit,e.findContactsMatchingPhoneNumber(t,n))})));case 4:if(i=e.sent,o=ib(i),a=o.success,(s=o.failure).length!==i.length){e.next=8;break}return e.abrupt("return",Ls.Result.failure({code:"LookupFailed",retryable:!0}));case 8:return e.abrupt("return",Ls.Result.success({complete:0===s.length,items:a.flatMap((function(e){return e.value}))}));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.findContactsForGroup=function(){var e=lb(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c=this,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},r=this.dataProviders.filter((function(e){return"function"===typeof e.findContactsForGroup})),e.next=4,Promise.all(r.map((function(e){return db(c.timeLimit,e.findContactsForGroup(t,n))})));case 4:if(i=e.sent,o=ib(i),a=o.success,(s=o.failure).length!==i.length){e.next=8;break}return e.abrupt("return",Ls.Result.failure({code:"LookupFailed",retryable:!0}));case 8:return e.abrupt("return",Ls.Result.success({complete:0===s.length,items:a.flatMap((function(e){return e.value}))}));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.getAddressBookContacts=function(){var e=lb(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},n=this.dataProviders.filter((function(e){return"function"===typeof e.getAddressBookContacts})),e.next=4,Promise.all(n.map((function(e){return e.getAddressBookContacts(t)})));case 4:if(r=e.sent,i=ib(r),o=i.success,(a=i.failure).length!==r.length){e.next=8;break}return e.abrupt("return",Ls.Result.failure({code:"LookupFailed",retryable:!0}));case 8:return e.abrupt("return",Ls.Result.success({complete:0===a.length,items:o.flatMap((function(e){return e.value}))}));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),e}();function hb(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function mb(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){hb(o,r,i,a,s,"next",e)}function s(e){hb(o,r,i,a,s,"throw",e)}a(void 0)}))}}function gb(e){return vb.apply(this,arguments)}function vb(){return(vb=mb(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t();case 3:n=e.sent,e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",Ls.Result.failure({code:"NetworkUnavailable",context:e.t0.message,retryable:!0}));case 9:if(n.ok){e.next=11;break}return e.abrupt("return",Ls.Result.failure({code:"FetchFailed",context:n,retryable:!0}));case 11:return e.prev=11,e.next=14,n.json();case 14:r=e.sent,e.next=20;break;case 17:return e.prev=17,e.t1=e.catch(11),e.abrupt("return",Ls.Result.failure({code:"MalformedJSON",retryable:!1}));case 20:return e.abrupt("return",Ls.Result.success(r));case 21:case"end":return e.stop()}}),e,null,[[0,6],[11,17]])})))).apply(this,arguments)}function yb(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return bb(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bb(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Cb,Ib=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;this.ttl=void 0,this._data=void 0,this._expires=0,this.search={},this.ttl=e,this.invalidate(),void 0!==t&&this.update(t)}var t,n,r=e.prototype;return r.invalidate=function(){return this._expires=Date.now()-1,this},r.update=function(e){this._data=e;for(var t=0,n=Object.values(this.search);t<n.length;t++){var r=n[t];r.trie.clear(),r.initialized=!1}return this._expires=Date.now()+this.ttl,this},r.trie=function(e,t){return this.search[e]={trie:new Bs.a,builder:t,initialized:!1},this},r.find=function(e,t){var n=this.search[e];if(!n.initialized){var r=n.trie;if(this.data)for(var i,o=function(){for(var e,t=i.value,n=t[0],o=t[1],a=yb(Array.isArray(n)?n:[n]);!(e=a()).done;){var s=e.value;r.update(s,(function(e){return(e||[]).concat(o)}))}},a=yb(n.builder(this.data));!(i=a()).done;)o();n.initialized=!0}return n.trie.find(t)},r.findValues=function(e,t){var n=this.find(e,t).flatMap((function(e){return e[0],e[1]})).reduce((function(e,t){return e.add(t)}),new Set);return Array.from(n)},t=e,(n=[{key:"data",get:function(){return this._data}},{key:"expires",get:function(){return this._expires}},{key:"ttlRemaining",get:function(){return Math.max(this.expires-Date.now(),0)}},{key:"isExpired",get:function(){return Date.now()>=this.expires}}])&&_b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();!function(e){e[e.undecided=0]="undecided",e[e.none=1]="none",e[e.immediate=2]="immediate",e[e.background=3]="background"}(Cb||(Cb={}));var wb=function(){function e(e){if(this.policies=void 0,0===e.length)throw new Error("No policies provided for ReloadAdviser");this.policies=e}return e.prototype.determineAction=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=Object.freeze(n);var r=this.policies,i=r.length,o=-1,a=function r(a){if((o+=1)>=i)return a;var s=Object.freeze({cache:e,flags:n,action:a});return t.policies[o].recommend(s,r)},s=a(Cb.undecided)||Cb.undecided;return s!==Cb.undecided?s:Cb.none},e}(),Eb=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.75;this.threshold=void 0,this.threshold=e}return e.prototype.recommend=function(e,t){if(e.cache.isExpired||e.action===Cb.immediate)return t(Cb.immediate);var n=e.cache,r=n.ttl,i=n.expires;return t(Math.max(i-Date.now(),0)<=r*(1-this.threshold)?Cb.background:e.action)},e}(),Sb=function(){function e(t){this.lastReloadRecommendation=-1/0,this.cooldownPeriod=void 0,this.cooldownPeriod=t||e.defaultCooldownPeriod}var t=e.prototype;return t.onCooldown=function(){return Date.now()<=this.lastReloadRecommendation+this.cooldownPeriod},t.recommend=function(e,t){if(e.cache.isExpired||e.action===Cb.immediate)return this.lastReloadRecommendation=-1/0,t(Cb.immediate);var n=e.flags.modifiedData;return!0!==(void 0!==n&&n)||this.onCooldown()?t(e.action):(this.lastReloadRecommendation=Date.now(),t(Cb.immediate))},e}();Sb.defaultCooldownPeriod=1e4;var Tb=function(){function e(){}return e.prototype.recommend=function(e,t){return!1===e.flags.expectLatest&&!0===e.cache.isExpired?t(Cb.background):t(e.action)},e}();function Ob(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Pb(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ob(o,r,i,a,s,"next",e)}function s(e){Ob(o,r,i,a,s,"throw",e)}a(void 0)}))}}function xb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ab=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.recentRequestCount=0,this.cloudOSDelegate=void 0,this.cache=void 0,this.reloadAdviser=void 0,this.loader=void 0,this.cloudOSDelegate=e,this.cache=new Ib(t.cacheTTL||3e5),this.reloadAdviser=new wb([new Sb(5e3),new Eb(.75),new Tb]),this.cache.trie("contacts",(function(e){return e.map((function(e){return[Nb(e),e]}))})),this.cache.trie("contactsByEmail",(function(e){return e.map((function(e){return[Rb(e),e]}))}))}var t,n,r=e.prototype;return r.buildEndpoint=function(e){return"/cc/mail/v1/account/"+e+"/preference/recents"},r.buildWebServiceURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.cloudOSDelegate.urlForService,r=new globalThis.URL(n(this.serviceName,""));return r.pathname=this.buildEndpoint(e),r.search=tb(t),r},r.findAnyMatchingText=function(){var e=Pb(regeneratorRuntime.mark((function e(t){var n,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",this.findContactsMatchingText(t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.findContactsMatchingText=function(){var e=Pb(regeneratorRuntime.mark((function e(t){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.loadData(n);case 3:if((r=e.sent).ok){e.next=6;break}return e.abrupt("return",r);case 6:return i=r.value,e.abrupt("return",Ls.Result.success(i.findValues("contacts",t.toLowerCase())));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.findContactsMatchingEmailAddress=function(){var e=Pb(regeneratorRuntime.mark((function e(t){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.loadData(n);case 3:if((r=e.sent).ok){e.next=6;break}return e.abrupt("return",r);case 6:return i=r.value,e.abrupt("return",Ls.Result.success(i.findValues("contactsByEmail",t.toLowerCase())));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.loadData=function(){var e=Pb(regeneratorRuntime.mark((function e(){var t,n,r=this,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:{},(n=this.reloadAdviser.determineAction(this.cache,t))!==Cb.none){e.next=4;break}return e.abrupt("return",Ls.Result.success(this.cache));case 4:if(this.loader||(this.loader=new Promise((function(e){r.fetchData().then((function(t){if(!0!==t.ok)e(t);else{var n=t.value.recipients;r.cache.update(n),r.loader=void 0,e(Ls.Result.success(r.cache))}}))}))),n!==Cb.background){e.next=7;break}return e.abrupt("return",Ls.Result.success(this.cache));case 7:return e.abrupt("return",this.loader);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.fetchData=function(){var e=Pb(regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cloudOSDelegate.getDSID();case 2:return t=e.sent,e.abrupt("return",gb((function(){var e=n.buildWebServiceURL(t);return n.cloudOSDelegate.fetchWebServiceURL(e.href,{})})));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.preload=function(){var e=Pb(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(!0===(t=e.sent).ok){e.next=5;break}return e.abrupt("return",t);case 5:return e.abrupt("return",Ls.Result.success(!0));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t=e,(n=[{key:"serviceName",get:function(){return e.serviceName}}])&&xb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();Ab.serviceName="mcc";var Nb=function(e){return e.recipients.flatMap((function(e){return[sb("recipientName",e),sb("recipientEmail",e)].filter(Boolean).map(ob)}))},Rb=function(e){return e.recipients.flatMap((function(e){return[sb("recipientEmail",e)].filter(Boolean).map(ob)}))};function Db(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kb(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Ub(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){kb(o,r,i,a,s,"next",e)}function s(e){kb(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Lb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Mb=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.cloudOSDelegate=void 0,this.endpoint="/co/addressbook",this.cache=void 0,this.reloadAdviser=void 0,this.loader=void 0,this.cloudOSDelegate=e,this.cache=new Ib(t.cacheTTL||3e5),this.reloadAdviser=new wb([new Sb(5e3),new Eb(.75),new Tb]),this.cache.trie("any",(function(e){return[].concat(e.contacts,e.groups).map((function(e){return[zb(e),e]}))})),this.cache.trie("contacts",(function(e){return e.contacts.map((function(e){return[Fb(e),e]}))})),this.cache.trie("contactsByEmail",(function(e){return e.contacts.map((function(e){return[Hb(e),e]}))})),this.cache.trie("contactsByPhone",(function(e){return e.contacts.map((function(e){return[Wb(e),e]}))}))}var t,n,r=e.prototype;return r.buildWebServiceURL=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.cloudOSDelegate.urlForService,n=new globalThis.URL(t(this.serviceName,""));return n.pathname=this.endpoint,n.search=tb(e),n},r.findAnyMatchingText=function(){var e=Ub(regeneratorRuntime.mark((function e(t){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.loadData(n);case 3:if((r=e.sent).ok){e.next=6;break}return e.abrupt("return",r);case 6:return i=r.value,e.abrupt("return",Ls.Result.success(i.findValues("any",t.toLowerCase())));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.findContactsMatchingText=function(){var e=Ub(regeneratorRuntime.mark((function e(t){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.loadData(n);case 3:if((r=e.sent).ok){e.next=6;break}return e.abrupt("return",r);case 6:return i=r.value,e.abrupt("return",Ls.Result.success(i.findValues("contacts",t.toLowerCase())));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.findContactsMatchingEmailAddress=function(){var e=Ub(regeneratorRuntime.mark((function e(t){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.loadData(n);case 3:if((r=e.sent).ok){e.next=6;break}return e.abrupt("return",r);case 6:return i=r.value,e.abrupt("return",Ls.Result.success(i.findValues("contactsByEmail",t.toLowerCase())));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.findContactsMatchingPhoneNumber=function(){var e=Ub(regeneratorRuntime.mark((function e(t){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.loadData(n);case 3:if((r=e.sent).ok){e.next=6;break}return e.abrupt("return",r);case 6:return i=r.value,e.abrupt("return",Ls.Result.success(i.findValues("contactsByPhone",ab(t.toLowerCase()))));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.findContactsForGroup=function(){var e=Ub(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},e.next=3,this.loadData(n);case 3:if(!1!==(r=e.sent).ok){e.next=6;break}return e.abrupt("return",r);case 6:return i=r.value.data,o=i.groups,a=(void 0===o?[]:o).find((function(e){return e.groupId===t.groupId})),e.abrupt("return",Ls.Result.success(void 0!==a&&a.contacts||[]));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.getAddressBookContacts=function(){var e=Ub(regeneratorRuntime.mark((function e(){var t,n,r,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:{},e.next=3,this.loadData(t);case 3:if(!0===(n=e.sent).ok){e.next=6;break}return e.abrupt("return",n);case 6:return r=n.value.data,e.abrupt("return",Ls.Result.success(r?r.contacts:[]));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.preload=function(){var e=Ub(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(!0===(t=e.sent).ok){e.next=5;break}return e.abrupt("return",t);case 5:return e.abrupt("return",Ls.Result.success(!0));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.loadData=function(){var e=Ub(regeneratorRuntime.mark((function e(){var t,n,r=this,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:{},(n=this.reloadAdviser.determineAction(this.cache,t))!==Cb.none){e.next=4;break}return e.abrupt("return",Ls.Result.success(this.cache));case 4:if(this.loader||(this.loader=new Promise((function(e){r.fetchData().then((function(t){if(!0!==t.ok)e(t);else{var n=t.value,i=n.contacts,o=void 0===i?[]:i,a=n.groups,s=void 0===a?[]:a;s=jb(s,o),r.cache.update({contacts:o,groups:s}),r.loader=void 0,e(Ls.Result.success(r.cache))}}))}))),n!==Cb.background){e.next=7;break}return e.abrupt("return",Ls.Result.success(this.cache));case 7:return e.abrupt("return",this.loader);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.fetchData=function(){var e=Ub(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cloudOSDelegate.getLocale();case 2:return t=e.sent,n=Zb(t),r=Vb(t),i={locale:n,order:r,includePhoneNumbers:!0,includePhotos:!0},e.next=8,gb((function(){var e=a.buildWebServiceURL(i);return a.cloudOSDelegate.fetchWebServiceURL(e.toString(),{})}));case 8:if(!(o=e.sent).ok){e.next=13;break}return e.abrupt("return",Ls.Result.success({contacts:o.value.contacts,groups:o.value.groups}));case 13:return e.abrupt("return",o);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t=e,(n=[{key:"serviceName",get:function(){return e.serviceName}}])&&Lb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function jb(e,t){var n=new Map(t.map((function(e){return[e.contactId,e]})));return e.map((function(e){var t=new Set;if(void 0!==e.contactIds)for(var r,i=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Db(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Db(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.contactIds);!(r=i()).done;){var o=r.value,a=n.get(o);void 0!==a&&t.add(a)}return e.contacts=Array.from(t),e}))}Mb.serviceName="contacts";var Fb=function(e){return[sb("firstName",e),sb("lastName",e),sb("phoneticFirstName",e),sb("phoneticLastName",e),sb("companyName",e),sb("nickName",e)].concat(Bb(e),Hb(e),Wb(e)).filter(Boolean).map(ob)},Bb=function(e){return[sb("firstName",e)&&sb("lastName",e)?sb("firstName",e)+" "+sb("lastName",e):"",sb("phoneticFirstName",e)&&sb("phoneticLastName",e)?sb("phoneticFirstName",e)+" "+sb("phoneticLastName",e):""].filter(Boolean).map(ob)},zb=function(e){return[sb("name",e)].concat(Fb(e)).filter(Boolean).map(ob)},Hb=function(e){return cb("emailAddresses",e).flatMap((function(e){return"field"in e&&e.field?[e.field]:[]})).map(ob)},Wb=function(e){return cb("phones",e).flatMap((function(e){return"field"in e&&e.field?[e.field]:[]})).map(ab)},Vb=function(e){return"ja-jp"===e||"ko-kr"===e||"zh-cn"===e||"zh-tw"===e||"hu-hu"===e?"first,last":"last,first"},Zb=function(e){return e.replace(/(.*)-(.*)$/,(function(e,t,n){return t+"_"+n.toUpperCase()}))};function qb(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Kb(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){qb(o,r,i,a,s,"next",e)}function s(e){qb(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Gb=new Ig.a("ContactsLookupServiceProtocol",new Set(["findAnyMatchingText","findContactsMatchingText","findContactsMatchingEmailAddress","findContactsMatchingPhoneNumber","findContactsForGroup","getAddressBookContacts","preload"])),Yb=function(){function e(e){var t;this.contactsLookup=void 0;var n=[],r=wZ.sharedInstance.cloudOSUser;if(null!=(t=wZ.sharedInstance.cloudOSUser)&&t.isAuthenticated){var i=null==r?void 0:r.details,o={getLocale:function(){return Kb(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",_r.locale);case 1:case"end":return e.stop()}}),e)})))()},getDSID:function(){return Kb(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i&&ha(i)?i.dsid:"-1");case 1:case"end":return e.stop()}}),e)})))()},urlForService:jn,fetchWebServiceURL:function(){var e=Kb(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,es.fetchURLWithRetry(t,n,r);case 2:if(e.t0=i=e.sent,null==e.t0){e.next=7;break}e.t1=i,e.next=8;break;case 7:e.t1=Response.error();case 8:return e.abrupt("return",e.t1);case 9:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()};n.push(new Mb(o));var a=Ab.serviceName;a&&Fn(a)&&Bn(a)&&n.push(new Ab(o))}this.contactsLookup=new fb(n),e.createListenerOnlyMessagingChannel(Gb,this,void 0,e.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.findAnyMatchingText=function(e,t){return this.contactsLookup.findAnyMatchingText(e,t)},t.findContactsMatchingText=function(e,t){return this.contactsLookup.findContactsMatchingText(e,t)},t.findContactsMatchingEmailAddress=function(e,t){return this.contactsLookup.findContactsMatchingEmailAddress(e,t)},t.findContactsMatchingPhoneNumber=function(e,t){return this.contactsLookup.findContactsMatchingPhoneNumber(e,t)},t.findContactsForGroup=function(e,t){return this.contactsLookup.findContactsForGroup(e,t)},t.getAddressBookContacts=function(e){return this.contactsLookup.getAddressBookContacts(e)},t.preload=function(){return this.contactsLookup.preload()},e}();function Qb(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Xb(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Qb(o,r,i,a,s,"next",e)}function s(e){Qb(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Jb=new Ig.a("MeCardServiceFromChildProtocol",new Set(["fetchMeCard","deleteMeCardPhoto","storeMeCardPhoto"])),$b=new Ig.a("MeCardServiceToChildProtocol",new Set(["didFetchMeCard","didDeleteMeCardPhoto","failedToDeleteMeCardPhoto","didStoreMeCardPhoto","failedToStoreMeCardPhoto"])),e_=function(){function e(e,t){var n=this;this.processReference=t,this.meCardController=void 0,this._fetchMeCard=function(){var e,t=n.meCardController.meCard;t?null==(e=n.processReference.remoteProxy)||e.didFetchMeCard(t):n.meCardController.refreshMeCard()},this._deleteMeCardPhoto=Xb(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.meCardController.deleteMeCardPhoto();case 2:e.sent?null==(t=n.processReference.remoteProxy)||t.didDeleteMeCardPhoto():null==(r=n.processReference.remoteProxy)||r.failedToDeleteMeCardPhoto();case 4:case"end":return e.stop()}}),e)}))),this._storeMeCardPhoto=function(){var e=Xb(regeneratorRuntime.mark((function e(t){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.meCardController.saveMeCardPhotoForUser(t);case 2:if(i=e.sent){e.next=6;break}return null==(o=n.processReference.remoteProxy)||o.failedToStoreMeCardPhoto(),e.abrupt("return");case 6:null==(r=n.processReference.remoteProxy)||r.didStoreMeCardPhoto(i);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.meCardController=e,t.createMessagingChannel(Jb,this,$b,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.sendMeCard=function(e){var t;null==(t=this.processReference.remoteProxy)||t.didFetchMeCard(e)},t.fetchMeCard=function(){this._fetchMeCard()},t.deleteMeCardPhoto=function(){this._deleteMeCardPhoto()},t.storeMeCardPhoto=function(e){this._storeMeCardPhoto(e)},e}();function t_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function n_(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){t_(o,r,i,a,s,"next",e)}function s(e){t_(o,r,i,a,s,"throw",e)}a(void 0)}))}}function r_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i_=function(){var e,t,n=r.prototype;function r(e){this.authenticationController=e,this.delegate=null,this.photoObservers=new Set,this.photoChangedObservers=new Set,this._meCard=null,this.refreshPromise=null,this._photo=null}return n.isFetching=function(){return!!this.refreshPromise},n.addPhotoChangedObserver=function(e){this.photoChangedObservers.add(e),null===this._meCard&&this.isFetching()?e(!0):null===this._meCard||this.isFetching()||e(!1)},n.addPhotoObserver=function(e){this.photoObservers.add(e),null===this._meCard&&!0===this.isFetching()?e(!0):null===this._meCard||this.isFetching()||e(!1)},n.saveMeCardPhotoForUser=function(){var e=n_(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.meCard,this.photoChangedObservers.forEach((function(e){return e(!0)})),!n){e.next=15;break}return n.contacts[0].photo=t,e.next=6,c_(n);case 6:if(r=e.sent){e.next=9;break}return e.abrupt("return",null);case 9:if(i=s_(r)){e.next=12;break}return e.abrupt("return",null);case 12:return this.setMeCard(r),this.photoChangedObservers.forEach((function(e){return e(!1)})),e.abrupt("return",i);case 15:if(o=this.createContactFromAuthenticatedUser(t)){e.next=18;break}return e.abrupt("return",null);case 18:return e.next=20,c_({contacts:[o]});case 20:if(a=e.sent){e.next=23;break}return e.abrupt("return",null);case 23:if(s=s_(a)){e.next=26;break}return e.abrupt("return",null);case 26:return this.setMeCard(a),this.photoChangedObservers.forEach((function(e){return e(!1)})),e.abrupt("return",s);case 29:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),n.deleteMeCardPhoto=function(){var e=n_(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.meCard){e.next=3;break}return e.abrupt("return",!0);case 3:if(s_(t)){e.next=6;break}return e.abrupt("return",!0);case 6:return delete t.contacts[0].photo,e.next=9,c_(t);case 9:if(n=e.sent){e.next=12;break}return e.abrupt("return",!1);case 12:return this.setMeCard(n),e.abrupt("return",!0);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),n.refreshMeCard=function(){var e=this;if(!this.refreshPromise){var t=n_(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o_();case 2:(n=t.sent)&&e.setMeCard(n),e.refreshPromise=null,e.photoChangedObservers.forEach((function(e){return e(!1)}));case 6:case"end":return t.stop()}}),t)})))();this.refreshPromise=t,this.photoChangedObservers.forEach((function(e){return e(!0)}))}},n.setMeCard=function(e){var t;this._meCard=e,this.photo=s_(e),null==(t=this.delegate)||t.meCardDidChange(this,e)},n.createContactFromAuthenticatedUser=function(e){if(null==e||!e.contactId)return null;var t=this.authenticationController.cloudOSUser,n=null==t?void 0:t.details;if(!n)return null;var r=[],i=[];return function(e){var t=e.appleIdEntries.find((function(e){return e.isPrimary}));return!!t&&"EMAIL"===t.type}(n)?i.push({field:n.appleId,label:"home"}):va(n)&&r.push({field:n.appleId,label:"mobile"}),{firstName:n.firstName,lastName:n.lastName,emailAddresses:i,phones:r,photo:e,contactId:e.contactId}},e=r,(t=[{key:"meCard",get:function(){return this._meCard}},{key:"photo",get:function(){return this._photo},set:function(e){e!==this._photo&&(this._photo=e,this.photoObservers.forEach((function(t){return t(e)})))}}])&&r_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function o_(){return a_.apply(this,arguments)}function a_(){return(a_=n_(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Fn("contacts")&&Bn("contacts")){e.next=2;break}return e.abrupt("return",null);case 2:return t=jn("contacts","co/mecard/"),e.next=5,es.fetchURLWithRetry(t);case 5:if(null!=(n=e.sent)&&n.ok){e.next=8;break}return e.abrupt("return",null);case 8:return e.next=10,n_(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 10:if(f_(r=e.sent)){e.next=13;break}return e.abrupt("return",null);case 13:return e.abrupt("return",r);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s_(e){var t;return 0===e.contacts.length?null:null!=(t=e.contacts[0].photo)?t:null}function c_(e){return u_.apply(this,arguments)}function u_(){return(u_=n_(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Fn("contacts")&&Bn("contacts")){e.next=2;break}return e.abrupt("return",null);case 2:return n=jn("contacts","co/mecard/"),e.next=5,es.fetchURL(n,{method:"POST",body:JSON.stringify(t)});case 5:if(null!=(r=e.sent)&&r.ok){e.next=8;break}return e.abrupt("return",null);case 8:return e.next=10,n_(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 10:if(f_(i=e.sent)){e.next=13;break}return e.abrupt("return",null);case 13:return e.abrupt("return",i);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var l_=Nn.object({url:Nn.string(),signature:Nn.string().optional(),crop:Nn.object({x:Nn.number(),y:Nn.number(),width:Nn.number(),height:Nn.number()}),contactId:Nn.string().optional()}),d_=(Nn.object({field:Nn.string(),label:Nn.string()}),Nn.object({firstName:Nn.string().optional(),lastName:Nn.string().optional(),emailAddresses:Nn.object({field:Nn.string(),label:Nn.string()}).array().optional(),phones:Nn.object({field:Nn.string(),label:Nn.string()}).array().optional(),photo:l_.optional(),contactId:Nn.string(),etag:Nn.string().optional()})),p_=Nn.object({contacts:d_.array()});function f_(e){return p_.safeParse(e).success}var h_=new Ig.a("LegacyMeCardServiceFromChildProtocol",new Set(["meCardUpdated","requestMeCard","storeMeCardPhoto","deleteMeCardPhoto"])),m_=new Ig.a("LegacyMeCardServiceToChildProtocol",new Set(["receiveMeCard"])),g_=function(){function e(e,t){this.processReference=t,this.meCardController=void 0,this.meCardController=e,t.createMessagingChannel(h_,this,m_,void 0,t.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.sendReceiveMeCard=function(e){var t,n=s_(e);n&&(null==(t=this.processReference.remoteProxy)||t.receiveMeCard([Object.assign({photoUrl:n.url,photoSignature:n.signature},n.crop&&{photoCrop:n.crop})]))},t.meCardUpdated=function(){this.meCardController.refreshMeCard()},t.requestMeCard=function(){var e=this.meCardController.meCard;e?this.sendReceiveMeCard(e):this.meCardController.refreshMeCard()},t.deleteMeCardPhoto=function(){this.meCardController.deleteMeCardPhoto()},t.storeMeCardPhoto=function(e,t){this.meCardController.saveMeCardPhotoForUser(t)},e}();function v_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function y_(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){v_(o,r,i,a,s,"next",e)}function s(e){v_(o,r,i,a,s,"throw",e)}a(void 0)}))}}var b_=1;function __(){return"LocaleService:"+b_++}var C_=new Ig.a("LocaleServiceFromChildProtocol",new Set(["setLocale","setSecondaryLocale","setRegionFormat"])),I_=new Ig.a("LocaleServiceToChildProtocol",new Set(["failedToSetLocale","failedToSetSecondaryLocale","failedToSetRegion"])),w_=function(){function e(e,t){this.processReference=t,this.localizationController=void 0,this.localizationController=e,t.createMessagingChannel(C_,this,I_,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.setLocale=function(e){var t,n=this,r=__(),i=null!=(t=up.getAccountPreferences())?t:{};return i.locale=e,y_(regeneratorRuntime.mark((function t(){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,up.setAccountPreferences(i);case 2:t.sent.isOK?n.localizationController.setCurrentLocaleAndRegionFormat(e,null!=(o=i.regionFormat)?o:"en-us"):n.processReference.remoteProxy.failedToSetLocale(r);case 4:case"end":return t.stop()}}),t)})))(),r},t.setSecondaryLocale=function(e){var t,n=this,r=__(),i=null!=(t=up.getAccountPreferences())?t:{};return i.secondaryLocale=e,y_(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,up.setAccountPreferences(i);case 2:t.sent.isOK?n.localizationController.setSecondaryLocale(e):n.processReference.remoteProxy.failedToSetSecondaryLocale(r);case 4:case"end":return t.stop()}}),t)})))(),r},t.setRegionFormat=function(e){var t,n=this,r=__(),i=null!=(t=up.getAccountPreferences())?t:{};return i.regionFormat=e,y_(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,up.setAccountPreferences(i);case 2:t.sent.isOK?n.localizationController.setCurrentLocaleAndRegionFormat(_r.locale,e):n.processReference.remoteProxy.failedToSetRegion(r);case 4:case"end":return t.stop()}}),t)})))(),r},e}();function E_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}var S_=new Ig.a("QuotaServiceFromChildProtocol",new Set(["fetchStorageQuota"])),T_=new Ig.a("QuotaServiceToChildProtocol",new Set(["didFetchStorageQuota","failedToFetchStorageQuota"])),O_=function(){function e(e,t){this.processReference=t,this.quotaController=void 0,this.quotaController=e,t.createMessagingChannel(S_,this,T_,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.fetchStorageQuota=function(){this._fetchStorageQuota()},t._fetchStorageQuota=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.quotaController.refreshQuotaData();case 2:(t=e.sent)?this.processReference.remoteProxy.didFetchStorageQuota(t):this.processReference.remoteProxy.failedToFetchStorageQuota();case 4:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){E_(o,r,i,a,s,"next",e)}function s(e){E_(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}(),e}();function P_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}var x_=new Ig.a("LegacyQuotaServiceFromChildProtocol",new Set(["refreshQuotaData"])),A_=new Ig.a("LegacyQuotaServiceToChildProtocol",new Set(["_cloudOSStateChange","quotaDataDidChange","quotaDataFailedToLoad"])),N_=function(){function e(e,t){this.processReference=t,this.quotaController=void 0,this.quotaController=e,t.createMessagingChannel(x_,this,A_,void 0,t.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.refreshQuotaData=function(){this._refreshQuotaData()},t._refreshQuotaData=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.quotaController.refreshQuotaData();case 2:(t=e.sent)?(this.processReference.remoteProxy._cloudOSStateChange([{quotaData:{overQuota:t.quotaStatus.overQuota,haveMaxQuotaTier:t.quotaStatus.haveMaxQuotaTier,"almost-full":t.quotaStatus["almost-full"],paidQuota:t.quotaStatus.paidQuota,compStorageInBytes:t.storageUsageInfo.compStorageInBytes,usedStorageInBytes:t.storageUsageInfo.usedStorageInBytes,totalStorageInBytes:t.storageUsageInfo.totalStorageInBytes,commerceStorageInBytes:t.storageUsageInfo.commerceStorageInBytes,storageUsageByMedia:t.storageUsageByMedia,familyStorageUsageInfo:t.storageUsageInfo}}]),this.processReference.remoteProxy.quotaDataDidChange()):this.processReference.remoteProxy.quotaDataFailedToLoad();case 4:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){P_(o,r,i,a,s,"next",e)}function s(e){P_(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}(),e}(),R_=new Ig.a("CoreTypesServiceFromChildProtocol",new Set(["fetchConformingTypes","fetchIcon"])),D_=new Ig.a("CoreTypesServiceToChildProtocol",new Set(["didFetchConformingTypes","failedToFetchConformingTypes"])),k_=function(){function e(e,t){this.processReference=t,this.coreTypesController=void 0,this.coreTypesController=e,t.createMessagingChannel(R_,this,D_,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.fetchConformingTypes=function(e){var t=this.coreTypesController.getConformingTypes(e);t&&t.length>0?this.processReference.remoteProxy.didFetchConformingTypes(t):this.processReference.remoteProxy.failedToFetchConformingTypes()},t.fetchIcon=function(e,t,n,r){return this.coreTypesController.fetchIcon(e,t,null!=n?n:window.devicePixelRatio,r)},e}(),U_=new Ig.a("LegacyCoreTypesServiceFromChildProtocol",new Set(["fetchIcon","getConformingTypes"])),L_=function(){function e(e,t){this.coreTypesController=void 0,this.coreTypesController=e,t.createListenerOnlyMessagingChannel(U_,this,void 0,t.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.fetchIcon=function(e,t,n,r,i){return this.coreTypesController.fetchIcon(t,n,null!=r?r:window.devicePixelRatio,i)},t.getConformingTypes=function(e,t){return this.coreTypesController.getConformingTypes(t)},e}(),M_=new Ig.a("LegacyStartupInfoServiceFromChildProtocol",new Set(["setStartupInfo","setStartupUrl","startupDataIsLoaded"])),j_=new Ig.a("LegacyStartupInfoServiceToChildProtocol",new Set(["didFetchStartup"])),F_=function(){function e(e,t){this.appName=e,this.processReference=t,t.createMessagingChannel(M_,this,j_,void 0,t.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.setStartupUrl=function(e,t){return this.setStartupInfo(e,Hd(t))},t.setStartupInfo=function(e,t){var n=this;t?function(){var e=up.getStartupInfoForApp(n.appName);return!e||t.url!==e.url||t.method!==e.method||t.requestPayload!==e.requestPayload}()&&up.setStartupInfoForApp(this.appName,t):up.clearStartupInfoForApp(this.appName)},t.startupDataIsLoaded=function(){},t.didFetchStartup=function(e,t){this.processReference.remoteProxy.didFetchStartup(e,t)},e}(),B_=new Ig.a("BannerServiceFromChildProtocol",new Set(["setAppBanner"])),z_=new Ig.a("BannerServiceToChildProtocol",new Set(["didSetAppBanner","failedToSetAppBanner"])),H_=function(){function e(e,t){this.processReference=t,this.linkHref=null,this.bannerController=void 0,this.bannerController=e,t.createMessagingChannel(B_,this,z_,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.setAppBanner=function(e,t,n,r,i){var o=this;this.linkHref=null!=i?i:null;var a=this.bannerController.setCurrentBannerForApp(e,t,n,(function(){return o.bannerActionDidClick()}),r||void 0,"link");return a?this.processReference.remoteProxy.didSetAppBanner(a):this.processReference.remoteProxy.failedToSetAppBanner(),a},t.bannerActionDidClick=function(){var e=this.linkHref;e&&(Object(ae.a)(e,{target:"_blank",features:[]}),this.linkHref=null)},e}();function W_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function V_(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){W_(o,r,i,a,s,"next",e)}function s(e){W_(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Z_=new Ig.a("LegacyCloudOSApplicationServiceFromChildProtocol",new Set(["performSecondaryAuth","replaceCurrentApp","revalidateUser","setAppBanner","showAccountSettings","setTitle","setRoute","setBadgeCount","completeAuthentication","logoutFromAllBrowsers","performLogout","completeAuthentication","showSpringBoard","switchToApplication","showAccountMenu","showAppSwitcher","sendLocalNotification","showLocalNotification","showCreationMenu","showStorageUsageWarning","didBecomeInteractive"])),q_=new Ig.a("LegacyCloudOSApplicationServiceToChildProtocol",new Set(["adjustLayout","_cloudOSStateChange","userDidRevalidate","secondaryAuthDidSucceed","secondaryAuthDidFail","didReceiveNotification","launchOptionsDidChange"])),K_=function(){function e(e,t,n,r){this.processReference=r,this.applicationInfo=void 0,this.applicationConfiguration=void 0,this.historyState=void 0,this.bannerController=void 0,this.appBannerId=null,this.appBannerLinkHref=null,this.secondaryLoginAttemptsCount=0,this.applicationInfo=e.applicationInfo,this.applicationConfiguration=e,this.historyState=t,this.bannerController=n,r.createMessagingChannel(Z_,this,q_,void 0,r.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.notifySizeClassDidChange=function(e,t){var n=this.processReference,r=n.remoteProxy;r&&n.isLegacyApplication&&(null==r.adjustLayout||r.adjustLayout([{sizeClass:{horizontal:e,vertical:t}}]))},t.completeAuthentication=function(){wZ.sharedInstance.continueAuthentication()},t.logoutFromAllBrowsers=function(){return wZ.sharedInstance.unauthenticateUserFromAllBrowsers()},t.performLogout=function(){return wZ.sharedInstance.unauthenticateUser(!1,!1)},t.performSecondaryAuth=function(e,t){this._performSecondaryAuth(t)},t._performSecondaryAuth=function(){var e=V_(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wZ.sharedInstance.performSecondaryAuth(t);case 2:n=e.sent,r=this.processReference,(i=r.remoteProxy)&&r.isLegacyApplication&&(n?(i.secondaryAuthDidSucceed(),this.secondaryLoginAttemptsCount=0):(i.secondaryAuthDidFail(),this.secondaryLoginAttemptsCount++,this.secondaryLoginAttemptsCount>=3&&wZ.sharedInstance.unauthenticateUser(!0,!1)));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.replaceCurrentApp=function(e,t){ky.sharedInstance.switchToApplication(t)},t.revalidateUser=function(){this._revalidateUser()},t._revalidateUser=function(){var e=V_(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jy.sharedInstance.performRevalidate();case 2:t=this.processReference,(n=t.remoteProxy)&&t.isLegacyApplication&&(r=Pv.getCloudOSState(this.applicationInfo,this.applicationConfiguration,this.historyState),n._cloudOSStateChange(r),n.userDidRevalidate());case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.showLocalNotification=function(e,t,n,r){return this.sendLocalNotification(e,t,n,r)},t.sendLocalNotification=function(e,t,n,r){var i=this.applicationConfiguration;(t.alertTitle||t.alertDescription||t.badgeCount||t.soundPath)&&YV.cloudOSApplication.didReceivePushNotification({badgeCount:t.badgeCount,notification:{title:t.alertTitle,description:t.alertDescription},sound:t.soundPath,applicationIdentifier:null!=r?r:i.identifier,payload:Object.assign({},n,t.actionPayload)},t.isDismissable,t.omitWhenActive)},t.setAppBanner=function(e,t){var n=this,r=this.appBannerId;if(r&&(this.bannerController.removeBanner(r),this.appBannerId=null,this.appBannerLinkHref=null),t){var i,o,a,s,c=null!=(i=null==(o=t.optionalLink)?void 0:o.text)?i:void 0,u=null!=(a=null==(s=t.optionalLink)?void 0:s.url)?a:void 0,l=c&&u?"link":"button";this.appBannerId=this.bannerController.setCurrentBannerForApp(this.applicationInfo.applicationName,t.title,t.description,(function(){return n.bannerActionDidClick()}),void 0!==c?c:void 0,l),this.appBannerLinkHref=null!=u?u:null}},t.setBadgeCount=function(e,t){var n=ky.sharedInstance.getChildApplicationController(this.applicationInfo);n&&(n.badgeCount=t)},t.setRoute=function(e,t){ky.sharedInstance.replaceHistoryState(this.applicationInfo,{},void 0,t,"")},t.setTitle=function(e,t){ky.sharedInstance.setTitle(this.applicationInfo,t)},t.showAccountSettings=function(){ky.sharedInstance.switchToApplication("settings")},t.showAppSwitcher=function(e,t){YV.cloudOSApplication.showAppSwitcher({x:t.left,y:t.top,width:t.width,height:t.height})},t.showStorageUsageWarning=function(e,t){YV.cloudOSApplication.showStorageUsageWarning(t)},t.showAccountMenu=function(e){YV.cloudOSApplication.showAccountMenu()},t.showSpringBoard=function(){YV.cloudOSApplication.navigateToHomePage()},t.switchToApplication=function(e,t){ky.sharedInstance.switchToApplication(t)},t.showCreationMenu=function(){YV.cloudOSApplication.showCreationMenu()},t.didBecomeInteractive=function(e,t,n){var r=this.processReference.applicationInfo,i=ky.sharedInstance.getChildApplicationController(r);i&&i.remoteInstanceDidBecomeInteractive(t,n)},t.bannerActionDidClick=function(){var e=this.appBannerLinkHref;e&&Object(ae.a)(e.toString(),{target:"_blank",features:[]})},t.didReceiveNotification=function(e){this.didReceiveNotification(e)},t.launchOptionsDidChange=function(e){this.launchOptionsDidChange(e)},e}();function G_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Y_(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){G_(o,r,i,a,s,"next",e)}function s(e){G_(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Q_,X_=new Ig.a("LegacyPreferencesServiceFromChildProtocol",new Set(["refreshAppPreferences","setAccountPreference","setAppPreferences"])),J_=new Ig.a("LegacyPreferencesServiceToChildProtocol",new Set(["_cloudOSStateChange","appPreferencesDidChange"])),$_=function(){function e(e,t,n){this.processReference=n,this.applicationInfo=void 0,this.localizationController=void 0,this.applicationInfo=e.applicationInfo,this.localizationController=t,n.createMessagingChannel(X_,this,J_,void 0,n.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.refreshAppPreferences=function(e){var t,n=this.applicationInfo.authBagId;this.processReference.remoteProxy._cloudOSStateChange([{appPreferences:(t={},t[n]=up.getPreferences(n),t)}]),this.processReference.remoteProxy.appPreferencesDidChange()},t.setAccountPreference=function(e,t,n){this._setAccountPreference(t,n)},t._setAccountPreference=function(){var e=Y_(regeneratorRuntime.mark((function e(t,n){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=up.getAccountPreferences()){e.next=3;break}return e.abrupt("return");case 3:e.t0=t,e.next="locale"===e.t0?6:"secondaryLocale"===e.t0?8:"regionFormat"===e.t0?10:"timeZone"===e.t0?12:("startupUrls"===e.t0||e.t0,14);break;case 6:return r.locale=n,e.abrupt("break",15);case 8:return r.secondaryLocale=n,e.abrupt("break",15);case 10:return r.regionFormat=n,e.abrupt("break",15);case 12:return r.timeZone=n,e.abrupt("break",15);case 14:return e.abrupt("break",15);case 15:return e.next=17,up.setAccountPreferences(r);case 17:if(e.sent.isOK){e.next=20;break}return e.abrupt("return");case 20:"locale"===t?this.localizationController.setCurrentLocaleAndRegionFormat(n,null!=(i=r.regionFormat)?i:null):"secondaryLocale"===t?this.localizationController.setSecondaryLocale(n):"regionFormat"===t&&this.localizationController.setCurrentLocaleAndRegionFormat(_r.locale,n);case 21:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.setAppPreferences=function(e,t){this._setAppPreferences(t)},t._setAppPreferences=function(){var e=Y_(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.applicationInfo.authBagId,e.next=3,up.setPreferences(r,t);case 3:if(e.sent.isOK){e.next=6;break}return e.abrupt("return");case 6:this.processReference.remoteProxy._cloudOSStateChange([{appPreferences:(n={},n[r]=up.getPreferences(r),n)}]),this.processReference.remoteProxy.appPreferencesDidChange();case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),e}(),eC=new Ig.a("LegacyTelemetryServiceFromChildProtocol",new Set(["beginStat","endStat","recordApplicationMessage","recordStat","recordPerfStat","didReceiveSpecialResponse","requestSent","requestReceived"])),tC=function(){function e(e,t,n,r){this.validateCount=0,this.applicationInfo=void 0,this.telemetryClient=void 0,this.httpRequestReportingController=void 0,this.stats=new Map,this.applicationInfo=e.applicationInfo,this.httpRequestReportingController=n,this.telemetryClient=t,r.createListenerOnlyMessagingChannel(eC,this,void 0,r.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.beginStat=function(e,t,n){var r=this.applicationInfo.applicationName,i=tr(r,e.masteringNumber,e.buildNumber,Kn.sharedInstance.identifier,_r.hostname,_r.locale,_.sharedInstance.primaryInteractionMode,t,n),o=this.stats.get(r);if(o)o.has(t)||o.set(t,{stat:i,startTime:Date.now()});else{var a=new Map;a.set(t,{stat:i,startTime:Date.now()}),this.stats.set(r,a)}},t.endStat=function(e,t,n){var r=this.applicationInfo.applicationName,i=this.stats.get(r);if(i){var o=i.get(t);o&&(this.telemetryClient.recordStat(Object.assign({masteringNumber:e.masteringNumber,buildNumber:e.buildNumber,duration:Date.now()-o.startTime},o.stat,n)),i.delete(t))}},t.recordApplicationMessage=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.recordStat(e,t,n)},t.recordStat=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.applicationInfo.applicationName,i=".errorCatcherWasDisplayed"===t&&!1===(null==n?void 0:n.isFatal)?".errorCatcherWasDisplayedNonFatal":t;n.fullStatName=""+r+i;try{var o=tr(r,e.masteringNumber,e.buildNumber,Kn.sharedInstance.identifier,_r.hostname,_r.locale,_.sharedInstance.primaryInteractionMode,t,n);this.telemetryClient.recordStat(o)}catch(s){var a=rr(s,{applicationName:r,masteringBuildNumber:e.masteringNumber,statName:t,parameters:n});this.telemetryClient.recordStat(a)}},t.recordPerfStat=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.applicationInfo.applicationName;n.fullStatName=""+r+t;try{if(t.startsWith(r+".")||(t=r+"."+t),!n||null===n.duration||void 0===n.duration)throw new Error("TelemetryService: _recordStat: No duration specified for a Perf Stat.");var i=er(r,e.masteringNumber,e.buildNumber,Kn.sharedInstance.identifier,_r.hostname,_r.locale,_.sharedInstance.primaryInteractionMode,t,n);this.telemetryClient.recordPerfStat(i)}catch(a){var o=rr(a,{applicationName:r,masteringBuildNumber:e.masteringNumber,buildNumber:e.buildNumber,statName:t,parameters:n,statType:U.PERF_STAT});this.telemetryClient.recordStat(o)}},t.didReceiveSpecialResponse=function(e,t,n,r){var i=this;switch(t){case 330:if(this.validateCount=this.validateCount?++this.validateCount:1,this.validateCount>3)return void window.setTimeout((function(){i.validateCount=0}),1e4);wZ.sharedInstance.validateUser();break;case 403:case 421:case 401:wZ.sharedInstance.cloudOSUser&&wZ.sharedInstance.unauthenticateUser(!0,!1);break;case 503:fr.sharedInstance.recordStat(new ur("childApplicationDisabled",{childAppIdentifier:this.applicationInfo.applicationName,serviceName:r.serviceName}));var o="number"===typeof r.retryAfter?r.retryAfter:0;YV.cloudOSApplication.terminateAndDisableCurrentChildApplication(o)}},t.requestSent=function(e){},t.requestReceived=function(e,t,n,r){this.httpRequestReportingController.recordLegacyApplicationStat({appName:this.applicationInfo.applicationName,masteringNumber:e.masteringNumber,buildNumber:e.buildNumber},t,n,r)},e}(),nC=Nn.object({badge:Nn.number().optional(),ck:Nn.object({cid:Nn.string()}).optional(),aps:Nn.object({alertTitle:Nn.string().optional(),alert:Nn.string().optional(),"content-available":Nn.number().optional()}).optional(),key:Nn.string().optional(),sound:Nn.string().optional(),apsTopic:Nn.string().optional(),sessionID:Nn.string().optional()});function rC(e){return nC.safeParse(e).success}function iC(e){var t,n,r,i,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.assign({},"badge"in e&&{badgeCount:e.badge},"ck"in e&&{ckInfo:{containerIdentifier:null!=(t=null==(n=e.ck)?void 0:n.cid)?t:""}},{notification:null!=(r=e.aps)&&r.alert||null!=(i=e.aps)&&i.alertTitle?{title:null!=(o=e.aps.alertTitle)?o:"",description:null!=(a=e.aps.alert)?a:""}:void 0},"sound"in e&&{sound:e.sound},{topic:e.apsTopic},"sessionID"in e&&{clientId:e.sessionID},{applicationIdentifier:s,payload:e})}function oC(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function aC(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){oC(o,r,i,a,s,"next",e)}function s(e){oC(o,r,i,a,s,"throw",e)}a(void 0)}))}}function sC(){return(sC=aC(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=0,a=500,s=regeneratorRuntime.mark((function e(){var s,c,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return fr.sharedInstance.recordStat(new ur("pushConnectionSuccess",{pushTokenTTL:n,pushConnectAttempt:++o})),s=r+"?tok="+t+"&ttl="+n,e.next=4,es.fetchURLWithoutCredentials(s,{timeout:1e3*n+200,dontReportServerError:!0});case 4:if(null!=(c=e.sent)&&c.ok){e.next=15;break}if(u=function(){var e;if(o>=5)return Q_.CONNECTION_FAILED;switch(null!=(e=null==c?void 0:c.status)?e:0){case 0:case 408:return Q_.REQUEST_TIMEOUT;case 204:case 403:return Q_.PUSH_TOKEN_EXPIRED;case 409:return Q_.MULTIPLE_CONNECTIONS;default:return Q_.UNKNOWN_ERROR}}(),fr.sharedInstance.recordStat(new ur("pushConnectionTerminated",{error:u,pushConnectAttempt:o})),u===Q_.REQUEST_TIMEOUT||u===Q_.MULTIPLE_CONNECTIONS){e.next=11;break}return i.apnsConnectionDidTerminate(u),e.abrupt("return",{v:void 0});case 11:return e.next=13,Xo(a);case 13:return a=Math.min(2*a,3e5),e.abrupt("return","continue");case 15:return e.next=17,aC(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.json();case 3:if(rC(t=e.sent)){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",iC(t));case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))();case 17:(l=e.sent)&&i.apnsConnectionDidReceiveNotification(l),o=0,a=500,fr.sharedInstance.recordStat(new ur("pushConnectionTerminated",{success:!0}));case 22:case"end":return e.stop()}}),e)}));case 3:return e.delegateYield(s(),"t0",5);case 5:if("continue"!==(c=e.t0)){e.next=8;break}return e.abrupt("continue",3);case 8:if("object"!==typeof c){e.next=10;break}return e.abrupt("return",c.v);case 10:e.next=3;break;case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cC(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function uC(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){cC(o,r,i,a,s,"next",e)}function s(e){cC(o,r,i,a,s,"throw",e)}a(void 0)}))}}function lC(e,t){return dC.apply(this,arguments)}function dC(){return(dC=uC(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=jn("ckdeviceservice","device/1/"+n+"/"+(r="production")+"/tokens/register"),o=250;case 3:return s=o,e.next=7,es.fetchURL(i,{method:"POST",body:JSON.stringify({apnsEnvironment:r,apnsToken:t,clientID:_r.clientId})});case 7:if(c=e.sent,200!==(u=null!=(a=null==c?void 0:c.status)?a:0)){e.next=11;break}return e.abrupt("return",!0);case 11:if(400!==u){e.next=13;break}return e.abrupt("return",!1);case 13:return e.next=15,Xo(s);case 15:o=Math.min(2*o,3e5),e.next=3;break;case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pC(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return fC(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fC(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hC(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function mC(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){hC(o,r,i,a,s,"next",e)}function s(e){hC(o,r,i,a,s,"throw",e)}a(void 0)}))}}!function(e){e.REQUEST_TIMEOUT="Request timed out",e.MULTIPLE_CONNECTIONS="Re-parked multiple connections with the same push token",e.PUSH_TOKEN_EXPIRED="Push token has expired",e.CONNECTION_FAILED="Retry limit exceeded",e.UNKNOWN_ERROR="UNKNOWN_ERROR"}(Q_||(Q_={}));var gC=Nn.object({states:Nn.object({data:Nn.object({badge:Nn.number().optional()}),pushTopic:Nn.string()}).array()});function vC(e){return gC.safeParse(e).success}var yC,bC=Nn.object({webCourierURL:Nn.string(),registeredTopics:Nn.string().array(),pushToken:Nn.string(),pushTokenTTL:Nn.number()});function _C(e){return bC.safeParse(e).success}function CC(e,t,n){return IC.apply(this,arguments)}function IC(){return(IC=mC(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c,u,l,d,p,f,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0,o=250,a=new Set(t),s=[];case 4:return c=o,e.next=8,null===r?TC(t,n):PC(t,r,n);case 8:if(!(u=e.sent).isOK){e.next=18;break}for(d=null!=(l=u.data.registeredTopics)?l:[],r=u.data.token,n=u.data.tokenTTL,p=pC(d);!(f=p()).done;)h=f.value,a.delete(h),s.push(h);if(0!==a.size){e.next=16;break}return e.abrupt("return",{isOK:!0,data:{pushServiceURL:u.data.pushServiceURL,registeredTopics:s,token:u.data.token,tokenTTL:u.data.tokenTTL}});case 16:e.next=20;break;case 18:if(!u.error){e.next=20;break}return e.abrupt("return",{isOK:!1,error:u.error});case 20:if(!(i>=3)){e.next=22;break}return e.abrupt("return",{isOK:!1,error:yC.REVERT_TO_POLLING});case 22:return e.next=24,Xo(c);case 24:i++,o=Math.min(2*o,3e5),e.next=4;break;case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wC(e){return EC.apply(this,arguments)}function EC(){return(EC=mC(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,es.fetchURL(jn("push","getState"),{method:"POST",body:JSON.stringify({pushTopics:t})});case 2:if(null!=(n=e.sent)&&n.ok){e.next=5;break}return e.abrupt("return",{isOK:!1});case 5:return e.next=7,mC(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.json();case 3:if(vC(t=e.sent)){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",{states:t.states.map((function(e){return{notification:{badgeCount:e.data.badge},pushTopic:e.pushTopic}}))});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))();case 7:if(r=e.sent){e.next=10;break}return e.abrupt("return",{isOK:!1});case 10:return e.abrupt("return",{isOK:!0,data:r});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function SC(e){switch(e){case 400:return yC.REVERT_TO_POLLING;default:return yC.UNKNOWN_ERROR}}function TC(e,t){return OC.apply(this,arguments)}function OC(){return(OC=mC(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,es.fetchJSON(jn("push","getToken"),_C,{method:"POST",body:JSON.stringify({pushTopics:t,pushTokenTTL:n})});case 2:if(null!=(r=e.sent)&&r.ok){e.next=5;break}return e.abrupt("return",{isOK:!1,error:SC(null!=(i=null==r||null==(o=r.response)?void 0:o.status)?i:0)});case 5:return e.abrupt("return",{isOK:!0,data:{pushServiceURL:r.result.webCourierURL,registeredTopics:[].concat(r.result.registeredTopics),token:r.result.pushToken,tokenTTL:r.result.pushTokenTTL}});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function PC(e,t,n){return xC.apply(this,arguments)}function xC(){return(xC=mC(regeneratorRuntime.mark((function e(t,n,r){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,es.fetchURL(jn("push","registerTopics"),{method:"POST",body:JSON.stringify({pushTopics:t,pushToken:n,pushTokenTTL:r})});case 2:if(null!=(i=e.sent)&&i.ok){e.next=5;break}return e.abrupt("return",{isOK:!1,error:SC(null!=(o=null==i?void 0:i.status)?o:0)});case 5:return e.next=7,mC(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.json();case 3:if(_C(t=e.sent)){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",{pushServiceURL:t.webCourierURL,registeredTopics:[].concat(t.registeredTopics),token:t.pushToken,tokenTTL:t.pushTokenTTL});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))();case 7:if(a=e.sent){e.next=10;break}return e.abrupt("return",{isOK:!1,error:yC.UNKNOWN_ERROR});case 10:return e.abrupt("return",{isOK:!0,data:a});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function AC(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return NC(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?NC(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function NC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RC(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function DC(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){RC(o,r,i,a,s,"next",e)}function s(e){RC(o,r,i,a,s,"throw",e)}a(void 0)}))}}function kC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.REVERT_TO_POLLING="REVERT_TO_POLLING",e.UNKNOWN_ERROR="UNKNOWN_ERROR"}(yC||(yC={}));var UC=function(){function e(){this.delegate=null,this.pushTopics=[],this.ckContainers=[],this.hasInitialized=!1,this.isLongPollingAPNS=!1,this.pendingCloudKitSubscriptions=new Set,this.pendingCloudKitSubscriptionsPromise=null,this.pendingCloudKitSubscriptionsResolve=null,this.pushServiceURL=null,this.registeredCloudKitContainers=new Set,this.registeredPushTopics=new Set,this.pushTokenTTL=null}var t,n,r=e.prototype;return r.initialize=function(){var e=DC(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.pushTopics=t,n&&(this.ckContainers=n),this.hasInitialized=!0,e.next=5,this.registerPushTopics(t);case 5:if(e.sent){e.next=9;break}return this.apnsConnectionDidTerminate(Q_.UNKNOWN_ERROR),e.abrupt("return",!1);case 9:if(n&&n.forEach((function(e){return d.pendingCloudKitSubscriptions.add(e)})),0!==this.pendingCloudKitSubscriptions.size){e.next=12;break}return e.abrupt("return",!0);case 12:for(i=[],o=Array.from(this.pendingCloudKitSubscriptions),a=0,s=o;a<s.length;a++)c=s[a],i.push(this.registerCloudKitSubscription(c)),this.pendingCloudKitSubscriptions.delete(c);return e.next=17,Promise.all(i);case 17:return u=e.sent,l=u.every((function(e){return e})),null==(r=this.pendingCloudKitSubscriptionsResolve)||r.call(this,l),this.pendingCloudKitSubscriptions.clear(),this.pendingCloudKitSubscriptionsResolve=null,this.pendingCloudKitSubscriptionsPromise=null,e.abrupt("return",l);case 24:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),r.reInitialize=function(){return this.initialize(this.pushTopics,this.ckContainers)},r.registerCloudKitSubscription=function(){var e=DC(regeneratorRuntime.mark((function e(t){var n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasInitialized){e.next=4;break}return this.pendingCloudKitSubscriptions.add(t),this.pendingCloudKitSubscriptionsPromise||(this.pendingCloudKitSubscriptionsPromise=new Promise((function(e){r.pendingCloudKitSubscriptionsResolve=e}))),e.abrupt("return",this.pendingCloudKitSubscriptionsPromise);case 4:if(!this.registeredCloudKitContainers.has(t)){e.next=6;break}return e.abrupt("return",!0);case 6:return e.next=8,this.fetchToken();case 8:if(e.sent){e.next=11;break}return e.abrupt("return",!1);case 11:if(n=this.pushToken){e.next=14;break}return e.abrupt("return",!1);case 14:return e.next=16,lC(n,t);case 16:if(e.sent){e.next=19;break}return e.abrupt("return",!1);case 19:return this.registeredCloudKitContainers.add(t),this.connectToPushService(),e.abrupt("return",!0);case 22:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.registerPushTopics=function(){var e=DC(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasInitialized){e.next=2;break}throw new Error("[PushController] Must initialize before registering topics");case 2:for(n=[],r=AC(t);!(i=r()).done;)o=i.value,this.registeredPushTopics.has(o)||n.push(o);if(0!==n.length){e.next=10;break}return e.next=7,this.fetchToken();case 7:return(a=e.sent)?this.connectToPushService():this.apnsConnectionDidTerminate(Q_.UNKNOWN_ERROR),e.abrupt("return",a);case 10:return e.next=12,this._registerPushTopics(n);case 12:return(s=e.sent)&&this.connectToPushService(),e.abrupt("return",s);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.apnsConnectionDidTerminate=function(){var e=DC(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isLongPollingAPNS=!1,null!=(n=wZ.sharedInstance.cloudOSUser)&&n.isAuthenticated){e.next=3;break}return e.abrupt("return");case 3:if(this.pushToken=null,t===Q_.PUSH_TOKEN_EXPIRED){e.next=7;break}return null==(r=this.delegate)||r.pushControllerDidDisconnect(this),e.abrupt("return");case 7:return e.next=9,this.fetchToken();case 9:if(e.sent){e.next=14;break}return this.pushToken=null,null==(i=this.delegate)||i.pushControllerDidDisconnect(this),e.abrupt("return");case 14:this.connectToPushService();case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.apnsConnectionDidReceiveNotification=function(e){var t,n=this;null==(t=this.delegate)||t.didReceivePushNotification(e),DC(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.fetchUpdatedBadgeCounts());case 1:case"end":return e.stop()}}),e)})))()},r.connectToPushService=function(){if(!this.isLongPollingAPNS){var e=this.pushToken,t=this.pushTokenTTL,n=this.pushServiceURL;e&&t&&n&&(this.isLongPollingAPNS=!0,function(e,t,n,r){sC.apply(this,arguments)}(e,t,n,this))}},r.fetchToken=function(){var e=DC(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.pushToken&&this.pushTokenTTL&&this.pushServiceURL)){e.next=2;break}return e.abrupt("return",!0);case 2:return e.abrupt("return",this._registerPushTopics(this.pushTopics));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r._registerPushTopics=function(){var e=DC(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,CC(t,43200,this.pushToken);case 3:if((n=e.sent).isOK){e.next=6;break}return e.abrupt("return",!1);case 6:if(this.pushToken=n.data.token,this.pushTokenTTL=n.data.tokenTTL,this.pushServiceURL=n.data.pushServiceURL,0!==(r=n.data.registeredTopics).length){e.next=12;break}return e.abrupt("return",!0);case 12:for(i=this.registeredPushTopics,o=0,a=r.length;o<a;o++)i.add(r[o]);return DC(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",s.fetchUpdatedBadgeCounts());case 1:case"end":return e.stop()}}),e)})))(),e.abrupt("return",!0);case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.fetchUpdatedBadgeCounts=function(){var e=DC(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.registeredPushTopics),e.next=3,wC(t);case 3:if((n=e.sent).isOK){e.next=6;break}return e.abrupt("return");case 6:for(r=AC(n.data.states);!(i=r()).done;)a=i.value,null==(o=this.delegate)||o.didReceivePushState(a.pushTopic,a.notification.badgeCount);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t=e,(n=[{key:"pushToken",get:function(){return function(){try{var e=window.sessionStorage.getItem("iCloud.accountPreferences.pushToken");if("string"===typeof e)return e}catch(t){}return null}()},set:function(e){!function(e){try{null===e?window.sessionStorage.removeItem("iCloud.accountPreferences.pushToken"):window.sessionStorage.setItem("iCloud.accountPreferences.pushToken",e)}catch(t){return!1}}(e)}}])&&kC(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function LC(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return MC(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?MC(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jC(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function FC(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){jC(o,r,i,a,s,"next",e)}function s(e){jC(o,r,i,a,s,"throw",e)}a(void 0)}))}}UC.sharedInstance=new UC;var BC=new Ig.a("LegacyPollingServiceToChildProtocol",new Set(["applicationShouldRefresh"])),zC=function(){function e(e){this.processReference=e,e.createConnectionOnlyMessagingChannel(BC,void 0,e.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},e.startPolling=function(t,n){var r=this;if(!this.isPolling){this.isPolling=!0,fr.sharedInstance.recordStat(new ur("legacyAppsPollingStarted"));var i=!1;FC(regeneratorRuntime.mark((function r(){var o,a,s,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=3,Xo(3e4);case 3:if(!i){r.next=5;break}return r.abrupt("return");case 5:for(o=n.serviceInstancesByIdentifier(t),a=LC(o);!(s=a()).done;)(c=s.value)instanceof e&&c.notifyApplicationToRefresh();r.next=0;break;case 9:case"end":return r.stop()}}),r)})))(),FC(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Xo(6e5);case 3:return e.next=5,UC.sharedInstance.reInitialize();case 5:if(!e.sent){e.next=11;break}return i=!0,r.isPolling=!1,fr.sharedInstance.recordStat(new ur("legacyAppsPollingStopped")),e.abrupt("break",13);case 11:e.next=0;break;case 13:case"end":return e.stop()}}),e)})))()}},t.notifyApplicationToRefresh=function(){var e;null==(e=this.processReference.remoteProxy)||e.applicationShouldRefresh()},e}();zC.isPolling=!1;var HC=new Ig.a("LegacyAppUrlServiceFromChildProtocol",new Set([])),WC=new Ig.a("LegacyAppUrlServiceToChildProtocol",new Set([])),VC=function(){function e(e){this.processReference=e,e.createMessagingChannel(HC,this,WC,void 0,e.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.fetchAppUrl=function(e,t,n){var r,i="",o=gl.sharedInstance.getApplicationInfo(n);o&&(i=Cr(_r.protocol,_r.hostname,_r.locale,o.path,null!=(r=bZ.sharedInstance.port)?r:void 0,"index.html",Ne.sharedInstance.current.rootDomain)),i&&this.processReference.remoteProxy.didFetchAppUrl(t,i)},e}(),ZC=new Ig.a("LegacyCloudKitResolutionServiceFromChildProtocol",new Set(["resolveCKShortGUID"])),qC=function(){function e(e){e.createListenerOnlyMessagingChannel(ZC,this,void 0,e.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.resolveCKShortGUID=function(){console.warn("Unhandled cloudos1 message: resolveCKShortGUID")},e}(),KC=new Ig.a("LegacyRegionFormatterServiceFromChildProtocol",new Set(["loadRulesForRegions"])),GC=function(){function e(e){e.createListenerOnlyMessagingChannel(KC,this,void 0,e.legacyMessagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.loadRulesForRegions=function(){console.warn("Unhandled cloudos1 message: loadRulesForRegions")},e}(),YC=new Ig.a("PreferencesServiceFromChildProtocol",new Set(["setPreferences"])),QC=new Ig.a("PreferencesServiceToChildProtocol",new Set(["preferencesDidUpdate"])),XC=function(){function e(e){this.processReference=e,e.createMessagingChannel(YC,this,QC,void 0,e.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.setPreferences=function(e){up.setRawPreferences(e)},t.preferencesDidUpdate=function(e){this.processReference.remoteProxy.preferencesDidUpdate(e)},e}();function JC(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return $C(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$C(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eI=function(e,t,n){this.identifier=e,this.factory=t,this.isLegacyService=n},tI=function(e,t){this.identifier=e,this.instance=t},nI=function(){function e(){this.registeredServices=[],this.servicesByProcessReference=new Map}var t=e.prototype;return t.registerServices=function(e){for(var t,n=JC(e);!(t=n()).done;){var r=t.value;this.registeredServices.push(r)}},t.serviceInstancesByProcessReference=function(e){var t,n;return null!=(t=null==(n=this.servicesByProcessReference.get(e))?void 0:n.map((function(e){return e.instance})))?t:[]},t.serviceInstancesByIdentifier=function(e){var t=[];return this.servicesByProcessReference.forEach((function(n){for(var r,i=JC(n);!(r=i()).done;){var o=r.value;o.identifier===e&&t.push(o.instance)}})),t},t.attachRegisteredServicesToProcessReference=function(e,t,n){return this.attachServicesToProcessReference(e,t,n,this.registeredServices)},t.attachServicesToProcessReference=function(e,t,n,r){for(var i,o=JC(r);!(i=o()).done;){var a=i.value,s=a.factory(t,n,e);this.ensureServicesForProcessReference(e).push(new tI(a.identifier,s)),s.serviceWasRegistered()}},t.removeServicesForProcessReference=function(e){var t=this.servicesByProcessReference.get(e);t&&t.forEach((function(e){e.instance.serviceWasRemoved()})),this.servicesByProcessReference.delete(e)},t.ensureServicesForProcessReference=function(e){var t=this.servicesByProcessReference.get(e);if(t)return t;var n=[];return this.servicesByProcessReference.set(e,n),n},e}(),rI=1;function iI(){return"bannerId-"+rI++}var oI="com.apple.icloud.cloudos.CloudOSApplication",aI=function(){function e(){this.delegate=null,this.bannersById=new Map,this.bannersByAppName=new Map}var t=e.prototype;return t.displayBanner=function(e,t,n,r,i){return this._displayBanner(!1,oI,e,t,n,r,i)},t.displayBannerForApp=function(e,t,n,r,i,o){return this._displayBanner(!1,e,t,n,r,i,o)},t.setCurrentBanner=function(e,t,n,r,i){return this._displayBanner(!0,oI,e,t,n,r,i)},t.setCurrentBannerForApp=function(e,t,n,r,i,o){return this._displayBanner(!0,e,t,n,r,i,o)},t.setInlineBanner=function(e,t,n,r,i){var o,a=iI(),s={bannerId:a,title:e,description:t,buttonTitle:r,buttonType:i,url:n};return null==(o=this.delegate)||o.showInlineBanner(this,s),a},t.removeBanner=function(e){var t=this.bannersById.get(e);if(t){this.bannersById.delete(e);var n=t.appName,r=this.bannersByAppName.get(n);if(r){var i=r.findIndex((function(t){return t.bannerId===e}));-1!==i&&(r.splice(i,1),0===r.length&&this.bannersByAppName.delete(n))}this.showNextBanner(n)}},t.updateBanner=function(e,t,n){var r,i,o=null==(r=this.bannersById.get(e))?void 0:r.bannerData;o&&(o.title=t,o.description=n,null==(i=this.delegate)||i.showBanner(this,o))},t._displayBanner=function(e,t,n,r,i,o,a){var s=iI(),c={bannerId:s,appName:t,bannerData:{bannerId:s,title:n,description:r,onClick:i,buttonTitle:o,buttonType:a},isOfHighPriority:e};this.bannersById.set(s,c);var u=this.bannersByAppName.get(t);return u?(u.push(c),u.sort((function(e,t){return!e.isOfHighPriority&&t.isOfHighPriority?-1:e.isOfHighPriority&&!t.isOfHighPriority?1:0}))):this.bannersByAppName.set(t,[c]),this.showNextBanner(t),s},t.showNextBanner=function(e){var t,n,r=this,i=function(){var t=r.bannersByAppName.get(e);if(t&&t.length>0)return t[t.length-1];var n=r.bannersByAppName.get(oI);return n&&n.length>0?n[n.length-1]:null}();i?null==(t=this.delegate)||t.showBanner(this,i.bannerData):null==(n=this.delegate)||n.removeBanner(this)},e}();function sI(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function cI(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){sI(o,r,i,a,s,"next",e)}function s(e){sI(o,r,i,a,s,"throw",e)}a(void 0)}))}}var uI=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:es.fetchURL,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:84e4;this.servicesDomain=e,this.fetchURL=t,this.pollingIntervalMS=n,this.storageQuota=null,this.isRunning=!1,this.currentRequest=null,this.quotaDataObservers=new Set}var t=e.prototype;return t.start=function(){var e=cI(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isRunning){e.next=2;break}return e.abrupt("return");case 2:this.isRunning=!0;case 3:if(!this.isRunning){e.next=10;break}return e.next=6,this.refreshQuotaData();case 6:return e.next=8,Xo(this.pollingIntervalMS);case 8:e.next=3;break;case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.getMostRecentQuotaData=function(){return this.storageQuota},t.isFetching=function(){return null!==this.currentRequest},t.refreshQuotaData=function(){var e=cI(regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.currentRequest)){e.next=6;break}return e.next=4,t;case 4:return n=e.sent,e.abrupt("return",n);case 6:return e.prev=6,r=this.fetchQuotaData().then((function(e){return i.quotaDataObservers.forEach((function(e){return e.quotaDataDidChange()})),e})),this.currentRequest=r,this.quotaDataObservers.forEach((function(e){return e.quotaDataLoadingStatusDidChange()})),e.next=12,r;case 12:return e.abrupt("return",e.sent);case 13:return e.prev=13,this.currentRequest=null,this.quotaDataObservers.forEach((function(e){return e.quotaDataLoadingStatusDidChange()})),e.finish(13);case 17:case"end":return e.stop()}}),e,this,[[6,,13,17]])})));return function(){return e.apply(this,arguments)}}(),t.fetchQuotaData=function(){var e=cI(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="https://setup."+this.servicesDomain+"/setup/ws/1/storageUsageInfo",e.next=3,this.fetchURL(t,{method:"POST"});case 3:if(null!=(n=e.sent)&&n.ok){e.next=6;break}return e.abrupt("return",null);case 6:return e.next=8,cI(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 8:if(i=r=e.sent,lI.safeParse(i).success){e.next=11;break}return e.abrupt("return",null);case 11:return this.storageQuota=r,e.abrupt("return",r);case 13:case"end":return e.stop()}var i}),e,this)})));return function(){return e.apply(this,arguments)}}(),e}(),lI=Nn.object({storageUsageByMedia:Nn.object({mediaKey:Nn.string(),displayLabel:Nn.string(),displayColor:Nn.string(),usageInBytes:Nn.number()}).array(),storageUsageInfo:Nn.object({compStorageInBytes:Nn.number(),usedStorageInBytes:Nn.number(),totalStorageInBytes:Nn.number(),commerceStorageInBytes:Nn.number()}),quotaStatus:Nn.object({overQuota:Nn.boolean(),haveMaxQuotaTier:Nn.boolean(),"almost-full":Nn.boolean(),paidQuota:Nn.boolean()}),familyStorageUsageInfo:Nn.object({mediaKey:Nn.string(),displayLabel:Nn.string(),displayColor:Nn.string(),usageInBytes:Nn.number(),familyMembers:Nn.object({appleId:Nn.string(),dsid:Nn.number(),id:Nn.string(),firstName:Nn.string(),fullName:Nn.string(),lastName:Nn.string(),usageInBytes:Nn.number()}).array()}).optional()});function dI(e){var t=e[1],n=e[2]-1,r=e[3],i=e[4],o=e[5],a=new Date;return a.setFullYear(t),a.setMonth(n,r),a.setHours(i),a.setMinutes(o),a.setSeconds(0),a.setMilliseconds(0),a}function pI(e){var t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return t.toString()+"-"+(n<10?"0"+n:""+n)+"-"+(r<10?"0"+r:""+r)}var fI=Nn.object({allDay:Nn.boolean(),duration:Nn.number(),guid:Nn.string(),localStartDate:Nn.number().array(),localEndDate:Nn.number().array(),endDate:Nn.number().array(),startDate:Nn.number().array(),location:Nn.string(),messageType:Nn.string(),pGuid:Nn.string(),startDateIsAllDay:Nn.boolean().optional(),tz:Nn.string(),triggerDate:Nn.number().array(),title:Nn.string()}),hI=Nn.object({AlarmTrigger:fI.array().optional()});function mI(e){return hI.safeParse(e).success}function gI(e,t){return{applicationIdentifier:t,allDay:e.allDay,duration:e.duration,guid:e.guid,localStartDate:dI(e.localStartDate),localEndDate:dI(e.localEndDate),startDate:dI(e.startDate),location:e.location,messageType:e.messageType,pGuid:e.pGuid,startDateIsAllDay:!!e.startDateIsAllDay,timeZone:e.tz,triggerDate:dI(e.triggerDate),title:e.title}}function vI(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return yI(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yI(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bI(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function _I(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){bI(o,r,i,a,s,"next",e)}function s(e){bI(o,r,i,a,s,"throw",e)}a(void 0)}))}}function CI(e,t,n,r){return II.apply(this,arguments)}function II(){return(II=_I(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=encodeURIComponent(i),s=encodeURIComponent(r),e.next=4,es.fetchURL(t+"?lang="+a+"&usertz="+s,{method:"POST",body:JSON.stringify({guid:n.guid,pGuid:n.pGuid})});case 4:return c=e.sent,e.abrupt("return",null!=(o=null==c?void 0:c.ok)&&o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wI(e,t,n,r,i,o){return EI.apply(this,arguments)}function EI(){return(EI=_I(regeneratorRuntime.mark((function e(t,n,r,i,o,a){var s,c,u,l,d,p,f,h,m,g,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=encodeURIComponent(pI(n)),c=encodeURIComponent(pI(r)),u=encodeURIComponent(o),l=encodeURIComponent(i),e.next=6,es.fetchJSON(t+"?startDate="+s+"&endDate="+c+"&lang="+u+"&usertz="+l,mI);case 6:if(null!=(d=e.sent)&&d.ok){e.next=9;break}return e.abrupt("return",null);case 9:for(p=[],f=vI(null!=(m=d.result.AlarmTrigger)?m:[]);!(h=f()).done;)g=h.value,v=gI(g,a),p.push(v);return e.abrupt("return",p);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function SI(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return TI(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TI(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function TI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function OI(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function PI(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){OI(o,r,i,a,s,"next",e)}function s(e){OI(o,r,i,a,s,"throw",e)}a(void 0)}))}}function xI(){var e=up.getAccountPreferences();if(e&&e.timeZone)return e.timeZone;try{var t;return null!=(t=(new Intl.DateTimeFormat).resolvedOptions().timeZone)?t:"US/Pacific"}catch($O){return"US/Pacific"}}function AI(){return _r.locale}function NI(){var e=new Date,t=new Date;return t.setHours(e.getHours()+24),wI(jn("calendar","ca/alarmtriggers/"),e,t,xI(),AI(),Ou.identifier)}function RI(){var e=new Date,t=new Date;return t.setHours(e.getHours()+24),wI(jn("reminders","rd/alarmtriggers/"),e,t,xI(),AI(),cl.identifier)}var DI,kI=function(){function e(){this.delegate=null,this.fetchCalendarAlarmsPromise=null,this.fetchCalendarAlarmsResolve=null,this.fetchRemindersAlarmsPromise=null,this.fetchRemindersAlarmsResolve=null,this.firedAlarms=[],this.scheduledCalendarAlarms=new Map,this.scheduledReminderAlarms=new Map}var t=e.prototype;return t.scheduleAlarms=function(){var e=PI(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=PI(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Ou.identifier,t.includes(n)){e.next=3;break}return e.abrupt("return",!1);case 3:if(Bn("calendar")){e.next=5;break}return e.abrupt("return",!1);case 5:return null==s.fetchCalendarAlarmsResolve||s.fetchCalendarAlarmsResolve(null),s.fetchCalendarAlarmsPromise=null,s.scheduledCalendarAlarms.forEach((function(e){return window.clearTimeout(e)})),s.scheduledCalendarAlarms.clear(),s.fetchCalendarAlarmsPromise=NI(),e.next=12,s.fetchCalendarAlarmsPromise;case 12:if(r=e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:return s.scheduleTimeouts(r,s.scheduledCalendarAlarms),e.abrupt("return",!0);case 17:case"end":return e.stop()}}),e)})))(),r=PI(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=cl.identifier,t.includes(n)){e.next=3;break}return e.abrupt("return",!1);case 3:if(Bn("reminders")){e.next=5;break}return e.abrupt("return",!1);case 5:return null==s.fetchRemindersAlarmsResolve||s.fetchRemindersAlarmsResolve(null),s.fetchRemindersAlarmsPromise=null,s.scheduledReminderAlarms.forEach((function(e){return window.clearTimeout(e)})),s.scheduledReminderAlarms.clear(),s.fetchRemindersAlarmsPromise=RI(),e.next=12,s.fetchRemindersAlarmsPromise;case 12:if(r=e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:return s.scheduleTimeouts(r,s.scheduledReminderAlarms),e.abrupt("return",!0);case 17:case"end":return e.stop()}}),e)})))(),e.next=4,Promise.all([n,r]);case 4:return i=e.sent,o=i[0],a=i[1],e.abrupt("return",o&&a);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.acknowledgeAlarm=function(){var e=PI(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.applicationIdentifier,e.next=e.t0===Ou.identifier?3:e.t0===cl.identifier?5:11;break;case 3:return n=jn("calendar","ca/acknowledgealarm/"),e.abrupt("return",CI(n,t,xI(),AI()));case 5:return r=jn("reminders","rd/acknowledgealarm/"),e.next=8,CI(r,t,xI(),AI());case 8:return i=e.sent,this.scheduleAlarms([cl.identifier]),e.abrupt("return",i);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.snoozeAlarm=function(){var e=PI(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=function(){switch(t.applicationIdentifier){case Ou.identifier:return jn("calendar","ca/snoozealarm/");case cl.identifier:return jn("reminders","rd/snoozealarm/");default:return null}}(),e.abrupt("return",null!==n&&CI(n,t,xI(),AI()));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.scheduleTimeouts=function(e,t){for(var n,r=this,i=Date.now(),o=this.firedAlarms,a=function(){for(var e,a,s,c=n.value,u=!1,l=SI(o);!(e=l()).done;){var d=e.value;if((a=c)===(s=d)||a.applicationIdentifier===s.applicationIdentifier&&a.allDay===s.allDay&&a.duration===s.duration&&a.guid===s.guid&&a.location===s.location&&a.messageType===s.messageType&&a.pGuid===s.pGuid&&a.startDateIsAllDay===s.startDateIsAllDay&&a.timeZone===s.timeZone&&a.title===s.title&&a.localStartDate.getTime()===s.localStartDate.getTime()&&a.localEndDate.getTime()===s.localEndDate.getTime()){u=!0;break}}if(u)return"continue";var p=c.triggerDate,f=c.localEndDate,h=c.startDate,m=f||h;if(!m||m.getTime()+3e4<i)return"continue";var g=p.getTime()-i;if(g>0&&g<=2147483647){var v=window.setTimeout((function(){var e;null==(e=r.delegate)||e.alarmWasTriggered(c),t.delete(c),r.firedAlarms.push(c)}),g);t.set(c,v)}},s=SI(e);!(n=s()).done;)a()},e}();function UI(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3e4;return new Promise((function(i){var o=void 0,a=function t(){window.clearTimeout(o),e.removeEventListener("load",t),e.removeEventListener("error",s),i(!0)},s=function t(){window.clearTimeout(o),e.removeEventListener("load",a),e.removeEventListener("error",t),i(!1)};e.addEventListener("load",a),e.addEventListener("error",s),o=window.setTimeout((function(){e.removeEventListener("load",a),e.removeEventListener("error",s),i(!1)}),r),t&&(e.src=t),n&&(e.srcset=n)}))}kI.sharedInstance=new kI,function(e){e.PUSH="PUSH",e.ALARM="ALARM"}(DI||(DI={})),n(722);var LI=function(e){var t=r.useState(e),n=t[0],i=t[1],o=r.useRef(i),a=r.useCallback((function(e){var t=o.current;t&&t(e)}),[]);return r.useLayoutEffect((function(){return function(){o.current=null}}),[]),[n,a]},MI=(n(723),r.forwardRef((function(e,t){var n=r.useRef(null),i=Object(zp.a)(t,n),o=e.iconSrc||void 0;return o?r.createElement("img",{ref:i,alt:"",src:o,className:"app-icon"}):r.createElement("div",{ref:i})})));MI.displayName="AppIcon";var jI=new Map([["ar-sa",{"1x":n(724),"2x":n(725)}],["ca-es",{"1x":n(726),"2x":n(727)}],["cs-cz",{"1x":n(728),"2x":n(729)}],["da-dk",{"1x":n(730),"2x":n(731)}],["de-de",{"1x":n(732),"2x":n(733)}],["el-gr",{"1x":n(734),"2x":n(735)}],["en-au",{"1x":n(736),"2x":n(737)}],["en-ca",{"1x":n(738),"2x":n(739)}],["en-gb",{"1x":n(740),"2x":n(741)}],["en-nz",{"1x":n(742),"2x":n(743)}],["en-us",{"1x":n(744),"2x":n(745)}],["es-es",{"1x":n(746),"2x":n(747)}],["es-mx",{"1x":n(748),"2x":n(749)}],["fi-fi",{"1x":n(750),"2x":n(751)}],["fr-ca",{"1x":n(752),"2x":n(753)}],["fr-fr",{"1x":n(754),"2x":n(755)}],["hi-in",{"1x":n(756),"2x":n(757)}],["hr-hr",{"1x":n(758),"2x":n(759)}],["hu-hu",{"1x":n(760),"2x":n(761)}],["id-id",{"1x":n(762),"2x":n(763)}],["it-it",{"1x":n(764),"2x":n(765)}],["iw-il",{"1x":n(766),"2x":n(767)}],["ja-jp",{"1x":n(768),"2x":n(769)}],["ko-kr",{"1x":n(770),"2x":n(771)}],["ms-my",{"1x":n(772),"2x":n(773)}],["nl-nl",{"1x":n(774),"2x":n(775)}],["no-no",{"1x":n(776),"2x":n(777)}],["pl-pl",{"1x":n(778),"2x":n(779)}],["pt-br",{"1x":n(780),"2x":n(781)}],["pt-pt",{"1x":n(782),"2x":n(783)}],["ro-ro",{"1x":n(784),"2x":n(785)}],["ru-ru",{"1x":n(786),"2x":n(787)}],["sk-sk",{"1x":n(788),"2x":n(789)}],["sv-se",{"1x":n(790),"2x":n(791)}],["th-th",{"1x":n(792),"2x":n(793)}],["tr-tr",{"1x":n(794),"2x":n(795)}],["uk-ua",{"1x":n(796),"2x":n(797)}],["vi-vi",{"1x":n(798),"2x":n(799)}],["zh-cn",{"1x":n(800),"2x":n(801)}],["zh-hk",{"1x":n(802),"2x":n(803)}],["zh-tw",{"1x":n(804),"2x":n(805)}]]);function FI(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function BI(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){FI(o,r,i,a,s,"next",e)}function s(e){FI(o,r,i,a,s,"throw",e)}a(void 0)}))}}var zI=n(806),HI=r.forwardRef((function(e,t){var n,i=null!=(n=e.iconSize)?n:60,o=i*Math.floor(window.devicePixelRatio),a=.3*i*Math.floor(window.devicePixelRatio),s=Math.floor(11*i/60)*Math.floor(window.devicePixelRatio),c=Math.floor(36*i/60)*Math.floor(devicePixelRatio),u=o-.0833*o*Math.floor(window.devicePixelRatio)*2,l=.817*i*Math.floor(window.devicePixelRatio),d=LI(""),p=d[0],f=d[1],h=r.useCallback((function(){var e=function(e){var t=jI.get(e);return t?window.devicePixelRatio>1?t["2x"]:t["1x"]:""}(_r.locale);f(e)}),[f]),m=LI(null),g=m[0],v=m[1],y=LI({}),b=y[0],_=y[1],C=r.useCallback((function(){_({})}),[_]),I=r.useRef(0),w=r.useCallback((function(){if(!I.current){var e=Date.now(),t=6e4*(new Date).getTimezoneOffset(),n=864e5*Math.ceil((e-t)/864e5)-(e-t);I.current=window.setTimeout((function(){I.current=0,_((function(e){return Object.assign({},e)}))}),n+1)}}),[_]);return r.useLayoutEffect((function(){var e=null==g?void 0:g.canvas;if(e){var t=g.backgroundImage;if(t){var n=e.getContext("2d");if(n){var r=function(){switch((new Date).getDay()){case 0:return Xn("CalendarIcon.Sunday");case 1:return Xn("CalendarIcon.Monday");case 2:return Xn("CalendarIcon.Tuesday");case 3:return Xn("CalendarIcon.Wednesday");case 4:return Xn("CalendarIcon.Thursday");case 5:return Xn("CalendarIcon.Friday");case 6:return Xn("CalendarIcon.Saturday");default:return Xn("CalendarIcon.Sunday")}}(),d=(new Date).getDate();r===b.weekDay&&d===b.monthDay||(n.clearRect(0,0,i,i),BI(regeneratorRuntime.mark((function i(){var p,m;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(n.drawImage(t,0,0,o,o),n.font="500 "+s+"px SFText Calendar Day Of Week",p=n.measureText(r).width,m=s;p>=u&&m>0;)m-=1,n.font="500 "+m+"px SFText Calendar Day Of Week",p=n.measureText(r).width;if(!(m<5*window.devicePixelRatio)){i.next=9;break}return fr.sharedInstance.recordStat(new ur("CalendarIconUnableToLoad",{error:"Calendar icon "+r+" string was too long."}).time()),h(),i.abrupt("return");case 9:for(n.textAlign="center",n.fillStyle="#ff3b30",n.fillText(r,o/2,a),n.font="200 "+c+"px SFDisplay Calendar Day Of Month",p=n.measureText(d.toString()).width,m=c;p>=u&&m>0;)m-=1,n.font="200 "+m+"px SFDisplay Calendar Day Of Month",p=n.measureText(d.toString()).width;if(!(m<5*window.devicePixelRatio)){i.next=20;break}return fr.sharedInstance.recordStat(new ur("CalendarIconUnableToLoad",{error:"Calendar icon "+d+" string was too long."}).time()),h(),i.abrupt("return");case 20:n.textAlign="center",n.fillStyle="#030303",n.fillText(d.toString(),o/2,l),f(e.toDataURL()),_({weekDay:r,monthDay:d}),w();case 26:case"end":return i.stop()}}),i)})))())}}}}),[b,g,i,o,s,u,a,c,l,f,_,w,h]),r.useLayoutEffect((function(){BI(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new ur("fontDetection").time(),e.prev=1,document.fonts.add(new FontFace("SFText Calendar Day Of Week","url(/fonts/SFUIDisplay-Thin.woff)")),document.fonts.add(new FontFace("SFDisplay Calendar Of Month","url(/fonts/SFUIText-Medium.woff)")),n=new Image,e.next=7,Promise.all([document.fonts.load("500 46px SFText Calendar Day Of Week"),document.fonts.load("200 152px SFDisplay Calendar Day Of Month"),UI(n,zI)]);case 7:if(e.sent[2]){e.next=12;break}return h(),e.abrupt("return");case 12:(r=document.createElement("canvas")).style.width=i+"px",r.style.height=i+"px",r.width=o,r.height=o,Iv.sharedInstance.delegates.push({localeOrRegionFormatChanged:C}),v({canvas:r,backgroundImage:n}),e.next=24;break;case 21:e.prev=21,e.t0=e.catch(1),h();case 24:return e.prev=24,fr.sharedInstance.recordStat(t),e.finish(24);case 27:case"end":return e.stop()}}),e,null,[[1,21,24,27]])})))()}),[i,o,C,v,h]),r.createElement(MI,{ref:t,iconSrc:p})}));function WI(e){var t,n,i=e.notification,o=i.applicationInfo,a=null!=(t=gu(o))?t:"",s="calendar"===o.applicationName?r.createElement(HI,{iconSize:128}):r.createElement(MI,{iconSrc:a}),c=function(e){var t=_r.locale,n=e.localStartDate,r=function(){var t,n=(null!=(t=e.title)?t:"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return n.length>40?n.substring(0,40)+"\u2026":n}();if(!n)return r;var i=new Date,o=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),c=new Date(s,a-1,o,0,0,0,0),u=c.getTime();c.setHours(c.getHours()+24);var l=c.getTime();c.setHours(c.getHours()+24);var d=c.getTime(),p=n,f=p.getTime(),h=new Intl.DateTimeFormat(t,{hour:"numeric",minute:"numeric"}).format(p);if(f>=u&&f<l)return Xn("Notification.Alarm.Today.Message",{eventTitle:r,time:h});if(f>=l&&f<d)return Xn("Notification.Alarm.Tomorrow.Message",{eventTitle:r,time:h});if(f>=d){var m=new Intl.DateTimeFormat(t,{month:"numeric",day:"numeric",year:"numeric"}).format(p);return Xn("Notification.Alarm.Future.Message",{eventTitle:r,date:m,time:h})}return console.warn("This alarm with guid ["+e.guid+"] is for a past alarm and it should not have been returned in the fetch call."),r}(i.alarmTrigger),u=i.alarmTrigger.location;return r.createElement("div",{"aria-hidden":null!=(n=e.ariaHidden)&&n,className:Ts()("notification-component",e.className)},r.createElement("div",{className:"notification-component-inner"},r.createElement(Wc,{variant:"notification-activate-button",onActivate:function(){e.onClick()}},r.createElement("div",{className:"notification-icon"},s),r.createElement("div",{className:"notification-info"},r.createElement("span",{className:"title"},c),r.createElement("span",{className:"description"},u))),r.createElement(Wc,{variant:"alarm-actions",onActivate:function(){e.onSnooze()}},Xn("Notification.Alarm.Snooze.Title")),r.createElement(Wc,{variant:"alarm-actions",onActivate:function(){e.onDismiss()}},Xn("Notification.Alarm.Dismiss.Title"))))}var VI=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.fill",svgPath:"M53.7109-35.6934C64.4043-35.6934 73.3887-45.166 73.3887-57.4219C73.3887-69.3848 64.3066-78.5156 53.7109-78.5156C43.1152-78.5156 33.9844-69.2383 34.0332-57.3242C34.0332-45.166 43.0664-35.6934 53.7109-35.6934ZM21.1914 9.7168L86.1816 9.7168C91.6504 9.7168 94.9707 7.12891 94.9707 2.83203C94.9707-9.76562 79.0039-27.0508 53.7109-27.0508C28.3691-27.0508 12.4512-9.76562 12.4512 2.83203C12.4512 7.12891 15.7227 9.7168 21.1914 9.7168Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:80.47012695312492,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 82.8614501953125 89.8935546875",width:82.8614501953125,height:89.8935546875,translateX:-12.109218750000082,translateY:80.1767578125,baseline:80.1767578125,capline:9.716796875}}})},ZI=(n(807),["styles"]);function qI(){return(qI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var KI=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,ZI);return i.a.createElement("svg",qI({width:"18",height:"20",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M10.026 10v8.5h3.356a.75.75 0 110 1.5H4.617a.75.75 0 110-1.5h3.356V10h2.053zm5.46-10a1 1 0 01.978.789l1.513 7A1 1 0 0116.999 9H1.001a1 1 0 01-.978-1.211l1.513-7A1 1 0 012.513 0h12.973zm.2 6.5H2.313a.5.5 0 100 1h13.371a.5.5 0 100-1z",fill:"#007AFF",fillRule:"evenodd"}))},GI=["styles"];function YI(){return(YI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var QI=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,GI);return i.a.createElement("svg",YI({width:"22",height:"18",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M4.362 17.997h16.622a.983.983 0 00.72-.294.968.968 0 00.296-.712.957.957 0 00-.295-.702.982.982 0 00-.721-.294H6.404l-2.042 2.002zM3.206 16.96L15.771 4.664l-2.09-2.048L1.126 14.91l-1.1 2.55c-.055.15-.022.286.099.41.12.124.256.16.405.108l2.676-1.018zM16.813 3.665l1.191-1.146c.296-.29.45-.588.462-.893.012-.305-.115-.592-.38-.86L17.671.36c-.266-.26-.555-.38-.867-.356-.312.023-.616.176-.912.458L14.7 1.608l2.112 2.058z",fill:"#FF9500"}))},XI=["styles"];function JI(){return(JI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var $I=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,XI);return i.a.createElement("svg",JI({width:"18",height:"20",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M0 19.183c0 .26.076.46.228.603.152.143.361.214.628.214h1.985c.26 0 .468-.071.624-.214.155-.142.232-.344.232-.603v-4.499c0-.247-.077-.446-.232-.594-.156-.15-.363-.224-.624-.224H.856c-.267 0-.476.075-.628.224-.152.148-.228.347-.228.594v4.499zm4.762 0c0 .26.077.46.232.603.156.143.364.214.625.214h1.993c.26 0 .469-.071.624-.214.154-.142.232-.344.232-.603V9.726c0-.254-.078-.452-.232-.595-.155-.143-.363-.215-.624-.215H5.619c-.261 0-.47.072-.625.215-.155.143-.232.34-.232.595v9.457zm4.77 0c0 .26.077.46.232.603.155.143.362.214.623.214h1.995c.26 0 .468-.071.624-.214.155-.142.232-.344.232-.603V.818c0-.26-.077-.46-.232-.604C12.85.071 12.643 0 12.382 0h-1.995c-.26 0-.468.071-.623.214-.155.143-.232.344-.232.604v18.365zm4.77 0c0 .26.078.46.233.603.156.143.363.214.624.214h1.994c.26 0 .466-.071.619-.214.152-.142.228-.344.228-.603V5.65c0-.253-.076-.453-.228-.599-.153-.146-.359-.219-.62-.219H15.16c-.26 0-.468.073-.624.22-.155.145-.232.345-.232.598v13.533z",fill:"#34C759"}))},ew=["styles"];function tw(){return(tw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var nw=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,ew);return i.a.createElement("svg",tw({width:"16",height:"20",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M2.949 20H13.05c1.97 0 2.949-.98 2.949-2.92V8.61H9.113c-1.218 0-1.798-.569-1.798-1.763V0H2.95C.989 0 0 .989 0 2.93v14.15C0 19.03.98 20 2.949 20zm5.08-6.627c.315 0 .573.057.774.171.202.114.35.278.447.49.097.212.146.466.146.76 0 .298-.05.555-.148.771a1.074 1.074 0 01-.45.5c-.201.116-.458.174-.769.174H6.843v-2.866zm3.855 0v.554h-1.286v.693h1.17v.537h-1.17v1.082H9.87v-2.866h2.014zm-6.517 0c.233 0 .428.045.584.136.157.09.275.21.355.36.08.151.12.317.12.498 0 .182-.041.348-.122.496a.882.882 0 01-.358.355 1.199 1.199 0 01-.587.132h-.541v.889H4.09v-2.866zm2.546.547h-.342v1.771h.342c.13 0 .24-.018.333-.054a.537.537 0 00.228-.165.724.724 0 00.132-.275c.028-.11.042-.239.042-.386 0-.196-.025-.36-.076-.493a.583.583 0 00-.238-.299.792.792 0 00-.42-.1zM5.2 13.903h-.384v.928H5.2a.57.57 0 00.26-.055.39.39 0 00.17-.158.506.506 0 00.058-.251c0-.15-.043-.266-.13-.345a.512.512 0 00-.358-.12zM8.62.103c.399.065.789.335 1.236.783l5.241 5.233c.457.457.733.83.79 1.213H9.14c-.351 0-.523-.168-.523-.504z",fill:"#FF3B30"}))},rw=["styles"];function iw(){return(iw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ow=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,rw);return i.a.createElement("svg",iw({width:"16",height:"20",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M6.602 0L6.24 1.502 5.784 3.46a3.66 3.66 0 00-.086.783c0 1.157.628 1.922 1.712 2.118v2.341H5.755c-.333 0-.59.243-.59.56 0 .327.257.588.59.588H7.41v1.38H5.755c-.333 0-.59.243-.59.56 0 .327.257.588.59.588H7.41v1.38H5.755c-.333 0-.59.243-.59.56 0 .327.257.588.59.588H7.41v1.38H5.755a.573.573 0 100 1.148H7.41v1.063h1.18v-2.332h1.655a.573.573 0 100-1.147H8.59v-1.38h1.655c.333 0 .59-.253.59-.58a.573.573 0 00-.59-.568H8.59v-1.38h1.655c.333 0 .59-.253.59-.58a.573.573 0 00-.59-.568H8.59v-1.38h1.655c.333 0 .59-.253.59-.58a.573.573 0 00-.59-.568H8.59V6.362c1.084-.196 1.712-.96 1.712-2.118a3.66 3.66 0 00-.086-.783l-.455-1.952h.002L9.41 0h3.64c1.899 0 2.878.92 2.945 2.725l.004.204V17.08c0 1.95-.98 2.92-2.949 2.92H2.95C.979 20 0 19.03 0 17.08V2.93C0 .988.98 0 2.949 0h3.653zM8 3.134c.58 0 1.037.448 1.037 1.017 0 .578-.438 1.026-1.037 1.026-.59 0-1.037-.448-1.037-1.026 0-.569.457-1.017 1.037-1.017z"}))},aw=["styles"];function sw(){return(sw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var cw=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,aw);return i.a.createElement("svg",sw({width:"24",height:"18",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M3.563 18h16.874c2.049 0 3.063-1.007 3.063-3.021V3.03C23.5 1.017 22.486 0 20.437 0H3.563C1.524 0 .5 1.017.5 3.031v11.948C.5 16.993 1.524 18 3.563 18zm4.253-8.75a2.417 2.417 0 01-2.41-2.416 2.424 2.424 0 012.41-2.415c1.316 0 2.399 1.095 2.399 2.415a2.415 2.415 0 01-2.4 2.415zm-4.234 7.186c-.946 0-1.512-.567-1.512-1.526v-.596l2.995-2.62c.43-.382.897-.577 1.326-.577.478 0 .976.195 1.405.596l1.863 1.682 4.662-4.146c.478-.43 1.015-.625 1.57-.625a2.27 2.27 0 011.552.635l4.487 4.165v1.506c0 .939-.576 1.506-1.503 1.506H3.582z",fill:"#FC0"}))},uw=["styles"];function lw(){return(lw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var dw=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,uw);return i.a.createElement("svg",lw({width:"22",height:"24"},t),i.a.createElement("path",{fill:"#FF2D55",d:"M8.736 0c.667 0 1.19.523 1.19 1.18v20.907c0 .656-.523 1.169-1.19 1.169a1.153 1.153 0 01-1.158-1.17V1.18C7.578.523 8.09 0 8.736 0zm7.578 2.215c.666 0 1.19.533 1.19 1.19v16.457c0 .656-.524 1.179-1.19 1.179a1.162 1.162 0 01-1.159-1.18V3.405c0-.656.513-1.19 1.159-1.19zM4.953 3.507c.656 0 1.179.533 1.179 1.19V18.56c0 .656-.523 1.179-1.18 1.179a1.164 1.164 0 01-1.168-1.18V4.697c0-.656.512-1.19 1.169-1.19zm7.577 1.59c.657 0 1.18.532 1.18 1.189V16.98a1.17 1.17 0 01-1.18 1.17 1.162 1.162 0 01-1.169-1.17V6.286c0-.657.513-1.19 1.17-1.19zM20.108 6.9c.656 0 1.18.533 1.18 1.18v7.095c0 .656-.524 1.169-1.18 1.169a1.156 1.156 0 01-1.169-1.17V8.08c0-.646.513-1.18 1.169-1.18zm-18.95.554c.667 0 1.19.533 1.19 1.189v5.978c0 .646-.523 1.169-1.19 1.169A1.16 1.16 0 010 14.622V8.644c0-.656.513-1.19 1.159-1.19z"}))},pw=["styles"];function fw(){return(fw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var hw=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,pw);return i.a.createElement("svg",fw({width:"22",height:"18",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M2.166 18h17.668C21.14 18 22 17.122 22 15.797V2.203C22 .878 21.14 0 19.834 0H2.166C.85 0 0 .878 0 2.203v13.594C0 17.122.851 18 2.166 18zm-.01-14.26a.42.42 0 01-.435-.43v-.925c0-.277.186-.468.454-.468h1.027c.241 0 .417.182.417.449v.944c0 .238-.176.43-.417.43H2.156zm3.471 4.3c-.296 0-.5-.2-.5-.505V2.423c0-.305.204-.506.5-.506h10.709c.296 0 .5.2.5.506v5.113c0 .305-.204.505-.5.505H5.627zm13.134-4.3a.423.423 0 01-.426-.429v-.944c0-.267.185-.449.426-.449h1.018c.277 0 .462.191.462.468v.925a.42.42 0 01-.435.43h-1.045zM2.156 6.84a.425.425 0 01-.435-.429v-.935c0-.267.176-.448.435-.448h1.046c.241 0 .417.181.417.448v.935c0 .23-.176.43-.417.43H2.156zm16.605 0a.43.43 0 01-.426-.429v-.935c0-.267.185-.448.426-.448h1.045c.26 0 .435.181.435.448v.935c0 .23-.175.43-.435.43h-1.045zM2.156 9.901a.42.42 0 01-.435-.429v-.935c0-.257.176-.438.435-.438h1.046c.241 0 .417.18.417.438v.935c0 .239-.176.43-.417.43H2.156zm16.605 0a.423.423 0 01-.426-.429v-.935a.42.42 0 01.426-.438h1.045c.26 0 .435.18.435.438v.935a.42.42 0 01-.435.43h-1.045zM5.627 16.073c-.296 0-.5-.2-.5-.505v-5.085c0-.305.204-.515.5-.515h10.709c.296 0 .5.21.5.515v5.085c0 .305-.204.505-.5.505H5.627zm-3.47-3.09c-.26 0-.436-.2-.436-.44v-.925c0-.267.176-.448.435-.448h1.046c.241 0 .417.181.417.448v.926c0 .238-.176.439-.417.439H2.156zm16.604 0a.431.431 0 01-.426-.44v-.925c0-.267.185-.448.426-.448h1.045c.26 0 .435.181.435.448v.926a.428.428 0 01-.435.439h-1.045zm-16.586 3.09a.437.437 0 01-.454-.458V14.7c0-.268.176-.449.435-.449h1.046c.241 0 .417.181.417.449v.934c0 .258-.176.44-.417.44H2.175zm16.586 0a.42.42 0 01-.426-.439V14.7c0-.268.185-.449.426-.449h1.045c.26 0 .435.181.435.449v.915a.439.439 0 01-.462.458H18.76z",fill:"#8E8E93"}))},mw=["styles"];function gw(){return(gw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vw=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,mw);return i.a.createElement("svg",gw({width:"16",height:"20",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M4.379 5.366a.605.605 0 01-.443-1.03.615.615 0 01.443-.17h7.253c.176 0 .323.056.441.17a.559.559 0 01.178.42.602.602 0 01-.619.61H4.379zm0 3.322a.597.597 0 01-.443-.18.592.592 0 01-.178-.43.56.56 0 01.178-.422.615.615 0 01.443-.17h7.253c.176 0 .323.057.441.17a.56.56 0 01.178.421c0 .168-.06.311-.178.431a.595.595 0 01-.441.18H4.379zm0 3.313a.614.614 0 01-.443-.17.56.56 0 01-.178-.42.605.605 0 01.62-.61l3.472-.002a.597.597 0 01.617.611.567.567 0 01-.173.42.606.606 0 01-.444.171H4.379zM0 17.024c0 .985.252 1.728.755 2.227.503.5 1.249.749 2.236.749h10.018c.993 0 1.74-.25 2.24-.749.5-.499.751-1.242.751-2.227V2.985c0-.986-.25-1.73-.75-2.232C14.75.251 14.001 0 13.01 0H2.99C2.005 0 1.259.251.756.753.252 1.255 0 2 0 2.985v14.039z",fill:"#AF52DE"}))},yw=["fileExtension"];function bw(){return(bw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _w=function(e){var t=e.fileExtension,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,yw),i=void 0!==t?gc({aac:"FileIcon.FileType.aac",abbu:"FileIcon.FileType.abbu",ai:"FileIcon.FileType.ai",aiff:"FileIcon.FileType.aiff",apk:"FileIcon.FileType.apk",app:"FileIcon.FileType.app",avi:"FileIcon.FileType.avi",band:"FileIcon.FileType.band",bat:"FileIcon.FileType.bat",bin:"FileIcon.FileType.bin",blend:"FileIcon.FileType.blend",bmp:"FileIcon.FileType.bmp",c:"FileIcon.FileType.c",c4d:"FileIcon.FileType.c4d",class:"FileIcon.FileType.class",cpp:"FileIcon.FileType.cpp",css:"FileIcon.FileType.css",cer:"FileIcon.FileType.cer",csv:"FileIcon.FileType.csv",dae:"FileIcon.FileType.dae",dmg:"FileIcon.FileType.dmg",dng:"FileIcon.FileType.dng",doc:"FileIcon.FileType.doc",docx:"FileIcon.FileType.docx",dxf:"FileIcon.FileType.dxf",eps:"FileIcon.FileType.eps",exe:"FileIcon.FileType.exe",fbx:"FileIcon.FileType.fbx",gif:"FileIcon.FileType.gif",gz:"FileIcon.FileType.gz",h:"FileIcon.FileType.h",hqx:"FileIcon.FileType.hqx",htm:"FileIcon.FileType.htm",epub:"FileIcon.FileType.epub",ibooks:"FileIcon.FileType.ibooks",icns:"FileIcon.FileType.icns",ico:"FileIcon.FileType.ico",ics:"FileIcon.FileType.ics",indd:"FileIcon.FileType.indd",ipa:"FileIcon.FileType.ipa",iso:"FileIcon.FileType.iso",java:"FileIcon.FileType.java",jpg:"FileIcon.FileType.jpg",js:"FileIcon.FileType.js",key:"FileIcon.FileType.key",keychain:"FileIcon.FileType.keychain",log:"FileIcon.FileType.log",m:"FileIcon.FileType.m",m3u:"FileIcon.FileType.m3u",m4a:"FileIcon.FileType.m4a",m4p:"FileIcon.FileType.m4p",m4r:"FileIcon.FileType.m4r",m4v:"FileIcon.FileType.m4v",mid:"FileIcon.FileType.mid",qt:"FileIcon.FileType.qt",mp3:"FileIcon.FileType.mp3",mp4:"FileIcon.FileType.mp4",mpeg:"FileIcon.FileType.mpeg",numbers:"FileIcon.FileType.numbers",obj:"FileIcon.FileType.obj",otf:"FileIcon.FileType.otf",pages:"FileIcon.FileType.pages",pdf:"FileIcon.FileType.pdf",perl:"FileIcon.FileType.perl",pkg:"FileIcon.FileType.pkg",png:"FileIcon.FileType.png",pps:"FileIcon.FileType.pps",ppsx:"FileIcon.FileType.ppsx",ppt:"FileIcon.FileType.ppt",pptx:"FileIcon.FileType.pptx",ps:"FileIcon.FileType.ps",psd:"FileIcon.FileType.psd",py:"FileIcon.FileType.py",rar:"FileIcon.FileType.rar",rtf:"FileIcon.FileType.rtf",safariextz:"FileIcon.FileType.safariextz",scpt:"FileIcon.FileType.scpt",sh:"FileIcon.FileType.sh",stl:"FileIcon.FileType.stl",svg:"FileIcon.FileType.svg",swift:"FileIcon.FileType.swift",tar:"FileIcon.FileType.tar",tiff:"FileIcon.FileType.tiff",ttf:"FileIcon.FileType.ttf",txt:"FileIcon.FileType.txt",vcf:"FileIcon.FileType.vcf",wave:"FileIcon.FileType.wave",wma:"FileIcon.FileType.wma",wmv:"FileIcon.FileType.wmv",xcodeproj:"FileIcon.FileType.xcodeproj",xhtml:"FileIcon.FileType.xhtml",xlam:"FileIcon.FileType.xlam",xls:"FileIcon.FileType.xls",xlsx:"FileIcon.FileType.xlsx",xml:"FileIcon.FileType.xml",zip:"FileIcon.FileType.zip"}[t]):"";return r.createElement("div",{className:"icon"},function(){switch(t){case"key":return r.createElement(KI,bw({"aria-label":i,"data-testid":"keynote-icon"},n));case"numbers":return r.createElement($I,bw({"aria-label":i,"data-testid":"numbers-icon"},n));case"pages":return r.createElement(QI,bw({"aria-label":i,"data-testid":"pages-icon"},n));case"pptx":case"ppt":return r.createElement("div",{"aria-label":i,"data-testid":"ppt-icon",className:"png-icon ppt-icon"});case"xlsx":case"xls":case"xlam":return r.createElement("div",{"aria-label":i,"data-testid":"excel-icon",className:"png-icon excel-icon"});case"docx":case"doc":return r.createElement("div",{"aria-label":i,"data-testid":"word-icon",className:"png-icon word-icon"});case"jpg":case"jpeg":case"png":case"gif":case"tiff":case"tif":case"bmp":return r.createElement(cw,bw({"aria-label":i,"data-testid":"image-icon"},n));case"aac":case"wav":case"m4a":case"m4p":case"aiff":case"midi":case"wave":case"mp3":return r.createElement(dw,bw({"aria-label":i,"data-testid":"audio-icon"},n));case"mp4":case"m4v":case"mov":return r.createElement(hw,bw({"aria-label":i,"data-testid":"video-icon"},n));case"zip":return r.createElement(ow,bw({"aria-label":i,"data-testid":"zip-icon"},n));case"pdf":return r.createElement(nw,bw({"aria-label":i,"data-testid":"pdf-icon"},n));case"folder":default:return r.createElement(vw,bw({"aria-label":i,"data-testid":"default-icon"},n))}}())},Cw=(n(808),["gif","jpeg","jpg","mp3","mp4","mov","pdf","png","txt","wav"]),Iw=["key","key-tef","keynote","keynote-tef","numbers","numbers-tef","pages","pages-tef"],ww={key:"keynote","key-tef":"keynote",keynote:"keynote","keynote-tef":"keynote",numbers:"numbers","numbers-tef":"numbers",pages:"pages","pages-tef":"pages"},Ew={ie9:["mov","mp4","wav","pdf"],chrome:["mp4","mov"],firefox:["mp4","mov"],safari12OrLower:["pdf"]};function Sw(e){var t,n=(null==(t=e.extension)?void 0:t.toLowerCase())||"";return!(-1===Cw.indexOf(n)||function(e){var t,n=bZ.sharedInstance.applicationParameter,r=n.isSafari12OrLower,i=n.isChrome,o=n.isFirefox;return r?t="safari12OrLower":i?t="chrome":o&&(t="firefox"),!!t&&-1!==Ew[t].indexOf(e)}(n))}var Tw=function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(new ArrayBuffer(n)),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r},Ow=["Utils.BytesToHumanizedFormat.Size.bytes","Utils.BytesToHumanizedFormat.Size.KB","Utils.BytesToHumanizedFormat.Size.MB","Utils.BytesToHumanizedFormat.Size.GB","Utils.BytesToHumanizedFormat.Size.TB","Utils.BytesToHumanizedFormat.Size.PB","Utils.BytesToHumanizedFormat.Size.EB","Utils.BytesToHumanizedFormat.Size.ZB","Utils.BytesToHumanizedFormat.Size.YB"],Pw=["Utils.BytesToHumanizedFormat.Size.bytes.Compact","Utils.BytesToHumanizedFormat.Size.KB.Compact","Utils.BytesToHumanizedFormat.Size.MB.Compact","Utils.BytesToHumanizedFormat.Size.GB.Compact","Utils.BytesToHumanizedFormat.Size.TB.Compact","Utils.BytesToHumanizedFormat.Size.PB.Compact","Utils.BytesToHumanizedFormat.Size.EB.Compact","Utils.BytesToHumanizedFormat.Size.ZB.Compact","Utils.BytesToHumanizedFormat.Size.YB.Compact"];function xw(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e<=0||isNaN(e))return gc(n?Pw[0]:Ow[0],{value:0});var r=gc("CloudOS.LocalizationFormatter.DecimalSymbol"),i=1024,o=Math.floor(Math.log(e)/Math.log(i)),a=e/Math.pow(i,o),s=(""+parseFloat(a.toFixed(t))).replace(".",r),c=n?Pw[o]:Ow[o];return gc(c,{value:s})}function Aw(e){throw new Error("Reached unexpected case "+e+" in exhaustive check")}function Nw(e,t,n){var r=e.toLocaleTimeString(t,{hour:"numeric",minute:"2-digit"}),i=gc("DateTime.Relative.Yesterday");if(function(e){return Rw(e).getTime()===Rw(new Date).getTime()}(e))return"short"===n?r:gc("DateTime.Relative.TodayTime",{time:r});if(function(e){var t=Rw(new Date);return t.getTime()>e.getTime()&&t.getTime()-e.getTime()<864e5}(e))return"short"===n?i:gc("DateTime.Relative.YesterdayTime",{time:r});if("short"===n)return e.toLocaleDateString(t,{year:"2-digit",month:"numeric",day:"numeric"});var o=e.toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"});return gc("DateTime.Relative.DateTime",{date:o,time:r})}function Rw(e){var t=new Date(e.getTime());return t.setHours(0,0,0,0),t}var Dw=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"short",n=a();return Nw(e,n,t)};function kw(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.getFullYear(),r=e.getMonth()+1,i=e.getDate(),o=String(r).padStart(2,"0"),a=String(i).padStart(2,"0");return[n,o,a].join(t?"-":"")}function Uw(e,t){var n=e.x,r=t.height-e.y-e.height,i=Math.min(e.width,e.height),o=i,a=i;return e.width>e.height?n+=(e.width-e.height)/2:e.height>e.width&&(r+=(e.height-e.width)/2),{top:r,left:n,width:o,height:a}}function Lw(e,t){return{x:Math.round(e.left),y:Math.round(t.height-e.top-e.height),width:Math.round(e.width),height:Math.round(e.height)}}function Mw(e,t){var n,r=t.givenName,i=t.familyName,o=t.emailAddress,a=t.phoneNumber,s=t.nickname,c=t.companyName,u=s||r;return u&&i&&(n=cy(u)&&cy(i)?function(e,t){return""+t+e}(u,i):function(e,t,n){switch(e){case"hu-hu":return n+" "+t;default:return t+" "+n}}(e,u,i)),jw(n)||(n=jw(u)||jw(i)||jw(o)||jw(a)||jw(c)),n}function jw(e){return e&&!/^\s*$/.test(e)?e:""}function Fw(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Mw(a(),{givenName:e}),i=Mw(a(),{givenName:e,familyName:t});return n||i&&cy(i)?null!=i?i:"":null!=r?r:""}function Bw(e){var t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function zw(e){var t,n,r=Ww(e);"pages"===e?n=gl.sharedInstance.getApplicationConfiguration(tl.identifier):"keynote"===e?n=gl.sharedInstance.getApplicationConfiguration(Hu.identifier):"numbers"===e?n=gl.sharedInstance.getApplicationConfiguration($u.identifier):Aw(e),n&&null!=(t=n)&&t.isHidden&&n.reasonConfigurationIsHidden===lu.APPLICATION_INFO_DOES_NOT_SUPPORT_DEVICE?Vw("https://"+r+"/"+e+"/"):Vw("https://"+r+"/"+e+"/create")}function Hw(e,t,n){var r,i=t.extension,o=t.shortGuid,a=t.isSharedToMe,s=t.sharingToken,c=t.title,u=t.isSharedByMe,l=t.isSharedDirectlyOrIndirectly,d=t.isSharedDirectly,p=t.zone,f=t.id,h=t.unifiedToken,m=Ww(e),g=null==i?void 0:i.replace(/-tef$/,""),v="https://"+m+"/"+("key"===(null==g?void 0:g.toLowerCase())?"keynote":g),y=c?"#"+encodeURIComponent(c.replace(/\s/g,"_"))+":nooverride":"#:nooverride",b=!!o,_=a&&d&&!!s,C=u||!l,I=null==n||null==(r=n.details)?void 0:r.dsid,w=h?"utoken:"+h:b?o:C?"docws:"+I+":"+p+":"+f:_?s:null;if(!w)throw new Error("Cannot open the document");Vw(v+"/"+w+"?redirectReason=off"+y)}function Ww(e){var t;return e&&(t=Ne.sharedInstance.isDomainCN?ge.url.hostname:me.url.hostname),t}function Vw(e){if(!he.c(e))throw new Error("Unable to open iWork document");globalThis.window.open(e.toString(),"_blank")}function Zw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var qw=function(){function e(e){if(this.url=void 0,"string"===typeof e)this.url=Object(he.c)(e);else{if(!e||e.constructor!==window.Location)throw new Error("A URL object cannot be created with the data provided");this.url=Object(he.c)(e.href)}}var t,n,r=e.prototype;return r.isInDomain=function(e){var t=this.hostname;return!(!t||""===e)&&t.indexOf(e)>-1},r.setQueryParameter=function(e,t){var n=this.url.searchParams;return n.delete(e),n.set(e,t),this.url.search="?"+n.toString(),this},r.appendQueryParameter=function(e,t){var n=this.url.searchParams;return n.append(e,t),this.url.search="?"+n.toString(),this},r.removeQueryParameter=function(e){return this.url.searchParams.delete(e),this},r.getQueryParameter=function(e){return this.url.searchParams.get(e)},r.setMultipleQueryParameters=function(e){for(var t in e)e.hasOwnProperty(t)&&this.setQueryParameter(t,e[t]);return this},r.toString=function(){return this.url.href},r.toJSON=function(){return this.url.toJSON()},t=e,(n=[{key:"protocol",get:function(){return this.url.protocol},set:function(e){this.url.protocol=e}},{key:"auth",get:function(){return this.url.username+":"+this.url.password},set:function(e){var t=e.split(":"),n=t[0],r=t[1];this.url.username=n,this.url.password=r}},{key:"hostname",get:function(){return this.url.hostname},set:function(e){this.url.hostname=e}},{key:"port",get:function(){return this.url.port},set:function(e){this.url.port="number"===typeof e?e.toString():parseInt(e,10).toString()}},{key:"pathname",get:function(){return this.url.pathname},set:function(e){this.url.pathname=e}},{key:"query",get:function(){return this.url.search},set:function(e){this.url.search=e}},{key:"hash",get:function(){return this.url.hash},set:function(e){this.url.hash=e}},{key:"href",get:function(){return this.url.href}},{key:"host",get:function(){return this.url.host}},{key:"origin",get:function(){return this.url.origin}},{key:"path",get:function(){return this.query?""+(this.pathname||"")+this.query:this.pathname}},{key:"queryObject",get:function(){var e=this.url.searchParams,t={};return e.forEach((function(n,r){if(!t[r]){var i=e.getAll(r);if(1!==i.length)t[r]=i;else{var o=i[0];o.indexOf(",")>-1?t[r]=o.split(","):t[r]=o}}})),t},set:function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],o=e[i];Array.isArray(o)?t.push(i+"="+o.map((function(e){return e.toString()})).join(",")):t.push(i+"="+o.toString())}this.url.search="?"+t.join("&")}}])&&Zw(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Kw(e,t,n){return(Kw=Gw()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Yw(i,n.prototype),i}).apply(null,arguments)}function Gw(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Yw(e,t){return(Yw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qw(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Xw(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Qw(o,r,i,a,s,"next",e)}function s(e){Qw(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Jw(e){return $w.apply(this,arguments)}function $w(){return($w=Xw(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,es.fetchURL(t);case 2:if(null!=(n=e.sent)&&n.ok){e.next=5;break}return e.abrupt("return",{success:!1,data:n});case 5:return e.next=7,Xw(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 7:if(!(r=e.sent)||r.error||!r.package_token||!r.package_token.url){e.next=13;break}return i=r.package_token.url,e.abrupt("return",{success:!0,url:i});case 13:return e.abrupt("return",{success:!1,data:n});case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var eE,tE=function(e){var t,n;function r(t,n,r){var i;if((i=e.call(this,String(t))||this).downloadTokenQueryParamKey=void 0,i.downloadTokenQueryParamValue=void 0,!n)throw new Error("downloadTokenQueryParamKey not provided");return i.downloadTokenQueryParamKey=n,i.downloadTokenQueryParamValue=r||$n(),i.setQueryParameter(i.downloadTokenQueryParamKey,i.downloadTokenQueryParamValue),i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Yw(t,n),r.packageUrlFromShortToken=function(){var e=Xw(regeneratorRuntime.mark((function e(t,n){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("Cannot fetch a `ValidatedPackageDownloadURL` without a `shortToken`.");case 2:if(n){e.next=4;break}throw new Error("Cannot fetch a `ValidatedPackageDownloadURL` without defining a `databaseScope`.");case 4:return i="ws/"+n.toLowerCase()+"/download/by_token",(o=new qw(jn("docws",i))).setQueryParameter("short_token",t),e.next=9,Jw(o.href);case 9:if((a=e.sent).success){e.next=12;break}return e.abrupt("return",a);case 12:return e.abrupt("return",new r(a.url," "));case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),r.create=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kw(r,t)},r}(qw);function nE(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function rE(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){nE(o,r,i,a,s,"next",e)}function s(e){nE(o,r,i,a,s,"throw",e)}a(void 0)}))}}!function(e){e[e.FAILED=0]="FAILED",e[e.SURVIVED=1]="SURVIVED"}(eE||(eE={}));var iE,oE=function(){function e(){this.running=!1,this.urlQueue=[]}var t=e.prototype;return t.downloadFromURL=function(e){var t=this,n=new Promise((function(n){t.urlQueue.push([e,n])}));return this.running||this.run(),n},t.run=function(){var e=rE(regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.running=!0;case 1:if(!this.urlQueue.length){e.next=9;break}return t=this.urlQueue.shift(),n=t[0],r=t[1],e.next=5,this.beginIFrameDownload(n);case 5:i=e.sent,r(i),e.next=1;break;case 9:this.running=!1;case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.beginIFrameDownload=function(){var e=rE(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=document.createElement("iframe")).style.display="none",document.body.appendChild(n),r=function(){},i=eE.FAILED,e.prev=5,o=new Promise((function(e){window.setTimeout(e,5e3)})).then((function(){return eE.SURVIVED})),a=new Promise((function(e){r=function(){return e(eE.FAILED)}})),n.addEventListener("load",r),n.id=t,n.src=t,e.next=13,Promise.race([o,a]);case 13:i=e.sent;case 14:return e.prev=14,n.removeEventListener("load",r),null==(s=n.parentElement)||s.removeChild(n),e.finish(14);case 18:return e.abrupt("return",i);case 19:case"end":return e.stop()}}),e,null,[[5,,14,18]])})));return function(t){return e.apply(this,arguments)}}(),e}();function aE(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function sE(e,t,n){return(sE=cE()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&uE(i,n.prototype),i}).apply(null,arguments)}function cE(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function uE(e,t){return(uE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.FAILED_TO_DOWNLOAD="Failed to download the url",e.ALREADY_DOWNLOADING="Already downloading a file. Retry after some time."}(iE||(iE={}));var lE=function(){function e(e,t){if(this.downloadCookieName=e,this._cookieManager=void 0,this.shouldUseIFrameDownloader=void 0,this._downloadManager=void 0,!e)throw new Error("downloadCookieName is required to create the ValidatedDownloadManager");if(!t)throw new Error("cookieManagerDomain is required to create the ValidatedDownloadManager");this._cookieManager=new Zm(t),this._downloadManager=new oE;var n=!0;if(_.sharedInstance.primaryInteractionMode===h.TOUCH){var r=bZ.sharedInstance.applicationParameter.isIOS,i=bZ.sharedInstance.applicationParameter.osMajorVersion;n=r&&i>=13}this.shouldUseIFrameDownloader=n}e.create=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sE(e,n)};var t=e.prototype;return t.download=function(e){if(!(e instanceof tE))throw new Error("Url to be downloaded is not of type ValidatedDownloadUrl");var t=this._cookieManager,n=this.downloadCookieName;return t.readCookieValue(n)?Promise.resolve({success:!1,errorReason:iE.ALREADY_DOWNLOADING}):(this._writeCookie(e),this.startDownload(e))},t.startDownload=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.shouldUseIFrameDownloader){e.next=3;break}return Object(ae.a)(t.toString(),{target:"_blank",features:[]}),e.abrupt("return",{success:!0});case 3:return e.next=5,this._downloadManager.downloadFromURL(t.href);case 5:if(e.sent!==eE.FAILED){e.next=10;break}return e.abrupt("return",{success:!1,errorReason:iE.FAILED_TO_DOWNLOAD});case 10:return e.abrupt("return",{success:!0});case 11:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){aE(o,r,i,a,s,"next",e)}function s(e){aE(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),t._writeCookie=function(e){var t=e.downloadTokenQueryParamValue,n=this._cookieManager,r=this.downloadCookieName;n.writeCookie(r,t,void 0,!0,void 0,1)},e}();function dE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mE(e,t)}function pE(e){var t="function"===typeof Map?new Map:void 0;return(pE=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return fE(e,arguments,gE(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),mE(r,e)})(e)}function fE(e,t,n){return(fE=hE()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&mE(i,n.prototype),i}).apply(null,arguments)}function hE(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function mE(e,t){return(mE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gE(e){return(gE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Na.a;var vE,yE=function(e){function t(){return e.apply(this,arguments)||this}return dE(t,e),t}(pE(Error)),bE=function(e){function t(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"seconds";return(n=e.call(this)||this).retryAfter=t,n.timeUnit=r,n}return dE(t,e),t}(pE(Error)),_E=function(e){function t(t,n){var r,i=n?n+": ":"";return(r=e.call(this,i+(t?t.status+" "+t.statusText:"request timed out"))||this).response=t,r.schemaName=n,r}return dE(t,e),t}(pE(Error)),CE=function(e){return e instanceof _E},IE={getListOfAvailableCookiesAsHash:function(){return Is.a.get()},getListOfAvailableCookiesAsConcatenatedString:function(){for(var e=this.getListOfAvailableCookiesAsHash(),t=Object.keys(e),n="",r=0;r<t.length;r++){var i=t[r];n+=i+":"+e[i]+";"}return n},getValidateToken:function(){return this.getListOfAvailableCookiesAsHash()["X-APPLE-WEBAUTH-VALIDATE"]}};!function(e){e.accountLogin="accountLogin",e.continueOnDevice="continueOnDevice",e.fetchCentralizedWebToken="fetchCentralizedWebToken",e.validateUser="validateUser",e.storageUsage="storageUsage",e.hmeList="hmeList",e.customEmailDomains="customEmailDomains",e.photosRecent="photosRecent",e.photosPrimaryZone="photosPrimaryZone",e.photosLibraryInfo="photosLibraryInfo",e.notesRecent="notesRecent",e.notesShared="notesShared",e.mailRecentMessages="mailRecentMessages",e.mailRecentThreads="mailRecentThreads",e.calendarFutureEvents="calendarFutureEvents",e.iWorksRecent="iWorksRecent",e.driveRecent="driveRecent",e.driveDownload="driveDownload",e.meCardGet="meCardGet",e.devicesBackup="devicesBackup",e.listCalendarArchives="listCalendarArchives",e.listContactArchives="listContactArchives",e.retrieveDeletedItemDetails="retrieveDeletedItemDetails",e.bookmarks="bookmarks",e.remindersPrimaryZone="remindersPrimaryZone",e.remindersRecent="remindersRecent",e.remindersList="remindersList",e.lookMeUpByEmailList="lookMeUpByEmailList",e.listSubscriptionFeatures="listSubscriptionFeatures",e.getSubscriptionFeaturePlanSummary="getSubscriptionFeaturePlanSummary",e.getPlanPricing="getPlanPricing",e.getFamilyDetails="getFamilyDetails"}(vE||(vE={}));var wE,EE=Ne.sharedInstance.isDomainCN,SE=EE?"https://setup.icloud.com.cn/setup/ws/1":"https://setup.icloud.com/setup/ws/1";!function(e){e.PUBLIC="public",e.PRIVATE="private",e.SHARED="shared"}(wE||(wE={}));var TE=function(e,t){e.searchParams.append("clientBuildNumber",window.__CW_BUILD_INFO.buildNumber),e.searchParams.append("clientMasteringNumber",window.__CW_BUILD_INFO.masteringNumber),e.searchParams.append("dsid",t)},OE=function(e,t,n,r,i,o){var a=he.c(e+"/database/1/"+n+"/"+t+"/"+r+"/"+o);return TE(a,i),a.toString()},PE=function(e,t,n,r,i){return OE(e,t,n,r,i,"records/query")},xE=function(e,t,n,r,i){return OE(e,t,n,r,i,"records/lookup")},AE=function(e,t,n,r,i){return OE(e,t,n,r,i,"zones/list")},NE=1;function RE(e,t,n){var r=he.c(e+"/ca/startup");TE(r,t),r.searchParams.append("startDate",kw(n)),r.searchParams.append("endDate",kw(n));var i=(new Intl.DateTimeFormat).resolvedOptions().timeZone;return r.searchParams.append("usertz",i),r.searchParams.append("requestID",""+NE++),r.searchParams.append("lang",a()),r.searchParams.append("brief","true"),r.searchParams.append("clientVersion","5.1"),r.toString()}function DE(e,t){var n=he.c(e+"/setup/web/device/getDevices");return TE(n,t),n.toString()}function kE(e,t){var n=he.c(e+"/listArchives");return TE(n,t),n.toString()}function UE(e,t){var n=he.c(e+"/retrieveDeletedItemDetails");return TE(n,t),n.toString()}var LE=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6,r=he.c(e+"/ws/_all_/list/enumerate/recentDocs");return TE(r,t),r.searchParams.append("limit",n.toString()),r.searchParams.append("unified_format","true"),r.toString()},ME=function(e,t,n,r){var i,o=he.c(e+"/ws/"+n+"/download/batch"+r);try{(i=function(e){var t=null;if(null!==e&&void 0!==e){var n=e.match(/^v=\d{1}:t=([\w\W]*)$/);null!=n&&2===n.length&&(t=n[1])}return t}(IE.getValidateToken()))&&o.searchParams.append("token",i)}catch(s){var a=IE.getListOfAvailableCookiesAsConcatenatedString();throw new Error("Error in DocWebService._executeBatchedDownload requesting COSK getValidateCookie(). Cookies = "+a)}return TE(o,t),o.toString()},jE=function(e,t){var n=he.c(e+"/restoreArchive");return TE(n,t),n.toString()},FE=function(e,t){var n=he.c(e+"/retrieveServiceStatus");return TE(n,t),n.toString()},BE=EE?"https://gatewayws.icloud.com.cn/acsegateway":"https://gatewayws.icloud.com/acsegateway",zE=function(e){var t=he.c(BE+"/v3/accounts/"+e+"/subscriptions/features");return TE(t,e),t.toString()},HE=function(e,t){var n=he.c(BE+"/v3/accounts/"+e+"/subscriptions/features/"+t+"/plan-summary");return TE(n,e),n.toString()},WE=function(e){var t=he.c(BE+"/v1/accounts/"+e+"/plans/icloud/pricing");return TE(t,e),t.toString()},VE=function(e,t){var n=he.c(e+"/setup/web/family/getFamilyDetails");return TE(n,t),n.toString()};function ZE(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function qE(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ZE(o,r,i,a,s,"next",e)}function s(e){ZE(o,r,i,a,s,"throw",e)}a(void 0)}))}}function KE(e){return GE.apply(this,arguments)}function GE(){return(GE=qE(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.url,r=t.method,i=t.contentType,o=t.includeCredentials,a=t.body,s=t.validate,e.next=3,Ga(String(n),{validate:s,method:r,headers:{"Content-Type":null!=i?i:"text/plain"},credentials:o?"include":void 0,body:a?JSON.stringify(a):void 0});case 3:return(c=e.sent)&&!c.ok&&tS(c),e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function YE(e){return QE.apply(this,arguments)}function QE(){return(QE=qE(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c,u,l,d,p,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.url,r=t.method,i=void 0===r?"GET":r,o=t.contentType,a=void 0===o?"text/plain":o,s=t.includeCredentials,c=void 0!==s&&s,u=t.body,!(l=t.validate)){e.next=14;break}return e.next=4,KE({url:n,method:i,contentType:a,includeCredentials:c,body:u,validate:l});case 4:if(d=e.sent){e.next=7;break}throw new Error("request timed out ("+n+")");case 7:if(d.ok){e.next=9;break}return e.abrupt("return",Promise.reject(new _E(d,l.type)));case 9:return e.next=11,d.json();case 11:return e.abrupt("return",e.sent);case 14:return p={method:i,headers:{"Content-Type":a}},u&&(p.body=JSON.stringify(u)),c&&(p.credentials="include"),e.next=19,Ga(String(n),p);case 19:if(f=e.sent){e.next=22;break}throw new Error("request timed out ("+n+")");case 22:return e.abrupt("return",f);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var XE=function(e){return YE(e)},JE=function(e){return YE(e)};function $E(){return($E=qE(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,KE({url:t.url,validate:t.validate,method:"GET",contentType:"text/plain",includeCredentials:!0});case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return",{statusCode:500});case 5:if(200===(r=n.status)){e.next=8;break}return e.abrupt("return",{statusCode:r});case 8:return e.next=10,n.json();case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var eS,tS=function(e){var t,n=e.status,r=wZ.sharedInstance;401!==n&&421!==n||null==(t=r.cloudOSUser)||!t.isAuthenticated||r.unauthenticateUser(!0,!1)},nS=n(809),rS=["endpoint","cacheKeys","fetchProvider","dependencies"];function iS(e){var t,n,i=e.endpoint,o=e.cacheKeys,a=void 0===o?[]:o,s=e.fetchProvider,c=e.dependencies,u=void 0===c?[]:c,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,rS),d=wm(),p=null==(t=qf())||null==(n=t.details)?void 0:n.dsid,f=[i,p].concat(a||[]),h=s({webServices:d,dsid:p}),m=[d,p].concat(u).every(Ra),g=Object(nS.useQuery)(f,h,Object.assign({},l,{enabled:m,retry:!1,notifyOnChangeProps:"tracked"})),v=g.data,y=g.error,b=l.onError,_=l.onSuccess;return r.useEffect((function(){v&&(null==_||_(v))}),[_,v]),r.useEffect((function(){y&&(null==b||b(y))}),[b,y]),g}function oS(e){var t,n,r=e.docwsid,i=function(e,t){var n="BY_ME"===t,r=e.split("::")[0],i=function(e){return"FOLDER::com.apple.CloudDocs::root"===e||"TRASH_ROOT"===e}(e);return r?i?eS.FOLDER:"APP_LIBRARY"===r?eS.APP_LIBRARY:"FILE_IN_SHARED_FOLDER"===r?eS.FILE_IN_SHARED_TO_ME_FOLDER:"FOLDER_IN_SHARED_FOLDER"===r?eS.FOLDER_IN_SHARED_TO_ME_FOLDER:"SHARED_FILE"===r?eS.SHARED_TO_ME_FILE:"SHARED_FOLDER"===r?eS.SHARED_TO_ME_FOLDER:n?"FOLDER"===r?eS.SHARED_BY_ME_FOLDER:eS.SHARED_BY_ME_FILE:"FOLDER"===r?eS.FOLDER:eS.FILE:eS.UNKNOWN}(r,e.share),o=function(e){return e===eS.SHARED_TO_ME_FILE||e===eS.SHARED_TO_ME_FOLDER||e===eS.FILE_IN_SHARED_TO_ME_FOLDER||e===eS.FOLDER_IN_SHARED_TO_ME_FOLDER}(i),a=function(e){return e===eS.SHARED_BY_ME_FILE||e===eS.SHARED_BY_ME_FOLDER||e===eS.FILE_IN_SHARED_BY_ME_FOLDER||e===eS.FOLDER_IN_SHARED_BY_ME_FOLDER}(i),s=function(e){return e===eS.SHARED_BY_ME_FILE||e===eS.SHARED_TO_ME_FILE||e===eS.SHARED_BY_ME_FOLDER||e===eS.SHARED_TO_ME_FOLDER}(i),c=(a||o)&&!s,u=a||o,l=null==(t=e.shareID)||null==(n=t.zoneID)?void 0:n.ownerRecordName;return{id:r,isShared:!1,title:e.name,time:Dw(new Date(e.dateModified)),shortGuid:e.shortGuid||void 0,shortGUID:e.shortGUID||void 0,extension:e.extension||void 0,unifiedToken:e.unifiedToken||void 0,sharingToken:e.sharingToken||void 0,zone:e.zone,isSharedToMe:o,isSharedByMe:a,isSharedDirectly:s,isSharedIndirectly:c,isSharedDirectlyOrIndirectly:u,ownerRecordName:l}}function aS(e){return e.data_token.url}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.APP_LIBRARY=1]="APP_LIBRARY",e[e.FOLDER=2]="FOLDER",e[e.FILE=3]="FILE",e[e.FILE_IN_SHARED_TO_ME_FOLDER=4]="FILE_IN_SHARED_TO_ME_FOLDER",e[e.FOLDER_IN_SHARED_TO_ME_FOLDER=5]="FOLDER_IN_SHARED_TO_ME_FOLDER",e[e.SHARED_TO_ME_FILE=6]="SHARED_TO_ME_FILE",e[e.SHARED_TO_ME_FOLDER=7]="SHARED_TO_ME_FOLDER",e[e.SHARED_BY_ME_FOLDER=8]="SHARED_BY_ME_FOLDER",e[e.SHARED_BY_ME_FILE=9]="SHARED_BY_ME_FILE",e[e.FOLDER_IN_SHARED_BY_ME_FOLDER=10]="FOLDER_IN_SHARED_BY_ME_FOLDER",e[e.FILE_IN_SHARED_BY_ME_FOLDER=11]="FILE_IN_SHARED_BY_ME_FOLDER"}(eS||(eS={}));var sS=Nn.object({zoneName:Nn.string(),ownerRecordName:Nn.string()}),cS=Nn.object({shareName:Nn.string(),recordName:Nn.string(),zoneID:sS}),uS=Nn.object({firstName:Nn.string(),lastName:Nn.string(),ownerRecordName:Nn.string()}),lS=Nn.object({docwsid:Nn.string(),drivewsid:Nn.string(),parentId:Nn.string(),zone:Nn.string(),type:Nn.string(),shortGuid:Nn.string().optional(),shortGUID:Nn.string().optional(),unifiedToken:Nn.string().optional(),sharingToken:Nn.string().optional(),isChainedToParent:Nn.boolean(),name:Nn.string(),etag:Nn.string(),size:Nn.number(),dateModified:Nn.string(),dateChanged:Nn.string(),extension:Nn.string().optional(),shareID:cS.optional(),share:Nn.string().optional(),owner:uS.optional(),lastOpenTime:Nn.string().optional()}),dS=Nn.object({url:Nn.string(),token:Nn.string(),signature:Nn.string(),wrapping_key:Nn.string(),reference_signature:Nn.string()}),pS=Nn.object({document_id:Nn.string(),owner_dsid:Nn.number(),data_token:dS,double_etag:Nn.string()}),fS=Nn.array(pS),hS=Nn.object({continuationMarker:Nn.string().optional(),documents:Nn.array(lS),status:Nn.union([Nn.literal("CONSISTENT"),Nn.literal("MORE_AVAILABLE")])}),mS=Nn.object({error_code:Nn.string().optional(),reason:Nn.string().optional(),serverErrorCode:Nn.string(),retryAfter:Nn.number().optional()}),gS=Nn.union([hS,mS]),vS=Nn.object({continuationMarker:Nn.string().optional(),documents:Nn.array(lS),status:Nn.union([Nn.literal("CONSISTENT"),Nn.literal("MORE_AVAILABLE")]).optional()}).nullable();function yS(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function bS(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){yS(o,r,i,a,s,"next",e)}function s(e){yS(o,r,i,a,s,"throw",e)}a(void 0)}))}}function _S(e,t){return CS.apply(this,arguments)}function CS(){return(CS=bS(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=performance.now(),e.prev=1,e.next=4,n();case 4:return e.abrupt("return",e.sent);case 5:return e.prev=5,null==performance.measure||performance.measure(t,{start:r}),e.finish(5);case 9:case"end":return e.stop()}}),e,null,[[1,,5,9]])})))).apply(this,arguments)}function IS(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function wS(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){IS(o,r,i,a,s,"next",e)}function s(e){IS(o,r,i,a,s,"throw",e)}a(void 0)}))}}var ES=function(e){return!!e&&"object"===typeof e&&"serverErrorCode"in e};function SS(e){return TS.apply(this,arguments)}function TS(){return(TS=wS(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,KE({url:String(t.url),validate:t.validate,includeCredentials:!0});case 2:if(n=e.sent){e.next=5;break}throw new Error("Failed to refetch data from docws");case 5:if(n.ok){e.next=7;break}throw new _E(n,t.validate.type);case 7:return r=n.status,e.next=10,n.json();case 10:if(i=e.sent,202!==r){e.next=14;break}if(!ES(i)){e.next=14;break}throw new bE(i.retryAfter,"seconds");case 14:return e.next=16,n.json();case 16:return e.abrupt("return",e.sent);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var OS=function(e,t){var n=e.webServices,r=e.dsid;return _S("fetchRecentDriveDocs",wS(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=n&&n.docws&&r){e.next=2;break}throw new Error("no service url or dsid available");case 2:return e.abrupt("return",SS({url:LE(n.docws,r,t),includeCredentials:!0,validate:{type:"WireRecentDriveDocumentsResponse",schema:gS}}));case 3:case"end":return e.stop()}}),e)}))))},PS=function(){var e=wS(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.webServices,i=t.dsid,null!=r&&r.docws&&i){e.next=3;break}throw new Error("no service url or dsid available");case 3:return o=n.zone,a=n.isSharedIndirectly,s=n.isSharedToMe,c=n.ownerRecordName,u=n.id,l=a&&s&&c?"/"+c:"",d=ME(r.docws,i,o,l),e.next=9,JE({url:d,method:"POST",includeCredentials:!0,body:[{document_id:u}],validate:{type:"WireDriveDownloadFileArray",schema:fS}});case 9:return p=e.sent,e.abrupt("return",p.map(aS));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),xS=function(e){var t,n,i,o=e.document,a=e.hasFocus,s=e.primaryRowCallbackLabel,c=o.id,u=o.isShared,l=o.numSharedWith,d=void 0===l?0:l,p=o.sharedBy,f=o.title,h=o.time,m=o.extension,g=Ts()("document-row",e.className),v=mc("VoiceOver.DocumentHomeRow.SingleShare"),y=mc("VoiceOver.DocumentHomeRow.MultiShares",{numSharedWith:d}),b=mc("VoiceOver.DocumentHomeRow.MissingNumShared"),_=mc("VoiceOver.DocumentHomeRow.Summary.SingleShare.AriaLabel",{title:f,time:h}),C=mc("VoiceOver.DocumentHomeRow.Summary.MultiShares.AriaLabel",{numSharedWith:d,title:f,time:h}),I=mc("VoiceOver.DocumentHomeRow.Summary.MissingNumShared.AriaLabel",{title:f,time:h}),w=mc("VoiceOver.DocumentHomeRow.Summary.NotShared.AriaLabel",{title:f,time:h}),E=mc("DocumentHomeRow.SharedBy",{sharedBy:p||""});u?0===d?(n=b,i=I):1===d?(n=v,i=_):(n=y,i=C):(n=null,i=w);var S=mc(s,{title:f}),T=qf(),O=null==T||null==(t=T.details)?void 0:t.dsid,P=wm(),x=mc("Keynote.DisplayName"),A=mc("Pages.DisplayName"),N=mc("Numbers.DisplayName"),R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=t.hasOwnProperty(e);return n?t[e]:e.toUpperCase()}(m,{pages:A,key:x,numbers:N});return r.createElement(nT,{className:g,hasFocus:a,id:c,primaryRowCallback:function(){var e;if(Sw(o)&&!(e=globalThis.window.open("","_blank")))throw new Error("Unable to open window");!function(e){var t,n=(null==(t=e.extension)?void 0:t.toLowerCase())||"";return-1!==Iw.indexOf(n)}(o)?PS({webServices:P,dsid:O},o).then((function(t){if(t){var n=t[0];Sw(o)?function(e,t){if(e){var n=-1===e.indexOf("?")?"?":"&";t.location.href=e+n+"cd=i"}else t.close()}(n,e):new lE(" ",Ne.sharedInstance.current.servicesDomain).download(new tE(n," "))}})):Hw(function(e){var t=(null==e?void 0:e.toLowerCase())||"";return ww[t]}(m),o,T)},primaryRowCallbackLabel:S,summaryAriaLabelText:i},r.createElement("div",{className:"row-container"},r.createElement(_w,{fileExtension:o.extension}),r.createElement("div",{className:"text"},r.createElement("div",{className:"first-line"},f),r.createElement("div",{className:"second-line"},r.createElement("span",{className:"extension-text"},R),p&&r.createElement("div",{className:"shared-by"},E),u&&r.createElement("div",{className:"shared-number"},d>0&&r.createElement("div",{className:"number-text"},d),r.createElement(VI,{"aria-hidden":!0,className:"shared-icon",desiredFontSize:13,layoutMode:"glyphBox"}),r.createElement(dT,null,r.createElement("div",null,n)))))))},AS=n(1293),NS=AS.t.object({retryAfter:AS.t.number(),timeUnit:AS.t.union([AS.t.literal("seconds"),AS.t.literal("milliseconds")]).optional()});function RS(e){try{return Na.b(e,NS)}catch(t){return null}}var DS,kS=function(e){var t=Object(r.useRef)(!1),n=Object(r.useCallback)((function(e,n,r){!t.current&&n&&(t.current=!0,setTimeout((function(){t.current=!1,n()}),e*("seconds"===r?1e3:1)))}),[]);Object(r.useEffect)((function(){if(!t.current&&e){var r=e.error,i=e.retry;if("string"===typeof r){var o=RS(r);o&&n(o.retryAfter,i,o.timeUnit||"seconds")}else r instanceof bE&&r.retryAfter&&r.retryAfter>0&&n(r.retryAfter,i,r.timeUnit)}}),[e,n])},US=(n(842),function(e){var t=e.ariaLabel,n=e.children,i=e.focusIndex,o=e.numRows,a=e.setFocusIndex,s=xm().isInCustomizationMode,c=Ts()("home-tile-table",{"edit-mode":s},e.className),u=r.useRef(null);return r.createElement("table",{"aria-readonly":!0,"aria-label":t,className:c,onKeyDown:function(e){return function(e){if(!s){var t=!1,n=o-1,r=-1!==i,c=o>3,l=r&&i<3,d=r&&i>=3;if("ArrowDown"===e.key&&i<n)a(i+1),t=!0;else if("ArrowUp"===e.key&&i>0)a(i-1),t=!0;else if("ArrowRight"===e.key&&l&&c){var p=i+3;a(p>n?3:p),t=!0}else if("ArrowLeft"===e.key&&d)a(i-3),t=!0;else if("Tab"===e.key&&r){var f;a(-1),null==(f=u.current)||f.focus(),t=!0}t&&e.preventDefault()}}(e)},ref:u,role:"grid",tabIndex:i>=0||s?-1:0},n)}),LS=function(e){var t=e.documentName,n=e.documentPreviews,i=e.appId,o=e.primaryRowCallback,a=e.primaryRowCallbackLabel,s=r.useContext(lm),c=r.useState(-1),u=c[0],l=c[1],d=s===cm.Large?6:3,p=Math.min(d,n.length);return r.createElement(r.Fragment,null,r.createElement(US,{ariaLabel:t,focusIndex:u,numRows:p,setFocusIndex:l},r.createElement(r.Fragment,null,r.createElement("tbody",{role:"rowgroup"},n.slice(0,Math.min(3,p)).map((function(e,t){return r.createElement(xS,{appId:i,key:e.id,document:e,hasFocus:u===t,primaryRowCallback:o,primaryRowCallbackLabel:a})}))),s===cm.Large&&r.createElement("tbody",{role:"rowgroup"},n.slice(3,p).map((function(e,t){return r.createElement(xS,{appId:i,key:e.id,document:e,hasFocus:u===t+3,primaryRowCallback:o,primaryRowCallbackLabel:a})}))))))},MS=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"plus",svgPath:"M12.4512-35.2539C12.4512-31.1523 15.7715-27.832 19.873-27.832L46.9727-27.832L46.9727-0.732422C46.9727 3.32031 50.2441 6.68945 54.3457 6.68945C58.4473 6.68945 61.7676 3.32031 61.7676-0.732422L61.7676-27.832L88.8672-27.832C92.9199-27.832 96.2402-31.1523 96.2402-35.2539C96.2402-39.3066 92.9199-42.627 88.8672-42.627L61.7676-42.627L61.7676-69.7266C61.7676-73.7793 58.4473-77.1484 54.3457-77.1484C50.2441-77.1484 46.9727-73.7793 46.9727-69.7266L46.9727-42.627L19.873-42.627C15.7715-42.627 12.4512-39.3066 12.4512-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:81.27520263671886,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 87.010498046875 83.8388671875",width:87.010498046875,height:83.8388671875,translateX:-9.22961914062489,translateY:77.1494140625,baseline:77.1494140625,capline:6.689453125}}})},jS=(n(843),n(844),function(e){var t=xm().isInCustomizationMode;return e.onActivate&&!t?r.createElement(Wc,{className:Ts()("home-tile-centered-column-layout",e.className),onActivate:e.onActivate,variant:"home-tile-button"},e.children):r.createElement("div",{className:Ts()("home-tile-centered-column-layout",{"edit-mode":t},e.className)},e.children)}),FS=function(e){var t=xs();return r.createElement(jS,{className:"empty-home-tile-create-action",onActivate:function(){-1!==["pages","numbers","keynote"].indexOf(e.appId)?zw(e.appId):t.launchApp(e.appId,{options:{source:{reason:Cc.CREATE}}})}},r.createElement("div",{"aria-hidden":!0,className:Ts()("plus",e.accentBackgroundClassName)},r.createElement(MS,{height:20,width:20,layoutMode:"glyphBox"})),r.createElement("p",{role:"presentation"},e.labelShort))},BS=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"arrow.clockwise",svgPath:"M8.74023-31.7871C8.74023-7.56836 28.1738 11.9141 52.3438 11.9141C76.5137 11.9141 95.9473-7.56836 95.9473-31.7871C95.9473-34.668 93.9453-36.7188 91.0645-36.7188C88.2812-36.7188 86.4258-34.668 86.4258-31.7871C86.4258-12.8418 71.2402 2.34375 52.3438 2.34375C33.4473 2.34375 18.3105-12.8418 18.3105-31.7871C18.3105-50.8301 33.3496-65.918 52.1973-65.918C55.4199-65.918 58.3984-65.6738 60.8887-65.1367L47.6074-51.9531C46.7285-51.0254 46.2891-50 46.2891-48.7305C46.2891-46.0449 48.291-43.9941 50.9277-43.9941C52.2949-43.9941 53.418-44.4336 54.248-45.3125L74.3164-65.5273C75.3418-66.5527 75.8301-67.7246 75.8301-69.043C75.8301-70.3125 75.293-71.582 74.3164-72.5586L54.248-92.9199C53.418-93.8477 52.2949-94.3359 50.9277-94.3359C48.291-94.3359 46.2891-92.1875 46.2891-89.5508C46.2891-88.2812 46.7285-87.1582 47.5586-86.2793L59.375-74.6094C57.2266-75.0488 54.7363-75.293 52.1973-75.293C28.0762-75.293 8.74023-55.957 8.74023-31.7871Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:82.13010498046879,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 88.134521484375 118.2119140625",width:88.134521484375,height:118.2119140625,translateX:-7.812705078124964,translateY:94.3359375,baseline:94.3359375,capline:23.8759765625}}})},zS=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"exclamationmark.icloud.fill",svgPath:"M106.25 3.61328C121.387 3.61328 133.35-7.56836 133.35-21.4844C133.35-31.8359 127.441-41.0156 117.773-45.0684C117.822-67.1387 101.953-83.0566 81.4941-83.0566C68.457-83.0566 58.7891-76.3184 52.6367-67.4805C40.2832-70.8008 27.2461-61.5723 26.8066-47.8027C15.625-45.8496 8.74023-35.8398 8.74023-23.6328C8.74023-8.78906 21.7285 3.56445 38.7695 3.56445ZM71.0938-29.541C68.2617-29.541 66.6504-31.1523 66.5527-34.0332L65.8203-54.4434C65.7227-57.373 67.9199-59.5215 71.0449-59.5215C74.1699-59.5215 76.4648-57.3242 76.3184-54.3945L75.5859-34.082C75.4395-31.1035 73.877-29.541 71.0938-29.541ZM71.0938-11.2305C67.8711-11.2305 65.1367-13.5254 65.1367-16.7969C65.1367-20.0195 67.8223-22.3145 71.0938-22.3145C74.2676-22.3145 76.9531-20.0684 76.9531-16.7969C76.9531-13.5254 74.2676-11.2305 71.0938-11.2305Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89507080078124,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 126.469970703125 95.6533203125",width:126.469970703125,height:95.6533203125,translateX:-6.880014648437509,translateY:83.056640625,baseline:83.056640625,capline:12.5966796875}}})},HS=(n(845),function(e){var t=e.className,n=e.refetch,i=e.showClouds,o=void 0===i||i,a=e.hideRetryButton,s=void 0!==a&&a,c=xm().isInCustomizationMode,u=mc("ErrorHomeTileContent.TryAgain");return r.createElement("div",{className:Ts()("error-home-tile-content",t)},o&&r.createElement(zS,{"aria-hidden":!0,className:"cloud",height:50,width:50,layoutMode:"glyphBox"}),r.createElement("p",{className:"message"},mc("ErrorHomeTileContent.Message")),!c&&!s&&r.createElement(Wc,{className:"reload-button",onActivate:n},r.createElement(BS,{"aria-hidden":!0,className:"arrow-clockwise",height:20,width:20,layoutMode:"glyphBox"}),u))}),WS=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"circle",svgPath:"M60.3027 16.3574C88.623 16.3574 111.865-6.93359 111.865-35.2539C111.865-63.5254 88.5742-86.8164 60.3027-86.8164C31.9824-86.8164 8.74023-63.5254 8.74023-35.2539C8.74023-6.93359 32.0312 16.3574 60.3027 16.3574ZM60.3027 3.51562C38.8672 3.51562 21.6309-13.7695 21.6309-35.2539C21.6309-56.6895 38.8184-73.9746 60.3027-73.9746C81.7383-73.9746 99.0234-56.6895 99.0234-35.2539C99.0723-13.7695 81.7871 3.51562 60.3027 3.51562Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46515624999984,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 106.6400146484375 103.1748046875",width:106.6400146484375,height:103.1748046875,translateX:-5.224907226562664,translateY:86.8173828125,baseline:86.8173828125,capline:16.357421875}}})};n(846),function(e){e.Checkboxes="check-boxes",e.Checkers="checkers",e.Rows="rows",e.Squircles="squircles"}(DS||(DS={}));var VS=function(e){switch(e.loadingLayout){case DS.Checkboxes:return r.createElement(qS,null);case DS.Checkers:return r.createElement(KS,null);case DS.Rows:return r.createElement(GS,null);case DS.Squircles:return r.createElement(QS,null);default:return r.createElement(r.Fragment,null)}},ZS=r.createElement("div",{className:"checkbox-row"},r.createElement(WS,{"aria-hidden":!0,className:"unchecked-circle",height:16,width:16,layoutMode:"glyphBox"})),qS=function(){var e=r.useContext(lm);return r.createElement("div",{className:Ts()("checkboxes-placeholder",e)},r.createElement("div",{className:"column"},ZS,ZS,ZS),e===cm.Large&&r.createElement("div",{className:"column"},ZS,ZS,ZS))},KS=function(){var e=r.useContext(lm);return r.createElement("div",{className:Ts()("checkers-placeholder",e)})},GS=function(){var e=r.useContext(lm);return r.createElement("div",{className:Ts()("rows-placeholder",e)},r.createElement("div",{className:"column"},r.createElement("div",{className:"row"}),r.createElement("div",{className:"row"}),r.createElement("div",{className:"row"})),e===cm.Large&&r.createElement("div",{className:"column"},r.createElement("div",{className:"row"}),r.createElement("div",{className:"row"}),r.createElement("div",{className:"row"})))},YS=r.createElement("svg",{className:"squircle",style:{overflow:"visible"},xmlns:"http://www.w3.org/2000/svg",width:60,height:60,viewBox:"0 0 60 60"},r.createElement("path",{d:wl,stroke:"#D2D2D7",strokeWidth:1,fill:"#D2D2D7",transform:"scale(0.6)"})),QS=function(){var e=r.useContext(lm);return r.createElement("div",{className:Ts()("squircles-placeholder",e)},YS,YS,YS,YS,YS,YS,e===cm.Large&&r.createElement(r.Fragment,null,YS,YS,YS,YS,YS,YS,YS,YS))};function XS(e){return!!(e instanceof bE||e instanceof Error&&RS(e.message))}var JS=function(e){var t=e.accentBackgroundClassName,n=e.createTextShort,i=e.dataState,o=e.documentName,a=e.documentPreviews,s=e.refetch,c=e.appId,u=e.primaryRowCallback,l=e.primaryRowCallbackLabel,d=e.error,p=Tp("load",c+"-tile",{measureFromBaseline:!0}),f=p[0],h=p[1];switch(i){case mm.SUCCESS_WITH_DATA:return f("with-data"),r.createElement(LS,{appId:c,documentName:o,documentPreviews:a||[],primaryRowCallback:u,primaryRowCallbackLabel:l});case mm.SUCCESS_NO_DATA:return f("no-data"),r.createElement(FS,{appId:c,accentBackgroundClassName:t,labelShort:n});case mm.LOADING:return r.createElement(VS,{loadingLayout:DS.Rows});case mm.ERROR:default:return h(),r.createElement(HS,{refetch:s,hideRetryButton:XS(d)})}},$S=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"plus",svgPath:"M12.4512-35.2539C12.4512-31.7871 15.332-28.9551 18.75-28.9551L47.4609-28.9551L47.4609-0.244141C47.4609 3.22266 50.293 6.05469 53.7598 6.05469C57.2266 6.05469 60.0586 3.22266 60.0586-0.244141L60.0586-28.9551L88.7695-28.9551C92.2363-28.9551 95.0684-31.7871 95.0684-35.2539C95.0684-38.7207 92.2363-41.5527 88.7695-41.5527L60.0586-41.5527L60.0586-70.2637C60.0586-73.6816 57.2266-76.5625 53.7598-76.5625C50.293-76.5625 47.4609-73.6816 47.4609-70.2637L47.4609-41.5527L18.75-41.5527C15.332-41.5527 12.4512-38.7207 12.4512-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:81.27507568359374,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 84.666748046875 82.6650390625",width:84.666748046875,height:82.6650390625,translateX:-10.401621093750009,translateY:76.5625,baseline:76.5625,capline:6.1025390625}}})};function eT(){return(eT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var tT=function(e){var t=e.appIcon,n=e.appIconSrcSet,i=e.appId,o=e.appUrl,a=e.tileIndex,s=e.children,c=e.className,u=e.isLoading,l=e.customPrimaryActionIcon,d=e.description,p=e.heading,f=e.ariaLabel,h=e.primaryActionCallback,m=e.primaryActionDescription,g=e.shouldHidePrimaryAction,v=void 0!==g&&g,y=e.tileSize;if(i?!o:o)throw new Error("App tiles need both an identifier and a URL");var b={children:s,className:c,description:d,heading:p,ariaLabel:f,tileSize:y,isLoading:u},_=m&&!v?{icon:l||r.createElement($S,{height:16,width:16,layoutMode:"glyphBox"}),description:m,callback:h}:void 0,C="string"===typeof t?r.createElement("img",{draggable:"false",alt:"","aria-hidden":!0,src:t,srcSet:n}):t;return r.createElement(dm,eT({tileIndex:a,icon:C,appId:i,url:o,primaryAction:_},b))},nT=(n(847),function(e){var t=e.children,n=e.hasFocus,i=e.id,o=e.primaryRowCallback,a=e.primaryRowCallbackLabel,s=e.summaryAriaLabelText,c=Ts()("home-tile-row",e.className),u=r.useRef(null),l=xm().isInCustomizationMode;return r.useEffect((function(){var e;n&&(null==(e=u.current)||e.focus())}),[n]),r.createElement("tr",{className:c,onClick:function(){var e;l||(null==(e=u.current)||e.blur(),o())},onKeyDown:function(e){l||function(e){var t;e.preventDefault(),"Enter"===e.key&&(o(),null==(t=u.current)||t.blur())}(e)},ref:u,role:"row",tabIndex:n&&!l?0:-1},r.createElement("td",{role:"gridcell"},r.createElement("div",{"aria-describedby":"activator-"+i,"aria-label":s,className:"home-tile-row-container",role:"group"},!l&&r.createElement("div",{id:"activator-"+i,hidden:!0},a),t,!l&&r.createElement(dT,null,r.createElement(Wc,{onActivate:o,tabIndex:-1},a)))))}),rT=(n(848),function(e){return r.createElement(jS,{className:"simple-empty-home-tile-content"},r.createElement("div",null,e.children))}),iT=(n(849),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"arrow.up.right",svgPath:"M84.5703-17.334L84.5215-66.4551C84.5215-69.2383 82.7148-71.1914 79.7852-71.1914L30.6641-71.1914C27.9297-71.1914 26.0742-69.0918 26.0742-66.748C26.0742-64.4043 28.1738-62.4023 30.4688-62.4023L47.4609-62.4023L71.2891-63.1836L62.207-55.2246L13.8184-6.73828C12.9395-5.85938 12.4512-4.73633 12.4512-3.66211C12.4512-1.31836 14.5508 0.878906 16.9922 0.878906C18.1152 0.878906 19.1895 0.488281 20.0684-0.439453L68.5547-48.877L76.6113-58.0078L75.7324-35.2051L75.7324-17.1387C75.7324-14.8438 77.7344-12.6953 80.127-12.6953C82.4707-12.6953 84.5703-14.6973 84.5703-17.334Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:85.49510009765618,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 72.127685546875 72.2177734375",width:72.127685546875,height:72.2177734375,translateX:-12.451127929687573,translateY:71.3388671875,baseline:71.3388671875,capline:.87890625}}})}),oT=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"arrow.up.left",svgPath:"M12.4512-17.334C12.4512-14.6973 14.502-12.6953 16.8945-12.6953C19.2871-12.6953 21.2891-14.8438 21.2891-17.1387L21.2891-35.2051L20.4102-58.0078L28.4668-48.877L76.9043-0.439453C77.832 0.488281 78.9062 0.878906 79.9805 0.878906C82.4219 0.878906 84.5703-1.31836 84.5703-3.66211C84.5703-4.73633 84.082-5.85938 83.2031-6.73828L34.8145-55.2246L25.7324-63.1836L49.5605-62.4023L66.5527-62.4023C68.8477-62.4023 70.9473-64.4043 70.9473-66.748C70.9473-69.0918 69.0918-71.1914 66.3574-71.1914L17.2363-71.1914C14.3066-71.1914 12.5-69.2383 12.5-66.4551Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:85.49510009765618,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 72.127685546875 72.2177734375",width:72.127685546875,height:72.2177734375,translateX:-12.451127929687573,translateY:71.3388671875,baseline:71.3388671875,capline:.87890625}}})},aT=(n(850),["children","hideArrow","className"]);function sT(){return(sT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var cT,uT=function(e){var t=e.children,n=e.hideArrow,i=e.className,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,aT),a=mc("VoiceOver.ExternalLink.Description"),s="rtl"===x()?r.createElement(oT,{"aria-label":a,desiredFontSize:10,layoutMode:"glyphBox"}):r.createElement(iT,{"aria-label":a,desiredFontSize:10,layoutMode:"glyphBox"});return r.createElement("span",{className:Ts()("external-link",i)},r.createElement("a",sT({target:"_blank",rel:"noreferrer"},o,{"data-testid":"anchor"}),t,!n&&r.createElement("span",{className:"nobreak"},"\xa0",s)))},lT=function(e){var t=e.contentTitleText,n=e.contentListItems,i=e.contentDescriptionText,o=e.learnMoreHref,a=Ts()("static-tile-content",e.className),s=mc("EmptyHomeTileContent.LearnMore");return r.createElement("div",{className:a},t&&r.createElement("div",{className:"content-title-text"},t),n&&n.length>0&&r.createElement("div",{className:"content-list-items"},r.createElement("ul",null,n.map((function(e,t){return r.createElement("li",{key:t+" - "+e},e)})))),i&&r.createElement("div",{className:"content-description-text"},i,o&&r.createElement(uT,{href:o},s)))};n(851),function(e){e.NEW_TAB="_blank",e.SAME_TAB="_self"}(cT||(cT={})),n(852);var dT=function(e){var t=e.children;return r.createElement("span",{className:"screenreader-only-content",role:"presentation"},t)},pT=(n(853),function(e){var t=e.ariaLevel,n=e.id,i=e.text;return r.createElement("span",{"aria-level":t,className:"ScreenreaderOnlyHeading",id:n,role:"heading"},i)}),fT=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"chevron.right",svgPath:"M72.3145-35.2539C72.3145-37.6953 71.4355-39.6973 69.4336-41.6016L32.5195-77.7832C31.0547-79.248 29.248-79.9805 27.0996-79.9805C22.8027-79.9805 19.2871-76.4648 19.2871-72.2168C19.2871-70.0684 20.166-68.0664 21.7773-66.5039L53.9551-35.3027L21.7773-4.05273C20.166-2.44141 19.2871-0.488281 19.2871 1.70898C19.2871 6.00586 22.8027 9.47266 27.0996 9.47266C29.248 9.47266 31.0547 8.74023 32.5195 7.27539L69.4336-28.9062C71.4844-30.8594 72.3145-32.8613 72.3145-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:97.09913085937478,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 70.8070068359375 89.5009765625",width:70.8070068359375,height:89.5009765625,translateX:-1.5074365234377183,translateY:79.98046875,baseline:79.98046875,capline:9.5205078125}}})},hT=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"chevron.left",svgPath:"M5.66406-35.2539C5.66406-32.8613 6.54297-30.8594 8.54492-28.9062L45.459 7.27539C46.9727 8.74023 48.7305 9.47266 50.8789 9.47266C55.1758 9.47266 58.7402 6.00586 58.7402 1.70898C58.7402-0.488281 57.8125-2.44141 56.2012-4.05273L24.0234-35.3027L56.2012-66.5039C57.8125-68.0664 58.7402-70.0684 58.7402-72.2168C58.7402-76.4648 55.1758-79.9805 50.8789-79.9805C48.7305-79.9805 46.9727-79.248 45.459-77.7832L8.54492-41.6016C6.54297-39.6973 5.71289-37.6953 5.66406-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:98.27100585937478,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 60.1500244140625 89.5009765625",width:60.1500244140625,height:89.5009765625,translateX:-5.664052734375218,translateY:79.98046875,baseline:79.98046875,capline:9.5205078125}}})},mT=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"chevron.right",svgPath:"M66.4551-35.2539C66.4551-36.4746 65.9668-37.5977 65.0391-38.4766L26.3672-76.3672C25.4883-77.1973 24.4141-77.6367 23.1445-77.6367C20.6543-77.6367 18.7012-75.7324 18.7012-73.1934C18.7012-71.9727 19.1895-70.8496 19.9707-70.0195L55.5176-35.2539L19.9707-0.488281C19.1895 0.341797 18.7012 1.41602 18.7012 2.68555C18.7012 5.22461 20.6543 7.12891 23.1445 7.12891C24.4141 7.12891 25.4883 6.68945 26.3672 5.81055L65.0391-32.0312C65.9668-32.959 66.4551-34.0332 66.4551-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:97.68503906249998,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 60.2601318359375 84.8134765625",width:60.2601318359375,height:84.8134765625,translateX:-6.194965820312518,translateY:77.63671875,baseline:77.63671875,capline:7.1767578125}}})},gT=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"chevron.left",svgPath:"M6.25-35.2539C6.25-34.0332 6.68945-32.959 7.61719-32.0312L46.3379 5.81055C47.168 6.68945 48.2422 7.12891 49.5117 7.12891C52.0508 7.12891 54.0039 5.22461 54.0039 2.68555C54.0039 1.41602 53.4668 0.341797 52.6855-0.488281L17.1387-35.2539L52.6855-70.0195C53.4668-70.8496 54.0039-71.9727 54.0039-73.1934C54.0039-75.7324 52.0508-77.6367 49.5117-77.6367C48.2422-77.6367 47.168-77.1973 46.3379-76.3672L7.61719-38.4766C6.68945-37.5977 6.25-36.4746 6.25-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:97.68503906249998,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 60.1500244140625 84.8134765625",width:60.1500244140625,height:84.8134765625,translateX:-6.250019531250018,translateY:77.63671875,baseline:77.63671875,capline:7.1767578125}}})};function vT(e){return x()===w.RTL?r.createElement(gT,e):r.createElement(mT,e)}function yT(e){return x()===w.RTL?r.createElement(hT,e):r.createElement(fT,e)}n(854);var bT=function(e){var t=Ts()("drawer-item",e.className),n=iZ(e.route,e.navLinkTitleKey,r.createElement(yT,{layoutMode:"glyphBox",desiredFontSize:15}));return r.createElement("div",{className:t},r.createElement(n,null),r.createElement("div",{className:"graphic"},e.graphic),r.createElement("div",{className:"description"},r.createElement("div",{className:"largeInfo"},e.largeDescription),r.createElement("div",{className:"smallInfo"},e.smallDescription)))},_T=(n(855),function(e){var t=e.title,n=e.icon,i=e.badge,o=e.textContent,a=e.linkInfo,s=e.tileId,c=Ts()("info-tile",e.className);return r.createElement("article",{className:c,"aria-labelledby":s},r.createElement("div",{className:"accessory"},r.createElement("div",null,n),i&&r.createElement("div",{className:"badge"},i)),r.createElement("h3",{className:"info-heading",id:s},t),r.createElement("p",null,o),r.createElement(uT,{href:a.href},a.text))}),CT=(n(856),function(e){var t=e.title,n=e.subtitle,i=e.subtitleDescription,o=e.extraSubtitle,a=e.description,s=Ts()("page-header",e.className);return r.createElement("div",{className:s},r.createElement("div",{className:"application-content"},r.createElement("div",{className:"page-header-top-row"},r.createElement("h1",{className:"page-header-title"},t)),!!n&&r.createElement("div",{className:"page-header-subtitle"}," ",n," "),!!i&&r.createElement("div",{className:"page-header-description"},i),!!o&&r.createElement("div",{className:"page-header-subtitle"},o),!!a&&r.createElement("div",{className:"page-header-description"},a)))});function IT(e){var t,n,i,o,a,s=e.notification,c=s.applicationConfiguration,u=c.identifier,l=null!=(t=null==(n=s.pushNotification.notification)?void 0:n.title)?t:bu(c),d=null!=(i=null==(o=s.pushNotification.notification)?void 0:o.description)?i:"mail"===u?Xn("Notification.PlaceholderDescription.mail"):"",p=Xn("Notification.Push.AccessibilityLabel",{applicationName:l});return r.createElement("div",{"aria-hidden":null!=(a=e.ariaHidden)&&a,className:Ts()("notification-component",e.className)},r.createElement("div",{className:"notification-component-inner"},r.createElement(Wc,{variant:"notification-activate-button",ariaLabel:p,onActivate:e.onClick},r.createElement("div",{className:"notification-icon"},r.createElement(Sd,{iconSize:44,applicationIdentifier:c.identifier})),r.createElement("div",{className:"notification-info"},r.createElement("span",{className:"title"},l),r.createElement("span",{className:"description"},d))),r.createElement(Wc,{variant:"notification-close-button",ariaLabel:Xn("Notification.Alarm.Dismiss.Title"),onActivate:e.onClose},r.createElement(lf,{"aria-hidden":!0,desiredFontSize:14}))))}function wT(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function ET(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ST=function(){function e(){this.delegate=null,this.notificationQueue=[],this.notification=null,this.timeout=void 0}var t=e.prototype;return t.enqueue=function(e){var t=this.notificationQueue;t.push(e),1===t.length&&this.displayNotification()},t.removeNotificationForChildApplication=function(e){var t=this.notification;t&&t.applicationConfiguration.identifier===e&&this.removeNotification(t)},t.displayNotification=function(){var e,t=this,n=this.notificationQueue,i=bZ.sharedInstance.applicationIdentifier,o=function(){if(!i)return n.length>0?n[0]:null;for(var e,t=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return ET(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ET(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(e=t()).done;){var r=e.value;if(r.applicationConfiguration.identifier!==i||!r.omitWhenActive)return r}return null}();if(o)if(o.notificationType!==DI.ALARM){var a=r.createElement(IT,{notification:o,onClick:function(){var e;window.clearTimeout(t.timeout);var n=o.applicationConfiguration;null==(e=t.delegate)||e.notificationDidClick(t,n.identifier),t.removeNotification(o)},onClose:function(){window.clearTimeout(t.timeout),t.removeNotification(o)}});null==(e=this.delegate)||e.showNotification(this,a),this.timeout=window.setTimeout((function(){t.removeNotification(o)}),8e3)}else{var s,c=r.createElement(WI,{notification:o,onClick:function(){var e,n=o.applicationConfiguration;null==(e=t.delegate)||e.notificationDidClick(t,n.identifier)},onDismiss:function(){var e;t.removeNotification(o),null==(e=t.delegate)||e.alarmDismissDidClick(t,o.alarmTrigger)},onSnooze:function(){var e;t.removeNotification(o),null==(e=t.delegate)||e.alarmSnoozeDidClick(t,o.alarmTrigger)}});null==(s=this.delegate)||s.showNotification(this,c)}},t.removeNotification=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==(n=this.delegate)?void 0:n.removeNotification(this);case 2:this.notification=null,r=this.notificationQueue,i=r.indexOf(t),r.splice(i,1),r.length>0&&this.displayNotification();case 7:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){wT(o,r,i,a,s,"next",e)}function s(e){wT(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),e}();function TT(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=_r.locale,r=n.toLowerCase(),i="https://support.apple.com/",o="";"ca-es"!==r||t?"vi-vi"===r?o="vi-vn/":"en-us"!==r&&(o=n+"/"):o="es-es/";var a="";return e&&(a=e+"/"),""+i+o+a}ST.sharedInstance=new ST;var OT=new Ig.a("TelemetryServiceProtocol",new Set(["recordStat","recordPerfStat"])),PT=function(){function e(e,t){this.telemetryClient=void 0,this.telemetryClient=e,t.createListenerOnlyMessagingChannel(OT,this,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.recordStat=function(e,t,n,r,i){try{var o=tr(e,t,n,Kn.sharedInstance.identifier,_r.hostname,_r.locale,_.sharedInstance.primaryInteractionMode,r,null!=i?i:{});this.telemetryClient.recordStat(o)}catch(s){var a=rr(s,{applicationName:e,masteringBuildNumber:t,buildNumber:n,statName:r,parameters:null!=i?i:{}});this.telemetryClient.recordStat(a)}},t.recordPerfStat=function(e,t,n,r,i){try{if(r.startsWith(e+".")||(r=e+"."+r),!i||null===i.duration||void 0===i.duration)throw new Error("TelemetryService: _recordStat: No duration specified for a Perf Stat.");var o=er(e,t,n,Kn.sharedInstance.identifier,_r.hostname,_r.locale,_.sharedInstance.primaryInteractionMode,r,i);this.telemetryClient.recordPerfStat(o)}catch(s){var a=rr(s,{applicationName:e,masteringBuildNumber:t,buildNumber:n,statName:r,parameters:i,statType:U.PERF_STAT});this.telemetryClient.recordStat(a)}},e}(),xT=n.p+"4f72d89d71e9abcc4e37c71fb77fe65b.svg";function AT(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function NT(e){if(!(e.currentShareRecord instanceof wy))throw new Error("Expected ShareRecord instance");var t=e.currentShareRecord,n=t.shortGuid,i=t.outOfNetworkParticipantList,o=Xn("CloudOS.OutOfNetworkAcceptance.VerifyAccess.Title"),a=Xn("CloudOS.OutOfNetworkAcceptance.SendVerificationButton.Title"),s=Xn("CloudOS.OutOfNetworkAcceptance.CancelButton.Title"),c=function(e){var t=!1,n=!1;if(e&&e.length>0)for(var r=0;r<e.length;r++){var i=e[r];t||!i.phoneNumber?n||!i.emailAddress||(n=!0):t=!0}return Xn(t&&n?"EmailAddressOrPhoneNumber.Title":t?"PhoneNumber.Title":"EmailAddress.Title")}(i),u=Xn("CloudOS.OutOfNetworkAcceptance.VerifyAccessContent.Description",{modeOfCommunication:c}),l=Xn("CloudOS.OutOfNetworkAcceptance.VerifyAccessContent.FooterText",{modeOfCommunication:c}),d=function(){e.declineShare()};return function(t){var c={id:"FIXME"};return{navigationHeaderTitle:o,primaryButtonTitle:a,secondaryButtonTitle:s,performPrimaryAction:function(){var t,r=(t=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.sendVerificationLink(n,c.id);case 2:if(t.sent){t.next=5;break}return t.abrupt("return",{isOK:!1,data:void 0});case 5:return t.abrupt("return",{isOK:!0,data:c});case 6:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(e){AT(o,r,i,a,s,"next",e)}function s(e){AT(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return r.apply(this,arguments)}}(),primaryButtonDisabled:!c,performSecondaryAction:d,renderContent:function(){return r.createElement("div",null,r.createElement("div",{className:"content-desc"},u),r.createElement("div",{className:"content-email-view"},i.map((function(e,t){return r.createElement("div",{key:t},e.emailAddress+" "+e.phoneNumber)}))),r.createElement("div",{className:"content-footer"},l))}}}}function RT(){var e=Xn("CloudOS.OutOfNetworkAcceptance.VerifyAccess.Title"),t=Xn("CloudOS.OutOfNetworkAcceptance.DoneButton.Title");return function(n){var i="";n&&(i=n.phoneNumber?Xn("CloudOS.OutOfNetworkAcceptance.TextMessageSent.Title"):Xn("CloudOS.OutOfNetworkAcceptance.EmailSent.Title"));var o="";n&&(o=n.phoneNumber?Xn("CloudOS.OutOfNetworkAcceptance.TextMessageSent.Description",{phoneNumber:n.phoneNumber}):Xn("CloudOS.OutOfNetworkAcceptance.EmailSent.Description"));var a="";return null!=n&&n.phoneNumber&&(a=Xn("CloudOS.OutOfNetworkAcceptance.TextMessageSent.AdditionalDescription")),{navigationHeaderTitle:e,primaryButtonTitle:t,renderContent:function(){return r.createElement("div",null,r.createElement("div",{className:"content-title"},i),r.createElement("div",{className:"content-desc"},o),r.createElement("div",{className:"content-desc"},a))}}}}var DT=new Ig.a("HostApplicationServiceFromChildProtocol",new Set(["minimizeApplication","switchToApplication","showAccountSettings","showAccountMenu","setTitle","updateRoute","updateShareGUID","removeEnvironmentInformation","didReceiveRemoteNotification","didBecomeInteractive","showCreationMenu","navigateToHomePage","showStorageUsageWarning","showHelpMenu"])),kT=new Ig.a("HostApplicationServiceToChildProtocol",new Set(["didReceiveRemoteNotification","launchOptionsDidChange","tileDataDidUpdate"])),UT=function(){function e(e,t){this.processReference=t,this.applicationInfo=void 0,this.applicationInfo=e,t.createMessagingChannel(DT,this,kT,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.minimizeApplication=function(){YV.cloudOSApplication.showAppSwitcher()},t.switchToApplication=function(e,t,n){var r=function(e){switch(e){case"settings":return eZ.icloudplus}}(e);if(r){var i=oZ(r);sZ(r,Xn(i),!0,{relativePath:t,hash:n})}else ky.sharedInstance.switchToApplication(e,{route:t,hash:n})},t.showAccountSettings=function(){cZ(eZ.settings)},t.showAccountMenu=function(){YV.cloudOSApplication.showAccountMenu()},t.setTitle=function(e){ky.sharedInstance.setTitle(this.applicationInfo,e)},t.updateRoute=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ky.sharedInstance.replaceHistoryState(this.processReference.applicationInfo,{},void 0,e,t)},t.updateShareGUID=function(e){this.updateRoute("",e?"#"+e:"")},t.removeEnvironmentInformation=function(){YV.cloudOSApplication.removeEnvironmentInformation()},t.didReceiveRemoteNotification=function(e){this.processReference.remoteProxy.didReceiveRemoteNotification(e)},t.didBecomeInteractive=function(e,t){var n=this.processReference.applicationInfo,r=ky.sharedInstance.getChildApplicationController(n);r&&r.remoteInstanceDidBecomeInteractive(e,t)},t.showCreationMenu=function(){YV.cloudOSApplication.showCreationMenu()},t.navigateToHomePage=function(){YV.cloudOSApplication.navigateToHomePage()},t.showStorageUsageWarning=function(e){YV.cloudOSApplication.showStorageUsageWarning(e)},t.showHelpMenu=function(e){YV.cloudOSApplication.showHelpMenu(e)},t.launchOptionsDidChange=function(e){this.processReference.remoteProxy.launchOptionsDidChange(e)},e}(),LT=new Ig.a("StartupInfoServiceFromChildProtocol",new Set(["setStartupInfo","setStartupUrl"])),MT=new Ig.a("StartupInfoServiceToChildProtocol",new Set(["didFetchStartup"])),jT=function(){function e(e,t){this.appName=e,this.processReference=t,t.createMessagingChannel(LT,this,MT,void 0,t.messagingChannelClass)}var t=e.prototype;return t.serviceWasRegistered=function(){},t.serviceWasRemoved=function(){},t.setStartupUrl=function(e,t){return this.setStartupInfo(e,Hd(t))},t.setStartupInfo=function(e,t){var n=this;t?function(){var e=up.getStartupInfoForApp(n.appName);return!e||t.url!==e.url||t.method!==e.method||t.requestPayload!==e.requestPayload}()&&up.setStartupInfoForApp(this.appName,t):up.clearStartupInfoForApp(this.appName)},t.didFetchStartup=function(e,t){this.processReference.remoteProxy.didFetchStartup(e,t)},e}();function FT(e){return e?e.replace(/(facetime.apple.com.*?[?#]).*$/gm,"$1sanitized"):""}function BT(e){var t=e.filename;if(!t||/(apple|icloud)\.com.*\/index\.html/.test(t)){var n,r=null==(n=e.error)?void 0:n.stack;if(r){var i=r.split("\n");t=i[1]||i[0]}}return!!t.match(/(apple|icloud)\.com.*\/main\.js/)}function zT(e){var t=BZ();t.exceptionHandler(e.detail.error),t.exceptionWasHandled=!0}function HT(e){fr.sharedInstance.recordStat(new ur("OnNonFatalError",Object.assign({},function(e){var t=e.detail,n=t.message,r=t.filename,i=t.lineno,o=t.colno,a=t.error;return{error:a&&a.message?a.message:n,url:FT(r),lineNumber:i,columnNumber:o,stack:a?FT(a.stack):"not available"}}(e),{isFatal:!1})))}function WT(e){var t,n=e.reason;if(!n)return!1;var r=null,i=n.sourceURL,o=n.stack;if("string"===typeof i)r=i;else if("string"===typeof o){var a,s=o.split("\n");r=null!=(a=s[1])?a:s[0]}return!(null==(t=r)||!t.match(/(apple|icloud)\.com.*\/main\.js/))}function VT(e){var t=function(e){var t,n=null!=(t=e.reason)?t:{},r={nativeEvent:e,type:"UNHANDLED_REJECTION",context:e.context},i=n.message;if("string"===typeof i){var o=n.toString(),a=-1!==o.indexOf(i)?o:i;r.message=a}var s=n.stack;return"string"===typeof s&&(r.stack=s),r}(e.detail.nativeEvent),n=BZ();n.exceptionHandler(t),n.exceptionWasHandled=!0}function ZT(e){fr.sharedInstance.recordStat(new ur("OnNonFatalUnhandledRejection",Object.assign({},function(e){var t,n,r,i,o=null!=(t=e.detail.nativeEvent.reason)?t:{},a=o.stack;if("string"!==typeof a)return{error:"unknown"};var s=o.message;if("string"!==typeof s)return{error:"unknown"};var c=/(https.*(?:icloud|apple)\.com.*\/main\.js):([0-9]+):([0-9]+)/,u=a.split("\n"),l=null!=(n=u[0])?n:"",d=null!=(r=u[1])?r:"",p=null!=(i=l.match(c))?i:d.match(c),f=o.toString(),h=-1!==f.indexOf(s)?f:s,m=FT(a);return p?{error:h,url:FT(p[1]),lineNumber:p[2],columnNumber:p[3],stack:m}:{error:h,stack:m}}(e),{isFatal:!1})))}function qT(e){let t=e.length;for(;--t>=0;)e[t]=0}const KT=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),GT=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),YT=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),QT=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),XT=new Array(576);qT(XT);const JT=new Array(60);qT(JT);const $T=new Array(512);qT($T);const eO=new Array(256);qT(eO);const tO=new Array(29);qT(tO);const nO=new Array(30);function rO(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let iO,oO,aO;function sO(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}qT(nO);const cO=e=>e<256?$T[e]:$T[256+(e>>>7)],uO=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},lO=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,uO(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},dO=(e,t,n)=>{lO(e,n[2*t],n[2*t+1])},pO=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},fO=(e,t,n)=>{const r=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)r[i]=a=a+n[i-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=pO(r[t]++,t))}},hO=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},mO=e=>{e.bi_valid>8?uO(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},gO=(e,t,n,r)=>{const i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},vO=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&gO(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!gO(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},yO=(e,t,n)=>{let r,i,o,a,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?dO(e,i,t):(o=eO[i],dO(e,o+256+1,t),a=KT[o],0!==a&&(i-=tO[o],lO(e,i,a)),r--,o=cO(r),dO(e,o,n),a=GT[o],0!==a&&(r-=nO[o],lO(e,r,a)))}while(s<e.last_lit);dO(e,256,t)},bO=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,c,u=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<o;a++)0!==n[2*a]?(e.heap[++e.heap_len]=u=a,e.depth[a]=0):n[2*a+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=u<2?++u:0,n[2*c]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[2*c+1]);for(t.max_code=u,a=e.heap_len>>1;a>=1;a--)vO(e,n,a);c=o;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vO(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[2*c]=n[2*a]+n[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[2*a+1]=n[2*s+1]=c,e.heap[1]=c++,vO(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,l,d,p,f,h,m=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(n[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)l=e.heap[u],p=n[2*n[2*l+1]+1]+1,p>c&&(p=c,m++),n[2*l+1]=p,l>r||(e.bl_count[p]++,f=0,l>=s&&(f=a[l-s]),h=n[2*l],e.opt_len+=h*(p+f),o&&(e.static_len+=h*(i[2*l+1]+f)));if(0!==m){do{for(p=c-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(p=c;0!==p;p--)for(l=e.bl_count[p];0!==l;)d=e.heap[--u],d>r||(n[2*d+1]!==p&&(e.opt_len+=(p-n[2*d+1])*n[2*d],n[2*d+1]=p),l--)}})(e,t),fO(n,u,e.bl_count)},_O=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<c&&i===a||(s<u?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4))},CO=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<c&&i===a)){if(s<u)do{dO(e,i,e.bl_tree)}while(0!==--s);else 0!==i?(i!==o&&(dO(e,i,e.bl_tree),s--),dO(e,16,e.bl_tree),lO(e,s-3,2)):s<=10?(dO(e,17,e.bl_tree),lO(e,s-3,3)):(dO(e,18,e.bl_tree),lO(e,s-11,7));s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4)}};let IO=!1;const wO=(e,t,n,r)=>{lO(e,0+(r?1:0),3),((e,t,n,r)=>{mO(e),uO(e,n),uO(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var EO={_tr_init:e=>{IO||((()=>{let e,t,n,r,i;const o=new Array(16);for(n=0,r=0;r<28;r++)for(tO[r]=n,e=0;e<1<<KT[r];e++)eO[n++]=r;for(eO[n-1]=r,i=0,r=0;r<16;r++)for(nO[r]=i,e=0;e<1<<GT[r];e++)$T[i++]=r;for(i>>=7;r<30;r++)for(nO[r]=i<<7,e=0;e<1<<GT[r]-7;e++)$T[256+i++]=r;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)XT[2*e+1]=8,e++,o[8]++;for(;e<=255;)XT[2*e+1]=9,e++,o[9]++;for(;e<=279;)XT[2*e+1]=7,e++,o[7]++;for(;e<=287;)XT[2*e+1]=8,e++,o[8]++;for(fO(XT,287,o),e=0;e<30;e++)JT[2*e+1]=5,JT[2*e]=pO(e,5);iO=new rO(XT,KT,257,286,15),oO=new rO(JT,GT,0,30,15),aO=new rO(new Array(0),YT,0,19,7)})(),IO=!0),e.l_desc=new sO(e.dyn_ltree,iO),e.d_desc=new sO(e.dyn_dtree,oO),e.bl_desc=new sO(e.bl_tree,aO),e.bi_buf=0,e.bi_valid=0,hO(e)},_tr_stored_block:wO,_tr_flush_block:(e,t,n,r)=>{let i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),bO(e,e.l_desc),bO(e,e.d_desc),a=(e=>{let t;for(_O(e,e.dyn_ltree,e.l_desc.max_code),_O(e,e.dyn_dtree,e.d_desc.max_code),bO(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*QT[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?wO(e,t,n,r):4===e.strategy||o===i?(lO(e,2+(r?1:0),3),yO(e,XT,JT)):(lO(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(lO(e,t-257,5),lO(e,n-1,5),lO(e,r-4,4),i=0;i<r;i++)lO(e,e.bl_tree[2*QT[i]+1],3);CO(e,e.dyn_ltree,t-1),CO(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),yO(e,e.dyn_ltree,e.dyn_dtree)),hO(e),r&&mO(e)},_tr_tally:(e,t,n)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(eO[n]+256+1)]++,e.dyn_dtree[2*cO(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{lO(e,2,3),dO(e,256,XT),(e=>{16===e.bi_valid?(uO(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},SO=(e,t,n,r)=>{let i=65535&e|0,o=e>>>16&65535|0,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{i=i+t[r++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16|0};const TO=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var OO=(e,t,n,r)=>{const i=TO,o=r+n;e^=-1;for(let a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},PO={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},xO={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:AO,_tr_stored_block:NO,_tr_flush_block:RO,_tr_tally:DO,_tr_align:kO}=EO,{Z_NO_FLUSH:UO,Z_PARTIAL_FLUSH:LO,Z_FULL_FLUSH:MO,Z_FINISH:jO,Z_BLOCK:FO,Z_OK:BO,Z_STREAM_END:zO,Z_STREAM_ERROR:HO,Z_DATA_ERROR:WO,Z_BUF_ERROR:VO,Z_DEFAULT_COMPRESSION:ZO,Z_FILTERED:qO,Z_HUFFMAN_ONLY:KO,Z_RLE:GO,Z_FIXED:YO,Z_DEFAULT_STRATEGY:QO,Z_UNKNOWN:XO,Z_DEFLATED:JO}=xO,$O=(e,t)=>(e.msg=PO[t],t),eP=e=>(e<<1)-(e>4?9:0),tP=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let nP=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const rP=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},iP=(e,t)=>{RO(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,rP(e.strm)},oP=(e,t)=>{e.pending_buf[e.pending++]=t},aP=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},sP=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=SO(e.adler,t,i,n):2===e.state.wrap&&(e.adler=OO(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},cP=(e,t)=>{let n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,l=e.w_mask,d=e.prev,p=e.strstart+258;let f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+a]===h&&u[n+a-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<p);if(r=258-(p-o),o=p-258,r>a){if(e.match_start=t,a=r,r>=s)break;f=u[o+a-1],h=u[o+a]}}}while((t=d[t&l])>c&&0!==--i);return a<=e.lookahead?a:e.lookahead},uP=e=>{const t=e.w_size;let n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{i=e.head[--n],e.head[n]=i>=t?i-t:0}while(--r);r=t,n=r;do{i=e.prev[--n],e.prev[n]=i>=t?i-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=sP(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=nP(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=nP(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},lP=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(uP(e),e.lookahead<262&&t===UO)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=nP(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=cP(e,n)),e.match_length>=3)if(r=DO(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=nP(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=nP(e,e.ins_h,e.window[e.strstart+1]);else r=DO(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(iP(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===jO?(iP(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(iP(e,!1),0===e.strm.avail_out)?1:2},dP=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<262){if(uP(e),e.lookahead<262&&t===UO)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=nP(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=cP(e,n),e.match_length<=5&&(e.strategy===qO||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=DO(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=nP(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(iP(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=DO(e,0,e.window[e.strstart-1]),r&&iP(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=DO(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===jO?(iP(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(iP(e,!1),0===e.strm.avail_out)?1:2};function pP(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const fP=[new pP(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(uP(e),0===e.lookahead&&t===UO)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,iP(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(iP(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===jO?(iP(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(iP(e,!1),e.strm.avail_out),1)}),new pP(4,4,8,4,lP),new pP(4,5,16,8,lP),new pP(4,6,32,32,lP),new pP(4,4,16,16,dP),new pP(8,16,32,32,dP),new pP(8,16,128,128,dP),new pP(8,32,128,256,dP),new pP(32,128,258,1024,dP),new pP(32,258,258,4096,dP)];function hP(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=JO,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),tP(this.dyn_ltree),tP(this.dyn_dtree),tP(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),tP(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),tP(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const mP=e=>{if(!e||!e.state)return $O(e,HO);e.total_in=e.total_out=0,e.data_type=XO;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=UO,AO(t),BO},gP=e=>{const t=mP(e);var n;return t===BO&&((n=e.state).window_size=2*n.w_size,tP(n.head),n.max_lazy_match=fP[n.level].max_lazy,n.good_match=fP[n.level].good_length,n.nice_match=fP[n.level].nice_length,n.max_chain_length=fP[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},vP=(e,t,n,r,i,o)=>{if(!e)return HO;let a=1;if(t===ZO&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==JO||r<8||r>15||t<0||t>9||o<0||o>YO)return $O(e,HO);8===r&&(r=9);const s=new hP;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=n,gP(e)};var yP=vP,bP=(e,t)=>e&&e.state?2!==e.state.wrap?HO:(e.state.gzhead=t,BO):HO,_P=(e,t)=>{let n,r;if(!e||!e.state||t>FO||t<0)return e?$O(e,HO):HO;const i=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==jO)return $O(e,0===e.avail_out?VO:HO);i.strm=e;const o=i.last_flush;if(i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,oP(i,31),oP(i,139),oP(i,8),i.gzhead?(oP(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),oP(i,255&i.gzhead.time),oP(i,i.gzhead.time>>8&255),oP(i,i.gzhead.time>>16&255),oP(i,i.gzhead.time>>24&255),oP(i,9===i.level?2:i.strategy>=KO||i.level<2?4:0),oP(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(oP(i,255&i.gzhead.extra.length),oP(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=OO(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(oP(i,0),oP(i,0),oP(i,0),oP(i,0),oP(i,0),oP(i,9===i.level?2:i.strategy>=KO||i.level<2?4:0),oP(i,3),i.status=113);else{let t=JO+(i.w_bits-8<<4)<<8,n=-1;n=i.strategy>=KO||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,i.status=113,aP(i,t),0!==i.strstart&&(aP(i,e.adler>>>16),aP(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=OO(e.adler,i.pending_buf,i.pending-n,n)),rP(e),n=i.pending,i.pending!==i.pending_buf_size));)oP(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=OO(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=OO(e.adler,i.pending_buf,i.pending-n,n)),rP(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,oP(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(e.adler=OO(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=OO(e.adler,i.pending_buf,i.pending-n,n)),rP(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,oP(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(e.adler=OO(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&rP(e),i.pending+2<=i.pending_buf_size&&(oP(i,255&e.adler),oP(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(rP(e),0===e.avail_out)return i.last_flush=-1,BO}else if(0===e.avail_in&&eP(t)<=eP(o)&&t!==jO)return $O(e,VO);if(666===i.status&&0!==e.avail_in)return $O(e,VO);if(0!==e.avail_in||0!==i.lookahead||t!==UO&&666!==i.status){let n=i.strategy===KO?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(uP(e),0===e.lookahead)){if(t===UO)return 1;break}if(e.match_length=0,n=DO(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(iP(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===jO?(iP(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(iP(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===GO?((e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=258){if(uP(e),e.lookahead<=258&&t===UO)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+258;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=258-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=DO(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=DO(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(iP(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===jO?(iP(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(iP(e,!1),0===e.strm.avail_out)?1:2})(i,t):fP[i.level].func(i,t);if(3!==n&&4!==n||(i.status=666),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),BO;if(2===n&&(t===LO?kO(i):t!==FO&&(NO(i,0,0,!1),t===MO&&(tP(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),rP(e),0===e.avail_out))return i.last_flush=-1,BO}return t!==jO?BO:i.wrap<=0?zO:(2===i.wrap?(oP(i,255&e.adler),oP(i,e.adler>>8&255),oP(i,e.adler>>16&255),oP(i,e.adler>>24&255),oP(i,255&e.total_in),oP(i,e.total_in>>8&255),oP(i,e.total_in>>16&255),oP(i,e.total_in>>24&255)):(aP(i,e.adler>>>16),aP(i,65535&e.adler)),rP(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?BO:zO)},CP=e=>{if(!e||!e.state)return HO;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?$O(e,HO):(e.state=null,113===t?$O(e,WO):BO)},IP=(e,t)=>{let n=t.length;if(!e||!e.state)return HO;const r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return HO;if(1===i&&(e.adler=SO(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(tP(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,uP(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=nP(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,uP(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,BO};const wP=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var EP=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(const t in n)wP(n,t)&&(e[t]=n[t])}}return e},SP=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,o=e.length;r<o;r++){let t=e[r];n.set(t,i),i+=t.length}return n};let TP=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(nq){TP=!1}const OP=new Uint8Array(256);for(let rq=0;rq<256;rq++)OP[rq]=rq>=252?6:rq>=248?5:rq>=240?4:rq>=224?3:rq>=192?2:1;OP[254]=OP[254]=1;var PP=e=>{if("function"===typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),55296===(64512&n)&&i+1<a&&(r=e.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),55296===(64512&n)&&i+1<a&&(r=e.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},xP=(e,t)=>{const n=t||e.length;if("function"===typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,i;const o=new Array(2*n);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){o[i++]=t;continue}let a=OP[t];if(a>4)o[i++]=65533,r+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&r<n;)t=t<<6|63&e[r++],a--;a>1?o[i++]=65533:t<65536?o[i++]=t:(t-=65536,o[i++]=55296|t>>10&1023,o[i++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&TP)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(o,i)},AP=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+OP[e[n]]>t?n:t},NP=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const RP=Object.prototype.toString,{Z_NO_FLUSH:DP,Z_SYNC_FLUSH:kP,Z_FULL_FLUSH:UP,Z_FINISH:LP,Z_OK:MP,Z_STREAM_END:jP,Z_DEFAULT_COMPRESSION:FP,Z_DEFAULT_STRATEGY:BP,Z_DEFLATED:zP}=xO;function HP(e){this.options=EP({level:FP,method:zP,chunkSize:16384,windowBits:15,memLevel:8,strategy:BP},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new NP,this.strm.avail_out=0;let n=yP(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==MP)throw new Error(PO[n]);if(t.header&&bP(this.strm,t.header),t.dictionary){let e;if(e="string"===typeof t.dictionary?PP(t.dictionary):"[object ArrayBuffer]"===RP.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=IP(this.strm,e),n!==MP)throw new Error(PO[n]);this._dict_set=!0}}function WP(e,t){const n=new HP(t);if(n.push(e,!0),n.err)throw n.msg||PO[n.err];return n.result}HP.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?LP:DP,"string"===typeof e?n.input=PP(e):"[object ArrayBuffer]"===RP.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===kP||o===UP)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=_P(n,o),i===jP)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=CP(this.strm),this.onEnd(i),this.ended=!0,i===MP;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},HP.prototype.onData=function(e){this.chunks.push(e)},HP.prototype.onEnd=function(e){e===MP&&(this.result=SP(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var VP={Deflate:HP,deflate:WP,deflateRaw:function(e,t){return(t=t||{}).raw=!0,WP(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,WP(e,t)},constants:xO},ZP=function(e,t){let n,r,i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,_,C,I,w,E,S;const T=e.state;n=e.next_in,E=e.input,r=n+(e.avail_in-5),i=e.next_out,S=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),s=T.dmax,c=T.wsize,u=T.whave,l=T.wnext,d=T.window,p=T.hold,f=T.bits,h=T.lencode,m=T.distcode,g=(1<<T.lenbits)-1,v=(1<<T.distbits)-1;e:do{f<15&&(p+=E[n++]<<f,f+=8,p+=E[n++]<<f,f+=8),y=h[p&g];t:for(;;){if(b=y>>>24,p>>>=b,f-=b,b=y>>>16&255,0===b)S[i++]=65535&y;else{if(!(16&b)){if(0===(64&b)){y=h[(65535&y)+(p&(1<<b)-1)];continue t}if(32&b){T.mode=12;break e}e.msg="invalid literal/length code",T.mode=30;break e}_=65535&y,b&=15,b&&(f<b&&(p+=E[n++]<<f,f+=8),_+=p&(1<<b)-1,p>>>=b,f-=b),f<15&&(p+=E[n++]<<f,f+=8,p+=E[n++]<<f,f+=8),y=m[p&v];n:for(;;){if(b=y>>>24,p>>>=b,f-=b,b=y>>>16&255,!(16&b)){if(0===(64&b)){y=m[(65535&y)+(p&(1<<b)-1)];continue n}e.msg="invalid distance code",T.mode=30;break e}if(C=65535&y,b&=15,f<b&&(p+=E[n++]<<f,f+=8,f<b&&(p+=E[n++]<<f,f+=8)),C+=p&(1<<b)-1,C>s){e.msg="invalid distance too far back",T.mode=30;break e}if(p>>>=b,f-=b,b=i-o,C>b){if(b=C-b,b>u&&T.sane){e.msg="invalid distance too far back",T.mode=30;break e}if(I=0,w=d,0===l){if(I+=c-b,b<_){_-=b;do{S[i++]=d[I++]}while(--b);I=i-C,w=S}}else if(l<b){if(I+=c+l-b,b-=l,b<_){_-=b;do{S[i++]=d[I++]}while(--b);if(I=0,l<_){b=l,_-=b;do{S[i++]=d[I++]}while(--b);I=i-C,w=S}}}else if(I+=l-b,b<_){_-=b;do{S[i++]=d[I++]}while(--b);I=i-C,w=S}for(;_>2;)S[i++]=w[I++],S[i++]=w[I++],S[i++]=w[I++],_-=3;_&&(S[i++]=w[I++],_>1&&(S[i++]=w[I++]))}else{I=i-C;do{S[i++]=S[I++],S[i++]=S[I++],S[i++]=S[I++],_-=3}while(_>2);_&&(S[i++]=S[I++],_>1&&(S[i++]=S[I++]))}break}}break}}while(n<r&&i<a);_=f>>3,n-=_,f-=_<<3,p&=(1<<f)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=i<a?a-i+257:257-(i-a),T.hold=p,T.bits=f};const qP=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),KP=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),GP=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),YP=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var QP=(e,t,n,r,i,o,a,s)=>{const c=s.bits;let u,l,d,p,f,h,m=0,g=0,v=0,y=0,b=0,_=0,C=0,I=0,w=0,E=0,S=null,T=0;const O=new Uint16Array(16),P=new Uint16Array(16);let x,A,N,R=null,D=0;for(m=0;m<=15;m++)O[m]=0;for(g=0;g<r;g++)O[t[n+g]]++;for(b=c,y=15;y>=1&&0===O[y];y--);if(b>y&&(b=y),0===y)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v<y&&0===O[v];v++);for(b<v&&(b=v),I=1,m=1;m<=15;m++)if(I<<=1,I-=O[m],I<0)return-1;if(I>0&&(0===e||1!==y))return-1;for(P[1]=0,m=1;m<15;m++)P[m+1]=P[m]+O[m];for(g=0;g<r;g++)0!==t[n+g]&&(a[P[t[n+g]]++]=g);if(0===e?(S=R=a,h=19):1===e?(S=qP,T-=257,R=KP,D-=257,h=256):(S=GP,R=YP,h=-1),E=0,g=0,m=v,f=o,_=b,C=0,d=-1,w=1<<b,p=w-1,1===e&&w>852||2===e&&w>592)return 1;for(;;){x=m-C,a[g]<h?(A=0,N=a[g]):a[g]>h?(A=R[D+a[g]],N=S[T+a[g]]):(A=96,N=0),u=1<<m-C,l=1<<_,v=l;do{l-=u,i[f+(E>>C)+l]=x<<24|A<<16|N|0}while(0!==l);for(u=1<<m-1;E&u;)u>>=1;if(0!==u?(E&=u-1,E+=u):E=0,g++,0===--O[m]){if(m===y)break;m=t[n+a[g]]}if(m>b&&(E&p)!==d){for(0===C&&(C=b),f+=v,_=m-C,I=1<<_;_+C<y&&(I-=O[_+C],!(I<=0));)_++,I<<=1;if(w+=1<<_,1===e&&w>852||2===e&&w>592)return 1;d=E&p,i[d]=b<<24|_<<16|f-o|0}}return 0!==E&&(i[f+E]=m-C<<24|64<<16|0),s.bits=b,0};const{Z_FINISH:XP,Z_BLOCK:JP,Z_TREES:$P,Z_OK:ex,Z_STREAM_END:tx,Z_NEED_DICT:nx,Z_STREAM_ERROR:rx,Z_DATA_ERROR:ix,Z_MEM_ERROR:ox,Z_BUF_ERROR:ax,Z_DEFLATED:sx}=xO,cx=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function ux(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const lx=e=>{if(!e||!e.state)return rx;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,ex},dx=e=>{if(!e||!e.state)return rx;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,lx(e)},px=(e,t)=>{let n;if(!e||!e.state)return rx;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?rx:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,dx(e))},fx=(e,t)=>{if(!e)return rx;const n=new ux;e.state=n,n.window=null;const r=px(e,t);return r!==ex&&(e.state=null),r};let hx,mx,gx=!0;const vx=e=>{if(gx){hx=new Int32Array(512),mx=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(QP(1,e.lens,0,288,hx,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;QP(2,e.lens,0,32,mx,0,e.work,{bits:5}),gx=!1}e.lencode=hx,e.lenbits=9,e.distcode=mx,e.distbits=5},yx=(e,t,n,r)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0};var bx=dx,_x=fx,Cx=(e,t)=>{let n,r,i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,_,C,I,w,E=0;const S=new Uint8Array(4);let T,O;const P=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return rx;n=e.state,12===n.mode&&(n.mode=13),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,l=n.bits,d=s,p=c,w=ex;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(2&n.wrap&&35615===u){n.check=0,S[0]=255&u,S[1]=u>>>8&255,n.check=OO(n.check,S,2,0),u=0,l=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&u)!==sx){e.msg="unknown compression method",n.mode=30;break}if(u>>>=4,l-=4,I=8+(15&u),0===n.wbits)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<n.wbits,e.adler=n.check=1,n.mode=512&u?10:12,u=0,l=0;break;case 2:for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(n.flags=u,(255&n.flags)!==sx){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&(S[0]=255&u,S[1]=u>>>8&255,n.check=OO(n.check,S,2,0)),u=0,l=0,n.mode=3;case 3:for(;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.head&&(n.head.time=u),512&n.flags&&(S[0]=255&u,S[1]=u>>>8&255,S[2]=u>>>16&255,S[3]=u>>>24&255,n.check=OO(n.check,S,4,0)),u=0,l=0,n.mode=4;case 4:for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&(S[0]=255&u,S[1]=u>>>8&255,n.check=OO(n.check,S,2,0)),u=0,l=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&(S[0]=255&u,S[1]=u>>>8&255,n.check=OO(n.check,S,2,0)),u=0,l=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(f=n.length,f>s&&(f=s),f&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+f),I)),512&n.flags&&(n.check=OO(n.check,r,f,o)),s-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;f=0;do{I=r[o+f++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I))}while(I&&f<s);if(512&n.flags&&(n.check=OO(n.check,r,f,o)),s-=f,o+=f,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;f=0;do{I=r[o+f++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I))}while(I&&f<s);if(512&n.flags&&(n.check=OO(n.check,r,f,o)),s-=f,o+=f,I)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}u=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}e.adler=n.check=cx(u),u=0,l=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=l,nx;e.adler=n.check=1,n.mode=12;case 12:if(t===JP||t===$P)break e;case 13:if(n.last){u>>>=7&l,l-=7&l,n.mode=27;break}for(;l<3;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}switch(n.last=1&u,u>>>=1,l-=1,3&u){case 0:n.mode=14;break;case 1:if(vx(n),n.mode=20,t===$P){u>>>=2,l-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if((65535&u)!==(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&u,u=0,l=0,n.mode=15,t===$P)break e;case 15:n.mode=16;case 16:if(f=n.length,f){if(f>s&&(f=s),f>c&&(f=c),0===f)break e;i.set(r.subarray(o,o+f),a),s-=f,o+=f,c-=f,a+=f,n.length-=f;break}n.mode=12;break;case 17:for(;l<14;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(n.nlen=257+(31&u),u>>>=5,l-=5,n.ndist=1+(31&u),u>>>=5,l-=5,n.ncode=4+(15&u),u>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.lens[P[n.have++]]=7&u,u>>>=3,l-=3}for(;n.have<19;)n.lens[P[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,T={bits:n.lenbits},w=QP(0,n.lens,0,19,n.lencode,0,n.work,T),n.lenbits=T.bits,w){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=n.lencode[u&(1<<n.lenbits)-1],g=E>>>24,v=E>>>16&255,y=65535&E,!(g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(y<16)u>>>=g,l-=g,n.lens[n.have++]=y;else{if(16===y){for(O=g+2;l<O;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(u>>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}I=n.lens[n.have-1],f=3+(3&u),u>>>=2,l-=2}else if(17===y){for(O=g+3;l<O;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=g,l-=g,I=0,f=3+(7&u),u>>>=3,l-=3}else{for(O=g+7;l<O;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=g,l-=g,I=0,f=11+(127&u),u>>>=7,l-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;f--;)n.lens[n.have++]=I}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,T={bits:n.lenbits},w=QP(1,n.lens,0,n.nlen,n.lencode,0,n.work,T),n.lenbits=T.bits,w){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,T={bits:n.distbits},w=QP(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,T),n.distbits=T.bits,w){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===$P)break e;case 20:n.mode=21;case 21:if(s>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=l,ZP(e,p),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,l=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=n.lencode[u&(1<<n.lenbits)-1],g=E>>>24,v=E>>>16&255,y=65535&E,!(g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(v&&0===(240&v)){for(b=g,_=v,C=y;E=n.lencode[C+((u&(1<<b+_)-1)>>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=b,l-=b,n.back+=b}if(u>>>=g,l-=g,n.back+=g,n.length=y,0===v){n.mode=26;break}if(32&v){n.back=-1,n.mode=12;break}if(64&v){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&v,n.mode=22;case 22:if(n.extra){for(O=n.extra;l<O;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=n.distcode[u&(1<<n.distbits)-1],g=E>>>24,v=E>>>16&255,y=65535&E,!(g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(0===(240&v)){for(b=g,_=v,C=y;E=n.distcode[C+((u&(1<<b+_)-1)>>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=l);){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}u>>>=b,l-=b,n.back+=b}if(u>>>=g,l-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=30;break}n.offset=y,n.extra=15&v,n.mode=24;case 24:if(n.extra){for(O=n.extra;l<O;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===c)break e;if(f=p-c,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}f>n.wnext?(f-=n.wnext,h=n.wsize-f):h=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=i,h=a-n.offset,f=n.length;f>c&&(f=c),c-=f,n.length-=f;do{i[a++]=m[h++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===c)break e;i[a++]=n.length,c--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===s)break e;s--,u|=r[o++]<<l,l+=8}if(p-=c,e.total_out+=p,n.total+=p,p&&(e.adler=n.check=n.flags?OO(n.check,i,p,a-p):SO(n.check,i,p,a-p)),p=c,(n.flags?u:cx(u))!==n.check){e.msg="incorrect data check",n.mode=30;break}u=0,l=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===s)break e;s--,u+=r[o++]<<l,l+=8}if(u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}u=0,l=0}n.mode=29;case 29:w=tx;break e;case 30:w=ix;break e;case 31:return ox;case 32:default:return rx}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=l,(n.wsize||p!==e.avail_out&&n.mode<30&&(n.mode<27||t!==XP))&&yx(e,e.output,e.next_out,p-e.avail_out),d-=e.avail_in,p-=e.avail_out,e.total_in+=d,e.total_out+=p,n.total+=p,n.wrap&&p&&(e.adler=n.check=n.flags?OO(n.check,i,p,e.next_out-p):SO(n.check,i,p,e.next_out-p)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===d&&0===p||t===XP)&&w===ex&&(w=ax),w},Ix=e=>{if(!e||!e.state)return rx;let t=e.state;return t.window&&(t.window=null),e.state=null,ex},wx=(e,t)=>{if(!e||!e.state)return rx;const n=e.state;return 0===(2&n.wrap)?rx:(n.head=t,t.done=!1,ex)},Ex=(e,t)=>{const n=t.length;let r,i,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?rx:11===r.mode&&(i=1,i=SO(i,t,n,0),i!==r.check)?ix:(o=yx(e,t,n,n),o?(r.mode=31,ox):(r.havedict=1,ex))):rx},Sx=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Tx=Object.prototype.toString,{Z_NO_FLUSH:Ox,Z_FINISH:Px,Z_OK:xx,Z_STREAM_END:Ax,Z_NEED_DICT:Nx,Z_STREAM_ERROR:Rx,Z_DATA_ERROR:Dx,Z_MEM_ERROR:kx}=xO;function Ux(e){this.options=EP({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new NP,this.strm.avail_out=0;let n=_x(this.strm,t.windowBits);if(n!==xx)throw new Error(PO[n]);if(this.header=new Sx,wx(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=PP(t.dictionary):"[object ArrayBuffer]"===Tx.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Ex(this.strm,t.dictionary),n!==xx)))throw new Error(PO[n])}function Lx(e,t){const n=new Ux(t);if(n.push(e),n.err)throw n.msg||PO[n.err];return n.result}Ux.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Px:Ox,"[object ArrayBuffer]"===Tx.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Cx(n,a),o===Nx&&i&&(o=Ex(n,i),o===xx?o=Cx(n,a):o===Dx&&(o=Nx));n.avail_in>0&&o===Ax&&n.state.wrap>0&&0!==e[n.next_in];)bx(n),o=Cx(n,a);switch(o){case Rx:case Dx:case Nx:case kx:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(0===n.avail_out||o===Ax))if("string"===this.options.to){let e=AP(n.output,n.next_out),t=n.next_out-e,i=xP(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==xx||0!==s){if(o===Ax)return o=Ix(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Ux.prototype.onData=function(e){this.chunks.push(e)},Ux.prototype.onEnd=function(e){e===xx&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=SP(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Mx={Inflate:Ux,inflate:Lx,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Lx(e,t)},ungzip:Lx,constants:xO};const{Deflate:jx,deflate:Fx,deflateRaw:Bx,gzip:zx}=VP,{Inflate:Hx,inflate:Wx,inflateRaw:Vx,ungzip:Zx}=Mx;var qx=Wx,Kx={Deflate:jx,deflate:Fx,deflateRaw:Bx,gzip:zx,Inflate:Hx,inflate:qx,inflateRaw:Vx,ungzip:Zx,constants:xO};function Gx(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return Yx(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yx(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Yx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qx(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Xx(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Qx(o,r,i,a,s,"next",e)}function s(e){Qx(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Jx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var $x="com.apple.Safari.TopBookmark",eA=Nn.object({isCKError:Nn.literal(!0)});function tA(e){return eA.safeParse(e).success}var nA,rA=Nn.object({default:Nn.object({sortValues:Nn.array(Nn.object({sortValue:Nn.number(),deviceIdentifier:Nn.string(),changeID:Nn.number()}))}).optional()});!function(e){e[e.NOT_YET_STARTED=0]="NOT_YET_STARTED",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.COMPLETE=2]="COMPLETE"}(nA||(nA={}));var iA,oA=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new lg;this.cloudKitJS=void 0,this.bookmarkRecords={},this.listeners=new Set,this.batchSize=10,this.syncToken=void 0,this.rootBookmarkAppendIndex=void 0,this.changeId=1,this.remoteMinimumSyncAPIVersion=void 0,this.migrationState=void 0,this.syncPromise=void 0,this._isLoading=!0,this.cloudKitJS=e,this.syncBookmarks()}var t,n,r,i=e.prototype;return i.getBookmarkRecord=function(e){return this.bookmarkRecords[e]},i.forEachBookmarkRecord=function(e){for(var t in this.bookmarkRecords)e(this.bookmarkRecords[t])},i.addListener=function(e){this.listeners.add(e)},i.removeListener=function(e){this.listeners.delete(e)},i.getCKDatabase=function(){var t=Xx(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.containerIdentifier,t.next=3,this.cloudKitJS.instanceForContainer(n,jn("ckdatabasews"));case 3:return r=t.sent,UC.sharedInstance.registerCloudKitSubscription(n),t.abrupt("return",r.instance.getDefaultContainer().privateCloudDatabase);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),i.didReceivePushNotification=function(t){var n;(null==(n=t.ckInfo)?void 0:n.containerIdentifier)===e.containerIdentifier&&this.syncBookmarks()},i.handleSyncError=function(e){for(var t,n=Gx(e);!(t=n()).done;){var r=t.value;if(!tA(r))return!1;if("FULL_RESET_NEEDED"===r.serverErrorCode||"FULL_RESET_NEEDED"===r.ckErrorCode)return this.syncToken=void 0,this.rootBookmarkAppendIndex=void 0,this.bookmarkRecords={},!0}return!1},i.syncBookmarks=function(){var e=this;return this.syncPromise||(this.syncPromise=Xx(regeneratorRuntime.mark((function t(){var n,r,i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,_,C;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getCKDatabase();case 2:n=t.sent,r=!1;case 4:return t.prev=5,t.next=8,n.fetchRecordZoneChanges(Object.assign({zoneID:{zoneName:"Bookmarks"}},!!e.syncToken&&{syncToken:e.syncToken}));case 8:if(!(o=t.sent).hasErrors){t.next=14;break}if(!e.handleSyncError(o.errors)){t.next=13;break}return t.abrupt("continue",4);case 13:return t.abrupt("break",31);case 14:if(a=null==(i=o.zones)?void 0:i[0]){t.next=17;break}return t.abrupt("break",31);case 17:for(s=Gx(null!=(u=null==a?void 0:a.records)?u:[]);!(c=s()).done;)l=c.value,r=e.ingestRecord(l)||r;if(a.moreComing&&e.syncToken!==a.syncToken){t.next=20;break}return t.abrupt("break",31);case 20:e.syncToken=a.syncToken,t.next=29;break;case 23:if(t.prev=23,t.t0=t.catch(5),!e.handleSyncError([t.t0])){t.next=28;break}return t.abrupt("continue",4);case 28:return t.abrupt("break",31);case 29:t.next=4;break;case 31:t.t1=regeneratorRuntime.keys(e.bookmarkRecords);case 32:if((t.t2=t.t1()).done){t.next=48;break}if(d=t.t2.value,"BookmarkLeaf"===(f=e.bookmarkRecords[d]).recordType){t.next=37;break}return t.abrupt("continue",32);case 37:h=null==(p=f.fields.ParentFolder)?void 0:p.value.recordName;case 38:if(!h){t.next=46;break}if("Reading List"===h&&delete e.bookmarkRecords[d],g=e.bookmarkRecords[h]){t.next=43;break}return t.abrupt("break",46);case 43:h=null==(m=g.fields.ParentFolder)?void 0:m.value.recordName,t.next=38;break;case 46:t.next=32;break;case 48:for(e.migrationState=aA(e.migrationState),v=e.bookmarkRecords,y=sA(v),b=Gx(y);!(_=b()).done;)C=_.value,delete e.bookmarkRecords[C.recordName];return r&&e.notifyChangeListeners(),e.syncPromise=void 0,e.isLoading=!1,t.abrupt("return",!0);case 56:case"end":return t.stop()}}),t,null,[[5,23]])})))()),this.syncPromise},i.notifyChangeListeners=function(){for(var e,t=Gx(this.listeners);!(e=t()).done;){var n=e.value;null==n.bookmarksDidChange||n.bookmarksDidChange(this)}},i.updateRootBookmarkAppendIndex=function(e){var t,n,r,i;if((null==(t=e.fields.ParentFolder)?void 0:t.value.recordName)===$x){var o=null==(n=e.fields.Position)?void 0:n.value;if(o){var a=uA(o),s=null==a||null==(r=a.default)?void 0:r.sortValues,c=null==s||null==(i=s[0])?void 0:i.sortValue;if(c){var u=this.rootBookmarkAppendIndex;(void 0===u||c>u)&&(this.rootBookmarkAppendIndex=c)}}}},i.ingestRecord=function(e){var t,n,r;if(e.deleted)return delete this.bookmarkRecords[e.recordName],!0;switch(e.recordType){case"BookmarkList":case"BookmarkLeaf":var i=e;return this.updateRootBookmarkAppendIndex(i),this.bookmarkRecords[e.recordName]=i,!0;case"MigrationState":return this.migrationState=null==(t=e.fields)||null==(n=t.MigrationState)?void 0:n.value,!0;case"SyncRequirements":return this.remoteMinimumSyncAPIVersion=null==(r=e.fields)?void 0:r.MinimumSyncAPIVersion.value,!0;default:return!1}},i.restoreBookmarkRecords=function(){var e=Xx(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c,u,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isClientObsolete){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this.getCKDatabase();case 4:n=e.sent,r=!1,i=cA(t,this.bookmarkRecords),o=0;case 8:if(!(o<i.length)){e.next=43;break}a=i.slice(o,this.batchSize),s=0;case 11:return e.prev=12,e.next=15,this.restoreItemsBatchSendRequest(n,a);case 15:if((c=e.sent).isRecordsResponse){e.next=18;break}return e.abrupt("return",!1);case 18:for(u=Gx(c.records);!(l=u()).done;)d=l.value,r=this.ingestRecord(d)||r;if(c.hasErrors){e.next=21;break}return e.abrupt("break",40);case 21:return e.next=23,this.handleError(c.errors,s);case 23:if(0!==(a=e.sent).length){e.next=27;break}return r&&this.notifyChangeListeners(),e.abrupt("return",!1);case 27:e.next=37;break;case 29:return e.prev=29,e.t0=e.catch(12),e.next=33,this.handleError([e.t0],s);case 33:if(0!==(a=e.sent).length){e.next=37;break}return r&&this.notifyChangeListeners(),e.abrupt("return",!1);case 37:++s,e.next=11;break;case 40:o+=this.batchSize,e.next=8;break;case 43:return r&&this.notifyChangeListeners(),this.syncBookmarks(),e.abrupt("return",!0);case 46:case"end":return e.stop()}}),e,this,[[12,29]])})));return function(t){return e.apply(this,arguments)}}(),i.restoreItemsBatchSendRequest=function(){var e=Xx(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,_,C,I,w,E;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],i="iCloud_"+_r.clientId,o=Gx(n);case 3:if((a=o()).done){e.next=16;break}if(p=a.value,f=this.bookmarkRecords[p]){e.next=8;break}return e.abrupt("continue",14);case 8:h={recordName:f.recordName,recordChangeTag:f.recordChangeTag,recordType:f.recordType,fields:{Deleted:{value:0},Deleted_generation:{value:(null!=(s=null==(c=f.fields.Deleted_generation)?void 0:c.value)?s:0)+1},Deleted_deviceIdentifier:{value:i}}},m=null==(u=f.fields.ParentFolder)?void 0:u.value.recordName,!(m&&null!=(l=this.bookmarkRecords[m])?l:null)&&(null==(d=f.fields.ParentFolder)?void 0:d.value.recordName)&&(h.fields.ParentAndPosition_generation={value:(null!=(g=null==(v=f.fields.ParentAndPosition_generation)?void 0:v.value)?g:0)+1},h.fields.ParentAndPosition_deviceIdentifier={value:i},h.fields.ParentFolder={type:"REFERENCE",value:{recordName:$x}},_=this.rootBookmarkAppendIndex,C=void 0===_?0:_+1e3,this.rootBookmarkAppendIndex=C,I=[{sortValue:C,deviceIdentifier:i,changeID:this.changeId++}],w=null==(y=f.fields.Position)?void 0:y.value,(E=w&&null!=(b=uA(w))?b:{}).default={sortValues:I},h.fields.Position={value:lA(E)}),r.push(h);case 14:e.next=3;break;case 16:return e.abrupt("return",t.saveRecords(r,{zoneID:{zoneName:"Bookmarks"}}));case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),i.deleteBookmarkRecords=function(){var e=Xx(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isClientObsolete){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this.getCKDatabase();case 4:n=e.sent,r=!1,i=0;case 7:if(!(i<t.length)){e.next=42;break}o=t.slice(i,this.batchSize),a=0;case 10:return e.prev=11,e.next=14,n.deleteRecords(o,{zoneID:{zoneName:"Bookmarks"}});case 14:if((s=e.sent).isRecordsResponse){e.next=17;break}return e.abrupt("return",!1);case 17:for(c=Gx(s.records);!(u=c()).done;)l=u.value,r=this.ingestRecord(l)||r;if(s.hasErrors){e.next=20;break}return e.abrupt("break",39);case 20:return e.next=22,this.handleError(s.errors,a);case 22:if(0!==(o=e.sent).length){e.next=26;break}return r&&this.notifyChangeListeners(),e.abrupt("return",!1);case 26:e.next=36;break;case 28:return e.prev=28,e.t0=e.catch(11),e.next=32,this.handleError([e.t0],a);case 32:if(0!==(o=e.sent).length){e.next=36;break}return r&&this.notifyChangeListeners(),e.abrupt("return",!1);case 36:++a,e.next=10;break;case 39:i+=this.batchSize,e.next=7;break;case 42:return r&&this.notifyChangeListeners(),this.syncBookmarks(),e.abrupt("return",!0);case 45:case"end":return e.stop()}}),e,this,[[11,28]])})));return function(t){return e.apply(this,arguments)}}(),i.handleError=function(){var e=Xx(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,i=[],o=Gx(t);case 3:if((a=o()).done){e.next=20;break}if(tA(c=a.value)){e.next=7;break}return e.abrupt("continue",18);case 7:u=null!=(s=c.serverErrorCode)?s:c.ckErrorCode,e.t0=u,e.next="FULL_RESET_NEEDED"===e.t0?11:e.t0===CloudKit.CKError.INTERNAL_ERROR||e.t0===CloudKit.CKError.INVALID_ARGUMENTS||e.t0===CloudKit.CKError.QUOTA_EXCEEDED||"PARTIAL_FAILURE"===e.t0||"UNKNOWN_ITEM"===e.t0||"BATCH_REQUEST_FAILED"===e.t0||"LIMIT_EXCEEDED"===e.t0||"BAD_CONTAINER"===e.t0||"MISSING_ENTITLEMENT"===e.t0||"NOT_AUTHENTICATED"===e.t0||"PERMISSION_FAILURE"===e.t0||"SERVER_REJECTED_REQUEST"===e.t0||"INCOMPATIBLE_VERSION"===e.t0||"CONSTRAINT_VIOLATION"===e.t0||"BAD_DATABASE"===e.t0||"OPERATION_CANCELLED"===e.t0||"RESULTS_TRUNCATED"===e.t0||"ASSET_FILE_NOT_FOUND"===e.t0||"ASSET_FILE_MODIFIED"===e.t0||"TOO_MANY_PARTICIPANTS"===e.t0||"ALREADY_SHARED"===e.t0||"REFERENCE_VIOLATION"===e.t0||"MANAGED_ACCOUNT_RESTRICTED"===e.t0||"PARTICIPANT_MAY_NEED_VERIFICATION"===e.t0||e.t0===CloudKit.CKError.ZONE_NOT_FOUND||"USER_DELETED_ZONE"===e.t0||e.t0===CloudKit.CKError.ACCESS_DENIED||e.t0===CloudKit.CKError.ATOMIC_ERROR||e.t0===CloudKit.CKError.AUTHENTICATION_FAILED||e.t0===CloudKit.CKError.AUTHENTICATION_REQUIRED||e.t0===CloudKit.CKError.AUTH_PERSIST_ERROR||e.t0===CloudKit.CKError.BAD_REQUEST||e.t0===CloudKit.CKError.CONFIGURATION_ERROR||e.t0===CloudKit.CKError.EXISTS||e.t0===CloudKit.CKError.NOT_FOUND||e.t0===CloudKit.CKError.SHARE_UI_TIMEOUT||e.t0===CloudKit.CKError.SIGN_IN_FAILED||e.t0===CloudKit.CKError.UNEXPECTED_SERVER_RESPONSE||e.t0===CloudKit.CKError.UNIQUE_FIELD_ERROR||e.t0===CloudKit.CKError.VALIDATING_REFERENCE_ERROR||e.t0===CloudKit.CKError.NETWORK_ERROR||e.t0===CloudKit.CKError.TRY_AGAIN_LATER||e.t0===CloudKit.CKError.THROTTLED||e.t0===CloudKit.CKError.SERVICE_UNAVAILABLE||"NETWORK_UNAVAILABLE"===e.t0||"NETWORK_FAILURE"===e.t0||"REQUEST_RATE_LIMITED"===e.t0||"SERVER_RESPONSE_LOST"===e.t0?15:("SERVER_RECORD_CHANGED"===e.t0||"CHANGE_TOKEN_EXPIRED"===e.t0||"OP_LOCK_FAILURE"===e.t0||e.t0===CloudKit.CKError.CONFLICT||e.t0===CloudKit.CKError.ZONE_BUSY||(e.t0,CloudKit.CKError.UNKNOWN_ERROR),16);break;case 11:return r=!0,this.syncToken=void 0,this.rootBookmarkAppendIndex=void 0,e.abrupt("break",18);case 15:return e.abrupt("break",18);case 16:return c.recordName&&i.push(c.recordName),e.abrupt("break",18);case 18:e.next=3;break;case 20:if(l=[1e3,3e3,5e3,1e4],!((r||i.length>0)&&n<l.length)){e.next=32;break}return d=l[n],e.next=25,Xo(d,"try "+n);case 25:return e.next=27,this.syncBookmarks();case 27:if(!r){e.next=29;break}return e.abrupt("return",[]);case 29:return e.abrupt("return",i);case 32:return e.next=34,this.syncBookmarks();case 34:return e.abrupt("return",[]);case 35:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t=e,r=[{key:"shared",get:function(){return this._shared||(this._shared=new e),this._shared}}],(n=[{key:"isClientObsolete",get:function(){var e;return(null!=(e=this.remoteMinimumSyncAPIVersion)?e:1)>1}},{key:"isLoading",get:function(){return this._isLoading},set:function(e){this._isLoading=e;for(var t,n=Gx(this.listeners);!(t=n()).done;){var r=t.value;null==r.loadingDidChange||r.loadingDidChange(this,e)}}}])&&Jx(t.prototype,n),r&&Jx(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function aA(e){var t=_r.configuration.rawConfiguration.iCloudInfo.SafariBookmarksHasMigratedToCloudKit;switch(e){case nA.COMPLETE:return t||Ga("https://setup.icloud.com/setup/ws/1/updateAccount",{method:"POST",body:JSON.stringify({SafariBookmarksHasMigratedToCloudKit:!0})}),e;case nA.IN_PROGRESS:return e;case nA.NOT_YET_STARTED:default:return t?nA.COMPLETE:e}}function sA(e){var t={},n=[];for(var r in e){var i,o,a,s,c,u,l=e[r],d=null==(i=l.fields.IdentityHash)?void 0:i.value;if(d){var p=null==(o=l.fields.ParentFolder)?void 0:o.value.recordName;if(p){var f=p+"/"+d,h=t[f];if(h){var m=null==(a=l.fields.Title)?void 0:a.value,g=null==(s=h.fields.Title)?void 0:s.value,v=l.modified.timestamp,y=h.modified.timestamp;(m?1:0)+(v?1:0)+((null==(c=l.fields.URL)?void 0:c.value)?1:0)>(g?1:0)+(y?1:0)+((null==(u=h.fields.URL)?void 0:u.value)?1:0)?(t[f]=l,n.push(h)):n.push(l)}else t[f]=l}}}return n}function cA(e,t){for(var n,r=new Map,i=[],o=function(e){var t=e.recordName,n=r.get(t);void 0!==n&&(i[n]=null),r.set(t,i.length),i.push(e)},a=Gx(e);!(n=a()).done;){var s,c=t[n.value];if(c){o(c);for(var u=null==(s=c.fields.ParentFolder)?void 0:s.value.recordName;u&&u!==$x;){var l,d=t[u];if(!d)break;o(d),u=null==(l=d.fields.ParentFolder)?void 0:l.value.recordName}}}for(var p=[],f=i.length-1;f>=0;--f){var h,m,g=i[f];if(g){var v=null==(h=g.fields.ParentFolder)?void 0:h.value.recordName,y=void 0!==v?t[v]:void 0;(null!=(m=g.fields.Deleted)&&m.value||!y)&&p.push(g.recordName)}}return p}function uA(e){for(var t=atob(e),n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);for(var i=Kx.inflate(n),o="",a=0;a<i.length;++a)o+=String.fromCharCode(i[a]);var s,c=JSON.parse(o);return s=c,rA.safeParse(s).success?c:null}function lA(e){for(var t=JSON.stringify(e),n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);for(var i=Kx.deflate(n),o="",a=0;a<i.length;++a)o+=String.fromCharCode(i[a]);return btoa(o)}oA.containerIdentifier="com.apple.SafariShared.WBSCloudBookmarksStore",oA._shared=void 0,function(e){e.STALE="stale",e.FRESH="fresh"}(iA||(iA={}));var dA=function(){function e(){this._applicationDataState=new Map,this.tileDataObservers=new Map,this.serializedDriveTileData="",this.switchDriveToAppMode=void 0}var t=e.prototype;return t.getCurrentAppDataState=function(e){return this._applicationDataState.get(e)},t.markDataStateAsStale=function(e){this.getCurrentAppDataState(e)!==iA.STALE&&(this._applicationDataState.set(e,iA.STALE),this.tileDataObservers.forEach((function(t,n){n===e&&t()})))},t.markDataStateAsFresh=function(e){this._applicationDataState.set(e,iA.FRESH)},t.getTileData=function(e){if(e===Du.identifier)return this.serializedDriveTileData},t.setTileData=function(e,t){if(e===Du.identifier){this.serializedDriveTileData=t;var n=ky.sharedInstance.getChildApplicationController(Du.applicationInfo);null==n||n.tileDataDidUpdate(t)}},e}();dA.sharedInstance=new dA,n(857);var pA=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"arrow.clockwise",svgPath:"M8.74023-31.8848C8.74023-7.27539 28.6133 12.5977 53.1738 12.5977C77.7832 12.5977 97.6074-7.27539 97.6074-31.8848C97.6074-35.6934 94.9707-38.3301 91.2598-38.3301C87.5977-38.3301 85.1074-35.6934 85.1074-31.8848C85.1074-14.2578 70.8496 0 53.1738 0C35.498 0 21.3379-14.2578 21.3379-31.8848C21.3379-49.9023 35.1562-64.0137 52.7832-64.0137C55.0781-64.0137 57.1777-63.8672 59.0332-63.5254L48.0469-52.6367C46.9727-51.5625 46.2891-50.293 46.2891-48.584C46.2891-45.166 48.9746-42.4805 52.3926-42.4805C54.1016-42.4805 55.5176-43.0664 56.6406-44.1406L76.5625-64.3555C77.8809-65.6738 78.5156-67.1387 78.5156-68.8965C78.5156-70.6055 77.832-72.2168 76.5625-73.4375L56.6406-93.75C55.5176-94.9219 54.1016-95.5566 52.3926-95.5566C48.9746-95.5566 46.2891-92.7734 46.2891-89.3066C46.2891-87.5977 46.9727-86.3281 47.998-85.2051L57.7148-75.6836C56.25-75.9277 54.4922-76.123 52.7832-76.123C28.2715-76.123 8.74023-56.543 8.74023-31.8848Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:82.13001708984393,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 91.454833984375 120.6533203125",width:91.454833984375,height:120.6533203125,translateX:-6.152636718749818,translateY:95.556640625,baseline:95.556640625,capline:25.0966796875}}})};function fA(e){var t=Xn("FaceTime.Unsupported.Button.Title"),n=gu(pl.applicationInfo),i=bZ.sharedInstance.applicationParameter.isIOS,o=bZ.sharedInstance.applicationParameter.isMac,a=!e.cantContinueAnyway&&fZ(),s=!i&&"function"===typeof document.queryCommandSupported&&document.queryCommandSupported("copy"),c=Xn(i?"FaceTime.UpdateNeeded.Title":"FaceTime.Unsupported.Title"),u=Xn(i?"FaceTime.UpdateNeeded.Description":a?o?"FaceTime.Unsupported.Description.Safari.ContinueAnyway":"FaceTime.Unsupported.Description.ContinueAnyway":o?"FaceTime.Unsupported.Description.Safari":"FaceTime.Unsupported.Description"),l=r.useState(Xn("FaceTime.Unsupported.Button.Title.Secondary")),d=l[0],p=l[1],f=r.useState(!1),h=f[0],m=f[1];return r.createElement("div",{className:"facetime-unsupported-error"},r.createElement("div",{className:"error-container-view"},r.createElement("div",{className:"error-content-container-view"},r.createElement("div",{className:"error-icon-view"},n&&r.createElement(MI,{iconSrc:n})),r.createElement("div",{className:"error-title-app-view"},c),r.createElement("div",{className:"error-description-view",dangerouslySetInnerHTML:{__html:u}})),r.createElement("div",{className:"error-button-container-view"},r.createElement("div",{className:"error-buttons-view"},a&&r.createElement(Wc,{variant:"badge-button-one",onActivate:function(){null==e.handleContinueAnyway||e.handleContinueAnyway(!0)}},t),s&&r.createElement(Wc,{variant:"badge-button-two",disabled:h,onActivate:function(){var e=Object(he.c)(window.location.href);e&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,n=document.createElement("textarea");n.contentEditable="true",n.style.fontSize="20px",n.readOnly=!0,n.style.position="absolute",n.style.left="-10000px",n.value=e,t.appendChild(n);try{var r=document.createRange();r.selectNodeContents(n);var i=window.getSelection();null==i||i.removeAllRanges(),null==i||i.addRange(r),n.focus();try{n.setSelectionRange(0,n.value.length),document.execCommand("copy")}catch(o){}finally{n.blur()}}finally{t.removeChild(n)}}(e.href);var t=new ur("FaceTime.CopyLink");fr.sharedInstance.recordStat(t),p(Xn("FaceTime.Unsupported.Button.Title.Secondary.Activated")),m(!0),window.setTimeout((function(){p(Xn("FaceTime.Unsupported.Button.Title.Secondary")),m(!1)}),2e3)}},d)))))}function hA(e){var t=r.useRef(null);r.useEffect((function(){var e;null==(e=t.current)||e.focus()}),[]);var n=Xn("CloudOS.TermsAndConditions.SuccessConfirmation.Title"),i=function(){switch((bZ.sharedInstance.needsGameCenterTermsFlow?1:0)+2*(e.wasTermsUpdatePerformed?1:0)){case 0:return Xn("CloudOS.TermsAndConditions.SuccessConfirmation.UpToDate.Description");case 1:return Xn("CloudOS.TermsAndConditions.SuccessConfirmation.GameCenter.UpToDate.Description");case 2:return Xn("CloudOS.TermsAndConditions.SuccessConfirmation.Description");case 3:return Xn("CloudOS.TermsAndConditions.SuccessConfirmation.GameCenter.Description");default:return}}();return r.createElement("div",{className:"terms-and-conditions-success-confirmation"},r.createElement("div",{className:"content"},r.createElement("div",{className:"title-text"},n),r.createElement("div",{className:"description-text"},i),r.createElement(Wc,{ref:t,onActivate:function(){bZ.sharedInstance.applicationUrl.pathname.startsWith("/terms")&&bZ.sharedInstance.replaceHistoryState(void 0,void 0,void 0,void 0,void 0,void 0),null==e.onDismiss||e.onDismiss()}},Xn("CloudOS.Button.OK.Title"))))}n(858),n(859),n(860);var mA,gA=function(){var e=r.useState([]),t=e[0],n=e[1],i=Us(),o=i.ariaLiveText,a=i.setAriaLiveText,s=r.useCallback((function(){n([])}),[]),c=r.useCallback((function(){var e;if(o.length){var r=t;(null==(e=r)?void 0:e.length)>0?r.push(o):r=[o],a(""),n(r)}}),[o,t,a]);return r.useEffect((function(){c();var e=window.setTimeout(s,1e4);return function(){window.clearTimeout(e)}}),[c,o,s,t]),r.createElement(dT,null,r.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"log"},t.map((function(e,t){return r.createElement("div",{key:t},e)}))))},vA=(n(861),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"icloud.and.arrow.up.fill",svgPath:"M8.74023-28.1738C8.74023-15.7227 19.2383-5.71289 35.2539-5.71289L66.5527-5.71289L66.5527 15.4785C66.5527 17.5293 68.3594 19.2383 70.459 19.2383C72.5586 19.2383 74.3164 17.5293 74.3164 15.4785L74.3164-5.71289L108.008-5.71289C122.07-5.71289 131.494-14.502 131.494-26.0742C131.494-35.6445 125.586-44.4336 116.064-48.3887C116.162-70.166 100.488-85.8887 80.5176-85.8887C67.2852-85.8887 57.8613-78.8086 52.002-70.2637C40.918-73.2422 26.9043-64.6484 26.6602-50.9277C15.625-49.1699 8.74023-39.4531 8.74023-28.1738ZM66.5527-7.71484L66.5527-32.8613L66.8457-40.1367L64.3555-37.5L56.1523-28.8086C55.4688-28.0273 54.3945-27.6367 53.4668-27.6367C51.416-27.6367 49.9512-29.1016 49.9512-31.0547C49.9512-32.1289 50.3906-32.9102 51.123-33.6426L67.627-49.5605C68.6035-50.5371 69.4336-50.8789 70.459-50.8789C71.4355-50.8789 72.2656-50.5371 73.2422-49.5605L89.7461-33.6426C90.4785-32.9102 90.918-32.1289 90.918-31.0547C90.918-29.1016 89.3555-27.6367 87.3535-27.6367C86.4258-27.6367 85.4004-28.0273 84.7168-28.8086L76.5137-37.5L74.0234-40.1367L74.3164-32.8613L74.3164-7.71484C74.3164-5.56641 72.5586-3.85742 70.459-3.85742C68.3105-3.85742 66.5527-5.56641 66.5527-7.71484Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 108.9365234375",width:122.758056640625,height:108.9365234375,translateX:-8.735942382812482,translateY:89.6982421875,baseline:89.6982421875,capline:19.23828125}}})}),yA=function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.documentPreviews,u=e.refetch,l=e.tileSize,d=Cm({error:o,isLoading:a,isSuccess:s,data:c}),p=xs(),f=mc("DriveHomeTile.Heading"),h=mc("DriveHomeTile.Description"),m=mc("VoiceOver.DriveHomeTile.Documents"),g=mc("HomeTile.Loading"),v=mc("HomeTile.NotLoaded"),y=function(){switch(d){case mm.SUCCESS_WITH_DATA:case mm.SUCCESS_NO_DATA:return h;case mm.LOADING:return g;case mm.ERROR:return v}}(),b=mc("DriveHomeTileEmpty.Create"),_=Tp("load",t+"-tile",{measureFromBaseline:!0}),C=_[0],I=_[1],w=null;return d===mm.SUCCESS_NO_DATA?(C("no-data"),w=r.createElement(jS,{onActivate:function(){return p.launchApp(t)}},r.createElement("div",{"aria-hidden":!0,className:"upload-icon-wrapper"},r.createElement(vA,{className:"upload-icon",width:50,height:50,layoutMode:"glyphBox"})),r.createElement("p",{role:"presentation"},b))):w=r.createElement(JS,{error:o,appId:t,createTextShort:b,dataState:d,documentName:m,documentPreviews:c,accentBackgroundClassName:"",refetch:u,primaryRowCallback:function(){},primaryRowCallbackLabel:"VoiceOver.DocumentHomeRow.OpenDocument"}),d===mm.ERROR&&I(),r.createElement(tT,{tileIndex:i,appIcon:r.createElement(El,{src:Dl,srcSet:Dl+", "+kl+" 2x",size:40}),appIconSrcSet:"",appId:t,appUrl:n,className:"drive-home-tile",heading:f,description:y,isLoading:d===mm.LOADING,tileSize:l},w)},bA=n(862),_A=function(e){var t,n,r=wm(),i=null==(t=qf())||null==(n=t.details)?void 0:n.dsid;return{mode:e,fetchRecents:function(e){return OS({webServices:r,dsid:i},e)},getChanges:function(e,t){return function(e,t,n){var r=e.webServices,i=e.dsid;if(null==r||!r.docws||!i)throw new Error("no service url or dsid available");return function(e){return $E.apply(this,arguments)}({url:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6,r=arguments.length>3?arguments[3]:void 0,i=he.c(e+"/ws/_all_/list/changes/recentDocs");return TE(i,t),i.searchParams.append("limit",n.toString()),i.searchParams.append("unified_format","true"),void 0!==r&&i.searchParams.append("nextPage",r),i.toString()}(r.docws,i,t,n),includeCredentials:!0,validate:{type:"WireRecentDriveDocumentsChanges",schema:vS}})}({webServices:r,dsid:i},e,t)}}},CA=function(e){var t=e.onError,n=e.onSuccess,i=e.tileSize,o=e.appId,a=e.appUrl,s=e.tileIndex,c=bA.useRecentDriveDocs(_A("tile")),u=c.result,l=c.appIsLaunching,d=dA.sharedInstance;r.useEffect((function(){u&&d.setTileData(o,JSON.stringify(u))}),[u,d,o]),r.useEffect((function(){d.switchDriveToAppMode=l}),[d,l]);var p=r.useMemo((function(){return u?u.ok?{state:"ok",data:u.value.recents.map(oS)}:{state:"error",error:c}:{state:"pending"}}),[u,c]);r.useEffect((function(){switch(p.state){case"pending":return;case"ok":return null==n?void 0:n(p.data);case"error":return null==t?void 0:t(new Error(p.error.result.error))}}),[p,n,t]);var f="error"!==p.state?void 0:{error:p.error.result.error,retry:p.error.userRequestedRetry};return kS(f),r.createElement(yA,{tileIndex:s,appId:o,appUrl:a,error:"error"===p.state?new Error(p.error.result.error):null,isLoading:"pending"===p.state,isSuccess:"ok"===p.state,documentPreviews:"ok"===p.state?p.data:void 0,refetch:"error"===p.state?p.error.userRequestedRetry:function(){},tileSize:i})};function IA(e){var t,n,r,i,o;if(!e)return e;var a=(null!=(t=e.storageUsageByMedia)?t:[]).filter((function(e){return e.usageInBytes})).sort((function(e,t){return t.usageInBytes-e.usageInBytes})),s=e.familyStorageUsageInfo;return s&&a.push({mediaKey:s.mediaKey,displayLabel:s.displayLabel,displayColor:s.displayColor,usageInBytes:s.usageInBytes}),{almostFull:null!=(n=e.quotaStatus["almost-full"])&&n,overQuota:null!=(r=e.quotaStatus.overQuota)&&r,usedBytes:null!=(i=e.storageUsageInfo.usedStorageInBytes)?i:0,totalBytes:null!=(o=e.storageUsageInfo.totalStorageInBytes)?o:0,usageByMedia:a,familyStorageUsage:s}}function wA(){var e=r.useState((function(){return IA(YV.cloudOSApplication.quotaController.getMostRecentQuotaData())})),t=e[0],n=e[1],i=r.useState((function(){return YV.cloudOSApplication.quotaController.isFetching()})),o=i[0],a=i[1];return r.useEffect((function(){var e=YV.cloudOSApplication.quotaController,t={quotaDataDidChange:function(){n(IA(e.getMostRecentQuotaData()))},quotaDataLoadingStatusDidChange:function(){a(YV.cloudOSApplication.quotaController.isFetching())}};return e.quotaDataObservers.add(t),function(){e.quotaDataObservers.delete(t)}}),[]),{storageUsage:t,isLoading:o}}!function(e){e.Safari="SAFARI",e.Mail="MAIL",e.News="APPLE_NEWS",e.OnDemand="ON_DEMAND",e.InApp="IN_APP"}(mA||(mA={}));var EA,SA,TA,OA=Nn.object({anonymousId:Nn.string(),domain:Nn.string().optional(),forwardToEmail:Nn.string().optional(),hme:Nn.string(),isActive:Nn.boolean(),recipientMailId:Nn.string().optional(),label:Nn.string().optional(),origin:Nn.nativeEnum(mA)}),PA=Nn.object({forwardToEmails:Nn.array(Nn.string()),hmeEmails:Nn.array(OA),selectedForwardTo:Nn.string().optional()}),xA=Nn.object({errorCode:Nn.string(),errorMessage:Nn.string(),retryAfter:Nn.number().optional()}),AA=Nn.object({success:Nn.boolean(),timestamp:Nn.number(),error:xA.optional()}),NA=AA.merge(Nn.object({result:PA.optional()}));!function(e){e.InProgress="IN_PROGRESS",e.EmailNotSelected="DEFAULT_EMAIL_NOT_SELECTED",e.Complete="COMPLETE"}(EA||(EA={})),function(e){e.NotStarted="NOT_STARTED",e.InProgress="IN_PROGRESS",e.Success="SUCCESS",e.Failed="FAILED"}(SA||(SA={})),function(e){e.NotStarted="NOT_STARTED",e.InProgress="VERIFICATION_IN_PROGRESS",e.Success="VERIFICATION_SUCCESS",e.Failed="VERIFICATION_FAILED"}(TA||(TA={}));var RA=Nn.object({name:Nn.string(),owner:Nn.object({dsid:Nn.string(),firstName:Nn.string(),lastName:Nn.string()}),isShared:Nn.boolean(),isOwner:Nn.boolean(),status:Nn.nativeEnum(EA),transferTimestamp:Nn.number().optional(),dnsRecordsGenerated:Nn.boolean().optional(),dnsProviderName:Nn.string().optional(),isDomainConnect:Nn.boolean().optional(),applyTemplateUrl:Nn.string().optional(),verificationStatus:Nn.nativeEnum(SA).optional(),catchAllEnabled:Nn.boolean().optional(),isEmailImportSupported:Nn.boolean().optional(),reverificationStatus:Nn.nativeEnum(TA).optional()}),DA=Nn.object({domains:Nn.array(RA),maxDomainsAllowed:Nn.number()}),kA=AA.merge(Nn.object({result:DA.optional()}));function UA(e){var t,n=wZ.sharedInstance.cloudOSUser;return(null==n||null==(t=n.details)?void 0:t.accountType)!==Wo.HSA2&&!e}var LA,MA,jA,FA=Nn.object({zoneID:Nn.object({zoneName:Nn.string(),ownerRecordName:Nn.string().optional(),zoneType:Nn.string().optional()})}),BA=Nn.object({zones:Nn.array(FA)}),zA=Nn.object({timestamp:Nn.number(),userRecordName:Nn.string()}),HA=Nn.object({created:zA.optional(),deleted:Nn.boolean().optional(),modified:zA.optional(),recordChangeTag:Nn.string().optional(),recordName:Nn.string(),recordType:Nn.string().optional(),shortGUID:Nn.string().optional(),parent:Nn.object({recordName:Nn.string().optional()}).optional(),share:Nn.object({recordName:Nn.string().optional()}).optional()}).merge(FA.partial()),WA=function(e,t){var n=e.webServices,r=e.dsid,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wE.PRIVATE;if(null==n||!n.ckdatabasews||!r)throw new Error("no service url or dsid available");var o=AE(n.ckdatabasews,"production",t,i,r);return JE({url:o,includeCredentials:!0,validate:{type:"WireCKZonesList",schema:BA}})};!function(e){e[e.NONE=0]="NONE",e[e.PHOTO_PANORAMA=1]="PHOTO_PANORAMA",e[e.PHOTO_SUPPORTING_VIDEO=2]="PHOTO_SUPPORTING_VIDEO",e[e.PHOTO_SCREENSHOT=3]="PHOTO_SCREENSHOT",e[e.VIDEO_SLOWMO=100]="VIDEO_SLOWMO",e[e.VIDEO_TIMELAPSE=101]="VIDEO_TIMELAPSE",e[e.VIDEO_SCREEN_RECORDING=102]="VIDEO_SCREEN_RECORDING"}(LA||(LA={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.IMAGE=1]="IMAGE",e[e.MOVIE=2]="MOVIE",e[e.AUDIO=3]="AUDIO"}(MA||(MA={})),function(e){e.CPLAlbum="CPLAlbum",e.CPLMaster="CPLMaster",e.CPLAsset="CPLAsset",e.CPLLibraryInfo="CPLLibraryInfo"}(jA||(jA={}));var VA=Nn.object({fields:Nn.object({masterRef:Nn.object({type:Nn.string(),value:Nn.object({recordName:Nn.string()})}),resJPEGThumbRes:Nn.object({type:Nn.string(),value:Nn.object({downloadURL:Nn.string()})}),resJPEGThumbHeight:Nn.object({type:Nn.string(),value:Nn.number()}),resJPEGThumbWidth:Nn.object({type:Nn.string(),value:Nn.number()}),orientation:Nn.object({type:Nn.string(),value:Nn.number()}),dataClassType:Nn.object({type:Nn.string(),value:Nn.nativeEnum(MA)}),assetSubtypeV2:Nn.object({type:Nn.string(),value:Nn.number()}),assetSubtype:Nn.object({type:Nn.string(),value:Nn.number()})}).partial()}),ZA=HA.merge(VA),qA=Nn.object({records:Nn.array(ZA)}),KA=Nn.object({fields:Nn.object({photosCount:Nn.object({type:Nn.string(),value:Nn.number()}),videosCount:Nn.object({type:Nn.string(),value:Nn.number()}),audiosCount:Nn.object({type:Nn.string(),value:Nn.number()}),othersCount:Nn.object({type:Nn.string(),value:Nn.number()})})}),GA=HA.merge(KA),YA=Nn.object({records:Nn.array(GA)}),QA=function(e){return e.replace(/\${f}/,"public.jpeg")};function XA(e){var t=[],n=new Map;return e.records.filter((function(e){return e.recordType===jA.CPLMaster})).forEach((function(e){var t;null!=(t=e.fields.resJPEGThumbRes)&&t.value.downloadURL&&n.set(e.recordName,e.fields.resJPEGThumbRes.value.downloadURL)})),e.records.filter((function(e){return e.recordType===jA.CPLAsset})).forEach((function(e){var r,i,o,a;if(null!=(r=e.fields.resJPEGThumbRes)&&r.value.downloadURL)t.push({id:e.recordName,url:QA(e.fields.resJPEGThumbRes.value.downloadURL),dateCreatedTimestamp:e.created.timestamp,zoneID:null!=(i=e.zoneID)?i:void 0,recordName:null!=(o=e.recordName)?o:void 0});else if(null!=(a=e.fields.masterRef)&&a.value.recordName&&n.has(e.fields.masterRef.value.recordName)){var s,c,u=n.get(e.fields.masterRef.value.recordName);t.push({id:e.fields.masterRef.value.recordName,url:QA(u),dateCreatedTimestamp:e.created.timestamp,zoneID:null!=(s=e.zoneID)?s:void 0,recordName:null!=(c=e.recordName)?c:void 0})}})),t.reverse()}function JA(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function $A(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){JA(o,r,i,a,s,"next",e)}function s(e){JA(o,r,i,a,s,"throw",e)}a(void 0)}))}}var eN=["recordName","recordType","isFavorite","orientation","dataClassType","assetSubtype","assetSubtypeV2","masterRef","resJPEGThumbRes","resJPEGThumbHeight","resJPEGThumbWidth"],tN={recordType:"CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted",filterBy:[{fieldName:"direction",comparator:"EQUALS",fieldValue:{value:"DESCENDING",type:"STRING"}}]},nN=function(e){var t=e.webServices,n=e.dsid;return _S("fetchPhotosPrimaryZone",$A(regeneratorRuntime.mark((function e(){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,WA({webServices:t,dsid:n},"com.apple.photos.cloud");case 2:return r=e.sent,i=r.zones.find((function(e){return"PrimarySync"===e.zoneID.zoneName})),e.abrupt("return",i?[i]:[]);case 5:case"end":return e.stop()}}),e)}))))},rN=function(e,t){var n=e.webServices,r=e.dsid;return _S("fetchRecentPhotos",$A(regeneratorRuntime.mark((function e(){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new yE("no primary zone available from user");case 2:if(null!=n&&n.ckdatabasews&&r){e.next=4;break}throw new Error("no service url or dsid available");case 4:return i=PE(n.ckdatabasews,"production","com.apple.photos.cloud",wE.PRIVATE,r),e.next=7,JE({url:i,method:"POST",includeCredentials:!0,body:Object.assign({},t,{query:tN,desiredKeys:eN,resultsLimit:24}),validate:{type:"WireRecentPhotosResponse",schema:qA}});case 7:return o=e.sent,e.abrupt("return",XA(o));case 9:case"end":return e.stop()}}),e)}))))};function iN(){return iS({endpoint:vE.photosPrimaryZone,fetchProvider:function(e){return function(){return nN(e)}}})}function oN(){var e=iN().data;return iS({endpoint:vE.photosLibraryInfo,dependencies:[e],fetchProvider:function(t){return function(){return function(e,t){var n=e.webServices,r=e.dsid;if(!t)throw new Error("no primary zone available from user");if(null==n||!n.ckdatabasews||!r)throw new Error("no service url or dsid available");var i=xE(n.ckdatabasews,"production","com.apple.photos.cloud",wE.PRIVATE,r);return JE({url:i,method:"POST",includeCredentials:!0,body:Object.assign({},t,{records:[{recordName:"PrimarySync-0000-LI"}]}),validate:{type:"WirePhotosLibraryInfoResponse",schema:YA}}).then((function(e){return{numPhotos:(t=e).records[0].fields.photosCount.value,numVideos:t.records[0].fields.videosCount.value,numItems:t.records[0].fields.audiosCount.value+t.records[0].fields.othersCount.value};var t}))}(t,null==e?void 0:e[0])}}})}var aN=Nn.object({fields:Nn.object({TitleEncrypted:Nn.object({type:Nn.string(),value:Nn.string()}).optional(),SnippetEncrypted:Nn.object({type:Nn.string(),value:Nn.string()}).optional(),ModificationDate:Nn.object({type:Nn.string(),value:Nn.number()}).optional(),MinimumSupportedNotesVersion:Nn.object({type:Nn.string(),value:Nn.number()}).optional(),Deleted:Nn.object({type:Nn.string(),value:Nn.number()}).optional()}),parent:Nn.object({recordName:Nn.string()}).optional()}),sN=HA.merge(aN),cN=Nn.object({records:Nn.array(sN)}),uN=Nn.object({reason:Nn.string(),serverErrorCode:Nn.string(),uuid:Nn.string()}),lN=Nn.union([cN,uN]),dN=(Nn.object({zones:Nn.array(Nn.object({moreComing:Nn.boolean(),syncToken:Nn.string().optional()}).merge(FA).merge(cN))}),function(e){var t=Tw(e);return(new TextDecoder).decode(t)}),pN=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.filter((function(e){var t,n,r,i,o,a=!(null==(t=e.fields.Deleted)||!t.value),s=null!=(n=null==(r=e.fields.MinimumSupportedNotesVersion)?void 0:r.value)?n:0,c=null!=(i=null==(o=e.parent)?void 0:o.recordName)?i:"";return!a&&s<=9&&"TrashFolder-CloudKit"!==c})).map((function(e){var n,r,i,o,a,s="",c="";null!=(n=e.fields.TitleEncrypted)&&n.value&&(c=dN(e.fields.TitleEncrypted.value)),null!=(r=e.fields.SnippetEncrypted)&&r.value&&(s=dN(e.fields.SnippetEncrypted.value));var u="PasswordProtectedNote"===e.recordType;return{id:e.recordName,snippet:s||(u?"":gc("Note.Empty.Snippet")),title:c||gc("Note.Empty.Title"),isShared:t||!(null==(i=e.share)||!i.recordName),isLocked:u,timestamp:null==(o=e.modified)?void 0:o.timestamp,time:Dw(new Date((null==(a=e.modified)?void 0:a.timestamp)||Date.now()))}}))};function fN(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function hN(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){fN(o,r,i,a,s,"next",e)}function s(e){fN(o,r,i,a,s,"throw",e)}a(void 0)}))}}var mN={recordType:"SearchIndexes",filterBy:[{comparator:"EQUALS",fieldName:"indexName",fieldValue:{value:"recents",type:"STRING"}}],sortBy:[{fieldName:"modTime",ascending:!1}]},gN={zoneName:"Notes"},vN=["TitleEncrypted","SnippetEncrypted","ModificationDate","Deleted","LastViewedModificationDate","MinimumSupportedNotesVersion"];function yN(e){return bN.apply(this,arguments)}function bN(){return(bN=hN(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!CE(t)||!Ma(t.response)){e.next=7;break}return n=t.response,e.next=4,n.unvalidatedJson();case 4:if("ZONE_NOT_FOUND"!==e.sent.serverErrorCode){e.next=7;break}return e.abrupt("return",[]);case 7:throw t;case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _N=function(e){var t=e.webServices,n=e.dsid;return _S("fetchRecentNotes",hN(regeneratorRuntime.mark((function e(){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&t.ckdatabasews&&n){e.next=2;break}throw new Error("no service url or dsid available");case 2:return r=PE(t.ckdatabasews,"production","com.apple.notes",wE.PRIVATE,n),e.prev=3,e.next=6,JE({url:r,method:"POST",includeCredentials:!0,body:{query:mN,zoneID:gN,desiredKeys:vN,resultsLimit:24},validate:{type:"WireRecentNotesResponse",schema:lN}});case 6:return i=e.sent,e.abrupt("return",pN(i.records));case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",yN(e.t0));case 13:case"end":return e.stop()}}),e,null,[[3,10]])}))))},CN=Nn.object({type:Nn.literal("CoreMail.Message"),guid:Nn.string().optional(),uid:Nn.string().optional(),sentdate:Nn.string().optional(),size:Nn.string().optional(),date:Nn.string().optional(),from:Nn.string().optional(),subject:Nn.string().optional(),unread:Nn.boolean().optional(),flagged:Nn.boolean().optional(),junk:Nn.boolean().optional(),messageId:Nn.string().optional()}),IN=Nn.object({type:Nn.literal("CoreMail.MessageListMetaData"),totalmessages:Nn.number(),unseen:Nn.number(),indexstart:Nn.number(),indexrange:Nn.number(),uids:Nn.array(Nn.string()),newslotnumber:Nn.number(),position:Nn.string()}),wN=Nn.object({folderStatus:Nn.object({unseenUndeletedThreads:Nn.number()}),threadList:Nn.array(Nn.object({jsonType:Nn.literal("threadDigest"),flags:Nn.array(Nn.string()),timestamp:Nn.number(),threadId:Nn.string(),subject:Nn.string(),senders:Nn.array(Nn.string())}))}),EN=Nn.object({id:Nn.string(),jsonrpc:Nn.string(),result:Nn.array(Nn.discriminatedUnion("type",[CN,IN])).optional(),error:Nn.object({code:Nn.number(),message:Nn.string(),data:Nn.unknown().optional()}).optional()}),SN=n(868);function TN(e,t){var n=a();return{unseen:e.folderStatus.unseenUndeletedThreads,messages:e.threadList.map((function(e){var r="";if(e.senders.length){var i=Object(SN.parseOneAddress)(e.senders[0]);if(null!=t&&t.has(i.address)){var o=t.get(i.address);r=Mw(n,{givenName:null==o?void 0:o.firstName,familyName:null==o?void 0:o.lastName,emailAddress:i.address})||""}r||(r=i.name||i.address||"")}return{id:e.threadId||"",from:r,read:e.flags.includes("\\Seen"),subject:e.subject||"",time:Dw(new Date(e.timestamp||Date.now()))}}))}}function ON(e,t){if(e.error)throw new Error(e.error.message);if(!e.result)throw new Error("mail API has invalid response");var n=a(),r=e.result.filter((function(e){return"CoreMail.Message"===e.type})),i=e.result.find((function(e){return"CoreMail.MessageListMetaData"===e.type}));return{unseen:null==i?void 0:i.unseen,total:null==i?void 0:i.totalmessages,messages:r.map((function(e){var r="";if(e.from){var i=Object(SN.parseOneAddress)(e.from);if(null!=t&&t.has(i.address)){var o=t.get(i.address);r=Mw(n,{givenName:null==o?void 0:o.firstName,familyName:null==o?void 0:o.lastName,emailAddress:i.address})||""}r||(r=i.name||i.address||"")}return{id:e.uid||"",from:r,read:!e.unread,subject:e.subject||"",time:Dw(new Date(e.date||Date.now()))}}))}}function PN(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function xN(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){PN(o,r,i,a,s,"next",e)}function s(e){PN(o,r,i,a,s,"throw",e)}a(void 0)}))}}var AN={guid:"folder:INBOX",sorttype:"Date",sortorder:"descending",searchtype:null,searchtext:null,requesttype:"index",responsetype:"hybrid",selected:1,count:6,rollbackslot:"0.0"},NN={responseType:"THREAD_DIGEST",maxResults:6,includeFolderStatus:!0,sessionHeaders:{condstore:1,folder:"INBOX",modseq:null,qresync:1,threadmode:1,threadmodseq:null}},RN="no service url or dsid available",DN=function(e){var t=e.webServices,n=e.dsid,r=e.contacts;return _S("fetchRecentMailThreads",xN(regeneratorRuntime.mark((function e(){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&t.mccgateway&&n){e.next=2;break}throw new Error(RN);case 2:return i=he.c(t.mccgateway+"/mailws2/v1/thread/search"),TE(i,n),e.next=6,JE({url:i,method:"POST",includeCredentials:!0,body:NN,contentType:"application/json",validate:{type:"WireRecentMailsThreadResponse",schema:wN}});case 6:return o=e.sent,e.abrupt("return",TN(o,r));case 8:case"end":return e.stop()}}),e)}))))},kN=function(e){var t=e.webServices,n=e.dsid,r=e.contacts;return _S("fetchRecentMailMessages",xN(regeneratorRuntime.mark((function e(){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&t.mail){e.next=2;break}throw new yE(RN);case 2:if(n){e.next=4;break}throw new Error(RN);case 4:return i=he.c(t.mail+"/wm/message"),TE(i,n),e.next=8,JE({url:i,method:"POST",includeCredentials:!0,body:{jsonrpc:"2.0",id:Date.now()+"/1",method:"list",params:AN},validate:{type:"WireRecentMailsMessageResponse",schema:EN}});case 8:return o=e.sent,e.abrupt("return",ON(o,r));case 10:case"end":return e.stop()}}),e)}))))};Nn.object({id:Nn.string(),name:Nn.string(),pGuid:Nn.string(),size:Nn.string(),type:Nn.string(),url:Nn.string()});var UN=Nn.tuple([Nn.number(),Nn.number(),Nn.number(),Nn.number(),Nn.number(),Nn.number(),Nn.number()]),LN=Nn.object({messageType:Nn.string().optional(),pGuid:Nn.string(),guid:Nn.string(),isLocationBased:Nn.boolean(),measurement:Nn.object({hours:Nn.number(),seconds:Nn.number(),weeks:Nn.number(),minutes:Nn.number(),days:Nn.number(),before:Nn.boolean()}),onDate:Nn.array(Nn.number()).optional(),structuredLocation:Nn.object({address:Nn.string(),title:Nn.string(),locationName:Nn.string(),latitute:Nn.string(),longtitude:Nn.string(),radius:Nn.string(),referenceFrame:Nn.string(),mapKitHandle:Nn.string()}).optional(),proximity:Nn.string().optional()}),MN=Nn.object({title:Nn.string(),guid:Nn.string(),color:Nn.string().optional()}),jN=Nn.object({title:Nn.string().optional(),tzname:Nn.string().optional(),duration:Nn.number().optional(),allDay:Nn.boolean(),pGuid:Nn.string(),localEndDate:UN,localStartDate:UN,guid:Nn.string(),startDate:UN,endDate:UN,icon:Nn.number()}),FN=Nn.object({Collection:Nn.array(MN),Alarm:Nn.array(LN).optional(),Event:Nn.array(jN).optional()});function BN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zN(e){var t;return{id:e.guid,title:e.title,color:null!=(t=e.color)?t:"#34aadc"}}function HN(e){var t=new Date(e[1],e[2]-1,e[3],e[4],e[5]),n=t.toLocaleTimeString(a(),{hour:"numeric",minute:"2-digit"});return{dateTime:t,formatted:n}}function WN(e){for(var t,n,r={},i=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return BN(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?BN(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(null!=(o=e.Collection)?o:[]);!(n=i()).done;){var o,a=n.value;r[a.guid]=zN(a)}var s=kw(new Date,!1);return{events:(null!=(t=e.Event)?t:[]).filter((function(e){return function(e,t){var n=String(e.startDate[0]),r=String(e.endDate[0]);return n===t||r===t||n<t&&r>t}(e,s)})).map((function(e){return function(e,t){var n,r=function(e,t,n,r){var i=void 0,o=void 0;return r||(String(e[0])===n&&(i=HN(e)),String(t[0])===n&&(o=HN(t))),{start:i,end:o}}(e.localStartDate,e.localEndDate,t,e.allDay);return{id:e.guid,title:null!=(n=e.title)?n:"",timezoneName:e.tzname,start:r.start,end:r.end,allDay:e.allDay,calendarId:e.pGuid,icon:e.icon}}(e,s)})).sort(VN),calendars:r}}function VN(e,t){var n,r,i,o,a,s,c,u;return(null!=(n=null!=(r=null==(i=e.start)?void 0:i.dateTime.getTime())?r:null==(o=e.end)?void 0:o.dateTime.getTime())?n:-1/0)-(null!=(a=null!=(s=null==(c=t.start)?void 0:c.dateTime.getTime())?s:null==(u=t.end)?void 0:u.dateTime.getTime())?a:-1/0)}function ZN(e,t){return iS(Object.assign({},t,{endpoint:vE.iWorksRecent,fetchProvider:function(t){return function(){return function(e){var t=e.webServices,n=e.dsid,r=e.iWorksApp;if(null==t||!t.docws||!n)throw new Error("no service url or dsid available");return SS({url:function(e,t,n){var r="pages"===n?"pages":"numbers"===n?"numbers":"keynote"===n?"key":void Aw(n),i=he.c(e+"/ws/_all_/list/enumerate/recentDocs");return TE(i,t),i.searchParams.append("limit","6"),i.searchParams.append("unified_format","true"),i.searchParams.append("extension",r),i.toString()}(t.docws,n,r),includeCredentials:!0,validate:{type:"WireRecentDriveDocumentsResponse",schema:gS}}).then((function(e){if(ES(e))throw new Error("failed to fetch recent docs");return e.documents})).then((function(e){return e.map((function(e){return oS(e)}))}))}(Object.assign({},t,{iWorksApp:e}))}},cacheKeys:[e]}))}function qN(){return YV.cloudOSApplication.meCardController.meCard?function(e){var t,n=null==(t=e.contacts)?void 0:t[0];if(!n)return{contactId:""};var r=n.photo;return r?{contactId:n.contactId,url:r.url,crop:{width:r.crop.width,height:r.crop.height,x:r.crop.x,y:r.crop.y},signature:r.signature}:{contactId:n.contactId}}(YV.cloudOSApplication.meCardController.meCard):{contactId:""}}function KN(){var e=r.useState((function(){return qN()})),t=e[0],n=e[1],i=r.useState((function(){return YV.cloudOSApplication.meCardController.isFetching()})),o=i[0],a=i[1];return r.useEffect((function(){var e=YV.cloudOSApplication.meCardController,t=function(){var e=qN();""!==e.contactId&&n(e)};e.addPhotoObserver(t);var r=function(e){a(e)};return e.addPhotoChangedObserver(r),function(){e.photoObservers.delete(t),e.photoChangedObservers.delete(r)}}),[]),{isLoading:o,data:t}}var GN=Nn.object({centralizedWebToken:Nn.string(),status:Nn.string()});function YN(){var e=he.c(SE+"/fetchCentralizedWebToken");return JE({url:e,includeCredentials:!0,validate:{type:"WireCentralizedWebToken",schema:GN}})}var QN,XN=Nn.object({success:Nn.boolean()});function JN(e){var t=he.c(SE+"/continueOnDevice");return JE({url:t,method:"POST",includeCredentials:!0,body:{feature:e},validate:{type:"WireContinueOnDevice",schema:XN}})}!function(e){e.PLAN_UPGRADE="iCloudPlanUpgrade",e.PRIVATE_RELAY="setupPrivateRelay",e.HOMEKIT_SECURE_VIDEO="homeKitSecureVideo",e.FAMILY_SHARING="iCloudPlusFamilySharing",e.STORAGE_MANAGE="iCloudStorageManage"}(QN||(QN={}));var $N,eR=Nn.object({organizer:Nn.string()}),tR=Nn.object({dsid:Nn.string(),firstName:Nn.string(),lastName:Nn.string(),fullName:Nn.string()}),nR=Nn.object({isMemberOfFamily:Nn.boolean(),family:eR.optional(),familyMembers:Nn.array(tR).optional()});function rR(){return iS({endpoint:vE.getFamilyDetails,fetchProvider:function(e){return function(){return function(e){var t=e.webServices,n=e.dsid;if(null==t||!t.account||!n)throw new Error("getFamilyDetials: no service url or dsid available");return JE({url:VE(t.account,n),includeCredentials:!0,validate:{type:"WireFamilyDetails",schema:nR}})}(e)}}})}function iR(){var e=rR(),t=e.data,n=e.isError,r=e.error;if(n)return Ls.Result.failure(r);if(!t)return Ls.Result.success(void 0);if(!t.isMemberOfFamily||!t.familyMembers||!t.family)return Ls.Result.failure(new Error("User not in a family"));var i=t.family.organizer,o=t.familyMembers.find((function(e){return e.dsid===i}));return o?Ls.Result.success(o):Ls.Result.failure(new Error("Cannot find family organizer"))}!function(e){e[e.None=0]="None",e[e.Organizer=1]="Organizer",e[e.OrganizerWithNoMember=2]="OrganizerWithNoMember",e[e.NonOrganizerMember=3]="NonOrganizerMember"}($N||($N={}));var oR=Nn.union([Nn.literal("cloud.storage"),Nn.literal("home.cameras"),Nn.literal("mail.custom-domains.transfer"),Nn.literal("mail.custom-domains.purchase"),Nn.literal("mail.hide-my-email.create"),Nn.literal("networking.privacy.attestation"),Nn.literal("networking.privacy.subscriber")]),aR=Nn.union([Nn.literal("GIB"),Nn.literal("TIB")]),sR=Nn.object({featureKey:oR,canUse:Nn.boolean(),limit:Nn.number().optional(),limitUnits:aR.optional(),cacheTill:Nn.string()}),cR=Nn.object({includedInPlan:Nn.boolean(),limit:Nn.number().optional(),limitUnits:aR.optional()}),uR=Nn.object({featureKey:oR,summary:cR,includedWithAccountPurchasedPlan:cR,includedWithAppleOnePlan:cR,includedWithSharedPlan:cR,includedWithCompedPlan:cR,includedWithManagedPlan:cR}),lR=Nn.array(sR),dR=Nn.union([Nn.literal("MONTHLY"),Nn.literal("YEARLY")]),pR=Nn.object({paidPlan:Nn.boolean(),priceForDisplay:Nn.string().optional(),renewalPeriod:dR.nullable()}),fR=function(e){var t=e.dsid;if(!t)throw new Error("listSubscriptionFeatures: no dsid available");return JE({url:zE(t),includeCredentials:!0,validate:{type:"WireSubscriptionFeatures",schema:lR}})};function hR(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function mR(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){hR(o,r,i,a,s,"next",e)}function s(e){hR(o,r,i,a,s,"throw",e)}a(void 0)}))}}function gR(){var e=iS({endpoint:vE.listSubscriptionFeatures,fetchProvider:function(e){return mR(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fR(e);case 2:return n=t.sent,t.abrupt("return",(r=n,Object.fromEntries(r.filter((function(e){return e.canUse})).map((function(e){return[e.featureKey,e]})))));case 4:case"end":return t.stop()}var r}),t)})))}}).data;if(!e||!e["home.cameras"])return 1;var t=e["home.cameras"].limit;return e["home.cameras"].limit?1===t||5===t?t:1:"unlimited"}n(869);var vR=function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.keynotePreviews,u=e.refetch,l=e.tileSize,d=e.shouldHidePrimaryAction,p=void 0!==d&&d,f=Cm({error:o,isLoading:a,isSuccess:s,data:c}),h=gc("VoiceOver.KeynoteHomeTile.PrimaryActionDescription"),m=qf(),g=gc("KeynoteHomeTile.TotalNumber.Description"),v=gc("HomeTile.Loading"),y=gc("KeynoteHomeTile.TotalNumber.Zero"),b=gc("HomeTile.NotLoaded"),_=function(){switch(f){case mm.SUCCESS_WITH_DATA:return g;case mm.SUCCESS_NO_DATA:return y;case mm.LOADING:return v;case mm.ERROR:return b}}();return r.createElement(tT,{tileIndex:i,appIcon:ed,appIconSrcSet:ed+", "+td+" 2x",appId:t,appUrl:n,className:"keynote-home-tile",description:_,heading:gc("KeynoteHomeTile.Heading"),isLoading:f===mm.LOADING,primaryActionDescription:h,primaryActionCallback:function(){zw(t)},shouldHidePrimaryAction:p,tileSize:l},r.createElement(JS,{error:o,accentBackgroundClassName:"accent-background",appId:t,createTextShort:gc("KeynoteHomeTileEmpty.Create.Short"),dataState:f,documentName:gc("VoiceOver.KeynoteHomeTile.Keynotes"),documentPreviews:c,refetch:u,primaryRowCallback:function(e){Hw(t,e,m)},primaryRowCallbackLabel:"VoiceOver.DocumentHomeRow.OpenDocument"}))},yR=function(e){var t,n,i,o=e.onError,a=e.onSuccess,s=e.tileSize,c=e.appId,u=e.appUrl,l=e.tileIndex,d=ZN("keynote",{onError:o,onSuccess:a}),p=d.data,f=d.error,h=d.isIdle,m=d.isLoading,g=d.isSuccess,v=d.refetch,y=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;return kS({error:f,retry:v}),r.createElement(vR,{tileIndex:l,appId:c,appUrl:u,error:f,isLoading:h||m,isSuccess:g,keynotePreviews:p,refetch:v,tileSize:s,shouldHidePrimaryAction:y})},bR=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"square.and.pencil",svgPath:"M110.059-73.8281L113.867-77.7832C115.82-79.8828 115.967-82.8125 114.014-84.8145L112.646-86.1816C110.889-87.9883 107.91-87.6465 105.957-85.6934L102.051-81.8848ZM52.7344-22.5586L63.0371-26.8066L106.543-70.3125L98.4863-78.3203L55.0293-34.7656L50.5859-24.8047C50.0488-23.4863 51.5137-22.0703 52.7344-22.5586ZM33.7891 10.791L90.3809 10.791C100.146 10.791 105.859 5.07812 105.859-5.61523L105.859-56.7871L94.9707-45.8984L94.9707-6.78711C94.9707-2.29492 92.627-0.0976562 89.4531-0.0976562L34.7168-0.0976562C30.4199-0.0976562 28.125-2.29492 28.125-6.78711L28.125-60.3027C28.125-64.7949 30.4199-66.9922 34.7168-66.9922L74.3164-66.9922L85.2051-77.832L33.7891-77.832C22.998-77.832 17.2363-72.168 17.2363-61.4258L17.2363-5.61523C17.2363 5.07812 22.998 10.791 33.7891 10.791Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:73.50924560546878,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 109.812744140625 104.26904296875",width:109.812744140625,height:104.26904296875,translateX:-5.594453124999973,translateY:87.364501953125,baseline:87.364501953125,capline:16.904541015625}}})},_R=(n(870),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"circle.fill",svgPath:"M59.1797 15.1855C86.7676 15.1855 109.619-7.61719 109.619-35.2539C109.619-62.8418 86.7676-85.6934 59.1309-85.6934C31.543-85.6934 8.74023-62.8418 8.74023-35.2539C8.74023-7.61719 31.5918 15.1855 59.1797 15.1855Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46508300781261,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 102.1480712890625 100.9267578125",width:102.1480712890625,height:100.9267578125,translateX:-7.470952148437391,translateY:85.693359375,baseline:85.693359375,capline:15.2333984375}}})}),CR=(n(871),function(e){var t=e.appId,n=e.email,i=e.hasFocus,o=n.from,a=n.id,s=n.read,c=n.subject,u=n.time,l=mc("VoiceOver.MailHomeRow.Unread"),d=mc("VoiceOver.MailHomeRow.Summary.AriaLabel",{unread:s?"":l+" ",from:o,subject:c,time:u}),p=mc("VoiceOver.MailHomeRow.OpenEmail",{from:o}),f=xs(),h=Tp("launch-for-open",t+"-tile")[0];return r.createElement(nT,{className:"mail-row",hasFocus:i,id:a,primaryRowCallback:function(){h(),f.launchApp(t,{options:{source:{reason:Cc.OPEN_DOCUMENT},launchItem:n}})},primaryRowCallbackLabel:p,summaryAriaLabelText:d},r.createElement("div",{className:"row-container"},!s&&r.createElement(r.Fragment,null,r.createElement(_R,{"aria-hidden":!0,className:"unread-indicator",height:10,width:10,layoutMode:"glyphBox"}),r.createElement(dT,null,r.createElement("div",null,l))),r.createElement("div",{className:"text"},r.createElement("div",{className:"first-line"},r.createElement("div",{className:"from-text"},o),r.createElement("div",{className:"time-text"},u)),r.createElement("div",{className:"second-line"},c))))}),IR=function(e){var t=e.emailPreviews,n=e.appId,i=mc("VoiceOver.MailHomeTile.Messages"),o=r.useState(-1),a=o[0],s=o[1],c=r.useContext(lm),u=c===cm.Large?6:3,l=Math.min(u,t.length);return r.createElement(r.Fragment,null,r.createElement(US,{ariaLabel:i,focusIndex:a,numRows:l,setFocusIndex:s},r.createElement(r.Fragment,null,r.createElement("tbody",{role:"rowgroup"},t.slice(0,Math.min(3,l)).map((function(e,t){return r.createElement(CR,{appId:n,key:e.id,email:e,hasFocus:a===t})}))),c===cm.Large&&r.createElement("tbody",{role:"rowgroup"},t.slice(3,l).map((function(e,t){return r.createElement(CR,{appId:n,key:e.id,email:e,hasFocus:a===t+3})}))))))},wR=function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.emailPreviews,u=e.refetch,l=e.tileSize,d=e.totalNumMessages,p=e.shouldHidePrimaryAction,f=void 0!==p&&p,h=Cm({error:o,isLoading:a,isSuccess:s,data:c}),m=gc("MailHomeTile.Heading"),g=gc("VoiceOver.MailHomeTile.PrimaryActionDescription"),v=yc({zero:"MailHomeTile.TotalNumber.Zero",one:"MailHomeTile.TotalNumber.One",two:"MailHomeTile.TotalNumber.Two",many:"MailHomeTile.TotalNumber.Many"},d||0),y=gc("MailHomeTile.TotalNumber.Zero"),b=gc("HomeTile.Loading"),_=gc("MailHomeTile.TotalNumber.Loading"),C=gc("HomeTile.NotLoaded"),I=gc("MailHomeTile.EmptyContent"),w=gc("MailHomeTile.SetUp"),E=gc("MailHomeTile.SetUpTitle"),S=gc("MailHomeTile.SetUpMessage"),T=function(){switch(h){case mm.SUCCESS_WITH_DATA:return void 0===d?_:v;case mm.SUCCESS_NO_DATA:return void 0===d?_:y;case mm.LOADING:return b;case mm.ERROR:return C}}(),O=Tp("load",t+"-tile",{measureFromBaseline:!0}),P=O[0],x=O[1],A=null;return h===mm.SUCCESS_WITH_DATA&&c?(P("with-data"),A=r.createElement(IR,{appId:t,emailPreviews:c})):h===mm.SUCCESS_NO_DATA?(P("no-data"),A=r.createElement(rT,null,I)):h===mm.LOADING?A=r.createElement(VS,{loadingLayout:DS.Rows}):null!==o&&o instanceof yE?(x("not-supported"),A=r.createElement("section",{className:"mail-setup"},r.createElement("p",{className:"mail-setup-title"},E),r.createElement("article",{className:"mail-setup-message"},S)),T=w):(x(),A=r.createElement(HS,{refetch:u})),r.createElement(tT,{tileIndex:i,appIcon:Ul,appIconSrcSet:Ul+", "+Ll+" 2x, "+Ml+" 3x",appId:t,appUrl:n,className:"mail-home-tile",customPrimaryActionIcon:r.createElement(bR,{height:19,width:19,layoutMode:"glyphBox"}),description:T,heading:m,isLoading:h===mm.LOADING,primaryActionDescription:g,shouldHidePrimaryAction:f,tileSize:l},A)};function ER(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=r.useState(1),i=n[1];return r.useEffect((function(){var n=function(){i((function(e){return e+1}))},r=t?lp(n,3e3):n,o=dA.sharedInstance;return e&&!o.tileDataObservers.has(e)&&dA.sharedInstance.tileDataObservers.set(e,r),function(){dA.sharedInstance.tileDataObservers.delete(e)}}),[e,t]),dA.sharedInstance.getCurrentAppDataState(e)}function SR(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=ER(e,n);r.useEffect((function(){i===iA.STALE&&t&&(t(),dA.sharedInstance.markDataStateAsFresh(e))}),[i,t,e])}var TR=function(e){var t,n,i,o=e.onError,a=e.onSuccess,s=e.tileSize,c=e.appId,u=e.appUrl,l=e.tileIndex,d=function(e,t){var n,r,i=qf();return(null==i?void 0:i.isThreadingAvailable)?(n=DN,r=vE.mailRecentThreads):(n=kN,r=vE.mailRecentMessages),iS(Object.assign({},t,{endpoint:r,dependencies:[e],fetchProvider:function(t){return function(){return n(Object.assign({},t,{contacts:e}))}}}))}(hc().contacts,{onError:o,onSuccess:function(e){return null==a?void 0:a(e.messages)}}),p=d.data,f=d.error,h=d.isIdle,m=d.isLoading,g=d.isSuccess,v=d.refetch;SR(Vu.identifier,v,!0);var y=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;return r.createElement(wR,{tileIndex:l,appId:c,appUrl:u,emailPreviews:null==p?void 0:p.messages,error:f,isLoading:h||m,isSuccess:g,refetch:v,tileSize:s,totalNumMessages:null==p?void 0:p.unseen,shouldHidePrimaryAction:y})},OR=(n(872),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.crop.circle",svgPath:"M59.1797 15.1855C86.7676 15.1855 109.619-7.61719 109.619-35.2539C109.619-62.8418 86.7676-85.6934 59.1309-85.6934C31.543-85.6934 8.74023-62.8418 8.74023-35.2539C8.74023-7.61719 31.5918 15.1855 59.1797 15.1855ZM59.1797-18.4082C45.2637-18.4082 34.5215-13.4766 29.3945-7.76367C22.7539-14.9414 18.7012-24.6094 18.7012-35.2539C18.7012-57.7148 36.6699-75.7324 59.1309-75.7324C81.5918-75.7324 99.6582-57.7148 99.707-35.2539C99.707-24.6094 95.6543-14.9414 89.0137-7.71484C83.8379-13.4766 73.0957-18.4082 59.1797-18.4082ZM59.1797-26.416C68.6523-26.3672 75.9766-34.4238 75.9766-44.9219C75.9766-54.7852 68.6035-62.9883 59.1797-62.9883C49.8047-62.9883 42.334-54.7852 42.3828-44.9219C42.4316-34.4238 49.7559-26.5137 59.1797-26.416Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46508300781261,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 102.1480712890625 100.9267578125",width:102.1480712890625,height:100.9267578125,translateX:-7.470952148437391,translateY:85.693359375,baseline:85.693359375,capline:15.2333984375}}})}),PR=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"lock.fill",svgPath:"M29.9805 10.9863L76.4648 10.9863C82.7637 10.9863 85.8398 7.86133 85.8398 1.02539L85.8398-34.8145C85.8398-40.9668 83.3008-44.1406 78.0762-44.6777L78.0762-56.9824C78.0762-75.3906 66.0156-84.2773 53.2227-84.2773C40.4297-84.2773 28.3691-75.3906 28.3691-56.9824L28.3691-44.4336C23.584-43.7012 20.6055-40.5762 20.6055-34.8145L20.6055 1.02539C20.6055 7.86133 23.6816 10.9863 29.9805 10.9863ZM36.2305-58.0078C36.2305-70.2637 44.0918-76.7578 53.2227-76.7578C62.3535-76.7578 70.2148-70.2637 70.2148-58.0078L70.2148-44.7266L36.2305-44.6777Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:80.78510009765614,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 65.239013671875 98.0947265625",width:65.239013671875,height:98.0947265625,translateX:-20.60546386718761,translateY:84.27734375,baseline:84.27734375,capline:13.8173828125}}})},xR=(n(873),function(e){var t=e.note,n=e.hasFocus,i=e.appId,o=t.id,a=t.isShared,s=t.snippet,c=t.title,u=t.time,l=t.isLocked,d=mc("VoiceOver.NotesHomeRow.Shared"),p=mc("VoiceOver.NotesHomeRow.Summary.AriaLabel",{isShared:a?d+" ":"",title:c,snippet:s,time:u}),f=mc("VoiceOver.NotesHomeRow.OpenNote",{title:c}),h=xs(),m=Tp("launch-for-open",i+"-tile")[0];return r.createElement(nT,{className:"notes-row",hasFocus:n,id:o,primaryRowCallback:function(){m(),h.launchApp(i,{options:{source:{reason:Cc.OPEN_DOCUMENT},launchItem:t}})},primaryRowCallbackLabel:f,summaryAriaLabelText:p},r.createElement("div",{className:"row-container"},a&&r.createElement(r.Fragment,null,r.createElement(OR,{className:"shared-indicator",height:15,width:15,layoutMode:"glyphBox"}),r.createElement(dT,null,r.createElement("div",null,d))),r.createElement("div",{className:"text"},r.createElement("div",{className:"first-line"},c),r.createElement("div",{className:"second-line"},r.createElement("span",{className:"time-text"},u),r.createElement("span",{className:"snippet-text"},s),l?r.createElement(PR,{className:"locked-indicator",height:15,width:15,"aria-hidden":"true",layoutMode:"glyphBox"}):null))))}),AR=function(e){var t=e.notePreviews,n=e.appId,i=mc("VoiceOver.NotesHomeTile.Notes"),o=r.useState(-1),a=o[0],s=o[1],c=r.useContext(lm),u=c===cm.Large?6:3,l=Math.min(u,t.length);return r.createElement(r.Fragment,null,r.createElement(US,{ariaLabel:i,focusIndex:a,numRows:l,setFocusIndex:s},r.createElement(r.Fragment,null,r.createElement("tbody",{role:"rowgroup"},t.slice(0,Math.min(3,l)).map((function(e,t){return r.createElement(xR,{appId:n,key:e.id,note:e,hasFocus:a===t})}))),c===cm.Large&&r.createElement("tbody",{role:"rowgroup"},t.slice(3,l).map((function(e,t){return r.createElement(xR,{appId:n,key:e.id,note:e,hasFocus:a===t+3})}))))))},NR=(n(874),function(e){return r.createElement(FS,{accentBackgroundClassName:"notes-home-tile-accent",appId:e.appId,labelShort:mc("NotesHomeTileEmpty.Create.Short")})}),RR=function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.notePreviews,u=e.refetch,l=e.tileSize,d=e.shouldHidePrimaryAction,p=void 0!==d&&d,f=Cm({error:o,isLoading:a,isSuccess:s,data:c}),h=gc("NotesHomeTile.Heading"),m=gc("VoiceOver.NotesHomeTile.PrimaryActionDescription"),g=gc("NotesHomeTile.TotalNumber.Description"),v=gc("HomeTile.Loading"),y=gc("HomeTile.NotLoaded"),b=function(){switch(f){case mm.SUCCESS_WITH_DATA:case mm.SUCCESS_NO_DATA:return g;case mm.LOADING:return v;case mm.ERROR:return y}}(),_=Tp("load",t+"-tile",{measureFromBaseline:!0}),C=_[0],I=_[1],w=null;return f===mm.SUCCESS_WITH_DATA&&c?(C("with-data"),w=r.createElement(AR,{notePreviews:c,appId:t})):f===mm.SUCCESS_NO_DATA?(C("no-data"),w=r.createElement(NR,{appId:t})):f===mm.LOADING?w=r.createElement(VS,{loadingLayout:DS.Rows}):(I(),w=r.createElement(HS,{refetch:u})),r.createElement(tT,{tileIndex:i,appIcon:r.createElement(El,{src:Vl,srcSet:Vl+", "+Zl+" 2x",size:40}),appIconSrcSet:Vl+", "+Zl+" 2x",appId:t,appUrl:n,className:"notes-home-tile",description:b,heading:h,isLoading:f===mm.LOADING,primaryActionDescription:m,shouldHidePrimaryAction:p,tileSize:l},w)},DR=function(e){var t,n,i,o,a=e.onError,s=e.onSuccess,c=e.tileSize,u=e.appId,l=e.appUrl,d=e.tileIndex,p=(o={onError:a,onSuccess:s},iS(Object.assign({},o,{endpoint:vE.notesRecent,fetchProvider:function(e){return function(){return _N(e)}}}))),f=p.data,h=p.error,m=p.isIdle,g=p.isLoading,v=p.isSuccess,y=p.refetch;SR(Xu.identifier,y,!0);var b=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;return r.createElement(RR,{tileIndex:d,appId:u,appUrl:l,error:h,isLoading:m||g,isSuccess:v,notePreviews:f,refetch:y,tileSize:c,shouldHidePrimaryAction:b})},kR=(n(875),function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.numbersPreviews,u=e.refetch,l=e.tileSize,d=e.shouldHidePrimaryAction,p=void 0!==d&&d,f=Cm({error:o,isLoading:a,isSuccess:s,data:c}),h=gc("VoiceOver.NumbersHomeTile.PrimaryActionDescription"),m=gc("NumbersHomeTile.TotalNumber.Description"),g=gc("HomeTile.Loading"),v=gc("HomeTile.NotLoaded"),y=gc("NumbersHomeTile.TotalNumber.Zero"),b=function(){switch(f){case mm.SUCCESS_WITH_DATA:return m;case mm.SUCCESS_NO_DATA:return y;case mm.LOADING:return g;case mm.ERROR:return v}}(),_=qf();return r.createElement(tT,{tileIndex:i,appIcon:Jl,appIconSrcSet:Jl+", "+$l+" 2x",appId:t,appUrl:n,className:"numbers-home-tile",description:b,heading:gc("NumbersHomeTile.Heading"),isLoading:f===mm.LOADING,primaryActionDescription:h,primaryActionCallback:function(){zw(t)},shouldHidePrimaryAction:p,tileSize:l},r.createElement(JS,{error:o,accentBackgroundClassName:"accent-background",appId:t,createTextShort:gc("NumbersHomeTileEmpty.Create.Short"),dataState:f,documentName:gc("VoiceOver.NumbersHomeTile.Spreadsheets"),documentPreviews:c,refetch:u,primaryRowCallback:function(e){Hw(t,e,_)},primaryRowCallbackLabel:"VoiceOver.DocumentHomeRow.OpenDocument"}))}),UR=function(e){var t,n,i,o=e.onError,a=e.onSuccess,s=e.tileSize,c=e.appId,u=e.appUrl,l=e.tileIndex,d=ZN("numbers",{onError:o,onSuccess:a}),p=d.data,f=d.error,h=d.isIdle,m=d.isLoading,g=d.isSuccess,v=d.refetch,y=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;return kS({error:f,retry:v}),r.createElement(kR,{tileIndex:l,appId:c,appUrl:u,error:f,isLoading:h||m,isSuccess:g,numbersPreviews:p,refetch:v,tileSize:s,shouldHidePrimaryAction:y})},LR=(n(876),function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.pagesPreviews,u=e.refetch,l=e.tileSize,d=e.shouldHidePrimaryAction,p=void 0!==d&&d,f=Cm({error:o,isLoading:a,isSuccess:s,data:c}),h=gc("VoiceOver.PagesHomeTile.PrimaryActionDescription"),m=gc("PagesHomeTile.TotalNumber.Description"),g=gc("HomeTile.Loading"),v=gc("HomeTile.NotLoaded"),y=gc("PagesHomeTile.TotalNumber.Zero"),b=function(){switch(f){case mm.SUCCESS_WITH_DATA:return m;case mm.SUCCESS_NO_DATA:return y;case mm.LOADING:return g;case mm.ERROR:return v}}(),_=qf();return r.createElement(tT,{tileIndex:i,appIcon:Ql,appIconSrcSet:Ql+", "+Xl+" 2x",appId:t,appUrl:n,className:"pages-home-tile",description:b,heading:gc("PagesHomeTile.Heading"),isLoading:f===mm.LOADING,primaryActionDescription:h,primaryActionCallback:function(){zw(t)},shouldHidePrimaryAction:p,tileSize:l},r.createElement(JS,{error:o,accentBackgroundClassName:"accent-background",appId:t,createTextShort:gc("PagesHomeTileEmpty.Create.Short"),dataState:f,documentName:gc("VoiceOver.PagesHomeTile.Documents"),documentPreviews:c,refetch:u,primaryRowCallback:function(e){Hw(t,e,_)},primaryRowCallbackLabel:"VoiceOver.DocumentHomeRow.OpenDocument"}))}),MR=function(e){var t,n,i,o=e.onError,a=e.onSuccess,s=e.tileSize,c=e.appId,u=e.appUrl,l=e.tileIndex,d=ZN("pages",{onSuccess:a,onError:o}),p=d.data,f=d.error,h=d.isIdle,m=d.isLoading,g=d.isSuccess,v=d.refetch,y=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;return kS({error:f,retry:v}),r.createElement(LR,{tileIndex:l,appId:c,appUrl:u,error:f,isLoading:h||m,isSuccess:g,pagesPreviews:p,refetch:v,tileSize:s,shouldHidePrimaryAction:y})},jR=(n(877),function(e){var t=yl()||[],n=xm().isInCustomizationMode,i=mc("AppLibraryHomeTile.Heading"),o=Ts()("app-library",{"edit-mode":n,large:e.tileSize===cm.Large},e.className);return r.createElement("div",{className:Ts()("tile-container",{customize:n})},r.createElement("article",{className:o,"aria-label":i,draggable:n},r.createElement("div",{className:"header"},n?r.createElement(r.Fragment,null,r.createElement("div",{className:"title"},r.createElement(fd,{"aria-hidden":!0,width:30,height:20,layoutMode:"glyphBox",fill:"#86868B"}),r.createElement("span",null,i)),r.createElement(nh,{applicationIdentifier:"appLibrary",heading:i,index:e.tileIndex})):null),r.createElement("div",{className:"app-icon-container","aria-hidden":n},null==t?void 0:t.map((function(t){var i=t.applicationIdentifier,o=t.displayName;return r.createElement(Td,{disabled:n,iconSize:e.tileSize===cm.Large?70:n?45:54,applicationIdentifier:i,key:i,appDisplayName:o,showDisplayName:!n})}))),r.createElement("div",{className:"tile-border"}),r.createElement(hm,{heading:i,tileIndex:e.tileIndex})))}),FR=["styles"];function BR(){return(BR=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var zR,HR=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,FR);return i.a.createElement("svg",BR({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 185 196"},t),i.a.createElement("defs",null,i.a.createElement("path",{id:"f94b451435b3a97a03f35aa6ed7b79c0b",d:"M0 0h185v196H0z"}),i.a.createElement("path",{d:"M133.685 175C162.38 175 185 153.618 185 127.246c0-19.838-11.668-36.944-29.884-45.021C154.997 40.173 124.636 10 85.823 10c-25.36 0-43.575 13.305-55.243 29.341-23.336-6.058-48.457 11.285-49.172 37.776C-40.022 80.917-53 100.28-53 123.327c0 27.796 24.526 51.554 57.149 51.554l129.536.119z",id:"f94b451435b3a97a03f35aa6ed7b79c0e"}),i.a.createElement("linearGradient",{x1:"19.823%",y1:"45.17%",x2:"-1.128%",y2:"45.17%",id:"f94b451435b3a97a03f35aa6ed7b79c0a"},i.a.createElement("stop",{stopColor:"#FFF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#FFF",stopOpacity:"0",offset:"100%"})),i.a.createElement("filter",{x:"-4.6%",y:"-6.7%",width:"109.2%",height:"113.3%",filterUnits:"objectBoundingBox",id:"f94b451435b3a97a03f35aa6ed7b79c0d"},i.a.createElement("feGaussianBlur",{stdDeviation:"6.5",in:"SourceAlpha",result:"shadowBlurInner1"}),i.a.createElement("feOffset",{dy:"9",in:"shadowBlurInner1",result:"shadowOffsetInner1"}),i.a.createElement("feComposite",{in:"shadowOffsetInner1",in2:"SourceAlpha",operator:"arithmetic",k2:"-1",k3:"1",result:"shadowInnerInner1"}),i.a.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.133002328 0",in:"shadowInnerInner1"}))),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("mask",{id:"f94b451435b3a97a03f35aa6ed7b79c0c",fill:"url(#f94b451435b3a97a03f35aa6ed7b79c0a)"},i.a.createElement("use",{xlinkHref:"#f94b451435b3a97a03f35aa6ed7b79c0b"})),i.a.createElement("g",{fillRule:"nonzero",mask:"url(#f94b451435b3a97a03f35aa6ed7b79c0c)",fill:"#000"},i.a.createElement("use",{filter:"url(#f94b451435b3a97a03f35aa6ed7b79c0d)",xlinkHref:"#f94b451435b3a97a03f35aa6ed7b79c0e"}))))},WR=function(e){var t=xm().isInCustomizationMode;return r.createElement(lm.Provider,{value:e.tileSize},r.createElement("div",{className:"tile-container"},r.createElement("div",{className:Ts()(e.className,"tile",e.tileSize,{customize:t})},e.children)))},VR=(n(878),n(879),i.a.forwardRef((function(e,t){var n=e.id,o=e.variant,a=e.className,s=e.style,c=e.alt,u=e.crop,l=e.src,d=e.srcSet,p=e.sizes,f=e.loadingTimeout,h=e.onLoad,m=e.onLoadFailure,g=e.crossOrigin,v=e.decoding,y=e.ariaHidden,b=Object(r.useState)("don't know yet"),_=b[0],C=b[1],I=Object(r.useRef)(null);function w(){"loaded"!==_&&(C("loaded"),O.current&&(window.clearTimeout(O.current),O.current=null),h&&h())}Object(r.useLayoutEffect)((function(){(l||d)&&I.current&&(I.current.complete?I.current.naturalHeight?E.current():T.current():C("loading"))}),[l,d]);var E=Object(r.useRef)(w);function S(){"error"!==_&&(C("error"),P.current&&P.current(zR.Error),O.current&&(window.clearTimeout(O.current),O.current=null))}E.current=w;var T=Object(r.useRef)(S);T.current=S;var O=Object(r.useRef)(null),P=Object(r.useRef)(m);P.current=m;var x=Object(r.useRef)(f);Object(r.useEffect)((function(){if("loading"===_&&!O.current)return O.current=setTimeout((function(){"loading"===_&&(C("error"),P.current&&P.current(zR.Timeout)),O.current=null}),x.current||1e4),function(){O.current&&(window.clearTimeout(O.current),O.current=null)}}),[_]);var A=Object(r.useRef)(null),N=Object(r.useMemo)((function(){return A.current&&"loaded"===_&&u?{transformOrigin:"left top",transform:"scale("+A.current.offsetWidth/u.width+") translate("+-1*u.left+"px, "+-1*u.top+"px)",pointerEvents:"none"}:{pointerEvents:"none"}}),[u,_]),R=Object(r.useRef)(!1);Object(r.useLayoutEffect)((function(){R.current?(O.current&&(window.clearTimeout(O.current),O.current=null),C("don't know yet")):R.current=!0}),[l,d]);var D="loading"===_?"is-loading":"loaded"===_?"is-loaded":"error"===_?"load-failed":void 0;return i.a.createElement("ui-image",{id:n,style:s,"aria-hidden":!!y||void 0,class:Ts()(a,o||"standard",D),ref:Object(zp.a)(t,A),dir:"ltr"},i.a.createElement("img",{ref:I,alt:c,src:l,srcSet:d,sizes:p,crossOrigin:g,decoding:v,draggable:!1,style:N,onLoad:w,onError:S}))})));VR.displayName="UIImage",function(e){e.Error="ERROR",e.Timeout="TIMEOUT"}(zR||(zR={}));var ZR=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.crop.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449-18.6523C43.8477-18.6523 32.5684-13.3789 27.5879-7.51953C21.0449-14.8926 17.0898-24.5605 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-24.5605 96.0938-14.8438 89.502-7.51953C84.5703-13.3789 73.2422-18.6523 58.5449-18.6523ZM58.5449-26.9531C67.9688-26.8555 75.293-34.8633 75.293-45.3613C75.293-55.2246 67.9199-63.3789 58.5449-63.3789C49.1699-63.3789 41.748-55.2246 41.7969-45.3613C41.8457-34.8633 49.1699-27.0508 58.5449-26.9531Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},qR=function(e){var t,n=e.profilePhoto,i=e.isProfilePhotoLoading,o=e.size,a=void 0===o?120:o,s=e.onPhotoReady,c=e.imageAlt,u=e.showPlaceholderOnError,l=void 0!==u&&u,d=c||gc("Avatar.ImageAlt"),p=function(e){var t=r.useState(void 0),n=t[0],i=t[1];return r.useEffect((function(){if(e){var t=function(){i({width:n.width,height:n.height})},n=new Image;return n.addEventListener("load",t),n.src=e,function(){n.removeEventListener("load",t)}}i(void 0)}),[e]),n}(null!=(t=null==n?void 0:n.url)?t:""),f=r.useState(!1),h=f[0],m=f[1],g=r.useRef(null==n?void 0:n.url),v=gc("AccountTilePopover.Button.Text"),y=!n||!n.url||!n.crop,b=y||l;r.useEffect((function(){(null==n?void 0:n.url)!==g.current&&(g.current=null==n?void 0:n.url,m(!1))}),[null==n?void 0:n.url]),r.useEffect((function(){i||n&&null!=n&&n.url||null==s||s()}),[i,n,s]);var _=r.useRef(null),C=mf(Object.assign({},hf,{anchorMargin:-10,sidePreference:[gf.below]})),I=Gp(r.createElement(Bf,{style:{padding:"10px",width:"275px",height:"60px",display:"flex",justifyContent:"center",alignItems:"center"},arrowAsset:r.createElement(r.Fragment,null),cornerArrowAsset:r.createElement(r.Fragment,null),positioner:C,anchorRef:_},r.createElement("div",null,v)))[0],w=null!=n&&n.crop&&p?Uw(n.crop,p):void 0;return r.createElement("div",{className:Ts()("static-avatar",i?"static-avatar-loading":void 0,b?"image-placeholder":void 0),style:{width:a,height:a}},!i&&r.createElement("div",{className:Ts()("profile-image-container",b?"image-placeholder":void 0)},y?r.createElement(ZR,{width:a,height:a,layoutMode:"glyphBox",className:"icon"}):w&&!h?r.createElement(VR,{style:{width:a,height:a},src:null==n?void 0:n.url,crop:w,alt:d,onLoadFailure:function(){m(!0),null==s||s()},onLoad:s}):null,h&&(l?r.createElement(ZR,{width:a,height:a,layoutMode:"glyphBox",className:"icon"}):r.createElement(Wc,{ref:_,className:"static-avatar-error",onActivate:I},r.createElement(zS,{height:35,width:24,layoutMode:"glyphBox"})))))},KR=(n(880),function(e){var t,n,i,o,a,s=KN(),c=s.isLoading,u=s.data,l=qf();return r.createElement(GR,{user:{givenName:null==l||null==(t=l.details)?void 0:t.firstName,familyName:null==l||null==(n=l.details)?void 0:n.lastName,primaryEmail:(null==l?void 0:l.primaryEmail)||void 0},profilePhoto:u,isProfilePhotoLoading:c,onPhotoReady:e.onPhotoReady,disabled:null!=(i=null==l||null==(o=l.details)||null==(a=o.beneficiaryInfo)?void 0:a.isBeneficiary)&&i})}),GR=function(e){var t,n,i,o=e.user,a=e.profilePhoto,s=e.isProfilePhotoLoading,c=e.disabled,u=void 0!==c&&c,l=mc("VoiceOver.ProfileCard.Heading"),d=null!=(t=null==o?void 0:o.primaryEmail)?t:"",p=Fw(null!=(n=null==o?void 0:o.givenName)?n:"",null!=(i=null==o?void 0:o.familyName)?i:""),f=mc("HomeTile.Loading"),h=mc("VoiceOver.ProfileCard.SettingsLink"),m=xm().isInCustomizationMode,g=mc("NavLinks.Settings"),v=Us().setAriaLiveText,y=mc("VoiceOver.NavLinks.OpeningPage",{name:g}),b=Yf(),_=b===zf.Lite?gc("ProfileCard.PlanType.WebOnly"):b===zf.Standard?gc("ProfileCard.PlanType.Standard"):b===zf.Plus?gc("ProfileCard.PlanType.Plus"):void Aw(b),C=eZ.settings,I=function(e){e.preventDefault(),e.stopPropagation(),m||(v(y),sZ(C,g))};return r.createElement(WR,{tileSize:cm.Small,className:Ts()("profile-card",{disabled:u})},r.createElement(pT,{ariaLevel:2,text:l}),r.createElement(dT,null,r.createElement("div",null,gc("Avatar.ImageAlt")),r.createElement("div",null,p),r.createElement("div",null,d),r.createElement("div",null,_)),r.createElement("div",{"aria-label":h,"aria-disabled":m||u,"aria-hidden":m||u,tabIndex:m?-1:0,className:Ts()("profile-card-link","unstyled-link",{"edit-mode":m}),onClick:u?function(){}:I,onKeyDown:u?function(){}:function(e){" "!==e.key&&"Return"!==e.key||I(e)},role:"link"},r.createElement("div",{className:"profile-avatar","aria-hidden":"true"},r.createElement(HR,{"aria-hidden":"true",className:"profile-background"}),r.createElement(qR,{profilePhoto:a,isProfilePhotoLoading:s,size:114,onPhotoReady:e.onPhotoReady})),r.createElement("div",{className:"user-info","aria-hidden":"true"},r.createElement("div",{className:"user-name"},p),r.createElement("div",{className:"email"},d)),s?r.createElement(r.Fragment,null,r.createElement("div",{className:"plan-name-loading","aria-hidden":"true"},r.createElement("span",null,f),r.createElement("div",{className:"ellipsis"},r.createElement("div",{className:"dots"})))):r.createElement("div",{className:"plan-name","aria-hidden":"true"},_)))};function YR(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return!!e.match(/chrome/)}n(881),n(882),n(883);var QR=function(e){var t=e.appId,n=e.photoPreviews,i=r.useRef(0);function o(){i.current++,i.current===n.length&&(null==e.onPhotosLoaded||e.onPhotosLoaded())}function a(){o()}function s(){o()}var c,u,l=xs(),d=Tp("launch-for-open",t+"-tile")[0],p=xm().isInCustomizationMode,f=r.useContext(lm);f===cm.Small?(c=2,u=3):(c=4,u=7);var h=function(e,t){e.preventDefault(),e.stopPropagation(),d(),l.launchApp("photos",{options:{source:{reason:Cc.OPEN_DOCUMENT},launchItem:t}})},m=function(e){"Enter"===e.key&&l.launchApp("photos")},g=Ts()("photos-grid",{"edit-mode":p,"small-grid":f===cm.Small,"large-grid":f===cm.Large}),v=(f===cm.Large?8:4)-n.length;return r.createElement("div",{className:g},n.map((function(e,t){return r.createElement(XR,{endStartRoundIndex:t===c,endEndRoundIndex:t===u,key:e.id,photo:e,onLoad:a,onError:s,onClick:h,onKeyDown:m})})),Array.from(Array(v),(function(e,t){return r.createElement("div",{key:t,className:"empty-thumbnail"})})))};function XR(e){var t=e.photo,n=t.dateCreatedTimestamp,i=r.useMemo((function(){return function(e){var t=a(),n=new Date(e),r=n.toLocaleDateString(t,{month:"long",year:"numeric",day:"numeric",timeZone:"UTC"}),i=n.toLocaleTimeString(t,{hour:"numeric",minute:"2-digit",timeZone:"UTC"});return gc("DateTime.Relative.DateTime",{date:r,time:i})}(n)}),[n]),o=gc("Photo.Created",{date:i}),s=gc("VoiceOver.PhotosHomeTile.OpenPhoto",{date:i});return xm().isInCustomizationMode?r.createElement("div",{className:"photo-container",key:t.id},r.createElement("img",{src:t.url,alt:o,onLoad:e.onLoad})):r.createElement("button",{key:t.id,className:Ts()("photo-container",{"end-start-round":e.endStartRoundIndex,"end-end-round":e.endEndRoundIndex}),onClick:function(n){return e.onClick(n,t)},onKeyDown:e.onKeyDown,"aria-label":s},r.createElement("img",{src:t.url,alt:o,onLoad:e.onLoad,onError:e.onError}))}n(884);var JR=["children","className"];function $R(){return($R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var eD=function(e){var t=e.children,n=e.className,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,JR);return r.createElement("div",$R({className:Ts()("fill-layer",n)},i),t)},tD=function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.photoPreviews,u=e.numPhotos,l=e.numVideos,d=e.refetch,p=e.tileSize,f=e.onPhotosLoaded,h=Cm({error:o,isLoading:a,isSuccess:s,data:c}),m=gc("PhotosHomeTile.Heading"),g=gc("PhotosHomeTile.Description",{photoCount:yc({zero:"PhotosHomeTile.TotalNumber.Photo.Zero",one:"PhotosHomeTile.TotalNumber.Photo.One",two:"PhotosHomeTile.TotalNumber.Photo.Two",many:"PhotosHomeTile.TotalNumber.Photo.Many"},u||0),videoCount:yc({zero:"PhotosHomeTile.TotalNumber.Video.Zero",one:"PhotosHomeTile.TotalNumber.Video.One",two:"PhotosHomeTile.TotalNumber.Video.Two",many:"PhotosHomeTile.TotalNumber.Video.Many"},l||0)}),v=g,y=gc("HomeTile.Loading"),b=gc("PhotosHomeTile.TotalNumber.Loading"),_=gc("HomeTile.NotLoaded"),C=gc("PhotosHomeTile.EmptyContent"),I=gc("PhotosHomeTile.SetUp"),w=gc("PhotosHomeTile.SetUpTitle"),E=gc("PhotosHomeTile.SetUpMessage"),S=function(){switch(h){case mm.SUCCESS_WITH_DATA:return void 0===u||void 0===l?b:g;case mm.SUCCESS_NO_DATA:return v;case mm.LOADING:return y;case mm.ERROR:return _}}(),T=Tp("load",t+"-tile",{measureFromBaseline:!0}),O=T[0],P=T[1],x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"with-data";O(e),null==f||f()},A=null;return h===mm.SUCCESS_WITH_DATA&&c?A=r.createElement(nD,{appId:t,photoPreviews:c,onPhotosLoaded:x}):h===mm.SUCCESS_NO_DATA?(x("no-data"),A=r.createElement(r.Fragment,null,r.createElement(eD,{"aria-hidden":!0},r.createElement(KS,null)),r.createElement(eD,null,r.createElement(rT,null,C)))):h===mm.LOADING?A=r.createElement(VS,{loadingLayout:DS.Checkers}):(null!==o&&o instanceof yE?(P("not-supported"),A=r.createElement("section",{className:"photos-setup"},r.createElement("p",{className:"photos-setup-title"},w),r.createElement("article",{className:"photos-setup-message"},E)),S=I):(P(),A=r.createElement(HS,{refetch:d})),null==f||f()),r.createElement(tT,{tileIndex:i,appIcon:r.createElement(El,{src:zl,srcSet:zl+", "+Hl+" 2x",size:40}),appIconSrcSet:zl+", "+Hl+" 2x",appId:t,appUrl:n,className:"photos-home-tile",heading:m,isLoading:h===mm.LOADING,description:S,tileSize:p},r.createElement(r.Fragment,null,A))};function nD(e){var t=e.appId,n=e.photoPreviews,i=e.onPhotosLoaded,o=r.useContext(lm)===cm.Large?8:4,a=n?Math.min(o,n.length):0;return r.createElement(QR,{appId:t,photoPreviews:n.slice(n.length-a),onPhotosLoaded:i})}var rD,iD=function(e){var t=e.onError,n=e.onSuccess,i=e.tileSize,o=e.appId,a=e.appUrl,s=e.tileIndex,c=function(e){var t=iN().data;return iS(Object.assign({},e,{endpoint:vE.photosRecent,fetchProvider:function(e){return function(){return rN(e,null==t?void 0:t[0])}},dependencies:[t]}))}({onError:t}),u=c.data,l=c.error,d=c.isIdle,p=c.isLoading,f=c.isSuccess,h=c.refetch,m=oN().data;return SR(il.identifier,h),r.createElement(tD,{tileIndex:s,appId:o,appUrl:a,error:l,isLoading:d||p,isSuccess:f,photoPreviews:u,numPhotos:null==m?void 0:m.numPhotos,numVideos:null==m?void 0:m.numVideos,refetch:h,tileSize:i,onPhotosLoaded:function(){null==n||n(u||[])}})};n(885),function(e){e[e.ACCEPTED=8]="ACCEPTED",e[e.TENTITIVE=9]="TENTITIVE",e[e.NEEDS_ACTION=12]="NEEDS_ACTION",e[e.DECLINED=13]="DECLINED"}(rD||(rD={}));var oD=function(e){var t=e.appId,n=e.collectionTitle,i=e.collectionColor,o=e.event,a=e.hasFocus,s=mc("VoiceOver.CalendarHomeRow.OpenCalendarEvent",{title:o.title}),c=mc("VoiceOver.CalendarHomeRow.Summary.AriaLabel",{calendar:n,title:o.title,time:u(o.start,o.end)});function u(e,t){return e||t?!e&&t?gc("CalendarHomeRow.Time.EndsAt",{time:t.formatted}):e&&!t?e.formatted:e.formatted+" - "+t.formatted:gc("CalendarHomeRow.Time.AllDay")}var l=xs(),d=Tp("launch-for-open",t+"-tile")[0],p=function(){switch(o.icon){case rD.TENTITIVE:case rD.NEEDS_ACTION:return!1;default:return!0}}(),f=function(){switch(o.icon){case rD.TENTITIVE:return gc("CalendarHomeRow.Event.Maybe");default:return""}}(),h=function(){switch(o.icon){case rD.NEEDS_ACTION:return!0;default:return!1}}();return r.createElement(nT,{className:"calendar-row",hasFocus:a,id:o.id,primaryRowCallback:function(){d(),l.launchApp(t,{options:{source:{reason:Cc.OPEN_DOCUMENT},launchItem:o}})},primaryRowCallbackLabel:s,summaryAriaLabelText:c},r.createElement("div",{className:"row-container"},r.createElement("div",{className:"color-bar",style:p?{backgroundColor:i}:{border:"1px solid "+i}}),r.createElement("div",{className:"text"},r.createElement("div",{className:"title-holder"},h&&r.createElement("div",{className:"action-needed-indicator"}),r.createElement("div",{className:"title"},o.title)),r.createElement("div",{className:"time"},r.createElement("div",null,u(o.start,o.end)),r.createElement("div",null,f)))))};function aD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(886);var sD=function(e){var t,n=e.appId,i=e.appUrl,o=e.tileIndex,s=e.data,c=e.error,u=e.isLoading,l=e.isSuccess,d=e.refetch,p=e.tileSize,f=e.shouldHidePrimaryAction,h=void 0!==f&&f,m=Cm({error:c,isLoading:u,isSuccess:l,data:null==s?void 0:s.events}),g=gc("CalendarHomeTile.Heading"),v=gc("VoiceOver.CalendarHomeTile.PrimaryActionDescription"),y=new Date,b=(null!=(t=null==s?void 0:s.events)?t:[]).filter((function(e){return function(e,t){return e.start?e.start.dateTime.getTime()+3e5>=t.getTime():!e.end||e.end.dateTime.getTime()+3e5>=t.getTime()}(e,y)})),_=a(),C=y.toLocaleDateString(_,{month:"long",day:"numeric",weekday:"long"}),I=yc({zero:"CalendarHomeTile.TotalNumber.Zero",one:"CalendarHomeTile.TotalNumber.One",two:"CalendarHomeTile.TotalNumber.Two",many:"CalendarHomeTile.TotalNumber.Many"},b.length),w=gc("CalendarHomeTile.TotalNumber.Zero"),E=gc("HomeTile.Loading"),S=gc("CalendarHomeTile.TotalNumber.Loading"),T=gc("HomeTile.NotLoaded"),O=gc("CalendarHomeTile.EmptyContent.NoMoreEvents"),P=r.useState(-1),x=P[0],A=P[1],N=function(e,t){for(var n,r=1/0,i=t.getTime(),o=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return aD(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aD(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(n=o()).done;){var a=n.value;if(a.start){var s=a.start.dateTime.getTime();s>i&&s<r&&(r=s)}if(a.end){var c=a.end.dateTime.getTime();c>i&&c<r&&(r=c)}}return r===1/0?null:r-i+1}(b,y),R=function(){switch(m){case mm.SUCCESS_WITH_DATA:return void 0===b.length?S:I;case mm.SUCCESS_NO_DATA:return void 0===b.length?S:w;case mm.LOADING:return E;case mm.ERROR:return T}}();vm(N?N+3e5:null);var D,k=Tp("load",n+"-tile",{measureFromBaseline:!0}),U=k[0],L=k[1],M=null;return m===mm.SUCCESS_WITH_DATA&&b.length>0?(U("with-data"),M=r.createElement(cD,{appId:n,calendars:null!=(D=null==s?void 0:s.calendars)?D:{},events:b,focusIndex:x,setFocusIndex:A})):m===mm.SUCCESS_NO_DATA||m===mm.SUCCESS_WITH_DATA&&0===b.length?(U("no-data"),M=r.createElement(rT,null,O)):m===mm.LOADING?M=r.createElement(VS,{loadingLayout:DS.Rows}):(L(),M=r.createElement(HS,{refetch:d})),r.createElement(tT,{tileIndex:o,appIcon:r.createElement(Ol,{iconSize:40}),appIconSrcSet:_l+", "+Cl+" 2x",appId:n,appUrl:i,className:"calendar-home-tile",description:R,heading:g,ariaLabel:g+" "+C,isLoading:m===mm.LOADING,primaryActionDescription:v,shouldHidePrimaryAction:h,tileSize:p},r.createElement(r.Fragment,null,M))};function cD(e){var t=e.appId,n=e.calendars,i=e.events,o=e.focusIndex,a=e.setFocusIndex,s=gc("VoiceOver.CalendarHomeTile.Events"),c=r.useContext(lm),u=c===cm.Large?6:3,l=Math.min(u,i.length);return r.createElement(US,{ariaLabel:s,focusIndex:o,numRows:i.length,setFocusIndex:a},r.createElement(r.Fragment,null,r.createElement("tbody",{role:"rowgroup"},i.slice(0,Math.min(3,l)).map((function(e,i){var a=n[e.calendarId];return r.createElement(oD,{appId:t,collectionTitle:a.title,collectionColor:a.color,event:e,hasFocus:o===i,key:e.id})}))),c===cm.Large&&r.createElement("tbody",{role:"rowgroup"},i.slice(3,l).map((function(e,i){var a=n[e.calendarId];return r.createElement(oD,{appId:t,collectionTitle:a.title,collectionColor:a.color,event:e,hasFocus:o===i,key:e.id})})))))}var uD,lD=function(e){var t,n,i,o,a,s=e.onError,c=e.onSuccess,u=e.tileSize,l=e.appId,d=e.appUrl,p=e.tileIndex,f=(o=ym(),a={onError:s,onSuccess:function(e){return null==c?void 0:c(e.events)}},iS(Object.assign({},a,{endpoint:vE.calendarFutureEvents,fetchProvider:function(e){return function(){return function(e,t){var n=e.webServices,r=e.dsid;if(null==n||!n.calendar||!r)throw new Error("no service url or dsid available");return JE({url:RE(n.calendar,r,t),includeCredentials:!0,validate:{type:"WireCalendarStartupResponse",schema:FN}}).then(WN)}(e,o)}},cacheKeys:[kw(new Date)]}))),h=f.data,m=f.error,g=f.isIdle,v=f.isLoading,y=f.isSuccess,b=f.refetch;SR(Ou.identifier,b);var _=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;return r.createElement(sD,{tileIndex:p,appId:l,appUrl:d,data:h,error:m,isLoading:g||v,isSuccess:y,refetch:b,tileSize:u,shouldHidePrimaryAction:_})};!function(e){e.Account="Account",e.List="List",e.Reminder="Reminder"}(uD||(uD={}));var dD=Nn.object({downloadURL:Nn.string(),fileChecksum:Nn.string().optional(),size:Nn.number().optional(),wrappingKey:Nn.string().optional(),referenceChecksum:Nn.string().optional()}),pD=Nn.object({fields:Nn.object({ListIDsMergeableOrdering:Nn.object({type:Nn.string(),value:Nn.string()}).optional(),ListIDsMergeableOrderingAsset:Nn.object({type:Nn.string(),value:dD}).optional()}).optional()}),fD=HA.merge(pD),hD=Nn.object({records:Nn.array(fD)}),mD=Nn.object({fields:Nn.object({Name:Nn.object({type:Nn.string(),value:Nn.string()}).optional(),ReminderIDs:Nn.object({type:Nn.string(),value:Nn.string()}).optional(),ReminderIDsAsset:Nn.object({type:Nn.string(),value:dD}).optional()}).optional()}),gD=HA.merge(mD),vD=Nn.object({records:Nn.array(gD)}),yD=Nn.object({fields:Nn.object({Completed:Nn.object({type:Nn.string(),value:Nn.number()}).optional(),DueDate:Nn.object({type:Nn.string(),value:Nn.number()}).optional(),TitleDocument:Nn.object({type:Nn.string(),value:Nn.string()}).optional(),TitleDocumentAsset:Nn.object({type:Nn.string(),value:dD}).optional(),CreationDate:Nn.object({value:Nn.number(),type:Nn.string()}).optional(),LastModifiedDate:Nn.object({value:Nn.number(),type:Nn.string()}).optional(),AllDay:Nn.object({value:Nn.number(),type:Nn.string()}).optional()}).optional()}),bD=HA.merge(yD),_D=Nn.object({continuationMarker:Nn.string().optional(),records:Nn.array(bD)}),CD=n(889),ID=n(887),wD=n.n(ID);function ED(e){var t="function"===typeof Map?new Map:void 0;return(ED=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return SD(e,arguments,PD(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),OD(r,e)})(e)}function SD(e,t,n){return(SD=TD()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&OD(i,n.prototype),i}).apply(null,arguments)}function TD(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function OD(e,t){return(OD=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PD(e){return(PD=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xD=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t+": "+n)||this).exception=void 0,r.exception=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,OD(t,n),r}(ED(Error));function AD(e){try{var t,n=qx(e),r=wD.a.concat([n]),i=(null==(t=CD.TTMergeableStringVersionedDocument.alloc().initWithData_andReplicaID(r,CD.CRUUID.UUID()).autorelease().mergeableString)?void 0:t.string.UTF16String)||"";return Ls.Result.success(i)}catch(o){return Ls.Result.failure(new xD("Failed to parse Reminder title",o))}}function ND(e){var t,n=[];try{return(t=CD.CRDocument.unarchiveFromData(e,CD.CRUUID.UUID()))&&t.rootObject&&t.rootObject.forEach((function(e){n.push(e.string)})),Ls.Result.success(n)}catch(r){return Ls.Result.failure(new xD("Failed to parse Reminder list IDs",r))}}var RD=n(942);function DD(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function kD(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){DD(o,r,i,a,s,"next",e)}function s(e){DD(o,r,i,a,s,"throw",e)}a(void 0)}))}}function UD(e){return LD.apply(this,arguments)}function LD(){return(LD=kD(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",RD.ctFetch(t).then((function(e){return e.arrayBuffer()})).then((function(e){return e})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var MD={year:"2-digit",month:"numeric",day:"numeric"};function jD(e){var t,n;if(!e.records.length)return Promise.resolve(Ls.Result.failure(new Error("No records in Reminders Account response")));var r=e.records[0];if(r.recordType!==uD.Account||!r.fields)return Promise.resolve(Ls.Result.failure(new Error("Wrong Reminders Account record type")));var i=[],o=r.recordName,a=null==(t=r.fields.ListIDsMergeableOrderingAsset)?void 0:t.value.downloadURL;if(a)return UD(a).then((function(e){var t=function(e){var t;try{t=wD.a.concat([e])}catch(n){return Ls.Result.failure(new xD("Failed to decode Reminder asset title",n))}return ND(t)}(e);return t.ok?Ls.Result.success({id:o,listIDs:t.value}):t})).catch((function(){return Ls.Result.failure(new Error("Unable to download Account asset"))}));var s=null==(n=r.fields.ListIDsMergeableOrdering)?void 0:n.value;if(s){var c=ND(s);if(!c.ok)return Promise.resolve(c);i=c.value}return Promise.resolve(Ls.Result.success({id:o,listIDs:i}))}function FD(e){return Promise.all(e.records.filter((function(e){return e.fields})).map((function(e){var t,n,r,i,o,a,s,c=e.recordName,u=(null==(t=e.fields)||null==(n=t.ReminderIDsAsset)?void 0:n.value.downloadURL)||(null==(r=e.fields)||null==(i=r.ReminderIDs)?void 0:i.value);return Promise.resolve(Ls.Result.success({id:c,name:null!=(o=null==(a=e.fields)||null==(s=a.Name)?void 0:s.value)?o:"",reminderIDs:u?[u]:[]}))})))}function BD(e){return Promise.all(e.filter((function(e){return!!e.fields})).map((function(e){var t,n,r,i,o,s,c,u,l,d,p,f,h,m={id:e.recordName,title:"",completed:!(null==(t=e.fields)||null==(n=t.Completed)||!n.value),creationDate:null==(r=e.created)?void 0:r.timestamp,lastModifiedDate:null==(i=e.modified)?void 0:i.timestamp,listId:null!=(o=null==(s=e.parent)?void 0:s.recordName)?o:""},g=null==(c=e.fields)||null==(u=c.DueDate)?void 0:u.value;if(g){var v,y,b=!(null==(v=e.fields)||null==(y=v.AllDay)||!y.value),_=(h=new Date(g),b&&h.setMinutes(h.getMinutes()+h.getTimezoneOffset()),h);m.dueDate=g,m.dueDateString=function(e,t){var n=a(),r=Rw(new Date),i=Rw(e),o=Math.abs(r.getTime()-i.getTime());return i.getTime()===r.getTime()?t?gc("RemindersTile.Date.Today.Time",{time:new Intl.DateTimeFormat(n,t).format(e)}):gc("RemindersTile.Date.Today"):o<=864e5&&r.getTime()>i.getTime()?t?gc("RemindersTile.Date.Yesterday.Time",{time:new Intl.DateTimeFormat(n,t).format(e)}):gc("RemindersTile.Date.Yesterday"):o<=864e5&&r.getTime()<i.getTime()?t?gc("RemindersTile.Date.Tomorrow.Time",{time:new Intl.DateTimeFormat(n,t).format(e)}):gc("RemindersTile.Date.Tomorrow"):new Intl.DateTimeFormat(n,Object.assign({},t,MD)).format(e)}(_,function(e){return e?null:{hour:"numeric",minute:"numeric"}}(b)),m.overdue=function(e,t){var n=new Date;return(!t||Rw(e).getTime()!==Rw(n).getTime())&&n.getTime()>e.getTime()}(_,b)}var C=null==(l=e.fields)||null==(d=l.TitleDocumentAsset)?void 0:d.value.downloadURL;if(C)return UD(C).then((function(e){var t=function(e){var t;try{t=new Uint8Array(e)}catch(n){return Ls.Result.failure(new xD("Failed to decode Reminder asset title",n))}return AD(t)}(e);return t.ok?(m.title=t.value,Ls.Result.success(m)):t}));var I=null==(p=e.fields)||null==(f=p.TitleDocument)?void 0:f.value;if(I){var w=function(e){if(!e)return Ls.Result.success("");var t;try{t=Tw(e)}catch(n){return Ls.Result.failure(new xD("Failed to decode Reminder title",n))}return AD(t)}(I);if(!w.ok)return Promise.resolve(w);m.title=w.value}return Promise.resolve(Ls.Result.success(m))})))}function zD(e,t,n,r){var i,o,a,s,c,u,l=null!=(i=null==(o=e.fields)||null==(a=o[n])?void 0:a.value)?i:0,d=null!=(s=null==(c=t.fields)||null==(u=c[n])?void 0:u.value)?s:0;return l||d?l&&!d?-1:!l&&d?1:"Ascending"===r?l-d:d-l:0}function HD(e){var t=[];return t.concat.apply(t,e)}function WD(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function VD(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){WD(o,r,i,a,s,"next",e)}function s(e){WD(o,r,i,a,s,"throw",e)}a(void 0)}))}}var ZD=function(e){return"Reminders"===e.zoneID.zoneName},qD={recordType:"active"},KD=function(){var e=VD(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.webServices,r=t.dsid,e.next=3,WA({webServices:n,dsid:r},"com.apple.reminders");case 3:if(i=e.sent,o=i.zones.find(ZD)){e.next=7;break}throw new Error("User does not have primary zone in cloudKit.");case 7:return e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),GD=function(){var e=VD(regeneratorRuntime.mark((function e(t,n){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.webServices,i=t.dsid,null!=r&&r.ckdatabasews&&i){e.next=3;break}throw new Error("no service url or dsid available");case 3:if(n&&n.zoneID.ownerRecordName){e.next=5;break}throw new Error("no zone or ownerRecordName given");case 5:return e.abrupt("return",JE({url:xE(r.ckdatabasews,"production","com.apple.reminders",wE.PRIVATE,i),method:"POST",includeCredentials:!0,body:Object.assign({records:[{recordName:"Account/"+n.zoneID.ownerRecordName}]},n),validate:{type:"WireRemindersAccountResponse",schema:hD}}).then(jD).then((function(e){if(e.ok)return e.value;throw e.error})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),YD=function(e,t,n){var r=e.webServices,i=e.dsid;if(null==r||!r.ckdatabasews||!i)throw new Error("no service url or dsid available");var o=PE(r.ckdatabasews,"production","com.apple.reminders",wE.PRIVATE,i);return JE({url:o,method:"POST",includeCredentials:!0,body:Object.assign({query:qD,continuationMarker:n},t),validate:{type:"WireReminderResponse",schema:_D}})},QD=function(){var e=VD(regeneratorRuntime.mark((function e(t,n){var r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&n.zoneID){e.next=2;break}throw new Error("no zone available.");case 2:r=void 0,i=[];case 4:return e.next=7,YD(t,n,r);case 7:if(o=e.sent,r=o.continuationMarker,i=i.concat(o.records),r){e.next=12;break}return e.abrupt("break",14);case 12:e.next=4;break;case 14:return e.next=16,BD(i.sort((function(e,t){return zD(e,t,"DueDate","Ascending")||zD(e,t,"LastModifiedDate","Descending")||zD(e,t,"CreationDate","Descending")})));case 16:return a=e.sent,e.abrupt("return",a.map((function(e){if(!e.ok)throw e.error;return Object.assign({},e.value)})));case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),XD=function(e,t){return GD(e,t).then((function(n){return function(e,t,n,r){var i=e.webServices,o=e.dsid;if(null==i||!i.ckdatabasews||!o)throw new Error("no service url or dsid available");var a=function(e,t){for(var n=[],r=0;r<e.length;r+=100)n.push(e.slice(r,r+100));return n}(t).map((function(e){return function(e,t,n){var r=e.webServices,i=e.dsid;if(null==r||!r.ckdatabasews||!i)throw new Error("no service url or dsid available");var o=t.map((function(e){return{recordName:"List/"+e}})),a=xE(r.ckdatabasews,"production","com.apple.reminders",wE.PRIVATE,i);return JE({url:a,method:"POST",includeCredentials:!0,body:Object.assign({records:o},n),validate:{type:"WireReminderListResponse",schema:vD}}).then(FD).then((function(e){return e.map((function(e){if(!e.ok)throw e.error;return e.value}))}))}({webServices:i,dsid:o},e,n)}));return Promise.all(a).then((function(e){return HD(e).map((function(e){return Object.assign({},e,{accountId:r})}))}))}(e,n.listIDs,t,n.id)}))};function JD(e){return iS(Object.assign({},e,{endpoint:vE.remindersPrimaryZone,fetchProvider:function(e){return function(){return KD(e)}}}))}function $D(e){var t=JD().data;return iS(Object.assign({},e,{endpoint:vE.remindersList,cacheKeys:[t],dependencies:[t],fetchProvider:function(e){return function(){return XD(e,t)}}}))}n(1148),n(1149);var ek=function(e){var t=e.reminder,n=e.hasFocus,i=e.appId,o=t.id,a=t.title,s=t.dueDateString,c=t.overdue,u=t.listName,l=!!s,d=mc(l?"VoiceOver.RemindersHomeRow.Summary.AriaLabel.Scheduled":"VoiceOver.RemindersHomeRow.Summary.AriaLabel.NotScheduled",{title:a,date:s||""}),p=mc("VoiceOver.RemindersHomeRow.OpenReminder",{title:a}),f=xs(),h=Tp("launch-for-open",i+"-tile")[0];return r.createElement(nT,{className:"reminders-row",hasFocus:n,id:o,primaryRowCallback:function(){h(),f.launchApp(i,{options:{source:{reason:Cc.OPEN_DOCUMENT},launchItem:t}})},primaryRowCallbackLabel:p,summaryAriaLabelText:d},r.createElement("div",{className:Ts()("row-container",{"is-scheduled":l})},r.createElement("div",{className:"reminders-circle","aria-hidden":"true"}),r.createElement("div",{className:"text"},r.createElement("div",{className:"first-line"},a),r.createElement("div",{className:"second-line"},l?r.createElement(r.Fragment,null,r.createElement("span",{className:Ts()("time-text",{"is-overdue":c})},s),r.createElement("span",{className:"time-text dot-separator"},"\u2022")):null,r.createElement("span",{className:"time-text"},u)))))},tk=function(e){var t=e.reminders,n=e.appId,i=mc("VoiceOver.RemindersHomeTile.Reminders"),o=r.useState(-1),a=o[0],s=o[1],c=r.useContext(lm),u=c===cm.Large?6:3,l=Math.min(u,t.length);return r.createElement(r.Fragment,null,r.createElement(US,{ariaLabel:i,focusIndex:a,numRows:l,setFocusIndex:s},r.createElement(r.Fragment,null,r.createElement("tbody",{role:"rowgroup"},t.slice(0,Math.min(3,l)).map((function(e,t){return r.createElement(ek,{appId:n,key:e.id,reminder:e,hasFocus:a===t})}))),c===cm.Large&&r.createElement("tbody",{role:"rowgroup"},t.slice(3,l).map((function(e,t){return r.createElement(ek,{appId:n,key:e.id,reminder:e,hasFocus:a===t+3})}))))))},nk=function(e){var t=e.appId,n=e.appUrl,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.isSuccess,c=e.refetch,u=e.reminders,l=e.tileSize,d=e.shouldHidePrimaryAction,p=void 0!==d&&d,f=Cm({error:o,isLoading:a,isSuccess:s,data:u}),h=gc("RemindersHomeTile.Heading"),m=gc("VoiceOver.RemindersHomeTile.PrimaryActionDescription"),g=gc("RemindersHomeTile.TotalNumber.Description"),v=gc("RemindersHomeTile.CreateFirst.TotalNumber.Zero"),y=gc("HomeTile.Loading"),b=gc("HomeTile.NotLoaded"),_=gc("RemindersHomeTile.Completed"),C=function(){switch(f){case mm.SUCCESS_WITH_DATA:return g;case mm.SUCCESS_NO_DATA:return v;case mm.LOADING:return y;case mm.ERROR:return b}}(),I=Tp("load",t+"-tile",{measureFromBaseline:!0}),w=I[0],E=I[1],S=null;return f===mm.SUCCESS_WITH_DATA&&u?(w("with-data",{itemCount:u.length}),S=null!=u&&u.length?r.createElement(tk,{reminders:u,appId:t}):r.createElement(rT,null,_)):f===mm.SUCCESS_NO_DATA?(w("no-data"),S=r.createElement(rT,null,_)):f===mm.LOADING?S=r.createElement(VS,{loadingLayout:DS.Checkboxes}):(E(),S=r.createElement(HS,{refetch:c})),r.createElement(tT,{tileIndex:i,appIcon:r.createElement(El,{src:Gl,srcSet:Gl+", "+Yl+" 2x",size:40}),appIconSrcSet:Gl+", "+Yl+" 2x",appId:t,appUrl:n,className:"reminders-home-tile",description:C,heading:h,isLoading:f===mm.LOADING,primaryActionDescription:m,shouldHidePrimaryAction:p,tileSize:l},S)},rk=function(e){var t,n,i,o=e.appId,a=e.appUrl,s=e.tileSize,c=e.tileIndex,u=e.onSuccess,l=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onSuccess,n=e.onError,r=e.onReminderListsSuccess,i=JD({onError:n}),o=$D({onError:n,onSuccess:r}),a=i.data,s=[a],c=iS({endpoint:vE.remindersRecent,cacheKeys:s,dependencies:s,fetchProvider:function(e){return function(){return QD(e,a)}},onSuccess:t,onError:n});return{zone:i,lists:o,reminders:c}}(e),n=t.zone,i=t.lists,o=t.reminders,a=i.data,s=i.isSuccess,c=o.data,u=o.isSuccess,l=Object(r.useState)(),d=l[0],p=l[1];Object(r.useEffect)((function(){if(s&&u)if(a&&c){var e=new Map;a.forEach((function(t){return e.set(t.id,t.name)})),p(c.map((function(t){var n;return Object.assign({},t,{listName:e.get(t.listId),accountId:null==(n=a[0])?void 0:n.accountId})})))}else p(c)}),[a,c,s,u]);var f=function(e){var t;return{data:e.map((function(e){return e.data})),error:(null==(t=e.find((function(e){return e.error})))?void 0:t.error)||null,isLoading:e.some((function(e){return e.isLoading})),isSuccess:e.every((function(e){return e.isSuccess})),isIdle:e.every((function(e){return e.isIdle})),refetch:r.useCallback((function(){return e.map((function(e){return e.refetch()})).pop()}),[e])}}([n,i,o]);return Object.assign({},f,{data:d})}({onError:e.onError,onReminderListsSuccess:function(e){null==u||u(HD(e.map((function(e){return e.reminderIDs}))))},onSuccess:function(e){return null==u?void 0:u(e.map((function(e){return e.id})))}}),d=l.data,p=l.error,f=l.refetch,h=l.isLoading,m=l.isSuccess,g=l.isIdle;SR(cl.identifier,f);var v=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;return r.createElement(nk,{tileIndex:c,error:p,isLoading:h||g||!d&&!p,isSuccess:m&&!!d,reminders:d,refetch:f,appId:o,appUrl:a,tileSize:s,shouldHidePrimaryAction:v})};function ik(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ok=r.createContext({dragData:null,useDragOffset:function(){return null},subscribeToOffset:function(){}});function ak(e){return r.createElement(ok.Provider,{value:e.value},e.children)}function sk(){var e=r.useContext(ok);return{dragData:e.dragData,onDragEnter:e.onDragEnter,onDragLeave:e.onDragLeave,gridContext:e}}function ck(e){var t=r.useRef(e),n=function(){var e=r.useState((function(){return new Set}))[0];return[r.useCallback((function(t){return e.add(t),function(){e.delete(t)}}),[]),r.useCallback((function(t){for(var n,r=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return ik(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ik(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(n=r()).done;)(0,n.value)(t)}),[])]}(),i=n[0],o=n[1],a=r.useCallback((function(e){t.current=e,o(e)}),[t,o]),s=r.useCallback((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=r.useState(t.current),o=n[0],a=n[1];return r.useLayoutEffect((function(){if(e)return i(a)}),[e,a]),o}),[i,t]),c=r.useCallback((function(){return t}),[t]);return[i,a,s,c]}var uk,lk=["onError","onSuccess"];function dk(){return(dk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pk(e){var t,n=gl.sharedInstance.getApplicationInfo(e.appId),i=null!=(t=n?mu(n):null)?t:"",o=e.onError,a=e.onSuccess,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,lk),c=r.useCallback((function(t){return null==o?void 0:o(t,e.appId,e.uuid)}),[o,e.appId,e.uuid]),u=r.useCallback((function(t){return null==a?void 0:a(t,e.appId,e.uuid)}),[a,e.appId,e.uuid]),l=Object.assign({},s,{onError:c,onSuccess:u,appId:""===i?"":e.appId,appUrl:i});switch(e.appId){case il.identifier:return r.createElement(iD,l);case Vu.identifier:return r.createElement(TR,l);case Ou.identifier:return r.createElement(lD,l);case Xu.identifier:return r.createElement(DR,l);case $u.identifier:return r.createElement(UR,l);case tl.identifier:return r.createElement(MR,l);case Hu.identifier:return r.createElement(yR,l);case Du.identifier:return r.createElement(CA,l);case cl.identifier:return r.createElement(rk,l);case Bu.identifier:return r.createElement(tM,s);case Nu.identifier:return r.createElement(rM,s);case"appLibrary":return r.createElement(jR,l);default:return null}}function fk(e){var t=e.tileState,n=e.tileSize,i=e.draggable,o=t.identifier,a=t.removed,s=t.inserted,c=xm().isInCustomizationMode,u=r.useRef(null),l=function(){var e=r.useContext(ok);return{dragData:e.dragData,useDragOffset:e.useDragOffset,subscribeToOffset:e.subscribeToOffset,onDragStart:e.onDragStart,gridContext:e}}(),d=l.dragData,p=l.onDragStart,f=l.subscribeToOffset,h=(null!=d?d:{}).dragUUID,m=d&&h===t.uuid,g=r.useRef(null),v=m?g.current:null,y=r.useRef((function(){}));y.current=r.useMemo((function(){if(m){var e=d.localOffsetX,t=d.localOffsetY;return function(n){var r=u.current;n&&r&&(r.style.left=n.offsetX-e+"px",r.style.top=n.offsetY-t+"px",r.style.transition="")}}return function(){}}),[m,d]),r.useLayoutEffect((function(){return f((function(e){g.current=e,y.current(e)}))}),[f]);var b=r.useMemo((function(){return v&&d?{left:v.offsetX-d.localOffsetX,top:v.offsetY-d.localOffsetY,marginLeft:-d.localOffsetXFraction*(n===cm.Small?315:660)}:void 0}),[v,d,n]),_=Em(b),C=void 0===_&&void 0!==b;C&&(b.transition="none"),r.useLayoutEffect((function(){var e=u.current;if(e)if(b){var t=Object.entries(b);e.classList.add("dragging"),t.forEach((function(t){var n,r=t[0],i=t[1];return e.style[r]="number"===typeof(n=i)?n+"px":n+""}))}else _&&(Object.entries(_).forEach((function(t){var n=t[0];return e.style[n]=""})),e.style.transition="none",e.classList.remove("dragging"))}),[b,_]);var I=c&&!m&&i;return function(e){var t=e.shouldFlip,n=void 0===t||t,i=e.shouldFlipPosition,o=void 0===i||i,a=e.contentRef.current,s=a?a.getBoundingClientRect():null,c=a?getComputedStyle(a):null,u=c?{marginLeft:parseInt(c.marginLeft)}:null;r.useLayoutEffect((function(){if(s&&a&&n){var e,t,r=a.getBoundingClientRect(),i=getComputedStyle(a),c={marginLeft:parseInt(i.marginLeft)},l=s.left-r.left,d=s.top-r.top,p=s.width-r.width,f=s.height-r.height,h=(null!=(e=null==u?void 0:u.marginLeft)?e:0)-(null!=(t=null==c?void 0:c.marginLeft)?t:0);if((!o||0===l&&0===d)&&0===p&&0===f&&0===h)return;!function(){var e;a.style.transition="none",o&&(a.style.left=l+"px",a.style.top=d+"px"),a.style.width=s.width+"px",a.style.height=s.height+"px",a.style.marginLeft=(null!=(e=null==u?void 0:u.marginLeft)?e:0)+"px",a.getBoundingClientRect(),requestAnimationFrame((function(){var e;a.style.transition="",o&&(a.style.left="",a.style.top=""),a.style.width="",a.style.height="",a.style.marginLeft=(null!=(e=null==c?void 0:c.marginLeft)?e:0)+"px"}))}()}}))}({contentRef:u,shouldFlip:!C,shouldFlipPosition:!m}),r.createElement("div",{ref:u,className:Ts()("tile-grid-tile-content","cell",n,{removed:a,inserted:s,jiggly:I}),onDragStart:function(e){var n=u.current;if(p&&t&&n&&i&&c){!function(e){var t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="1px",t.style.height="1px",t.style.zIndex="-1",document.body.appendChild(t),window.setTimeout((function(){document.body.removeChild(t)}),500),e.dataTransfer.setDragImage(t,0,0)}(e);var r=e.dataTransfer;r.clearData(),r.setData("text/plain"," "),r.effectAllowed="move",r.dropEffect="move",p(e,{dragTarget:n,uuid:t.uuid},t)}}},r.createElement(Sp,{scope:o+"-tile",baseline:!0},e.children))}function hk(e){var t=e.tileState,n=e.tileSize,i=e.draggable,o=void 0===i||i,a=t.uuid,s=t.removed,c=sk(),u=c.dragData,l=c.onDragEnter,d=c.onDragLeave,p=(null!=u?u:{}).dragUUID===t.uuid,f=u&&!p,h=f?"100%":"0%",m={position:"absolute",top:"0",left:"0",display:"flex",flexDirection:"row",height:h,width:h,zIndex:f?"9001":"-100"},g={height:"100%",width:"100%",flexGrow:"1",flexShrink:"1"},v=Object.assign({},g);return r.createElement("div",{"data-apple-uuid":a,className:Ts()("tile-grid-tile-container",n,{removed:s})},r.createElement(fk,{tileState:t,tileSize:n,draggable:o},e.children),o&&r.createElement("div",{style:m},r.createElement(mk,dk({},e,{tileZone:uk.inlineStart,onDragEnter:l,onDragLeave:d,style:g})),r.createElement(mk,dk({},e,{tileZone:uk.inlineEnd,onDragEnter:l,onDragLeave:d,style:v}))))}function mk(e){var t=e.tileState,n=e.tileZone,i=e.style,o=e.onDragEnter,a=e.onDragLeave,s=r.useCallback((function(e){null==o||o(e,null,t,n)}),[o,t,n]),c=r.useCallback((function(e){null==a||a(e,null,t,n)}),[a,t,n]);return r.createElement("div",{className:"drop-zone "+n,onDragEnter:s,onDragLeave:c,style:i})}function gk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vk(e){var t=Em(e),n=r.useRef([[],[]]);return t!==e&&(n.current=function(e,t){for(var n,r=[],i=function(){var e=n.value;t.find((function(t){return t.uuid===e.uuid}))||r.push(Object.assign({},e,{removed:!0}))},o=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return gk(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gk(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(n=o()).done;)i();return[[].concat(t.map((function(t){var n=!e.find((function(e){return e.uuid===t.uuid}));return Object.assign({},t,{inserted:n})}))),r]}(null!=t?t:e,e)),n.current}!function(e){e.inlineStart="inlineStart",e.inlineEnd="inlineEnd",e.gridEnd="gridEnd"}(uk||(uk={})),n(1150);var yk=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.2.badge.heart.fill",svgPath:"M21.0826 9.46057L58.1021 9.46057C53.0439 2.09198 59.2442-12.7154 69.7546-20.8507C64.3446-24.499 57.3434-27.16 48.2218-27.16C26.2293-27.16 12.4609-10.8699 12.4609 2.61005C12.4609 7.01259 14.8697 9.46057 21.0826 9.46057ZM48.2429-34.6366C57.3816-34.6366 65.2607-42.8081 65.2607-53.42C65.2607-63.9052 57.35-71.6742 48.2429-71.6742C39.1876-71.6742 31.2146-63.75 31.2358-53.3164C31.2358-42.8081 39.156-34.6366 48.2429-34.6366ZM104.515-27.0143C79.1787-27.0143 63.4061-9.62176 63.4061 2.98388C63.4061 7.2618 66.1369 9.46057 73.8421 9.46057L115.39 9.46057C114.768 7.16785 114.477 4.70931 114.477 2.20958C114.477-7.5396 119.016-16.2814 126.036-22.0727C120.084-25.0271 112.809-27.0143 104.515-27.0143ZM104.442-35.7475C114.951-35.7475 123.982-45.1133 123.982-57.2205C124.014-69.1388 114.919-78.2986 104.442-78.2986C94.0158-78.2986 84.9424-69.3459 84.9424-57.3241C84.9424-45.1133 93.9841-35.7475 104.442-35.7475ZM145.988 27.043C159.464 27.043 170.822 15.7995 170.822 2.20958C170.822-11.3909 159.578-22.5827 145.988-22.5827C132.398-22.5827 121.196-11.3804 121.196 2.20958C121.196 15.8513 132.398 27.043 145.988 27.043ZM139.572-9.23992C142.406-9.23992 144.66-7.66121 145.937-4.61983C147.265-7.66121 149.508-9.23992 152.343-9.23992C156.92-9.23992 160.129-5.86592 160.129-1.12222C160.129 5.83681 152.731 12.2838 148.041 15.377C146.539 16.2789 145.386 16.2789 143.811 15.3358C139.089 12.3471 131.724 5.83681 131.724-1.12222C131.724-5.86592 134.984-9.23992 139.572-9.23992Z",layoutBox:{viewBox:"0 0 190.419921875 125.93212890625",width:190.419921875,height:125.93212890625,translateX:16.21999511718741,translateY:98.196044921875,baseline:98.196044921875,capline:27.736083984375},glyphBox:{viewBox:"0 0 183.6640625 124.5458984375",width:183.6640625,height:124.5458984375,translateX:12.842065429687409,translateY:97.5029296875,baseline:97.5029296875,capline:27.04296875}}})};function bk(e){var t=e.bannerData;return r.createElement("div",{role:"banner",className:"banner"},r.createElement("div",{className:"banner-inner"},r.createElement("span",{className:"title"},t.title),r.createElement("span",{className:"description"},t.description),t.buttonTitle&&t.onClick&&r.createElement(Wc,{variant:"banner-button",onActivate:function(){return null==t.onClick?void 0:t.onClick(t)}},r.createElement("span",null,t.buttonTitle),"link"===t.buttonType&&r.createElement(vT,{"aria-hidden":!0,desiredFontSize:8}))))}function _k(e){var t,n,i=e.bannerData,o=gc("VoiceOver.Banner.Heading");return r.createElement("div",{role:"banner",className:"banner"},r.createElement(pT,{ariaLevel:1,text:o}),r.createElement(dT,null,null!=(t=i.title)?t:r.createElement("div",null,i.title),r.createElement("div",null,i.description)),r.createElement("div",{className:"icon-wrapper"},r.createElement(yk,{"aria-hidden":!0,className:"exclamation-mark",style:{fill:"#FFFFFF"},height:30,width:46,layoutMode:"glyphBox"})),r.createElement("div",{className:"banner-inner inline"},null!=(n=i.title)?n:r.createElement("span",{className:"title"},i.title),r.createElement("span",{className:"description"},i.description,i.url&&r.createElement(uT,{href:i.url},i.buttonTitle))))}var Ck=function(e){var t="true"===localStorage.getItem("debugDragAndDrop"),n=function(){var e=r.useRef(new Set),t=r.useRef(new Set),n=r.useRef(new Set),i=r.useRef(Up().length),o=bp().configurations,a=_p(),s=r.useRef([]),c=r.useRef(Up());r.useEffect((function(){o&&i.current>0&&(i.current=0)}),[o]);var u=r.useCallback((function(){0!==i.current&&(i.current=0);var r=Array.from(n.current).sort(Mp),o=Array.from(e.current).sort(Mp),s=Array.from(t.current).sort(Mp),c=r.concat(o,s),u=c.slice(0,4);null==u||u.splice(3,0,"appLibrary"),a({type:fp.SET,configurations:u.map((function(e){return{identifier:e,uuid:Np()}})),defaultOrder:c.map((function(e){return{identifier:e,uuid:Np()}}))})}),[a]),l=r.useCallback((function(e,n){0!==i.current&&-1!==c.current.indexOf(e)&&-1===s.current.indexOf(e)&&(s.current.push(e),n&&t.current.add(e),i.current--,0===i.current&&u())}),[u,i]),d=r.useCallback((function(t,r){0!==i.current&&-1!==c.current.indexOf(t)&&-1===s.current.indexOf(t)&&(s.current.push(t),r&&0!==r.length?n.current.add(t):e.current.add(t),i.current--,0===i.current&&u())}),[u,i]);return r.useEffect((function(){var r=setTimeout((function(){0!==i.current&&(c.current.forEach((function(r){n.current.has(r)||e.current.has(r)||t.current.has(r)||e.current.add(r)})),u())}),2400);return function(){clearTimeout(r)}}),[u]),{onError:l,onSuccess:d}}(),i=n.onError,o=n.onSuccess,a=Tp("load","tile-grid",{measureFromBaseline:!0})[0],s=bp().configurations,c=_p(),u=Lp(),l=r.useMemo((function(){var e;return null!=(e=null==s?void 0:s.slice())?e:u.map((function(e){return{identifier:e,uuid:Np()}}))}),[s,u]),d=r.useState(null),p=d[0],f=d[1],h=vk(function(e,t){return r.useMemo((function(){if(!t)return e;var n=t.fromIndex,r=t.toIndex,i=e.slice(),o=i[n];return i.splice(n,1),i.splice(r,0,o),i}),[e,t])}(l,p)),m=h[0],g=h[1],v=Tm(),y=r.useCallback((function(e,t){return e.tileSize=v===bm.LG?2&t?cm.Small:cm.Large:cm.Small,e.renderIndex=t,e}),[v]),b=r.useMemo((function(){return m.map(y)}),[m,y]),_=r.useRef([]),C=r.useRef(!1),I=C.current,w=r.useMemo((function(){var e=g.filter((function(e){return!e.hidden}));if(e.length>0){var t=e.map((function(e){return e.hidden=!0,Object.assign({},e,{tileSize:cm.Small,renderIndex:-1})}));_.current=[].concat(_.current,t),setTimeout((function(){t.forEach((function(e){return e.cleanup=!0})),C.current=!0}),1e3)}return I&&C.current&&(_.current=_.current.filter((function(e){return!e.cleanup})),C.current=!1),_.current}),[g,I]),E=e.onTilesLayoutReady,S=r.useRef(new Set([])),T=r.useCallback((function(e,t){S.current.add(e+"_"+t),s&&S.current.size>s.length&&(a(),null==E||E())}),[s,a,E]);r.useEffect((function(){null==s||s.forEach((function(e){var t=e.identifier,n=e.uuid;"appLibrary"===t&&T(t,n)}))}),[s,T]);var O=r.useCallback((function(e){var t=e.renderIndex;void 0!==t&&requestAnimationFrame((function(){f({fromIndex:t,toIndex:t})}))}),[]),P=r.useRef(void 0),x=function(e){var t=null!=e?e:{},n=t.dragStartTile,i=t.dragEnteredTileZone,o=t.dragLeftTileZone,a=t.dragEnded,s=r.useState(null),c=s[0],u=s[1],l=ck(null),d=l[0],p=l[1],f=l[2],h=l[3],m=!!c,g=r.useCallback((function(e,t,r){if(e.target instanceof HTMLElement&&null!==t){var i=t.dragTarget,o=t.uuid,a=i.getBoundingClientRect(),s=e.clientX-a.left,c=e.clientY-a.top,l={dragTarget:i,dragUUID:o,localOffsetX:0,localOffsetXFraction:s/a.width,localOffsetY:c},d={offsetX:e.clientX,offsetY:e.clientY};requestAnimationFrame((function(){u(l),p(d)})),null==n||n(r)}}),[n,u,p]),v=h(),y=r.useCallback((function(e){if(m){e.preventDefault();var t=v.current,n=e.clientX,r=e.clientY,i=t,o=i.offsetX,a=i.offsetY;n===o&&r===a||p({offsetX:n,offsetY:r})}}),[m,v,p]);r.useLayoutEffect((function(){if(m)return window.addEventListener("dragover",y),function(){window.removeEventListener("dragover",y)}}),[m,y]);var b=r.useCallback((function(e){u(null),p(null),null==a||a(),e.preventDefault(),e.stopPropagation()}),[a,u,p]),_=r.useCallback((function(e,t,n,r){null==i||i(n,r),e.preventDefault()}),[i]),C=r.useCallback((function(e,t,n,r){null==o||o(n,r)}),[o]),I=f,w=r.useMemo((function(){return{dragData:c,useDragOffset:I,subscribeToOffset:d,onDragStart:g,onDragEnd:b,onDragEnter:_,onDragLeave:C}}),[c,I,d,g,b,_,C]);return{dragData:c,useDragOffset:I,subscribeToOffset:d,onDragEnd:b,gridContext:w}}({dragStartTile:O,dragEnteredTileZone:r.useCallback((function(e,t){if(p){var n=e.renderIndex;if(void 0!==n){var r=0;switch(t){case uk.gridEnd:r=n;break;case uk.inlineStart:case uk.inlineEnd:r=n}if(r!==p.toIndex){var i=P.current={uuid:e.uuid,zone:t};setTimeout((function(){P.current===i&&f({fromIndex:p.fromIndex,toIndex:r})}),200)}}}}),[p]),dragLeftTileZone:r.useCallback((function(e,t){void 0!==e.renderIndex&&void 0!==P.current&&P.current.uuid===e.uuid&&P.current.zone===t&&(P.current=void 0)}),[]),dragEnded:r.useCallback((function(){if(P.current=void 0,p){var e=p.fromIndex,t=p.toIndex;c({type:fp.MOVE,fromIndex:e,toIndex:t}),f(null)}}),[p,c])}),A=x.dragData,N=x.subscribeToOffset,R=x.onDragEnd,D=x.gridContext,k=!!A,U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,i=r.useRef(0),o=r.useRef();return r.useEffect((function(){if(e&&!YR()){var r,a,s=setInterval((function(){var e=o.current,s=i.current;if(e){var c=e.getBoundingClientRect(),u=c.top,l=c.height,d=e.scrollTop,p=e.scrollHeight,f=u+t,h=l+u-n;if(f<s&&s<h)return r=null,void(a=null);null!==r&&null!==a||(r=Date.now(),a=d);var m=(Date.now()-r)/1e3,g=320*m+320*Math.pow(Math.min(m,10),2.2)+320*Math.max(0,m-10)*(Math.pow(10,2.2)-Math.pow(9,2.2));s>h?e.scrollTop=Math.min(a+g,p-l):s<f&&(e.scrollTop=Math.max(a-g,0))}}),17);return function(){clearInterval(s)}}}),[e,o,i,t,n]),[o,i]}(k,60,40),L=U[0],M=U[1];r.useEffect((function(){L.current=document.getElementsByClassName("homepage-scrollview")[0]}),[L]),r.useEffect((function(){return N((function(e){var t;M.current=null!=(t=null==e?void 0:e.offsetY)?t:0}))}),[M,N]);var j=r.useCallback((function(){return T("profile-card","")}),[T]),F=r.useCallback((function(e,t,n){T(t,n),i(t,e)}),[i,T]),B=r.useCallback((function(e,t,n){T(t,n),o(t,e)}),[o,T]),z=r.useCallback((function(e){return r.createElement(r.Fragment,null,e.map((function(e){var t=e.uuid,n=e.identifier,i=e.tileSize,o=e.renderIndex;return r.createElement(hk,{tileState:e,tileSize:i,key:t},r.createElement(pk,{appId:n,uuid:t,tileIndex:o,tileSize:i,onError:F,onSuccess:B}))})))}),[F,B]),H=v===bm.SM||1&b.length?1:2,W=b.length-1,V=xm().isInCustomizationMode;return r.createElement(Sp,{scope:"tile-grid"},r.createElement(ak,{value:D},r.createElement("div",{className:"application-content",onDragEnd:R,onDrop:R},e.inlineBannerData&&r.createElement("div",{className:Ts()("banner-container",v.toLowerCase())},r.createElement(_k,{bannerData:e.inlineBannerData})),r.createElement("div",{className:Ts()("tile-grid",e.className,v.toLowerCase(),{dragging:k,"debug-dnd":t,customizing:V})},r.createElement(hk,{tileSize:cm.Small,tileState:Ik,draggable:!1},r.createElement(KR,{onPhotoReady:j})),z(b),r.createElement(wk,{zoneCount:H,index:W})),r.createElement("div",{"aria-hidden":!0,className:Ts()("removed-container")},z(w)))))},Ik={uuid:"ProfileCard",identifier:""};function wk(e){var t=e.zoneCount,n=e.index,i=xm().isInCustomizationMode,o=sk(),a=o.onDragEnter,s=o.onDragLeave,c=uk.gridEnd,u=r.useMemo((function(){return{uuid:Np(),identifier:"grid",renderIndex:n}}),[n]),l=r.useCallback((function(e){null==a||a(e,null,u,c)}),[a,u,c]),d=r.useCallback((function(e){null==s||s(e,null,u,c)}),[s,u,c]),p=r.useCallback((function(e){return r.createElement("div",{className:"grid-end-drop-zone",key:"grid-end-"+e,onDragEnter:l,onDragLeave:d})}),[l,d]);return i?r.createElement(r.Fragment,null,Array(t).fill(0).map((function(e,t){return p(t)}))):null}n(1151),n(1152),n(1153);var Ek=n(867);function Sk(e){var t=e.changedTouches.item(0);return t?document.elementFromPoint(t.clientX,t.clientY):null}n(1155);var Tk=["styles"];function Ok(){return(Ok=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Pk,xk=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Tk);return i.a.createElement("svg",Ok({className:n["ui-menu-icon-check"]||"ui-menu-icon-check",width:"12",height:"13",xmlns:"http://www.w3.org/2000/svg"},r),i.a.createElement("path",{className:n["at3-check"]||"at3-check",d:"M7.754 3.645c-.62.895-1.68 2.3-2.36 3.125l-1.23 1.5c-1.175-1.745-1.685-2.245-1.89-2.24-.205 0-.71.2-1.125.44-.63.37-.47.885 1 3.23.96 1.535 1.87 2.73 2.02 2.655.15-.07 1.67-2.09 3.375-4.485 2.6-3.645 3.005-4.475 2.48-5.12-.345-.425-.74-.765-.885-.75-.145.01-.765.75-1.385 1.645z"}),i.a.createElement("path",{className:n["sf-check"]||"sf-check",d:"M4.633 12.345c.4 0 .712-.16.931-.485l6.225-9.603c.16-.239.226-.458.226-.665 0-.545-.4-.937-.958-.937-.385 0-.618.133-.85.505l-5.6 8.858-2.86-3.604c-.226-.273-.458-.4-.79-.4-.566 0-.972.4-.972.951 0 .24.08.466.286.705l3.438 4.223c.26.313.545.452.924.452z"}))},Ak=function(){return(Ak=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Nk(e){var t=e.ariaLabel,n=e.checkedAsset,r=e.children,o=e.checkable,a=e.exclusiveCheckable,s=e.checked,c=e.disabled,u=e.className,l=e.id,d=e._isHighlighted,p=e._isChosen,f="menuitem";return o&&(f="menuitemcheckbox"),a&&(f="menuitemradio"),i.a.createElement("ui-menu-item",{role:f,id:l,"aria-checked":o||a?s?"true":"false":void 0,"aria-disabled":!!c||void 0,"aria-label":t,tabindex:d&&!c?0:-1,class:Ts()(u,d?"is-highlighted":void 0,p?"is-chosen":void 0)},s?n||i.a.createElement(xk,{"aria-hidden":"true"}):void 0,r)}function Rk(e){var t=e.href,n=e.target,r=e.rel,o=e.preventLinkNavigation,a=e.children,s=e.ariaLabel,c=e.disabled,u=e.className,l=e.id,d=e._isHighlighted,p=e._isChosen;return i.a.createElement("a",{role:"menuitem",id:l,href:t,target:n,rel:r,"aria-disabled":!!c||void 0,"aria-label":s,tabIndex:d&&!c?0:-1,onClick:o?function(e){e.preventDefault()}:void 0,className:Ts()(u,d?"is-highlighted":void 0,p?"is-chosen":void 0)},a)}function Dk(e){var t=e.className;return i.a.createElement("ui-menu-divider",{"aria-hidden":"true",class:t})}!function(e){e.Discrete="DISCRETE",e.Continuous="CONTINUOUS"}(Pk||(Pk={}));var kk=i.a.forwardRef((function(e,t){var n=e.directionCSSClassName,r=e.hoverStart,o=e.hoverEnd;return i.a.createElement("ui-menu-scroller",{ref:t,class:n,onMouseOver:r,onMouseLeave:o,onFocus:function(){},"aria-hidden":"true"})}));kk.displayName="UIMenuScroller";var Uk,Lk=i.a.forwardRef((function(e,t){!function(e){var t=new Set,n=!1;i.a.Children.forEach(e,(function(e){if(Hk(e)){var r=e.props,i=r.value,o=r.initialHighlighted;if(void 0===i)throw new Error("`UIMenuItem` must have a value, which may not be `undefined`.");if(t.has(i))throw new Error("Two UIMenuItems in one UIMenu may not have the same value ("+i+").");if(t.add(e.props.value),o){if(n)throw new Error("You can only specify `initialHighlighted` on one UIMenuItem per menu.");n=!0}}}))}(e.children);var n,o,a,s,c=Object(r.useState)((function(){var t=-1;return i.a.Children.forEach(e.children,(function(n,r){(Hk(n)||Wk(n))&&!e.highlightedIndex&&n.props.initialHighlighted&&(t=r)})),t})),u=c[0],l=c[1],d="number"===typeof e.highlightedIndex?e.highlightedIndex:u,p=Object(r.useState)(void 0),f=p[0],h=p[1],m=Object(r.useState)(-1),g=m[0],v=m[1],y=(i.a.Children.map(e.children,(function(e,t){var n,r=(Hk(e)||Wk(e))&&e.key||t;if(Hk(e))return i.a.createElement(Nk,Ak({},e.props,{key:r,_isHighlighted:t===d,_isChosen:e.props.value===f}));if(Wk(e))return i.a.createElement(Rk,Ak({},e.props,{key:r,_isHighlighted:t===d,_isChosen:e.props.value===f}));if(n=e,Object(ih.a)(n)&&n.type===Dk)return i.a.createElement(Dk,Ak({},e.props,{key:r}));if(e)throw new Error("Unexpected child of menu. Got "+Object(Ek.a)(e)+", expected UIMenuItem or UIMenuDivider.")}))||[]).filter(Boolean),b=window.matchMedia("(pointer: coarse)").matches,_=e.scrollMode||(b?Pk.Continuous:Pk.Discrete),C=Object(r.useRef)(null),I=function(e){var t=Object(Vc.a)(),n=Object(r.useRef)(void 0!==e?Math.max(0,e):void 0);return void 0===n.current&&e!==n.current&&(n.current=Math.max(0,e||0)),[n.current||0,Object(r.useCallback)((function(e){n.current=e,t()}),[t])]}(e.initialScrollOffset),w=I[0],E=I[1],S=Object(r.useState)(0),T=S[0],O=S[1],P=e.frame,x=void 0!==e.initialScrollOffset?e.initialScrollOffset:_===Pk.Discrete?0:void 0,A=!1,N=!1;void 0!==P&&(n=P.top,o=P.left,Bk(P)&&(a=P.width,s=P.height,C.current&&void 0!==x&&(x>0?(n=P.top,s=Math.min(C.current.scrollHeight-x+T,P.height),A=s<P.height):x<0&&(n=P.top-x-T,s=Math.min(P.height+x+T,P.height),N=n>P.top))));var R=!1,D=!1;if(C.current&&void 0!==s){R=w>0;var k=C.current.scrollHeight;D=w+s<k}var U=Object(r.useRef)(0);function L(t){if(l(t),e.onItemHighlighted)if(t>-1){var n=y[t];e.onItemHighlighted(n.props.value,t)}else e.onItemHighlighted(void 0,-1)}function M(t){if(void 0===f&&t>-1){var n=y[t];if(n){var r=n.props.value;h(r),v(t),e.onItemSelectedSync&&e.onItemSelectedSync(r,t)}}}function j(e){var t=y[e];return Hk(t)||Wk(t)&&!0===t.props.preventLinkNavigation}function F(e,t){if(P&&Bk(P)&&C.current&&void 0!==x){var n=0;if(A?n=P.height-(C.current.scrollHeight-x):N&&N&&(n=-x),t===Uk.Down&&N)(r=T+e-w)<n?O(r):(O(n),P.height<C.current.scrollHeight&&E(w+(r-n)));else if(t===Uk.Up&&A){var r;(r=T+Math.abs(e-w))<n?(O(r),E(e)):(O(n),P.height<C.current.scrollHeight&&E(w+(r-n)))}else E(e)}}function B(e){if(null!==C.current&&void 0!==s){var t=C.current.children,n=null;if(e===Uk.Up)for(var r=0;r<t.length;r++){if((i=t[r]).offsetTop+i.offsetHeight>w)return null!=n?n.offsetHeight:null;n=i}else for(r=t.length-1;r>=0;r--){var i;if((i=t[r]).offsetTop<w+s)return null!=n?n.offsetHeight:null;n=i}}return null}var z=Object(r.useRef)(null);function H(e,t){if(C.current){var n,r=B(t);n=null!=r&&t===Uk.Up?w-r:null!=r&&t===Uk.Down?w+r:e,F(Mk(C.current,n),t)}}var W=Object(r.useRef)(H);W.current=H;var V=Object(r.useRef)(null),Z=Object(r.useRef)(""),q=Object(r.useRef)(null);function K(e){q.current&&clearTimeout(q.current),Z.current+=e;var t=function(e,t){var n;if(!e||!t)return-1;function r(e){return e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():e.toLowerCase()}for(var i=0;i<t.length;i++){var o=t[i],a=null===(n=null===o||void 0===o?void 0:o.props)||void 0===n?void 0:n.children;if("string"===typeof a&&(Hk(o)||Wk(o))&&!o.props.disabled&&r(a).startsWith(r(e)))return i}return-1}(Z.current,y);-1!==t&&t!==u&&Y(t,t>u?Uk.Down:Uk.Up),q.current=setTimeout((function(){Z.current=""}),500)}function G(e,t){if(C.current){var n=void 0,r=void 0;t?(n=e===Uk.Down?y.length:-1,r=-e):(n=-1===d&&e===Uk.Up?y.length:d,r=e),Y(function(e,t,n){var r,i;n===Uk.Up?(r=t-1,i=0):(r=t+1,i=e.length-1);for(var o=r;o*n<=i*n;o+=n){var a=e[o];if(a&&(Hk(a)||Wk(a))&&!a.props.disabled)return o}return t}(y,n,r),e)}}function Y(t,n){var r;if(null===(r=null===C||void 0===C?void 0:C.current)||void 0===r?void 0:r.children){var i=C.current.children[t];if(!i)return;!0!==e.dontManageFocus&&(V.current=i),L(t),void 0!==s&&F(t===y.length-1?C.current.scrollHeight-s:0===t?0:Mk(C.current,function(e,t){if(C.current&&void 0!==s)if(t===Uk.Up){var n=R?18:0,r=e.offsetTop-n;if(r<w)return r}else if(t===Uk.Down){var i=D?18:0,o=w+s,a=e.offsetTop+e.offsetHeight+i;if(a>o)return a-s}return w}(i,n)),n),J()}}Object(r.useEffect)((function(){return function(){clearTimeout(q.current)}}),[]),Object(r.useLayoutEffect)((function(){_===Pk.Discrete&&C.current&&(C.current.scrollTop=w+(R?18:0)),!0!==e.dontManageFocus&&V.current&&(V.current.focus(),V.current=null)}));var Q=Object(r.useRef)(null),X=Object(r.useRef)(!1),J=Object(r.useCallback)((function(){var e=Q.current;e&&window.clearTimeout(e),X.current=!0,Q.current=setTimeout((function(){X.current=!1}),200)}),[]);Object(r.useLayoutEffect)((function(){J()}),[J]),Object(r.useEffect)((function(){var e=C.current;if(e){var t=function(e){_===Pk.Discrete&&e.preventDefault()};return e.addEventListener("wheel",t,{passive:!1}),function(){return e.removeEventListener("wheel",t)}}}),[_]);var $=Object(Vc.a)();Object(r.useEffect)($,[$]);var ee=Object(r.useRef)(null),te=Object(r.useRef)(null),ne=Object(r.useRef)(null),re=Object(r.useRef)(!1),ie=function(){return!1===re.current||ne.current!==C.current.scrollTop||te.current!==C.current.getBoundingClientRect().top};return i.a.createElement("ui-menu",{class:Ts()(e.variant||"standard "+(b?"touch":"mouse"),R?"has-overflow-top":null,D?"has-overflow-bottom":null,e.className),ref:t,style:{position:P?"absolute":"relative",top:n,left:o,width:a,height:s},onMouseMove:function(e){ee.current={x:e.clientX,y:e.clientY}},onMouseUp:function(t){var n=t.target;e._unsafe_allowPointerPropagationForSproutCore||t.stopPropagation();var r=Fk(n);r&&M(zk(r))},onMouseOver:function(e){if(!X.current){var t=Fk(e.target);L(t?zk(t):-1)}},onMouseLeave:function(e){void 0===f&&L(-1)},onTouchStart:function(e){if(null!==te.current?re.current=!1:(te.current=C.current.getBoundingClientRect().top,ne.current=C.current.scrollTop,re.current=!0),!X.current){var t=Fk(e.target);L(t?zk(t):-1)}},onTouchMove:function(e){var t=ie();if(t&&(re.current=!1),!X.current){var n=Sk(e);if(n){e.preventDefault();var r=Fk(n);L(r&&!t?zk(r):-1)}}},onTouchEnd:function(t){var n=ie();if(te.current=null,ne.current=null,re.current=!1,!X.current){var r=Sk(t);if(r){if(d>-1&&j(d)&&t.preventDefault(),e._unsafe_allowPointerPropagationForSproutCore||t.stopPropagation(),!0===n)return;var i=Fk(r);i&&M(zk(i))}}},onFocus:function(e){var t=e.target;jk(t)&&L(zk(t))},onKeyDown:function(e){switch(e.key){case"ArrowDown":e.preventDefault(),G(Uk.Down,e.metaKey);break;case"ArrowUp":e.preventDefault(),G(Uk.Up,e.metaKey);break;case"Home":e.preventDefault(),G(Uk.Up,!0);break;case"End":e.preventDefault(),G(Uk.Down,!0);break;case" ":Z.current.length>0?(e.preventDefault(),e.stopPropagation(),K(e.key)):d>-1&&(j(d)&&e.preventDefault(),M(d));break;case"Enter":d>-1&&(j(d)&&e.preventDefault(),M(d));break;case"Tab":e.preventDefault();break;case"Escape":break;default:return void(e.key&&1===e.key.length&&!e.metaKey&&(e.preventDefault(),e.stopPropagation(),K(e.key)))}},onAnimationEnd:function(t){void 0!==f&&(e.onItemSelected(f,g),h(void 0),v(-1),t.stopPropagation())},tabindex:-1===d?0:-1},i.a.createElement(kk,{directionCSSClassName:"top",hoverStart:function(){z.current=setInterval((function(){return W.current(0,Uk.Up)}),50)},hoverEnd:function(){z.current&&clearInterval(z.current)}}),i.a.createElement("ui-menu-scroll-container",{role:"menu",ref:C,style:{position:"relative"},onWheel:function(e){if(C.current&&_===Pk.Discrete&&void 0!==s){U.current+=e.deltaY;var t=U.current>0?Uk.Down:Uk.Up,n=B(t);if(n&&t*U.current>=n/2){for(var r=Mk(C.current,w+n*t);t*U.current>=n/2;)U.current-=n/2*t;F(r,t);var i=ee.current;if(i){var o=i.y+n*t,a=document.elementFromPoint(i.x,o);jk(a)&&L(zk(a))}}else null===n&&(U.current=0,r=w,t===Uk.Up?r=0:t===Uk.Down&&(r=C.current.scrollHeight-s),F(r,t))}}},y),i.a.createElement(kk,{directionCSSClassName:"bottom",hoverStart:function(){z.current=setInterval((function(){if(C.current){var e=C.current.scrollHeight-C.current.offsetHeight;W.current(e,Uk.Down)}}),50)},hoverEnd:function(){z.current&&clearInterval(z.current)}}))}));function Mk(e,t){return e?Math.max(Math.min(e.scrollHeight-e.offsetHeight,t),0):t}function jk(e){return!!e&&("UI-MENU-ITEM"===e.tagName||"A"===e.tagName)&&"true"!==e.getAttribute("aria-disabled")}function Fk(e){if(!e.closest)return jk(e)?e:(console.warn("To support UIMenuItems with child elements in IE11, add a 'closest' polyfill to your project."),null);var t=e.closest("[role=menuitem]")||e.closest("ui-menu-item");return t&&jk(t)?t:null}function Bk(e){return"width"in e&&"height"in e}function zk(e){return e&&e.parentElement?Array.prototype.slice.call(e.parentElement.children).indexOf(e):-1}function Hk(e){return Object(ih.a)(e)&&e.type===Nk}function Wk(e){return Object(ih.a)(e)&&e.type===Rk}Lk.displayName="UIMenu",function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(Uk||(Uk={}));var Vk=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"questionmark.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM57.5195-25.1465C59.9609-25.1465 61.4746-26.709 61.4746-28.6133L61.4746-29.1992C61.4746-31.9336 63.0371-33.6914 66.4551-35.9375C71.1914-39.0625 74.5605-41.8945 74.5605-47.7539C74.5605-55.8594 67.334-60.2539 59.0332-60.2539C50.6348-60.2539 45.1172-56.25 43.7988-51.7578C43.5547-50.9766 43.3594-50.1465 43.3594-49.3652C43.3594-47.168 45.1172-45.9961 46.7285-45.9961C49.5117-45.9961 49.9512-47.4609 51.5137-49.3164C53.125-52.002 55.4688-53.6133 58.7402-53.6133C63.1836-53.6133 66.0645-51.0742 66.0645-47.3633C66.0645-44.043 64.0137-42.4316 59.7656-39.4531C56.25-37.0117 53.6133-34.4238 53.6133-29.6387L53.6133-29.0039C53.6133-26.4648 55.0293-25.1465 57.5195-25.1465ZM57.4219-10.5957C60.2539-10.5957 62.6953-12.8418 62.6953-15.6738C62.6953-18.5059 60.3027-20.752 57.4219-20.752C54.541-20.752 52.1484-18.457 52.1484-15.6738C52.1484-12.8906 54.5898-10.5957 57.4219-10.5957Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},Zk=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"questionmark.circle.ar",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM59.4238-25.1465C61.9629-25.1465 63.3301-26.4648 63.3301-29.0039L63.3301-29.6387C63.3301-34.4238 60.6934-37.0117 57.2266-39.4531C52.9297-42.4316 50.8789-44.043 50.8789-47.3633C50.8789-51.0742 53.7598-53.6133 58.252-53.6133C61.4746-53.6133 63.8672-52.002 65.4297-49.3164C67.041-47.4609 67.4805-45.9961 70.2148-45.9961C71.875-45.9961 73.584-47.168 73.584-49.3652C73.584-50.1465 73.4375-50.9766 73.1934-51.7578C71.8262-56.25 66.3086-60.2539 57.9102-60.2539C49.6094-60.2539 42.3828-55.8594 42.3828-47.7539C42.3828-41.8945 45.752-39.0625 50.4883-35.9375C53.9062-33.6914 55.5176-31.9336 55.5176-29.1992L55.5176-28.6133C55.5176-26.709 56.9824-25.1465 59.4238-25.1465ZM59.5703-10.5957C62.3535-10.5957 64.7949-12.8906 64.7949-15.6738C64.7949-18.457 62.4023-20.752 59.5703-20.752C56.6895-20.752 54.2969-18.5059 54.2969-15.6738C54.2969-12.8418 56.7383-10.5957 59.5703-10.5957Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},qk=(n(1154),function(e){return r.createElement("div",{className:"cloudos-menu-item",role:"presentation"},e.startIcon,r.createElement("div",{className:"label",role:"presentation"},e.children),e.endIcon)}),Kk=function(e){return r.createElement("div",{className:"cloudos-menu-item cloudos-menu-item-link"},e.startIcon,r.createElement("div",{className:"label","aria-hidden":"true"},e.children,r.createElement(Xk,null)),e.endIcon)};function Gk(){var e=O(),t="rtl"===x()&&"iw-il"!==e;return r.createElement(Yk,{symbol:t?Zk:Vk})}function Yk(e){var t=e.symbol;return r.createElement(t,{"aria-hidden":!0,className:"symbol-icon",desiredFontSize:11})}function Qk(e){var t;return r.createElement(Sd,{applicationIdentifier:e.applicationIdentifier,iconSize:null!=(t=e.iconSize)?t:18})}function Xk(){var e="rtl"===x()?oT:iT;return r.createElement(e,{className:"cloudos-menu-item-opens-in-new-tab",desiredFontSize:9,"aria-hidden":"true"})}function Jk(e){var t,n,r,i,o,a=null!=(t=null==(n=_r.configuration)?void 0:n.environment)?t:"PROD",s=wZ.sharedInstance.cloudOSUser,c=null!=(r=null==s||null==(i=s.details)?void 0:i.alternateDSID)?r:"",u=(null!=(o=null==s?void 0:s.isTiburonLogin)&&o).toString(),l=_r.domain,d=he.c(l.url.origin+"/ssoRedirect");e&&d.searchParams.append("action",e),d.searchParams.append("env",a),d.searchParams.append("alternateDSID",c),d.searchParams.append("isTiburonLogin",u),globalThis.window.open(d.toString(),"_blank")}var $k,eU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"gear",svgPath:"M63.7207 12.5488C64.9902 12.5488 66.2109 12.4023 67.5293 12.3047L70.3125 17.6758C70.8496 18.75 71.9238 19.3359 73.291 19.1406C74.5117 18.8965 75.3418 18.0176 75.5371 16.6992L76.3672 10.791C78.8086 10.1562 81.2012 9.22852 83.4961 8.20312L87.8906 12.1582C88.8184 13.0371 89.9902 13.2324 91.2109 12.5488C92.2852 11.9629 92.7246 10.791 92.4805 9.52148L91.2598 3.66211C93.3105 2.24609 95.3125 0.634766 97.1191-1.17188L102.539 1.12305C103.76 1.61133 104.932 1.36719 105.859 0.244141C106.689-0.634766 106.787-1.9043 106.055-2.97852L102.881-8.05664C104.346-10.1074 105.518-12.3047 106.641-14.6484L112.646-14.3555C113.916-14.3066 114.941-14.9902 115.381-16.2109C115.771-17.4316 115.43-18.6035 114.404-19.3848L109.717-23.0957C110.352-25.4395 110.84-27.9785 111.084-30.6152L116.699-32.373C117.969-32.8125 118.701-33.7402 118.701-35.0586C118.701-36.3281 117.969-37.2559 116.699-37.6953L111.084-39.502C110.84-42.1387 110.352-44.5801 109.717-46.9727L114.404-50.7324C115.381-51.4648 115.771-52.5879 115.381-53.8086C114.941-55.0293 113.916-55.7129 112.646-55.6641L106.641-55.4199C105.518-57.7637 104.346-59.9609 102.881-62.0117L106.055-67.0898C106.738-68.1152 106.641-69.3848 105.859-70.2637C104.932-71.3867 103.76-71.6797 102.539-71.1426L97.1191-68.9453C95.3125-70.6543 93.3105-72.3145 91.2598-73.7305L92.4805-79.541C92.7246-80.8594 92.2852-82.0312 91.2109-82.6172C89.9902-83.252 88.8184-83.1543 87.8906-82.1777L83.4961-78.3203C81.2012-79.3457 78.8086-80.1758 76.3672-80.8594L75.5371-86.7676C75.3418-88.0371 74.4629-88.9648 73.2422-89.1602C71.9238-89.3555 70.8496-88.8184 70.3125-87.7441L67.5293-82.373C66.2109-82.4707 64.9902-82.5684 63.7207-82.5684C62.4023-82.5684 61.2305-82.4707 59.9121-82.373L57.0801-87.7441C56.543-88.8184 55.4688-89.3555 54.1504-89.1602C52.9297-88.9648 52.0508-88.0371 51.9043-86.7676L51.0254-80.9082C48.584-80.1758 46.2402-79.3457 43.8965-78.3203L39.502-82.1777C38.5742-83.1543 37.4023-83.252 36.1816-82.6172C35.1074-82.0312 34.668-80.8594 34.9121-79.541L36.1328-73.7305C34.1309-72.3145 32.0801-70.6543 30.2734-68.9453L24.8535-71.1426C23.6328-71.6797 22.5098-71.3867 21.582-70.2637C20.752-69.3848 20.6543-68.1152 21.3379-67.1387L24.5117-62.0117C23.0957-59.9609 21.875-57.7637 20.752-55.4199L14.7949-55.6641C13.5254-55.7129 12.4512-55.0293 12.0117-53.8086C11.6211-52.5879 11.9629-51.4648 12.9883-50.7324L17.6758-46.9727C17.041-44.5801 16.5527-42.1387 16.4062-39.502L10.6934-37.6953C9.42383-37.3047 8.74023-36.377 8.74023-35.0586C8.74023-33.7402 9.42383-32.8125 10.6934-32.373L16.4062-30.5664C16.5527-27.9785 17.041-25.4395 17.6758-23.0957L12.9883-19.3848C12.0117-18.6035 11.6699-17.4316 12.0117-16.2109C12.4512-14.9902 13.5254-14.3066 14.7949-14.3555L20.752-14.6484C21.875-12.3047 23.0957-10.1074 24.5117-8.05664L21.3379-2.97852C20.6543-1.9043 20.752-0.634766 21.582 0.244141C22.5098 1.36719 23.6328 1.61133 24.8535 1.12305L30.2734-1.17188C32.0801 0.634766 34.1309 2.24609 36.1328 3.66211L34.9121 9.52148C34.668 10.791 35.1074 11.9629 36.1816 12.5488C37.4023 13.2324 38.5742 13.0371 39.502 12.1582L43.8965 8.20312C46.2402 9.22852 48.584 10.1562 51.0254 10.791L51.9043 16.6992C52.0508 18.0176 52.9297 18.8965 54.1504 19.1406C55.4688 19.3359 56.543 18.75 57.0801 17.6758L59.9121 12.3047C61.1816 12.4023 62.4023 12.5488 63.7207 12.5488ZM75.9766-38.1348C73.7305-44.2871 69.1895-47.6562 63.623-47.6562C62.7441-47.6562 61.8164-47.5586 60.2051-47.2168L46.1914-71.1426C51.4648-73.7305 57.373-75.1465 63.7207-75.1465C85.0098-75.1465 101.709-58.9844 103.271-38.1348ZM24.0723-35.0098C24.0723-48.584 30.5176-60.5469 40.5762-67.7734L54.7363-43.7012C52.0508-40.9668 50.8301-37.9883 50.8301-34.8145C50.8301-31.7383 52.002-28.9062 54.6875-26.0742L40.2832-2.44141C30.3711-9.7168 24.0723-21.5332 24.0723-35.0098ZM57.7637-34.8633C57.7637-38.1836 60.5469-40.7715 63.7207-40.7715C66.9922-40.7715 69.7266-38.1836 69.7266-34.8633C69.7266-31.5918 66.9922-28.9062 63.7207-28.9062C60.5469-28.9062 57.7637-31.5918 57.7637-34.8633ZM63.7207 5.12695C57.2266 5.12695 51.1719 3.61328 45.8496 0.976562L60.2051-22.5098C61.7188-22.1191 62.7441-22.0215 63.623-22.0215C69.2383-22.0215 73.7793-25.4883 75.9766-31.7871L103.223-31.7871C101.66-11.0352 85.0098 5.12695 63.7207 5.12695Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:70.28510009765614,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 109.969482421875 108.815673828125",width:109.969482421875,height:108.815673828125,translateX:-8.74022949218761,translateY:89.6378173828125,baseline:89.6378173828125,capline:19.1778564453125}}})},tU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM58.4961-36.7676C65.4297-36.7188 71.0449-42.6758 71.0449-50.4883C71.0449-57.8125 65.4297-63.8672 58.4961-63.8672C51.5625-63.8672 45.9473-57.8125 45.9473-50.4883C45.9473-42.6758 51.5625-36.8164 58.4961-36.7676ZM36.1816-10.498L80.8105-10.498C82.7637-10.498 83.6914-11.8164 83.6914-13.5742C83.6914-18.9453 75.6348-32.8125 58.4961-32.8125C41.3574-32.8125 33.3008-18.9453 33.3008-13.5742C33.3008-11.8164 34.2285-10.498 36.1816-10.498Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},nU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"x.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM43.9941-12.8906C45.5566-12.8906 46.3867-13.4277 47.6562-15.1367L58.2031-30.1758L58.3984-30.1758L68.9453-15.1367C70.166-13.4277 71.0449-12.8906 72.5586-12.8906C74.7559-12.8906 76.416-14.3555 76.416-16.4551C76.416-17.4316 76.123-18.1641 75.4883-18.9941L63.2324-35.7422L75.5859-52.5391C76.2695-53.418 76.5137-54.1992 76.5137-55.127C76.5137-57.0312 74.9023-58.5449 72.8516-58.5449C71.3379-58.5449 70.3613-57.959 69.2871-56.3477L59.082-41.3086L58.8379-41.3086L48.4375-56.3965C47.3145-57.959 46.3867-58.5449 44.7266-58.5449C42.627-58.5449 40.918-56.8848 40.918-54.9316C40.918-53.8574 41.1621-53.1738 41.9434-52.0996L53.6621-35.9863L41.2109-18.7988C40.625-17.9199 40.3809-17.2363 40.3809-16.2598C40.3809-14.3555 41.9434-12.8906 43.9941-12.8906Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})};function rU(){return(rU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function iU(e,t){var n=t.menuProps,i=t.paneProps,o=t.popoverProps,a=r.useRef(null),s=mc("VoiceOver.Menu.Close"),c=Gp(r.createElement(Bf,rU({className:"cloudos-menu-popover",arrowAsset:r.createElement(r.Fragment,null),cornerArrowAsset:r.createElement(r.Fragment,null),positioner:aU},o),r.createElement(Sp,{scope:"cloud-os-menu"},r.createElement(e,rU({},n,{onClose:function(){return l()},ref:Object(zp.a)(null==n?void 0:n.ref,a)})))),Object.assign({ariaClosePaneDescription:s,initialFocus:"ui-menu"},i)),u=c[0],l=c[1];return[u,l]}function oU(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.menuProps,i=t.paneProps,o=t.popoverProps,a=void 0===o?{}:o,s=r.useState({}),c=s[0],u=s[1],l=iU(e,{menuProps:n,paneProps:i,popoverProps:Object.assign({},a,c)}),d=l[0];return function(e){u({anchorRect:{left:e.x,top:e.y,width:e.width,height:e.height,right:e.width+e.x,bottom:e.height+e.y}}),d()}}function aU(e,t,n,r,i){if(void 0===e)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var o=n.bottom-2,a=Math.min(o+e.height,r.height-10),s=a-o,c=e.width,u=(n.left+n.right)/2,l={height:0,width:0,top:o,bottom:o,left:u,right:u};if("rtl"===i){var d=Math.max(n.left-2,10);return{contentRect:{height:s,width:c,top:o,bottom:a,left:d,right:r.width-d-e.width},arrowRect:l,arrowDirection:cf.Up}}var p=Math.min(n.right+2,r.width-10);return{contentRect:{height:s,width:c,top:o,bottom:a,left:p-e.width,right:p},arrowRect:l,arrowDirection:cf.Up}}!function(e){e.ICloudSettings="iCloudSettings",e.ManageAppleId="mangeAppleId",e.DigitalLegacyPortal="digitalLegacyPortal",e.SignOut="signOut"}($k||($k={}));var sU=r.forwardRef((function(e,t){var n,i,o,s,c,u=qf(),l=null!=(n=null==u?void 0:u.primaryEmail)?n:"",d=null!=u&&u.details&&null!=(i=Mw(a(),{givenName:u.details.firstName,familyName:u.details.lastName}))?i:"",p=null==u||null==(o=u.details)||null==(s=o.beneficiaryInfo)?void 0:s.isBeneficiary,f=mc("CloudOS.Toolbar.AccountMenu.ICloudSettings"),h=mc("CloudOS.Toolbar.AccountMenu.DigitalLegacyPortal"),m=D("digitalLegacyPortal"),g=mc("AccountMenuPopover.ManageAppleId"),v=Tp("load","account-menu")[0],y=Tp("click","account-menu")[0],b=Tp("link","account-menu")[0];v();var _=[],C=null==(c=YV.cloudOSApplication.currentChildApplicationConfiguration)?void 0:c.applicationInfo.helpButtonConfigs;return null==C||C.forEach((function(e){var t=gc("CloudOS.Help.Title");e.title&&(t=gc(e.title)),_.push(r.createElement(Rk,{href:e.externalURL(),target:"_blank",className:"blue"},r.createElement(Kk,{startIcon:e.symbol?r.createElement("div",{className:"symbol-icon"},e.symbol):r.createElement(Gk,null)},t))),_.push(r.createElement(Dk,null))})),r.createElement(Lk,{className:"account-menu",variant:"cloudos-menu",onItemSelected:function(t){switch(t){case $k.SignOut:y("sign-out"),wZ.sharedInstance.unauthenticateUser(!1,!1).then((function(e){e&&Object(Qn.a)(window.location.origin)})).catch((function(){}));break;case $k.ICloudSettings:y("settings"),sZ(eZ.settings,gc(oZ(eZ.settings)));break;case $k.DigitalLegacyPortal:b("digital-legacy-id"),globalThis.window.open(m,"_blank")}e.onClose()},onItemSelectedSync:function(e){e===$k.ManageAppleId&&(b("manage-apple-id"),Jk())},ref:t},r.createElement(Nk,{ariaLabel:mc("CloudOS.Toolbar.AccountMenu.Profile.AccessibilityLabel",{name:d,email:l}),className:"header",disabled:!0,value:""},r.createElement(qk,null,r.createElement("div",{"aria-hidden":!0,className:"name"},d),r.createElement("div",{"aria-hidden":!0,className:"email"},l))),!p&&r.createElement(Nk,{value:$k.ICloudSettings},r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:eU})},f)),!p&&r.createElement(Dk,null),r.createElement(Nk,{className:"blue",value:p?$k.DigitalLegacyPortal:$k.ManageAppleId},r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:tU})},p?h:g,r.createElement(Xk,null))),r.createElement(Dk,null),_,r.createElement(Nk,{className:"red",value:$k.SignOut},r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:nU})},mc("AccountMenuPopover.SignOut"))))})),cU=(n(1156),r.forwardRef((function(e,t){var n=Ts()("toolbar-icon-button",e.className);return r.createElement(Wc,{className:n,onActivate:e.onActivate,ariaLabel:e.ariaLabel,ariaHasPopup:e.ariaHasPopup,ref:t},e.icon)}))),uU=r.forwardRef((function(e,t){return r.createElement("a",{className:Ts()("unstyled-link","toolbar-icon-button",e.className),target:"_blank",rel:"noreferrer",href:e.href,"aria-label":e.ariaLabel,ref:t},e.children)})),lU=function(){var e=r.useRef(null),t=mc("AccountMenuPopover.Button.AriaLabel"),n=KN(),i=n.data,o=n.isLoading,a=function(e){var t=r.useRef(null),n=r.useRef(null),i=r.useRef(null),o=iU(sU,{menuProps:{ref:t},popoverProps:{anchorRef:e}}),a=o[0],s=o[1],c=pf(sU,{menuProps:{ref:n},cardProps:{className:"account-menu-compact"}}),u=c[0],l=c[1];return Xf(u,l,n,a,s,t,i)}(e);return r.createElement("div",{className:"account-menu-popover"},r.createElement(cU,{ariaHasPopup:"menu",ariaLabel:t,className:"activation-button",onActivate:a,ref:e,icon:r.createElement(qR,{profilePhoto:i,isProfilePhotoLoading:o,size:28,showPlaceholderOnError:!0})}))},dU=(n(1157),function(e){var t=Ts()("application-toolbar",e.className);return r.createElement("header",{className:"toolbar-banner",role:"banner"},r.createElement("div",{className:t},r.createElement("div",{className:"toolbar-container"},r.Children.toArray(e.children).reduce((function(e,t){var n=t;return n.type===pU?e[0]=n:n.type===hU?e[1]=n:n.type===fU&&(e[2]=n),e}),[]).filter((function(e){return e})))))}),pU=function(e){var t=Ts()("application-toolbar-start-view",e.className);return r.createElement("div",{className:t},e.children)},fU=function(e){var t=Ts()("application-toolbar-end-view",e.className);return r.createElement("div",{className:t},e.children)},hU=function(e){var t=Ts()("application-toolbar-center-view",e.className);return r.createElement("div",{className:t},e.children)},mU=(n(1158),n(1159),n(1160),["styles"]);function gU(){return(gU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vU=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,mU);return i.a.createElement("svg",gU({xmlns:"http://www.w3.org/2000/svg",width:"164",height:"44"},t),i.a.createElement("g",{fill:"#F5F5F7"},i.a.createElement("path",{d:"M76.412 18.106h-4.69v-2.072h-1.484v2.072h-4.69V28.9h1.456v-.812h7.952v.812h1.456V18.106zm-9.408 8.568v-3.108h3.234v3.108h-3.234zm4.718 0v-3.108h3.234v3.108h-3.234zm-4.718-4.452v-2.73h3.234v2.73h-3.234zm4.718-2.73h3.234v2.73h-3.234v-2.73zm8.008-2.814v1.414h10.08v-1.414H79.73zm-1.358 3.85v1.456h4.452c-1.344 2.702-2.436 4.354-3.276 4.97a1.707 1.707 0 01-.35.154l.378 1.484c3.29-.238 6.328-.546 9.114-.938.252.476.476.938.686 1.414l1.316-.924c-.7-1.386-1.68-3.024-2.94-4.9l-1.176.728c.504.798.966 1.582 1.4 2.352a94.323 94.323 0 01-6.608.7c.896-1.036 1.918-2.716 3.08-5.04h6.622v-1.456H78.372zm18.634-4.522v11.046h-4.858v1.428h12.586v-1.428h-6.216v-5.474h5.18v-1.414h-5.18v-4.158zm8.848 4.508v1.232h12.572v-1.232h-5.558v-.588h4.074v-3.052h-4.074v-.826h-1.456v.826h-4.046v3.052h4.046v.588h-5.558zm9.688-1.708h-2.674v-.812h2.674v.812zm-4.13 0h-2.646v-.812h2.646v.812zm5.39 3.486h-9.184v4.382h1.414v-3.122h6.342v2.954h1.428v-4.214zm-5.222 1.75c-.098 1.274-.476 2.17-1.12 2.674-.728.532-2.254.84-4.55.924l.588 1.33c2.772-.21 4.494-.672 5.194-1.386.672-.546 1.12-1.68 1.316-3.402l-1.428-.14zm1.708 2.254l-.742 1.106c1.736.406 3.416.966 5.04 1.694l.784-1.232c-1.526-.616-3.22-1.134-5.082-1.568zm7.308-6.902a16.381 16.381 0 01-1.022 4.032l1.316.448c.462-1.33.784-2.716.952-4.144l-1.246-.336zm5.754-2.87v11.97h1.4v-7.812c.42.854.798 1.82 1.148 2.898l1.176-.602c-.42-1.246-.91-2.38-1.47-3.416l-.854.392v-3.43h-1.4zm3.864-.448V28.97h1.386V16.076h-1.386zm-5.502 3.612l-.91.406v-3.906h-1.386v4.326c-.028 3.444-.798 5.95-2.31 7.518l1.092.966c1.68-1.764 2.548-4.536 2.604-8.316.448.896.854 1.918 1.218 3.052l1.176-.602a22.955 22.955 0 00-1.484-3.444zm9.828-3.584l-1.022.966c1.008.812 1.778 1.568 2.324 2.268l1.05-1.036a18.064 18.064 0 00-2.352-2.198zm7.966 12.628h3.206l.364-1.442c-.392.028-.938.056-1.652.084-.728 0-1.428.014-2.128.014-1.064 0-2.002-.014-2.8-.028-.812-.028-1.414-.14-1.82-.35-.322-.182-.644-.462-.952-.826l-.14-.14V20.71h-3.206v1.344h1.848v3.836c-.56.308-1.176 1.022-1.876 2.142l1.078 1.008c.7-1.26 1.176-1.89 1.442-1.89.168 0 .336.112.518.35.406.476.882.798 1.442.966.588.14 1.316.224 2.212.238.882.014 1.708.028 2.464.028zm-4.242-12.082v1.344h6.608V16.65h-6.608zm-.896 3.15v1.386h2.786c-1.036 2.436-1.834 3.738-2.394 3.906l.364 1.274c2.422-.252 4.382-.574 5.894-.966.14.378.266.77.406 1.19l1.302-.322c-.56-1.652-1.204-3.108-1.932-4.396l-1.19.392c.322.602.63 1.232.91 1.89-1.036.266-2.282.49-3.752.686.616-.896 1.232-2.114 1.848-3.654h4.284V19.8h-8.526zm12.278 1.26v3.066h7.392V21.06h-7.392zm6.048 1.988h-4.704v-.896h4.704v.896zm2.646 1.736h-9.954v4.186h1.428v-.518h7.112v.518h1.414v-4.186zm-8.526 2.436v-1.232h7.112v1.232h-7.112zm-2.59-10.388v1.274h2.982v.672h1.456v-.672h3.276v.672h1.456v-.672h2.982v-1.274h-2.982v-.812h-1.456v.812h-3.276v-.812h-1.456v.812h-2.982zm11.914 2.31h-11.676v2.94h1.4v-1.708h8.876v1.638h1.4v-2.87zM1.407 29.5h2.55V18.423h-2.55V29.5zm1.28-12.832c.412 0 .763-.144 1.05-.43a1.41 1.41 0 00.432-1.033c0-.407-.144-.753-.432-1.038a1.44 1.44 0 00-1.05-.426c-.407 0-.756.142-1.046.426-.291.285-.437.63-.437 1.038 0 .401.146.745.437 1.032.29.287.64.43 1.046.43zm9.915 13.156c1.14 0 2.157-.21 3.052-.631a5.723 5.723 0 002.188-1.758c.563-.752.908-1.624 1.037-2.619l.007-.091h-2.594l-.021.076a3.576 3.576 0 01-.713 1.465 3.35 3.35 0 01-1.258.943c-.5.219-1.065.328-1.695.328-.847 0-1.582-.22-2.204-.663-.623-.442-1.103-1.07-1.441-1.884-.338-.813-.507-1.776-.507-2.886v-.016c0-1.115.17-2.076.507-2.886.338-.81.817-1.434 1.439-1.875.62-.44 1.354-.66 2.199-.66.634 0 1.201.117 1.702.351.501.235.92.565 1.257.99.338.425.572.926.705 1.505l.026.105h2.59l-.004-.093c-.118-1.006-.46-1.895-1.028-2.668a5.874 5.874 0 00-2.204-1.819c-.901-.439-1.916-.658-3.044-.658-1.405 0-2.619.311-3.642.935-1.022.624-1.812 1.511-2.368 2.663-.556 1.152-.834 2.523-.834 4.113v.016c0 1.588.278 2.958.834 4.11.555 1.154 1.346 2.043 2.372 2.669 1.026.625 2.24.938 3.642.938zm8.034-.324h2.55V14.24h-2.55zm9.534.222c1.1 0 2.049-.231 2.846-.693.797-.461 1.413-1.122 1.846-1.982.434-.86.65-1.886.65-3.08v-.02c0-1.191-.218-2.216-.655-3.074a4.68 4.68 0 00-1.852-1.98c-.798-.46-1.744-.691-2.838-.691-1.086 0-2.03.23-2.829.694a4.692 4.692 0 00-1.855 1.981c-.438.859-.656 1.882-.656 3.07v.02c0 1.191.216 2.217.65 3.078.434.86 1.05 1.522 1.85 1.984.8.462 1.747.693 2.843.693zm.004-2.066c-.572 0-1.063-.146-1.472-.436-.408-.291-.722-.711-.941-1.261-.219-.55-.329-1.213-.329-1.99v-.02c0-.776.11-1.438.33-1.985.22-.548.535-.967.944-1.259.408-.291.896-.437 1.461-.437.571 0 1.06.145 1.469.436.408.29.721.71.941 1.258.22.549.33 1.21.33 1.987v.02c0 .776-.11 1.438-.328 1.988-.218.55-.53.97-.936 1.262-.406.29-.896.437-1.469.437zm10.596 2.066c.816 0 1.502-.172 2.058-.517a3.148 3.148 0 001.237-1.41h.13V29.5h2.55V18.423h-2.55v6.444c0 .543-.097 1.018-.292 1.425a2.167 2.167 0 01-.848.945c-.37.223-.82.334-1.346.334-.754 0-1.307-.216-1.657-.647-.35-.431-.526-1.063-.526-1.894v-6.607h-2.55v7.166c0 .867.144 1.61.433 2.228.289.618.716 1.09 1.281 1.416.566.326 1.259.489 2.08.489zm12.084-.024c.787 0 1.473-.176 2.058-.527a3.448 3.448 0 001.338-1.46h.13V29.5h2.55V14.24h-2.55v5.997h-.13a3.409 3.409 0 00-1.347-1.472c-.6-.36-1.284-.54-2.055-.54-.932 0-1.739.232-2.42.694-.681.463-1.207 1.122-1.579 1.978-.371.855-.557 1.873-.557 3.055v.016c0 1.175.186 2.19.559 3.049.372.858.9 1.52 1.585 1.984.684.464 1.49.697 2.418.697zm.783-2.15c-.566 0-1.054-.145-1.466-.432-.412-.287-.728-.699-.95-1.235-.22-.536-.33-1.174-.33-1.913v-.016c0-.742.11-1.38.331-1.912.222-.533.539-.944.95-1.232.412-.288.9-.432 1.465-.432.56 0 1.046.146 1.46.436.413.29.735.703.964 1.237.228.534.343 1.169.343 1.906v.016c0 .732-.114 1.366-.34 1.902-.227.536-.548.95-.963 1.24-.415.29-.903.434-1.464.434z"})))},yU=["styles"];function bU(){return(bU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _U=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,yU);return i.a.createElement("svg",bU({xmlns:"http://www.w3.org/2000/svg",width:"164",height:"44"},t),i.a.createElement("g",{fill:"#1D1D1F"},i.a.createElement("path",{d:"M76.412 18.106h-4.69v-2.072h-1.484v2.072h-4.69V28.9h1.456v-.812h7.952v.812h1.456V18.106zm-9.408 8.568v-3.108h3.234v3.108h-3.234zm4.718 0v-3.108h3.234v3.108h-3.234zm-4.718-4.452v-2.73h3.234v2.73h-3.234zm4.718-2.73h3.234v2.73h-3.234v-2.73zm8.008-2.814v1.414h10.08v-1.414H79.73zm-1.358 3.85v1.456h4.452c-1.344 2.702-2.436 4.354-3.276 4.97a1.707 1.707 0 01-.35.154l.378 1.484c3.29-.238 6.328-.546 9.114-.938.252.476.476.938.686 1.414l1.316-.924c-.7-1.386-1.68-3.024-2.94-4.9l-1.176.728c.504.798.966 1.582 1.4 2.352a94.323 94.323 0 01-6.608.7c.896-1.036 1.918-2.716 3.08-5.04h6.622v-1.456H78.372zm18.634-4.522v11.046h-4.858v1.428h12.586v-1.428h-6.216v-5.474h5.18v-1.414h-5.18v-4.158zm8.848 4.508v1.232h12.572v-1.232h-5.558v-.588h4.074v-3.052h-4.074v-.826h-1.456v.826h-4.046v3.052h4.046v.588h-5.558zm9.688-1.708h-2.674v-.812h2.674v.812zm-4.13 0h-2.646v-.812h2.646v.812zm5.39 3.486h-9.184v4.382h1.414v-3.122h6.342v2.954h1.428v-4.214zm-5.222 1.75c-.098 1.274-.476 2.17-1.12 2.674-.728.532-2.254.84-4.55.924l.588 1.33c2.772-.21 4.494-.672 5.194-1.386.672-.546 1.12-1.68 1.316-3.402l-1.428-.14zm1.708 2.254l-.742 1.106c1.736.406 3.416.966 5.04 1.694l.784-1.232c-1.526-.616-3.22-1.134-5.082-1.568zm7.308-6.902a16.381 16.381 0 01-1.022 4.032l1.316.448c.462-1.33.784-2.716.952-4.144l-1.246-.336zm5.754-2.87v11.97h1.4v-7.812c.42.854.798 1.82 1.148 2.898l1.176-.602c-.42-1.246-.91-2.38-1.47-3.416l-.854.392v-3.43h-1.4zm3.864-.448V28.97h1.386V16.076h-1.386zm-5.502 3.612l-.91.406v-3.906h-1.386v4.326c-.028 3.444-.798 5.95-2.31 7.518l1.092.966c1.68-1.764 2.548-4.536 2.604-8.316.448.896.854 1.918 1.218 3.052l1.176-.602a22.955 22.955 0 00-1.484-3.444zm9.828-3.584l-1.022.966c1.008.812 1.778 1.568 2.324 2.268l1.05-1.036a18.064 18.064 0 00-2.352-2.198zm7.966 12.628h3.206l.364-1.442c-.392.028-.938.056-1.652.084-.728 0-1.428.014-2.128.014-1.064 0-2.002-.014-2.8-.028-.812-.028-1.414-.14-1.82-.35-.322-.182-.644-.462-.952-.826l-.14-.14V20.71h-3.206v1.344h1.848v3.836c-.56.308-1.176 1.022-1.876 2.142l1.078 1.008c.7-1.26 1.176-1.89 1.442-1.89.168 0 .336.112.518.35.406.476.882.798 1.442.966.588.14 1.316.224 2.212.238.882.014 1.708.028 2.464.028zm-4.242-12.082v1.344h6.608V16.65h-6.608zm-.896 3.15v1.386h2.786c-1.036 2.436-1.834 3.738-2.394 3.906l.364 1.274c2.422-.252 4.382-.574 5.894-.966.14.378.266.77.406 1.19l1.302-.322c-.56-1.652-1.204-3.108-1.932-4.396l-1.19.392c.322.602.63 1.232.91 1.89-1.036.266-2.282.49-3.752.686.616-.896 1.232-2.114 1.848-3.654h4.284V19.8h-8.526zm12.278 1.26v3.066h7.392V21.06h-7.392zm6.048 1.988h-4.704v-.896h4.704v.896zm2.646 1.736h-9.954v4.186h1.428v-.518h7.112v.518h1.414v-4.186zm-8.526 2.436v-1.232h7.112v1.232h-7.112zm-2.59-10.388v1.274h2.982v.672h1.456v-.672h3.276v.672h1.456v-.672h2.982v-1.274h-2.982v-.812h-1.456v.812h-3.276v-.812h-1.456v.812h-2.982zm11.914 2.31h-11.676v2.94h1.4v-1.708h8.876v1.638h1.4v-2.87zM1.407 29.5h2.55V18.423h-2.55V29.5zm1.28-12.832c.412 0 .763-.144 1.05-.43a1.41 1.41 0 00.432-1.033c0-.407-.144-.753-.432-1.038a1.44 1.44 0 00-1.05-.426c-.407 0-.756.142-1.046.426-.291.285-.437.63-.437 1.038 0 .401.146.745.437 1.032.29.287.64.43 1.046.43zm9.915 13.156c1.14 0 2.157-.21 3.052-.631a5.723 5.723 0 002.188-1.758c.563-.752.908-1.624 1.037-2.619l.007-.091h-2.594l-.021.076a3.576 3.576 0 01-.713 1.465 3.35 3.35 0 01-1.258.943c-.5.219-1.065.328-1.695.328-.847 0-1.582-.22-2.204-.663-.623-.442-1.103-1.07-1.441-1.884-.338-.813-.507-1.776-.507-2.886v-.016c0-1.115.17-2.076.507-2.886.338-.81.817-1.434 1.439-1.875.62-.44 1.354-.66 2.199-.66.634 0 1.201.117 1.702.351.501.235.92.565 1.257.99.338.425.572.926.705 1.505l.026.105h2.59l-.004-.093c-.118-1.006-.46-1.895-1.028-2.668a5.874 5.874 0 00-2.204-1.819c-.901-.439-1.916-.658-3.044-.658-1.405 0-2.619.311-3.642.935-1.022.624-1.812 1.511-2.368 2.663-.556 1.152-.834 2.523-.834 4.113v.016c0 1.588.278 2.958.834 4.11.555 1.154 1.346 2.043 2.372 2.669 1.026.625 2.24.938 3.642.938zm8.034-.324h2.55V14.24h-2.55zm9.534.222c1.1 0 2.049-.231 2.846-.693.797-.461 1.413-1.122 1.846-1.982.434-.86.65-1.886.65-3.08v-.02c0-1.191-.218-2.216-.655-3.074a4.68 4.68 0 00-1.852-1.98c-.798-.46-1.744-.691-2.838-.691-1.086 0-2.03.23-2.829.694a4.692 4.692 0 00-1.855 1.981c-.438.859-.656 1.882-.656 3.07v.02c0 1.191.216 2.217.65 3.078.434.86 1.05 1.522 1.85 1.984.8.462 1.747.693 2.843.693zm.004-2.066c-.572 0-1.063-.146-1.472-.436-.408-.291-.722-.711-.941-1.261-.219-.55-.329-1.213-.329-1.99v-.02c0-.776.11-1.438.33-1.985.22-.548.535-.967.944-1.259.408-.291.896-.437 1.461-.437.571 0 1.06.145 1.469.436.408.29.721.71.941 1.258.22.549.33 1.21.33 1.987v.02c0 .776-.11 1.438-.328 1.988-.218.55-.53.97-.936 1.262-.406.29-.896.437-1.469.437zm10.596 2.066c.816 0 1.502-.172 2.058-.517a3.148 3.148 0 001.237-1.41h.13V29.5h2.55V18.423h-2.55v6.444c0 .543-.097 1.018-.292 1.425a2.167 2.167 0 01-.848.945c-.37.223-.82.334-1.346.334-.754 0-1.307-.216-1.657-.647-.35-.431-.526-1.063-.526-1.894v-6.607h-2.55v7.166c0 .867.144 1.61.433 2.228.289.618.716 1.09 1.281 1.416.566.326 1.259.489 2.08.489zm12.084-.024c.787 0 1.473-.176 2.058-.527a3.448 3.448 0 001.338-1.46h.13V29.5h2.55V14.24h-2.55v5.997h-.13a3.409 3.409 0 00-1.347-1.472c-.6-.36-1.284-.54-2.055-.54-.932 0-1.739.232-2.42.694-.681.463-1.207 1.122-1.579 1.978-.371.855-.557 1.873-.557 3.055v.016c0 1.175.186 2.19.559 3.049.372.858.9 1.52 1.585 1.984.684.464 1.49.697 2.418.697zm.783-2.15c-.566 0-1.054-.145-1.466-.432-.412-.287-.728-.699-.95-1.235-.22-.536-.33-1.174-.33-1.913v-.016c0-.742.11-1.38.331-1.912.222-.533.539-.944.95-1.232.412-.288.9-.432 1.465-.432.56 0 1.046.146 1.46.436.413.29.735.703.964 1.237.228.534.343 1.169.343 1.906v.016c0 .732-.114 1.366-.34 1.902-.227.536-.548.95-.963 1.24-.415.29-.903.434-1.464.434z"})))},CU=function(e){var t=e.className,n=e.fill,i=void 0===n?"light":n,o=e.isCNDomain,a=Us().setAriaLiveText,s=gc("NavLinks.Home"),c=gc("VoiceOver.NavLinks.OpeningPage",{name:s});return r.createElement("a",{onClick:function(e){e.preventDefault(),e.stopPropagation(),a(c),YV.cloudOSApplication.recordHomePageLinkStat(),YV.cloudOSApplication.switchToSpringboard(!0)},href:eZ.home,"aria-label":gc("NavLinks.Home.Label"),className:Ts()("ICloudLogo","unstyled-link","nav-link",t)},o?"light"===i?r.createElement(vU,null):r.createElement(_U,null):r.createElement("svg",{width:"90",height:"31",xmlns:"http://www.w3.org/2000/svg",className:"apple-icloud-logo","aria-hidden":"true"},r.createElement("g",{fill:"none",fillRule:"nonzero"},r.createElement("path",{d:"M77.005 23.215c1.568 0 2.767-.779 3.382-2.06h.061V23H83V8.204h-2.552v5.793h-.061c-.615-1.302-1.855-2.092-3.392-2.092-2.726 0-4.479 2.143-4.479 5.65v.01c0 3.497 1.742 5.65 4.489 5.65Zm.768-2.153c-1.64 0-2.654-1.333-2.654-3.497v-.01c0-2.163 1.025-3.496 2.654-3.496 1.568 0 2.675 1.374 2.675 3.496v.01c0 2.133-1.096 3.497-2.675 3.497Zm-13.05 2.153c1.64 0 2.757-.758 3.32-1.917h.052V23h2.552V12.13h-2.552v6.297c0 1.579-.933 2.635-2.398 2.635-1.455 0-2.173-.872-2.173-2.41v-6.521h-2.552v7.024c0 2.522 1.363 4.06 3.751 4.06Zm-10.826 0c3.187 0 5.257-2.122 5.257-5.65v-.02c0-3.507-2.1-5.64-5.267-5.64-3.157 0-5.248 2.154-5.248 5.64v.02c0 3.518 2.06 5.65 5.258 5.65Zm.01-2.06c-1.63 0-2.665-1.303-2.665-3.59v-.02c0-2.256 1.056-3.568 2.645-3.568 1.619 0 2.664 1.302 2.664 3.568v.02c0 2.277-1.035 3.59-2.644 3.59ZM44.137 23h2.55V8.204h-2.55V23Zm-8.357.256c3.402 0 5.913-2.102 6.292-5.137l.02-.102H39.5l-.031.102c-.482 1.825-1.804 2.84-3.69 2.84-2.572 0-4.232-2.07-4.232-5.362v-.01c0-3.282 1.65-5.343 4.233-5.343 1.926 0 3.228 1.056 3.658 2.748l.051.195h2.593l-.01-.103c-.39-3.014-2.89-5.137-6.292-5.137-4.243 0-6.938 2.912-6.938 7.64v.01c0 4.727 2.685 7.66 6.938 7.66ZM25.424 10.572a1.4 1.4 0 1 0 0-2.8c-.799 0-1.424.626-1.424 1.406 0 .759.625 1.394 1.424 1.394ZM24.144 23h2.551V12.13h-2.552V23Z",fill:"light"===i?"#F5F5F7":"#1D1D1F"}),r.createElement("path",{d:"M12.9 7.598c.608-.737 1.04-1.74 1.04-2.755 0-.14-.013-.28-.038-.394-.99.038-2.183.66-2.893 1.498-.559.635-1.079 1.65-1.079 2.666 0 .153.026.305.038.356.064.012.165.025.267.025.888 0 2.004-.597 2.664-1.396Zm.697 1.612c-1.484 0-2.69.901-3.464.901-.825 0-1.903-.85-3.197-.85C4.486 9.26 2 11.292 2 15.113c0 2.387.914 4.9 2.056 6.526.977 1.37 1.827 2.5 3.057 2.5 1.218 0 1.751-.812 3.261-.812 1.536 0 1.878.787 3.223.787 1.332 0 2.22-1.218 3.058-2.425.939-1.383 1.332-2.729 1.345-2.793-.076-.025-2.626-1.066-2.626-3.986 0-2.526 2.004-3.656 2.118-3.745-1.32-1.904-3.337-1.955-3.895-1.955Z",fill:"light"===i?"#FFF":"#1D1D1F",opacity:".569"}))))};function IU(){return/^(carry|beta|future|sprinkles)\.icloud\.com$/.test(window.location.hostname)}var wU=function(e){var t=Ts()("cloudos-application-toolbar-start-view",e.className),n=Rs()===Es.HOMEPAGE,i=IU(),o=/^(carry)\.icloud\.com$/.test(window.location.hostname);return r.createElement("div",{className:t},r.createElement(CU,{className:Ts()(n&&"homepage-theme"),isCNDomain:e.isCNDomain,fill:n?"light":"dark"}),i&&!o&&r.createElement("svg",{width:"52",height:"22",xmlns:"http://www.w3.org/2000/svg",className:"badge","aria-label":gc("VoiceOver.CloudOS.Toolbar.Beta"),role:"img"},r.createElement("path",{fillRule:"evenodd",d:"M41 0c6.075 0 11 4.925 11 11s-4.925 11-11 11H11C4.925 22 0 17.075 0 11S4.925 0 11 0h30Zm-2.534 6.9H35.99l-2.903 8.455h2.152l.558-1.918h2.862l.558 1.918h2.153L38.466 6.9Zm-5.246 0h-7.036v1.642h2.495v6.813h2.047V8.542h2.494V6.9Zm-8.305 0h-5.79v8.455h5.79v-1.642h-3.742v-1.859h3.523v-1.511h-3.523v-1.8h3.742V6.9Zm-10.313 0H10.7v8.455h4.016c.61 0 1.137-.1 1.58-.298.444-.199.787-.48 1.03-.844.243-.365.364-.793.364-1.285v-.012c0-.357-.087-.683-.26-.977a2.048 2.048 0 0 0-.706-.714 2.116 2.116 0 0 0-1.008-.304v-.11c.3-.042.568-.149.804-.32.236-.17.423-.383.562-.64.139-.256.208-.535.208-.836v-.011c0-.435-.107-.81-.32-1.125-.215-.314-.521-.556-.92-.725-.4-.17-.883-.254-1.448-.254Zm-1.855 4.728h1.382c.317 0 .585.043.804.128.218.086.384.211.498.377.113.166.17.37.17.611v.012c0 .37-.124.653-.372.85-.248.197-.608.295-1.08.295h-1.402v-2.273Zm24.536-2.92.945 3.251h-2.003l.947-3.251h.11Zm-24.536-.355h1.317c.386 0 .687.09.901.267.215.178.323.424.323.736v.012c0 .313-.116.558-.348.735-.231.177-.56.266-.984.266h-1.209V8.353Z"})))},EU=(n(1161),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"plus.circle",svgPath:"M59.1797 15.1855C86.7676 15.1855 109.619-7.61719 109.619-35.2539C109.619-62.8418 86.7676-85.6934 59.1309-85.6934C31.543-85.6934 8.74023-62.8418 8.74023-35.2539C8.74023-7.61719 31.5918 15.1855 59.1797 15.1855ZM59.1797 5.27344C36.7188 5.27344 18.7012-12.793 18.7012-35.2539C18.7012-57.7148 36.6699-75.7324 59.1309-75.7324C81.5918-75.7324 99.6582-57.7148 99.707-35.2539C99.707-12.793 81.6406 5.27344 59.1797 5.27344ZM37.793-35.2051C37.793-32.5684 39.6973-30.7129 42.4316-30.7129L54.5898-30.7129L54.5898-18.5059C54.5898-15.8203 56.4453-13.9648 59.082-13.9648C61.8164-13.9648 63.7207-15.8203 63.7207-18.5059L63.7207-30.7129L75.8789-30.7129C78.5645-30.7129 80.4688-32.5684 80.4688-35.2051C80.4688-37.9395 78.5645-39.8438 75.8789-39.8438L63.7207-39.8438L63.7207-52.002C63.7207-54.7363 61.8164-56.5918 59.082-56.5918C56.4453-56.5918 54.5898-54.6875 54.5898-52.002L54.5898-39.8438L42.4316-39.8438C39.6973-39.8438 37.793-37.9395 37.793-35.2051Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46508300781261,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 102.1480712890625 100.9267578125",width:102.1480712890625,height:100.9267578125,translateX:-7.470952148437391,translateY:85.693359375,baseline:85.693359375,capline:15.2333984375}}})}),SU=(n(1162),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"ellipsis",svgPath:"M28.418-35.2051C28.418-40.625 24.0234-44.9707 18.5059-44.9707C13.1348-44.9707 8.74023-40.625 8.74023-35.2051C8.74023-29.7852 13.1348-25.4395 18.5059-25.4395C24.0234-25.4395 28.418-29.7852 28.418-35.2051ZM64.5508-35.2051C64.5508-40.625 60.2051-44.9707 54.7852-44.9707C49.4141-44.9707 45.0684-40.625 45.0684-35.2051C45.0684-29.7852 49.4141-25.4395 54.7852-25.4395C60.2051-25.4395 64.5508-29.7852 64.5508-35.2051ZM100.83-35.2051C100.83-40.625 96.4844-44.9707 91.0645-44.9707C85.5469-44.9707 81.2012-40.625 81.2012-35.2051C81.2012-29.7852 85.5469-25.4395 91.0645-25.4395C96.4844-25.4395 100.83-29.7852 100.83-35.2051Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:79.22503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 92.0899658203125 19.5810546875",width:92.0899658203125,height:19.5810546875,translateX:-8.740048828125055,translateY:45.0205078125,baseline:45.0205078125,capline:-25.439453125}}})}),TU=["styles"];function OU(){return(OU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var PU=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,TU);return i.a.createElement("svg",OU({viewBox:"67.8 67.4 20.5 20.5",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M85.239 77.648a3.834 3.834 0 012.664 1.06 3.7 3.7 0 01.813 1.15c.196.437.294.903.294 1.4 0 .496-.098.962-.294 1.398a3.68 3.68 0 01-.814 1.151 3.825 3.825 0 01-2.663 1.063 3.783 3.783 0 01-1.46-.282 3.846 3.846 0 01-1.202-.78 3.666 3.666 0 01-.815-1.152 3.36 3.36 0 01-.295-1.397c0-.498.098-.964.295-1.4a3.66 3.66 0 01.813-1.15 3.834 3.834 0 012.664-1.06zm0 1a2.77 2.77 0 00-1.93.763 2.6 2.6 0 00-.584.831c-.14.316-.21.654-.21 1.017 0 .36.07.698.21 1.013a2.587 2.587 0 00.6.844l.093-.081.147-.108c.205-.14.45-.251.732-.336.282-.084.597-.126.945-.126s.663.042.946.126c.282.085.525.197.73.336.088.06.168.123.24.187l.01-.01c.25-.24.445-.517.586-.832.141-.315.212-.653.212-1.013 0-.363-.07-.701-.212-1.017a2.61 2.61 0 00-.587-.83 2.775 2.775 0 00-1.928-.764zm-.653-7.462c.715 0 1.252.176 1.61.53.357.353.536.88.536 1.582v3.722a4.975 4.975 0 00-1.046-.218v-3.497l-.002-.054-3.901 3.833.575.568a4.779 4.779 0 00-.765.66l-.528-.523-.444.438a2.52 2.52 0 01-.711.512c-.233.105-.47.157-.711.157-.242 0-.48-.052-.714-.157a2.417 2.417 0 01-.708-.512l-.446-.437-4.087 4.043.104.035c.117.033.25.05.396.05h6.653c.043.363.13.714.257 1.046h-6.87c-.715 0-1.251-.177-1.61-.53-.357-.353-.536-.883-.536-1.59v-7.546c0-.702.17-1.23.51-1.583.34-.353.816-.53 1.432-.53zm.656 8.225c.228 0 .435.058.621.174.186.116.334.27.443.461.11.192.164.401.164.629 0 .238-.054.455-.162.65-.108.195-.255.35-.441.464a1.142 1.142 0 01-.625.17 1.17 1.17 0 01-.626-.171 1.24 1.24 0 01-.44-.463 1.316 1.316 0 01-.162-.65 1.218 1.218 0 01.16-.629c.11-.191.258-.345.444-.46.186-.117.394-.175.624-.175zM72.686 73.23l-.002.068v7.547l.004.116 3.922-3.879-3.924-3.852zm11.94-.999H73.745c-.196 0-.365.03-.508.089l-.021.01 5.157 5.09c.146.141.286.247.42.318.135.07.27.106.407.106a.877.877 0 00.4-.103c.134-.068.277-.175.427-.321l5.144-5.08-.04-.02a1.317 1.317 0 00-.503-.089z",fill:"currentColor"}))},xU=["styles"];function AU(){return(AU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var NU=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,xU);return i.a.createElement("svg",AU({viewBox:"67 70 20.5 20.5",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M79 72.45a6.53 6.53 0 014.632 1.918A6.53 6.53 0 0185.55 79v6.148a1.49 1.49 0 01-1.493 1.493H73.943c-.413 0-.786-.167-1.056-.437a1.488 1.488 0 01-.437-1.056V79a6.53 6.53 0 011.918-4.632A6.53 6.53 0 0179 72.45z",stroke:"currentColor",strokeWidth:"1.1"}),i.a.createElement("path",{d:"M79 74.705c1.176 0 2.242.458 3.013 1.2a3.974 3.974 0 011.237 2.87 3.974 3.974 0 01-1.237 2.871 4.331 4.331 0 01-3.013 1.2 4.331 4.331 0 01-3.013-1.2 3.974 3.974 0 01-1.237-2.87c0-1.122.474-2.137 1.237-2.871a4.331 4.331 0 013.013-1.2z",stroke:"currentColor",strokeWidth:"1.1"}),i.a.createElement("path",{d:"M79 80.7c1.105 0 2-.861 2-1.925 0-1.063-.895-1.925-2-1.925s-2 .862-2 1.925c0 1.064.895 1.926 2 1.926z",fill:"currentColor"})))},RU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"envelope.badge.shield.half.filled",svgPath:"M27.7832 6.88477L89.502 6.88477C87.9395 4.73633 86.9141 2.29492 86.4258-0.585938L27.4902-0.585938C26.123-0.585938 24.9512-0.78125 23.9258-1.2207L53.125-30.0781L56.2988-26.9531C59.7168-23.584 62.9883-22.168 66.4551-22.168C69.873-22.168 73.1934-23.584 76.6113-26.9531L79.7852-30.0781L85.6934-24.2188C85.6934-27.7344 86.1328-30.0781 87.6953-32.373L84.9121-35.1074L112.793-62.5488C112.793-62.4023 112.793-62.2559 112.793-62.1094L112.793-43.5059C115.234-44.1895 117.773-44.1406 120.264-43.457L120.264-62.1582C120.264-72.168 115.137-77.2461 104.932-77.2461L26.3184-77.2461C17.5293-77.2461 12.4512-72.2168 12.4512-62.1582L12.4512-8.25195C12.4512 1.85547 17.5781 6.88477 27.7832 6.88477ZM60.5469-32.7148L23.6816-69.0918C24.7559-69.5312 26.0254-69.7754 27.4902-69.7754L105.225-69.7754C106.738-69.7754 108.057-69.5312 109.131-69.043L72.3633-32.7148C70.2637-30.6152 68.3594-29.6875 66.4551-29.6875C64.502-29.6875 62.5977-30.6641 60.5469-32.7148ZM19.9219-8.25195L19.9219-62.1582C19.9219-62.3535 19.9219-62.5488 19.9219-62.6953L47.998-35.1074L19.9707-7.42188C19.9219-7.66602 19.9219-7.95898 19.9219-8.25195ZM92.3828-6.05469C92.3828 4.05273 98.291 7.76367 112.744 16.2598C114.062 16.9922 116.064 17.1875 117.627 16.2598C132.08 7.76367 138.037 4.05273 138.037-6.05469L138.037-25.1465C138.037-28.1738 136.865-30.2246 133.74-31.543C130.615-32.8613 120.85-36.2793 117.822-37.3535C116.113-37.9395 114.16-37.9883 112.158-37.1582C109.57-36.1816 99.8047-32.8613 96.6797-31.543C93.5547-30.2246 92.3828-28.1738 92.3828-25.1465ZM115.186 8.83789L115.186-30.3711C115.771-30.3711 116.309-30.2734 116.895-30.0293C120.361-28.8086 125.488-26.8555 128.955-25.5859C130.469-25.0488 130.859-24.3164 130.859-22.8516L130.859-6.98242C130.859 0.0488281 127.832 1.70898 116.699 8.44727C116.162 8.69141 115.674 8.83789 115.186 8.83789Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:67.62510009765629,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 143.303955078125 104.22900390625",width:143.303955078125,height:104.22900390625,translateX:5.267006835937536,translateY:87.344482421875,baseline:87.344482421875,capline:16.884521484375}}})},DU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"externaldrive",svgPath:"M12.4512-15.5273C12.4512-3.125 22.0703 6.49414 35.6445 6.49414L104.541 6.49414C118.115 6.49414 127.734-3.125 127.734-15.5273C127.734-19.1895 126.66-22.4609 125.391-25.5371L108.936-65.0391C105.713-72.8516 99.0723-76.8555 90.332-76.8555L49.8535-76.8555C41.1133-76.8555 34.4727-72.8516 31.25-65.0391L14.7461-25.5371C13.5254-22.5098 12.4512-19.1895 12.4512-15.5273ZM28.2227-36.2793L38.8672-63.0371C40.7227-67.6758 44.7266-70.0195 50.2441-70.0195L89.9414-70.0195C95.459-70.0195 99.5117-67.6758 101.318-63.0371L111.963-36.2793C109.668-37.1094 107.227-37.5488 104.541-37.5488L35.6445-37.5488C32.959-37.5488 30.4688-37.1094 28.2227-36.2793ZM20.3125-15.5273C20.3125-23.584 26.416-29.6875 35.6445-29.6875L104.541-29.6875C113.77-29.6875 119.873-23.584 119.873-15.5273C119.873-6.49414 113.77-1.36719 104.541-1.36719L35.6445-1.36719C26.416-1.36719 20.3125-7.4707 20.3125-15.5273ZM98.3887-15.5273C98.3887-12.1094 101.172-9.42383 104.541-9.47266C107.764-9.47266 110.596-12.1582 110.596-15.5273C110.596-18.7988 107.764-21.582 104.541-21.582C101.172-21.582 98.3887-18.7988 98.3887-15.5273Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.91510009765625,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 115.28759765625 83.4482421875",width:115.28759765625,height:83.4482421875,translateX:-12.451171875,translateY:76.9541015625,baseline:76.9541015625,capline:6.494140625}}})},kU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"lifepreserver",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449-61.377C54.0039-61.377 49.7559-60.2051 46.0449-58.1543L34.8145-69.3848C41.5039-74.0723 49.6582-76.7578 58.4961-76.7578C67.3828-76.7578 75.6348-74.0234 82.373-69.2871L71.1914-58.1055C67.4316-60.2051 63.1348-61.377 58.5449-61.377ZM17.0898-35.2539C17.0898-44.043 19.7754-52.1484 24.3164-58.8379L35.5469-47.6562C33.5449-43.9453 32.4219-39.7461 32.4219-35.2539C32.4219-30.6641 33.6426-26.3184 35.6934-22.6074L24.5605-11.4258C19.8242-18.1641 17.0898-26.3672 17.0898-35.2539ZM84.668-35.2539C84.668-39.6973 83.5449-43.8477 81.5918-47.5098L92.8223-58.7402C97.3633-52.0508 100.049-43.9941 100.049-35.2539C100.049-26.416 97.3633-18.2129 92.6758-11.4746L81.4453-22.7051C83.4961-26.416 84.668-30.7129 84.668-35.2539ZM58.5449-17.3828C48.6816-17.3828 40.6738-25.3906 40.6738-35.2539C40.6738-45.1172 48.6816-53.125 58.5449-53.125C68.4082-53.125 76.416-45.1172 76.416-35.2539C76.416-25.3906 68.4082-17.3828 58.5449-17.3828ZM58.5449 6.25C49.8047 6.25 41.748 3.61328 35.1074-0.976562L46.3379-12.207C49.9512-10.2539 54.1504-9.13086 58.5449-9.13086C62.9883-9.13086 67.2363-10.2539 70.8984-12.2559L82.1289-1.02539C75.4395 3.56445 67.334 6.25 58.5449 6.25Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},UU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"network.badge.shield.half.filled",svgPath:"M58.5449 14.5508Q62.8906 14.5508 67.2119 13.7451Q71.5332 12.9395 75.6348 11.4258Q76.1719 11.2305 76.709 11.0352Q77.2461 10.8398 77.6855 10.5957Q76.5137 9.375 75.415 7.93457Q74.3164 6.49414 73.5352 5.0293Q73.0957 5.22461 72.6318 5.39551Q72.168 5.56641 71.7285 5.71289Q65.3809-4.10156 62.2803-14.7949Q59.1797-25.4883 59.1797-36.2793Q59.1797-47.168 62.1338-57.3975Q65.0879-67.627 70.752-76.5625Q78.2715-74.3164 84.4727-69.5801Q90.6738-64.8438 94.8975-58.3008Q99.1211-51.7578 100.732-44.043Q102.49-44.043 104.126-43.6279Q105.762-43.2129 107.764-42.4805Q106.445-51.416 102.1-59.1553Q97.7539-66.8945 91.0889-72.7295Q84.4238-78.5645 76.0986-81.8115Q67.7734-85.0586 58.4961-85.0586Q48.291-85.0586 39.2822-81.1523Q30.2734-77.2461 23.3887-70.3613Q16.5039-63.4766 12.6221-54.4678Q8.74023-45.459 8.74023-35.2539Q8.74023-25.0488 12.6465-16.0645Q16.5527-7.08008 23.4375-0.219727Q30.3223 6.64062 39.3311 10.5469Q48.3398 14.4531 58.5449 14.5508ZM58.5449 7.91016Q49.707 7.91016 41.8945 4.5166Q34.082 1.12305 28.125-4.83398Q22.168-10.791 18.7744-18.6035Q15.3809-26.416 15.3809-35.2539Q15.3809-44.0918 18.75-51.9043Q22.1191-59.7168 28.0762-65.6738Q34.0332-71.6309 41.8457-75.0244Q49.6582-78.418 58.4961-78.418Q61.6699-78.418 64.6973-77.9785Q59.082-68.5059 56.1768-57.9346Q53.2715-47.3633 53.2715-36.2793Q53.2715-28.4668 54.6875-20.9229Q56.1035-13.3789 58.8867-6.29883Q61.6699 0.78125 65.7227 7.27539Q63.9648 7.61719 62.1826 7.76367Q60.4004 7.91016 58.5449 7.91016ZM16.6016-55.957Q22.6074-49.5605 30.127-45.0195Q37.6465-40.4785 46.167-38.1104Q54.6875-35.7422 63.7207-35.7422Q74.3652-35.791 84.3018-39.2578Q94.2383-42.7246 102.49-49.2188L99.7559-54.6875Q92.1875-48.3887 82.959-45.0439Q73.7305-41.6992 63.7207-41.6504Q50.7324-41.6016 39.1357-46.9727Q27.5391-52.3438 19.3359-62.0117ZM35.5469 5.46875L42.5781 7.08008Q40.0879 1.17188 38.7939-5.0293Q37.5-11.2305 37.4023-17.627Q36.7188-29.7852 39.8193-41.2598Q42.9199-52.7344 49.3408-62.7197Q55.7617-72.7051 65.0879-80.3223L58.8867-82.7637Q49.6582-74.5605 43.2861-64.1357Q36.9141-53.7109 33.8867-41.8701Q30.8594-30.0293 31.4941-17.5293Q31.5918-11.6699 32.5928-5.9082Q33.5938-0.146484 35.5469 5.46875ZM62.4512-14.502Q48.9746-14.8438 36.1328-19.9463Q23.291-25.0488 12.793-34.7168L11.377-28.0762Q22.4121-18.6523 35.8154-13.7207Q49.2188-8.78906 63.1348-8.54492ZM76.8066-40.4297Q75.293-44.6289 74.4629-49.0967Q73.6328-53.5645 73.584-58.1543Q73.4863-63.2812 74.3896-68.3105Q75.293-73.3398 77.0996-78.0273L71.4355-79.6387Q69.4824-74.5117 68.5303-69.1162Q67.5781-63.7207 67.6758-58.1055Q67.7734-48.1445 71.1914-38.623ZM37.3047-36.3281Q40.4785-36.3281 42.7002-38.5742Q44.9219-40.8203 44.9219-43.9941Q44.9219-47.168 42.7002-49.3896Q40.4785-51.6113 37.3047-51.6113Q34.1309-51.6113 31.8848-49.3896Q29.6387-47.168 29.6387-43.9941Q29.6387-40.8203 31.8848-38.5742Q34.1309-36.3281 37.3047-36.3281ZM73.9746-34.0332Q77.0508-34.0332 79.248-36.2305Q81.4453-38.4277 81.4453-41.5527Q81.4453-44.6289 79.248-46.8506Q77.0508-49.0723 73.9746-49.0723Q70.8496-49.0723 68.6279-46.8506Q66.4062-44.6289 66.4062-41.5527Q66.4062-38.4277 68.6279-36.2305Q70.8496-34.0332 73.9746-34.0332ZM59.9121-4.29688Q63.0371-4.29688 65.2588-6.51855Q67.4805-8.74023 67.4805-11.9629Q67.4805-15.0879 65.2588-17.3096Q63.0371-19.5312 59.9121-19.5312Q56.7383-19.5312 54.4922-17.3096Q52.2461-15.0879 52.2461-11.9629Q52.2461-8.74023 54.4922-6.51855Q56.7383-4.29688 59.9121-4.29688ZM75.3418-6.15234Q75.3418-2.34375 76.5137 0.439453Q77.6855 3.22266 80.127 5.61523Q82.5684 8.00781 86.4502 10.4736Q90.332 12.9395 95.752 16.1621Q96.9238 16.8457 98.291 16.7725Q99.6582 16.6992 100.635 16.1621Q107.861 11.9141 112.354 8.81348Q116.846 5.71289 118.921 2.31934Q120.996-1.07422 120.996-6.15234L120.996-25.2441Q120.996-27.5391 120.044-29.0771Q119.092-30.6152 116.748-31.6406Q115.527-32.1289 113.379-32.9102Q111.23-33.6914 108.789-34.5459Q106.348-35.4004 104.272-36.1328Q102.197-36.8652 101.221-37.2559Q99.7559-37.8418 98.3154-37.8662Q96.875-37.8906 95.6055-37.4512Q94.4336-37.0605 92.2852-36.3037Q90.1367-35.5469 87.6465-34.6436Q85.1562-33.7402 82.9834-32.9346Q80.8105-32.1289 79.6387-31.6406Q77.2949-30.6152 76.3184-29.0771Q75.3418-27.5391 75.3418-25.2441ZM82.5195-7.08008L82.5195-22.9492Q82.5195-24.0234 82.9102-24.6338Q83.3008-25.2441 84.4238-25.6836Q85.7422-26.1719 87.3047-26.7334Q88.8672-27.2949 90.4785-27.9053Q92.0898-28.5156 93.6523-29.1016Q95.2148-29.6875 96.4844-30.127Q96.9727-30.3223 97.3633-30.3955Q97.7539-30.4688 98.1934-30.4688L98.1934 8.74023Q97.4609 8.74023 96.7285 8.34961Q91.1621 4.98047 88.0615 2.85645Q84.9609 0.732422 83.7402-1.41602Q82.5195-3.56445 82.5195-7.08008Z",layoutBox:{viewBox:"0 0 137.841796875 111.1806640625",width:137.841796875,height:111.1806640625,translateX:10.400932617187436,translateY:90.8203125,baseline:90.8203125,capline:20.3603515625},glyphBox:{viewBox:"0 0 124.951904296875 104.01904296875",width:124.951904296875,height:104.01904296875,translateX:3.9559863281249363,translateY:87.239501953125,baseline:87.239501953125,capline:16.779541015625}}})},LU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.icloud",svgPath:"M105.225 3.22266C119.971 3.22266 131.494-7.56836 131.494-20.9961C131.494-31.25 125.586-40.1367 116.064-44.1406C116.162-65.918 100.488-81.6406 80.5176-81.6406C67.2852-81.6406 57.8613-74.5605 52.002-66.0156C39.9902-69.5312 26.9043-60.4004 26.6602-46.7285C15.625-44.9707 8.74023-35.1074 8.74023-23.1934C8.74023-8.83789 21.2891 3.22266 37.9883 3.22266ZM105.225-4.63867L100.977-4.63867C97.5586-12.4023 88.3789-21.3379 73.5352-21.3379C58.7402-21.3379 49.5117-12.4512 46.0938-4.63867L37.9883-4.63867C25.6836-4.63867 16.6016-13.2324 16.6016-23.1934C16.6016-32.959 22.5098-40.7227 32.8613-40.7227C33.5449-40.7227 33.7891-41.0645 33.7891-41.6992C33.7891-56.7383 44.6289-61.1816 54.6387-57.9102C55.2246-57.7148 55.5664-57.8613 55.8594-58.3984C60.5957-66.8457 67.8711-73.7793 80.5176-73.7793C96.5332-73.7793 107.617-61.084 108.447-46.582C108.594-44.3359 108.447-41.6992 108.252-39.4043C108.203-38.7695 108.447-38.4277 109.033-38.2812C117.92-36.3281 123.633-29.834 123.633-20.9961C123.633-11.9141 115.625-4.63867 105.225-4.63867ZM73.5352-27.3926C80.8594-27.3438 86.8164-34.082 86.8164-41.9434C86.8164-49.707 80.8594-56.1035 73.5352-56.1035C66.1621-56.1035 60.2539-49.707 60.2539-41.9434C60.3027-34.082 66.1621-27.4414 73.5352-27.3926Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 92.8212890625",width:122.758056640625,height:92.8212890625,translateX:-8.735942382812482,translateY:81.640625,baseline:81.640625,capline:11.1806640625}}})},MU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"wand.and.stars",svgPath:"M49.3652-60.9863C49.9512-60.9863 50.2441-61.3281 50.3418-61.8652C52.002-69.6777 51.9043-69.9707 60.1074-71.6309C60.6445-71.7285 61.0352-72.0703 61.0352-72.6074C61.0352-73.1934 60.6445-73.5352 60.1074-73.6328C51.9043-75.293 52.002-75.5859 50.3418-83.3496C50.2441-83.8867 49.9512-84.2773 49.3652-84.2773C48.7793-84.2773 48.4863-83.8867 48.3887-83.3496C46.7285-75.5859 46.8262-75.293 38.623-73.6328C38.0859-73.5352 37.6953-73.1934 37.6953-72.6074C37.6953-72.0703 38.0859-71.7285 38.623-71.6309C46.8262-69.9707 46.7285-69.6777 48.3887-61.8652C48.4863-61.3281 48.7793-60.9863 49.3652-60.9863ZM89.6973-43.75C90.3809-43.75 90.7715-44.1895 90.918-44.8242C92.5781-54.1016 92.627-54.6875 102.441-56.3965C103.125-56.4941 103.564-56.9336 103.564-57.6172C103.564-58.3008 103.125-58.6914 102.441-58.8379C92.627-60.498 92.5781-61.084 90.918-70.3613C90.7715-70.9961 90.3809-71.4844 89.6973-71.4844C89.0137-71.4844 88.623-70.9961 88.4766-70.3613C86.8164-61.084 86.7676-60.498 76.9531-58.8379C76.3184-58.6914 75.8301-58.3008 75.8301-57.6172C75.8301-56.9336 76.3184-56.4941 76.9531-56.3965C86.7676-54.6875 86.8164-54.1016 88.4766-44.8242C88.623-44.1895 89.0137-43.75 89.6973-43.75ZM22.6074-29.7363C23.291-29.7363 23.6816-30.2246 23.8281-30.8594C25.4883-40.1367 25.5371-40.7227 35.3516-42.3828C35.9863-42.5293 36.4746-42.9199 36.4746-43.6035C36.4746-44.2871 35.9863-44.7266 35.3516-44.8242C25.5371-46.5332 25.4883-47.1191 23.8281-56.3965C23.6816-57.0312 23.291-57.4707 22.6074-57.4707C21.9238-57.4707 21.5332-57.0312 21.3867-56.3965C19.7266-47.1191 19.6777-46.5332 9.86328-44.8242C9.22852-44.7266 8.74023-44.2871 8.74023-43.6035C8.74023-42.9199 9.22852-42.5293 9.86328-42.3828C19.6777-40.7227 19.7266-40.1367 21.3867-30.8594C21.5332-30.2246 21.9238-29.7363 22.6074-29.7363ZM106.006 12.0117C108.057 14.1113 111.572 14.1113 113.525 12.0117C115.527 9.86328 115.527 6.54297 113.525 4.49219L67.0898-42.0898C65.0391-44.1406 61.5234-44.1406 59.5703-42.0898C57.5195-39.9414 57.5684-36.5723 59.5703-34.5215ZM77.5879-21.5332L63.2812-35.8887C62.4023-36.7676 62.1094-37.7441 62.9883-38.5742C63.7207-39.3555 64.7461-39.1602 65.6738-38.2324L80.0293-23.877ZM45.8008 12.793C46.6797 12.793 47.3145 12.1582 47.4609 11.2305C49.0234-1.80664 49.6582-2.14844 62.9395-4.29688C63.9648-4.49219 64.5996-4.98047 64.5996-5.95703C64.5996-6.88477 63.9648-7.4707 63.1348-7.61719C49.7559-10.1562 49.0234-10.1074 47.4609-23.1445C47.3145-24.0723 46.6797-24.707 45.8008-24.707C44.873-24.707 44.2383-24.0723 44.1406-23.1934C42.4316-9.96094 41.9922-9.52148 28.4668-7.61719C27.6367-7.51953 27.002-6.88477 27.002-5.95703C27.002-5.0293 27.6367-4.49219 28.4668-4.29688C41.9922-1.70898 42.3828-1.70898 44.1406 11.3281C44.2383 12.1582 44.873 12.793 45.8008 12.793Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:72.1201049804688,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 106.299560546875 98.0947265625",width:106.299560546875,height:98.0947265625,translateX:-8.740185546874955,translateY:84.27734375,baseline:84.27734375,capline:13.8173828125}}})},jU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"cloud",svgPath:"M31.6895 2.58789L92.2852 2.58789C108.301 2.58789 120.264-9.57031 120.264-24.6582C120.264-40.1855 107.52-51.5625 90.9668-51.5625C84.8633-63.623 73.5352-71.3867 59.4727-71.3867C41.0645-71.3867 25.9277-57.0312 24.3652-38.8672C15.4785-36.3281 8.74023-28.6133 8.74023-18.3105C8.74023-6.78711 17.1387 2.58789 31.6895 2.58789ZM31.5918-5.27344C21.582-5.27344 16.5527-10.8398 16.5527-18.0664C16.5527-23.9746 19.9707-29.1992 28.2715-31.4453C31.0059-32.1289 31.9824-33.3984 32.1777-36.1816C33.3008-52.0996 45.3125-63.5742 59.4727-63.5742C70.4102-63.5742 79.0527-57.5684 84.3262-46.7285C85.498-44.3848 86.9141-43.5547 89.7949-43.5547C104.248-43.5547 112.402-34.8145 112.402-24.4141C112.402-13.7695 103.906-5.27344 92.7734-5.27344Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:69.50510009765617,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 111.529541015625 75.6357421875",width:111.529541015625,height:75.6357421875,translateX:-8.740200195312582,translateY:73.0478515625,baseline:73.0478515625,capline:2.587890625}}})},FU=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"info.circle",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449 6.25C35.498 6.25 17.0898-12.207 17.0898-35.2539C17.0898-58.3008 35.4492-76.7578 58.4961-76.7578C81.543-76.7578 100-58.3008 100.049-35.2539C100.098-12.207 81.5918 6.25 58.5449 6.25ZM58.1055-52.6367C61.6699-52.6367 64.4531-55.4688 64.4531-59.0332C64.4531-62.5977 61.6699-65.4297 58.1055-65.4297C54.5898-65.4297 51.7578-62.5977 51.7578-59.0332C51.7578-55.4688 54.5898-52.6367 58.1055-52.6367ZM50-8.39844L69.873-8.39844C71.875-8.39844 73.4375-9.86328 73.4375-11.8652C73.4375-13.7695 71.875-15.2832 69.873-15.2832L63.8184-15.2832L63.8184-40.1367C63.8184-42.7734 62.5-44.5312 60.0098-44.5312L50.8301-44.5312C48.8281-44.5312 47.2656-43.0176 47.2656-41.1133C47.2656-39.1113 48.8281-37.6465 50.8301-37.6465L56.0547-37.6465L56.0547-15.2832L50-15.2832C47.998-15.2832 46.4355-13.7695 46.4355-11.8652C46.4355-9.86328 47.998-8.39844 50-8.39844Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})};function BU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:jU})},mc("CloudOS.Toolbar.AppSwitcherMenu.HomePage"))}function zU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:RU})},mc("HideMyEmailTile.Heading"))}function HU(){return r.createElement(qk,{startIcon:r.createElement(PU,{"aria-hidden":!0,className:"custom-symbol"})},mc("CustomEmailDomainTile.Heading"))}function WU(){return r.createElement(qk,{startIcon:r.createElement(UU,{"aria-hidden":!0,className:"network-badge-symbol"})},mc("PrivateRelayTile.Heading"))}function VU(){return r.createElement(qk,{startIcon:r.createElement(NU,{"aria-hidden":!0,className:"custom-symbol"})},mc("HomeKitSecureVideoTile.Heading"))}function ZU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:DU})},mc("CloudOS.Toolbar.AppSwitcherMenu.YourStorage"))}function qU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:DU})},mc("CloudOS.Toolbar.AppSwitcherMenu.Storage"))}function KU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:LU})},mc("CloudOS.Toolbar.AppSwitcherMenu.YourPlan"))}function GU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:LU})},mc("CloudOS.Toolbar.AppSwitcherMenu.Plan"))}function YU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:kU})},mc("NavLinks.DataRecovery"))}function QU(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:MU})},mc("HomePage.CustomizeDashboard"))}function XU(){return r.createElement(Kk,{startIcon:r.createElement(Gk,null)},mc("CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide"))}function JU(){return r.createElement(Kk,{startIcon:r.createElement(Yk,{symbol:jU})},mc("CloudOS.Toolbar.AccountMenu.UpgradeToICloudPlus"))}function $U(){return r.createElement(Kk,{startIcon:r.createElement(Yk,{symbol:FU})},mc("CloudOS.Toolbar.AccountMenu.AboutWebOnlyPlan"))}var eL,tL="https://support.apple.com/guide/icloud/welcome/icloud";!function(e){e.Help="link:icloud-guide",e.SignOut="signOut",e.SignIn="signIn"}(eL||(eL={}));var nL=function(){},rL=r.forwardRef((function(e,t){var n=qf(),i=mc("VoiceOver.ExternalLink.Description"),o=mc("CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide")+" "+i,a=bZ.sharedInstance.shortGuid&&"photos"===bZ.sharedInstance.applicationIdentifier?[r.createElement(Nk,{key:"sign-in",className:"blue",value:eL.SignIn},r.createElement(oL,null))]:[r.createElement(Rk,{key:"guide",value:eL.Help,href:tL,target:"_blank",className:"blue",rel:"noreferrer",ariaLabel:o},r.createElement(XU,null))],s=mc("AccountMenuPopover.SignOut");return n&&!n.isAuthenticated&&(a.push(r.createElement(Dk,{key:"divider"})),a.push(r.createElement(Nk,{className:"red",key:"signout",value:eL.SignOut},r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:nU})},s)))),r.createElement(Lk,{className:"help-menu",variant:"cloudos-menu",onItemSelected:nL,onItemSelectedSync:function(t){switch(t){case eL.SignOut:wZ.sharedInstance.unauthenticateUser(!1,!1).then((function(){Object(Qn.a)(window.location.origin)})).catch((function(){}));break;case eL.SignIn:wZ.sharedInstance.authenticateUser();break;case eL.Help:break;default:Aw(t)}e.onClose()},ref:t},a)}));rL.displayName="HelpMenu";var iL=function(){var e=r.useRef(null),t=mc("Toolbar.Button.HelpButton.AriaLabel"),n=iU(rL,{popoverProps:{anchorRef:e}})[0];return r.createElement(cU,{className:"help-icon",onActivate:n,ref:e,ariaLabel:t,ariaHasPopup:"menu",icon:r.createElement(SU,{height:19,width:19,layoutMode:"glyphBox"})})};function oL(){return r.createElement(qk,{startIcon:r.createElement(Yk,{symbol:ZR})},mc("CloudOS.Toolbar.HelpMenu.SignIn"))}n(1163);var aL=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"square.grid.4x3.fill",svgPath:"M16.6504-56.1035L24.7559-56.1035C27.8809-56.1035 29.0039-57.2266 29.0039-60.3027L29.0039-68.4082C29.0039-71.5332 27.8809-72.6562 24.7559-72.6562L16.6504-72.6562C13.5742-72.6562 12.4512-71.5332 12.4512-68.4082L12.4512-60.3027C12.4512-57.2266 13.5742-56.1035 16.6504-56.1035ZM45.8496-56.1035L53.9551-56.1035C57.0312-56.1035 58.1543-57.2266 58.1543-60.3027L58.1543-68.4082C58.1543-71.5332 57.0312-72.6562 53.9551-72.6562L45.8496-72.6562C42.7246-72.6562 41.6016-71.5332 41.6016-68.4082L41.6016-60.3027C41.6016-57.2266 42.7246-56.1035 45.8496-56.1035ZM75-56.1035L83.1055-56.1035C86.1816-56.1035 87.3047-57.2266 87.3047-60.3027L87.3047-68.4082C87.3047-71.5332 86.1816-72.6562 83.1055-72.6562L75-72.6562C71.9238-72.6562 70.8008-71.5332 70.8008-68.4082L70.8008-60.3027C70.8008-57.2266 71.9238-56.1035 75-56.1035ZM104.15-56.1035L112.256-56.1035C115.381-56.1035 116.504-57.2266 116.504-60.3027L116.504-68.4082C116.504-71.5332 115.381-72.6562 112.256-72.6562L104.15-72.6562C101.074-72.6562 99.9512-71.5332 99.9512-68.4082L99.9512-60.3027C99.9512-57.2266 101.074-56.1035 104.15-56.1035ZM16.8945-26.9531L25-26.9531C28.125-26.9531 29.248-28.0762 29.248-31.1523L29.248-39.2578C29.248-42.334 28.125-43.457 25-43.457L16.8945-43.457C13.8184-43.457 12.6953-42.334 12.6953-39.2578L12.6953-31.1523C12.6953-28.0762 13.8184-26.9531 16.8945-26.9531ZM46.0938-26.9531L54.1992-26.9531C57.2754-26.9531 58.3984-28.0762 58.3984-31.1523L58.3984-39.2578C58.3984-42.334 57.2754-43.457 54.1992-43.457L46.0938-43.457C42.9688-43.457 41.8457-42.334 41.8457-39.2578L41.8457-31.1523C41.8457-28.0762 42.9688-26.9531 46.0938-26.9531ZM75.2441-26.9531L83.3496-26.9531C86.4258-26.9531 87.5488-28.0762 87.5488-31.1523L87.5488-39.2578C87.5488-42.334 86.4258-43.457 83.3496-43.457L75.2441-43.457C72.168-43.457 71.0449-42.334 71.0449-39.2578L71.0449-31.1523C71.0449-28.0762 72.168-26.9531 75.2441-26.9531ZM104.443-26.9531L112.5-26.9531C115.625-26.9531 116.748-28.0762 116.748-31.1523L116.748-39.2578C116.748-42.334 115.625-43.457 112.5-43.457L104.443-43.457C101.318-43.457 100.195-42.334 100.195-39.2578L100.195-31.1523C100.195-28.0762 101.318-26.9531 104.443-26.9531ZM16.8945 2.24609L25 2.24609C28.125 2.24609 29.248 1.12305 29.248-2.00195L29.248-10.0586C29.248-13.1836 28.125-14.3066 25-14.3066L16.8945-14.3066C13.8184-14.3066 12.6953-13.1836 12.6953-10.0586L12.6953-2.00195C12.6953 1.12305 13.8184 2.24609 16.8945 2.24609ZM46.0938 2.24609L54.1992 2.24609C57.2754 2.24609 58.3984 1.12305 58.3984-2.00195L58.3984-10.0586C58.3984-13.1836 57.2754-14.3066 54.1992-14.3066L46.0938-14.3066C42.9688-14.3066 41.8457-13.1836 41.8457-10.0586L41.8457-2.00195C41.8457 1.12305 42.9688 2.24609 46.0938 2.24609ZM75.2441 2.24609L83.3496 2.24609C86.4258 2.24609 87.5488 1.12305 87.5488-2.00195L87.5488-10.0586C87.5488-13.1836 86.4258-14.3066 83.3496-14.3066L75.2441-14.3066C72.168-14.3066 71.0449-13.1836 71.0449-10.0586L71.0449-2.00195C71.0449 1.12305 72.168 2.24609 75.2441 2.24609ZM104.443 2.24609L112.5 2.24609C115.625 2.24609 116.748 1.12305 116.748-2.00195L116.748-10.0586C116.748-13.1836 115.625-14.3066 112.5-14.3066L104.443-14.3066C101.318-14.3066 100.195-13.1836 100.195-10.0586L100.195-2.00195C100.195 1.12305 101.318 2.24609 104.443 2.24609Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:69.41010498046876,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 104.297607421875 74.9521484375",width:104.297607421875,height:74.9521484375,translateX:-12.451162109374991,translateY:72.7060546875,baseline:72.7060546875,capline:2.24609375}}})},sL=(n(1164),{webOnly:!0,tablet:!0,tabletWebOnly:!0,phone:!0,phoneWebOnly:!0}),cL={tablet:!0},uL={tablet:!0,phone:!0},lL={none:!0},dL={contactAppleSupport:"HT201232",iCloudUserGuide:{guidePath:"welcome/icloud",variations:sL},upgradeToICloudPlus:"HT201318",webOnlyPlan:"HT204174",lookMeUp:{guidePath:"mmbffe88bb42",variations:cL},iCloudPlusPlanPricing:"HT201238",privateRelay:{guidePath:"mm8010d8daf3"},hideMyEmail:{guidePath:"mme38e1602db"},homeKitSecureVideo:{guidePath:"mme054c72692"},customEmailDomains:{guidePath:"mm0e4339d289"},familySharing:"HT201088",iCloudAppsFeatures:{guidePath:"mm203ae070a2"},iCloudMailAddress:{guidePath:"mmdd8d1c5c"},restoreFiles:{guidePath:"mmae56ea1ca5",variations:sL},restoreBookmarks:{guidePath:"mmf039e1d085",variations:cL},restoreContacts:{guidePath:"mm1d9cfdb498",variations:cL},restoreCalendars:{guidePath:"mm7478c562f3",variations:cL},findDevices:{guidePath:"mm6b1aa045",variations:uL},mail:{guidePath:"mm6b1a17e3",variations:uL},photos:{guidePath:"mmbc402b84",variations:uL},drive:{guidePath:"mmd0b4a7f5e8",variations:sL},notes:{guidePath:"mm6704cac5",variations:sL},reminders:{guidePath:"mmc0cd794a",variations:uL},calendar:{guidePath:"mmd67283e4",variations:cL},pages:{guidePath:"pages-icloud",variations:lL},numbers:{guidePath:"numbers-icloud",variations:lL},keynote:{guidePath:"keynote-icloud",variations:lL},contacts:{guidePath:"mmfba7481b",variations:{webOnly:!0,tablet:!0,tabletWebOnly:!0}},unsupportedSafariVersion:"HT204416"},pL="https://support.apple.com";function fL(e){var t,n,r,i,o,a=dL[e];if(!a)throw new Error("No support link found for "+e);if("string"===typeof a)return pL+"/"+a;var s=wZ.sharedInstance.cloudOSUser,c=!(null==s||!s.details)&&ma(s.details),u=_.sharedInstance.deviceType,l=function(e){return""===e?pL+"/guide/"+a.guidePath:pL+"/guide/"+e+"/"+a.guidePath};return c&&u===p.PHONE&&null!=(t=a.variations)&&t.phoneWebOnly?l("icloud-iphone-web-only"):c&&u===p.TABLET&&null!=(n=a.variations)&&n.tabletWebOnly?l("icloud-ipad-web-only"):c&&u===p.DESKTOP&&null!=(r=a.variations)&&r.webOnly?l("icloud-web-only"):!c&&u===p.PHONE&&null!=(i=a.variations)&&i.phone?l("icloud-iphone"):!c&&u===p.TABLET&&null!=(o=a.variations)&&o.tablet?l("icloud-ipad"):a.variations===lL?l(""):l("icloud")}var hL=r.forwardRef((function(e,t){var n,i,o,a=e.onClose,s=e.onCustomizeClick,c=e.userPlan,u=e.canNavigateToHomePage,l=yl(),d=xs(),p=null==(n=qf())||null==(i=n.details)||null==(o=i.beneficiaryInfo)?void 0:o.isBeneficiary,f=mc("CloudOS.Toolbar.AppSwitcherMenu.Heading.Apps"),h=mc("CloudOS.Toolbar.AppSwitcherMenu.Heading.ICloudPlus"),m=mc("CloudOS.Toolbar.AppSwitcherMenu.Heading.More"),g=mc("VoiceOver.ExternalLink.Description"),v=mc("CloudOS.Toolbar.AppSwitcherMenu.ICloudGuide")+" "+g,y=mc("CloudOS.Toolbar.AccountMenu.UpgradeToICloudPlus")+" "+g,b=fL("upgradeToICloudPlus"),_=mc("CloudOS.Toolbar.AccountMenu.AboutWebOnlyPlan")+" "+g,C=fL("webOnlyPlan"),I=Tp("load","app-switcher")[0],w=Tp("launch-app","app-switcher")[0],E=Tp("click","app-switcher")[0],S=Rm().setModalToOpen;r.useEffect((function(){I();var e=ur.withEventAndLabel("workflow","app-switcher",{statCategory:B.USER}).time();return function(){e.record()}}),[I]);var T=Ne.sharedInstance.isDomainCN,O=[];return c===zf.Plus&&!p&&(O=[r.createElement(Nk,{key:"icloud-plus",value:"icloudplus-heading",disabled:!0,className:"app-switcher-wide-item app-switcher-heading"},h),r.createElement(Nk,{key:"hide-my-email",value:"action:hide-my-email",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(zU,null)),r.createElement(Nk,{key:"custom-email-domain",value:"action:custom-email-domain",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(HU,null)),r.createElement(Nk,{key:"private-relay",value:"action:private-relay",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(WU,null)),r.createElement(Nk,{key:"homekit-secure-video",value:"action:homekit-secure-video",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(VU,null))],T&&O.splice(2,2)),r.createElement(Lk,{className:"app-switcher-menu",variant:"cloudos-menu",scrollMode:Pk.Continuous,onItemSelected:function(e){var t=e.split(":"),n=t[0],r=t[1];switch(n){case"app":w(r),d.launchApp(r);break;case"action":switch(E(r),r){case"home-page":mL(eZ.home);break;case"hide-my-email":mL(eZ.icloudplus),d.launchApp("hidemyemail",void 0,{presentationStyle:"modal"});break;case"custom-email-domain":mL(eZ.icloudplus),d.launchApp("customdomainsettings",void 0,{presentationStyle:"modal"});break;case"private-relay":mL(eZ.icloudplus),S("private-relay");break;case"homekit-secure-video":mL(eZ.icloudplus),S("homekit-secure-video");break;case"your-storage":mL(eZ.storage);break;case"your-plan":mL(eZ.plan);break;case"data-recovery":mL(eZ.recovery);break;case"customize-home-page":null==s||s()}}a()},ref:t},r.createElement(Nk,{value:"apps-heading",disabled:!0,className:"app-switcher-wide-item app-switcher-heading"},f),l.map((function(e){return r.createElement(Nk,{className:"app-switcher-grid-cell",key:e.applicationIdentifier,value:"app:"+e.applicationIdentifier,ariaLabel:gc("VoiceOver.AppSwitcher.Open",{appName:e.displayName})},r.createElement(Sd,{iconSize:54,applicationIdentifier:e.applicationIdentifier,isBadgeVisible:!0}),r.createElement("div",{className:"app-switcher-app-name",role:"presentation"},e.displayName))})),u?[r.createElement(Nk,{key:"home-page",value:"action:home-page",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(BU,null))]:[],O,r.createElement(Nk,{value:"more-heading",disabled:!0,className:"app-switcher-wide-item app-switcher-heading"},m),r.createElement(Nk,{value:"action:your-storage",className:"app-switcher-wide-item app-switcher-list-item"},p?r.createElement(qU,null):r.createElement(ZU,null)),r.createElement(Nk,{value:"action:your-plan",className:"app-switcher-wide-item app-switcher-list-item"},p?r.createElement(GU,null):r.createElement(KU,null)),!p&&r.createElement(Nk,{value:"action:data-recovery",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(YU,null)),s&&!p?[r.createElement(Nk,{key:"customize-home-page",value:"action:customize-home-page",className:"app-switcher-wide-item app-switcher-list-item"},r.createElement(QU,null))]:[],r.createElement(Rk,{value:"link:icloud-guide",href:tL,target:"_blank",className:"blue app-switcher-wide-item app-switcher-list-item",rel:"noreferrer",ariaLabel:v},r.createElement(XU,null)),c!==zf.Plus&&!p&&[c===zf.Standard?r.createElement(Rk,{className:"blue app-switcher-wide-item app-switcher-list-item",key:"upgrade-to-icloud-plus",value:"link:upgrade-to-icloud-plus",href:b,target:"_blank",rel:"noreferrer",ariaLabel:y},r.createElement(JU,null)):r.createElement(Rk,{value:"link:about-web-only-plan",className:"blue app-switcher-wide-item app-switcher-list-item",key:"about-web-only-plan",href:C,target:"blank",rel:"noreferrer",ariaLabel:_},r.createElement($U,null))])}));function mL(e){sZ(e,gc(oZ(e)))}hL.displayName="AppSwitcherMenu";var gL,vL,yL=r.forwardRef((function(e,t){var n=mc("Toolbar.Button.AppLauncher.AriaLabel"),i=r.useRef(null),o=function(e){var t=r.useRef(null),n=r.useRef(null),i=r.useRef(null),o=xm(),a=o.canCustomize,s=o.toggleCustomizationMode,c=Yf(),u=mc("VoiceOver.AppSwitcher.Close"),l=a?s:void 0,d=r.useContext(bL).canNavigateToHomePage,p=iU(hL,{menuProps:{onCustomizeClick:l,userPlan:c,canNavigateToHomePage:d,ref:t},popoverProps:{anchorRef:e}}),f=p[0],h=p[1],m=pf(hL,{menuProps:{onCustomizeClick:l,userPlan:c,canNavigateToHomePage:d,ref:n},cardProps:{closeAriaLabel:u,className:"app-switcher-menu-compact"}}),g=m[0],v=m[1];return Xf(g,v,n,f,h,t,i)}(i);return r.createElement(Wc,{className:"toolbar-icon-button",onActivate:o,ref:Object(zp.a)(t,i),ariaLabel:n,ariaHasPopup:"menu"},r.createElement(aL,{height:22,width:22,layoutMode:"glyphBox"}))})),bL=r.createContext({canNavigateToHomePage:!0});n(1165),function(e){e.Mail="Mail",e.Note="Note",e.Event="Event",e.Reminder="Reminder",e.Document="Document",e.Spreadsheet="Spreadsheet",e.Presentation="Presentation"}(vL||(vL={}));var _L=((gL={})[vL.Mail]={locKey:"CreationMenu.Mail",appId:Vu.identifier,ariaLabelLocKey:"CreationMenu.Mail.AriaLabel"},gL[vL.Note]={locKey:"CreationMenu.Note",appId:Xu.identifier,ariaLabelLocKey:"CreationMenu.Note.AriaLabel"},gL[vL.Event]={locKey:"CreationMenu.Event",appId:Ou.identifier,ariaLabelLocKey:"CreationMenu.Event.AriaLabel"},gL[vL.Reminder]={locKey:"CreationMenu.Reminder",appId:cl.identifier,ariaLabelLocKey:"CreationMenu.Reminder.AriaLabel"},gL[vL.Document]={locKey:"CreationMenu.Document",appId:tl.identifier,ariaLabelLocKey:"CreationMenu.Document.AriaLabel"},gL[vL.Spreadsheet]={locKey:"CreationMenu.Spreadsheet",appId:$u.identifier,ariaLabelLocKey:"CreationMenu.Spreadsheet.AriaLabel"},gL[vL.Presentation]={locKey:"CreationMenu.Presentation",appId:Hu.identifier,ariaLabelLocKey:"CreationMenu.Presentation.AriaLabel"},gL),CL=function(){},IL=r.forwardRef((function(e,t){var n=yl().map((function(e){return e.applicationIdentifier})),i=r.useMemo((function(){var e=new Set(n),t=[];return Object.keys(_L).forEach((function(n){var r=_L[n].appId;e.has(r)&&t.push(n)})),t}),[n]),o=Kc()===f.COMPACT,a=o?24:20,s=xs(),c=Tp("load","create-menu")[0],u=Tp("launch-for-create","create-menu")[0];return r.useEffect((function(){c();var e=ur.withEventAndLabel("workflow","create-menu",{statCategory:B.USER}).time();return function(){e.record()}}),[c]),r.createElement(Lk,{variant:"cloudos-menu",className:"creation-menu",onItemSelected:CL,onItemSelectedSync:function(t){var n=_L[t].appId;u(n),t===vL.Document||t===vL.Spreadsheet||t===vL.Presentation?zw(n):s.launchApp(n,{options:{source:{reason:Cc.CREATE}}}),e.onClose()},ref:t},r.createElement(Nk,{className:"title",disabled:!0,value:""},gc("CreationMenu.CreateNew")),function(){var e=[];return i.forEach((function(t,n){var s=_L[t];e.push(r.createElement(Nk,{value:t,key:t,ariaLabel:gc(s.ariaLabelLocKey)},r.createElement(qk,{startIcon:r.createElement(Qk,{applicationIdentifier:s.appId,iconSize:a})},gc(s.locKey)))),o&&n<i.length-1&&e.push(r.createElement(Dk,{key:"divider-"+n}))})),e}())}));IL.displayName="CreationMenu";var wL,EL=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"exclamationmark.bubble.fill",svgPath:"M41.4551 18.7012C43.3594 18.7012 44.7754 17.7246 47.0703 15.5762L64.6973-0.537109L97.7051-0.488281C112.256-0.439453 120.068-8.54492 120.068-22.8516L120.068-60.2539C120.068-74.5605 112.256-82.6172 97.7051-82.6172L34.8145-82.6172C20.2637-82.6172 12.4512-74.6094 12.4512-60.2539L12.4512-22.8516C12.4512-8.49609 20.2637-0.537109 34.8145-0.537109L37.1094-0.537109L37.1094 13.6719C37.1094 16.6992 38.6719 18.7012 41.4551 18.7012ZM66.3086-32.5195C63.7695-32.5195 62.3535-33.9355 62.3047-36.5234L61.6699-63.0859C61.6211-65.6738 63.5254-67.5781 66.2598-67.5781C68.9453-67.5781 70.9473-65.625 70.8984-63.0371L70.166-36.5234C70.1172-33.8867 68.7012-32.5195 66.3086-32.5195ZM66.3086-16.1621C63.3789-16.1621 60.8398-18.457 60.8398-21.3867C60.8398-24.2676 63.3301-26.6113 66.3086-26.6113C69.2383-26.6113 71.7285-24.3164 71.7285-21.3867C71.7285-18.4082 69.1895-16.1621 66.3086-16.1621Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:67.75010498046868,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 107.61767578125 107.8623046875",width:107.61767578125,height:107.8623046875,translateX:-12.451127929687573,translateY:89.1611328125,baseline:89.1611328125,capline:18.701171875}}})},SL=(n(1166),function(){var e=_.sharedInstance.isiOS||_.sharedInstance.isMac;return r.createElement(uU,{className:"feedback-button",href:e?"applefeedback://new?form_identifier=public.macos&answers%5B%3Aarea%5D=seedx%3Aicloud&answers%5B%3Aicloud_problem_area_req%5D=iCloud.com&answers":"https://feedbackassistant.apple.com/new-form-response",ariaLabel:mc("Toolbar.Button.FeedbackButton.AriaLabel")},r.createElement(EL,{height:22,width:22,layoutMode:"glyphBox"}))});function TL(){var e=wA().storageUsage,t=void 0;return null==e?t=void 0:e.overQuota?t=wL.Full:e.almostFull&&(t=wL.AlmostFull),Object(r.useDebugValue)(t),t}!function(e){e[e.AlmostFull=1]="AlmostFull",e[e.Full=2]="Full"}(wL||(wL={})),n(1167);var OL=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"exclamationmark.circle.fill",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.5449-26.1719C56.0059-26.1719 54.5898-27.5879 54.541-30.1758L53.9062-56.7871C53.8574-59.375 55.7617-61.2305 58.4961-61.2305C61.1816-61.2305 63.1836-59.3262 63.1348-56.7383L62.4512-30.1758C62.4023-27.5391 60.9863-26.1719 58.5449-26.1719ZM58.5449-9.81445C55.6152-9.81445 53.0762-12.1582 53.0762-15.0391C53.0762-17.9199 55.5664-20.3125 58.5449-20.3125C61.5234-20.3125 64.0137-17.9688 64.0137-15.0391C64.0137-12.1094 61.4746-9.81445 58.5449-9.81445Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},PL=(n(1168),r.forwardRef((function(e,t){var n,i=e.onClose,o=TL(),a=mc("StorageWarning.Full.Content"),s=mc("StorageWarning.AlmostFull.Content"),c=(null==(n=bZ.sharedInstance.applicationParameter.informationalPageDetails)?void 0:n.route)!==eZ.storage;return r.createElement("a",{className:"storage-warning-popover-inner",href:eZ.storage,onClick:function(e){sZ(eZ.storage,gc(oZ(eZ.storage))),e.preventDefault(),i()},ref:t},r.createElement(OL,{"aria-hidden":!0,className:"exclamation-mark",height:22,width:22,layoutMode:"glyphBox"}),r.createElement("div",{className:"text"},o===wL.Full?a:s),c&&r.createElement(vT,{"aria-hidden":!0,className:"chevron",height:14,width:14,layoutMode:"glyphBox"}))}))),xL=(n(1169),["className"]);function AL(){return(AL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var NL=function(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,xL);return r.createElement("svg",AL({},n,{className:Ts()("dual-tone-exclamation-mark",t),viewBox:"0 0 99.61 99.657",xmlns:"http://www.w3.org/2000/svg"}),r.createElement("path",{fill:"currentColor",d:"M49.805 99.61c27.246 0 49.805-22.608 49.805-49.805C99.61 22.559 77.002 0 49.756 0 22.56 0 0 22.559 0 49.805c0 27.197 22.608 49.804 49.805 49.804Z"}),r.createElement("path",{fill:"#fff",d:"M49.805 58.887c-2.54 0-3.955-1.416-4.004-4.004l-.635-26.612c-.049-2.587 1.856-4.443 4.59-4.443 2.686 0 4.688 1.904 4.639 4.492l-.684 26.563c-.049 2.636-1.465 4.004-3.906 4.004ZM49.805 75.244c-2.93 0-5.469-2.344-5.469-5.225 0-2.88 2.49-5.273 5.469-5.273 2.978 0 5.469 2.344 5.469 5.273 0 2.93-2.54 5.225-5.47 5.225Z"}))},RL=function(){return TL()?r.createElement(DL,null):null};function DL(){var e=r.useRef(null),t=iU(PL,kL(e))[0];return r.createElement(cU,{className:"storage-warning-button",icon:r.createElement(NL,{height:22,width:22}),onActivate:function(){t()},ref:e})}function kL(e){var t=Kc();return{paneProps:{ariaClosePaneDescription:gc("VoiceOver.Close"),initialFocus:"a"},popoverProps:Object.assign({},e?{anchorRef:e}:{},{className:"storage-warning-popover",positioner:t===f.REGULAR?aU:UL,remeasureToken:t})}}function UL(e,t,n,r,i){if(void 0===e)return{contentRect:void 0,arrowRect:void 0,arrowDirection:cf.None};var o=n.bottom-2,a=(r.width-e.width)/2,s=(n.left+n.right)/2;return{contentRect:{top:o,bottom:o+e.height,left:a,right:a,width:e.width,height:e.height},arrowRect:{height:0,width:0,top:o,bottom:o,left:s,right:s},arrowDirection:cf.Up}}var LL=["Account","QuickSwitch","StorageWarning","Feedback","Create"],ML=function(e){var t,n,i=qf(),o=null==i||null==(t=i.details)||null==(n=t.beneficiaryInfo)?void 0:n.isBeneficiary,a=r.useRef(null),s=Ts()("cloudos-application-toolbar-end-view",e.className),c=mc("Toolbar.Button.CreateNew.AriaLabel"),u=function(e){var t=r.useRef(null),n=r.useRef(null),i=r.useRef(null),o=iU(IL,{menuProps:{ref:t},popoverProps:{anchorRef:e}}),a=o[0],s=o[1],c=pf(IL,{menuProps:{ref:n},cardProps:{className:"creation-menu-compact"}}),u=c[0],l=c[1];return Xf(u,l,n,a,s,t,i)}(a),l=Object(Vc.a)();r.useEffect((function(){return e=l,window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)};var e}),[l]);var d,p=(d=function(){var e,t,n;return null!=(e=null==(t=document.getElementsByClassName("application-toolbar-start-view"))||null==(n=t[0])?void 0:n.getBoundingClientRect().width)?e:0},function(){var e,t,n;return null!=(e=null==(t=document.getElementsByClassName("toolbar-container"))||null==(n=t[0])?void 0:n.getBoundingClientRect().width)?e:0}()-d()),f=function(e,t){for(var n=0,r={},i=0;i<LL.length;i++){var o=LL[i],a=e[o];if(void 0!==a&&0!==a){if((n+=a)>t&&0!==i)break;r[o]=!0}}return r}({Account:50,QuickSwitch:44,StorageWarning:TL()?44:0,Feedback:e.allowFeedbackButton&&IU()?44:0,Create:o?0:42},e.shouldFitButtonsToWindowSize?p:9e3);return r.createElement("div",{className:s},r.createElement("div",{className:"toolbar-buttons-container"},null!=i&&i.isAuthenticated?r.createElement(r.Fragment,null,f.StorageWarning&&r.createElement(RL,null),f.Feedback&&r.createElement(SL,null),f.QuickSwitch&&r.createElement(yL,{ref:e.appSwitcherButtonRef}),f.Create&&r.createElement(cU,{className:"create-button",onActivate:u,ref:a,ariaLabel:c,ariaHasPopup:"menu",icon:r.createElement(EU,{height:20,width:20,layoutMode:"glyphBox"})}),f.Account&&r.createElement(lU,null)):r.createElement(iL,null)))},jL=function(e){var t=Rs(),n=Ts()(t===Es.INTERNAL_APP&&"internal-app-theme",t===Es.HOMEPAGE&&"homepage-theme",t===Es.LOGIN&&"login-theme");return r.createElement(dU,{className:n},r.createElement(pU,null,r.createElement(wU,{isCNDomain:e.isCNDomain})),r.createElement(fU,null,e.static?null:r.createElement(ML,{appSwitcherButtonRef:e.appSwitcherButtonRef,allowFeedbackButton:e.allowFeedbackButton,shouldFitButtonsToWindowSize:!0})))},FL=(n(1170),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"icloud.fill",svgPath:"M105.225 3.22266C119.971 3.22266 131.494-7.56836 131.494-20.9961C131.494-31.25 125.586-40.1367 116.064-44.1406C116.162-65.918 100.488-81.6406 80.5176-81.6406C67.2852-81.6406 57.8613-74.5605 52.002-66.0156C39.9902-69.5312 26.9043-60.4004 26.6602-46.7285C15.625-44.9707 8.74023-35.1074 8.74023-23.1934C8.74023-8.83789 21.2891 3.22266 37.9883 3.22266Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 92.8212890625",width:122.758056640625,height:92.8212890625,translateX:-8.735942382812482,translateY:81.640625,baseline:81.640625,capline:11.1806640625}}})});function BL(){var e,t,n,r=iS({endpoint:vE.getPlanPricing,fetchProvider:function(e){return function(){return function(e){var t=e.dsid;if(!t)throw new Error("listSubscriptionFeatures: dsid available");return JE({url:WE(t),includeCredentials:!0,validate:{type:"WirePlanPricing",schema:pR}})}(e)}}}),i=r.data,o=r.isError,a=r.isLoading,s=(n="cloud.storage",iS({endpoint:vE.getSubscriptionFeaturePlanSummary,cacheKeys:[n],fetchProvider:function(e){return function(){return function(e,t){var n=e.dsid;if(!n)throw new Error("getSubscriptionFeaturePlanSummary: no dsid available");return JE({url:HE(n,t),includeCredentials:!0,validate:{type:"WireSubscriptionFeaturePlanSummary",schema:uR}})}(e,n)}}})),c=s.data,u=s.isError,l=s.isLoading,d=iR();if(u)return{type:"error"};if(l||!c)return{type:"loading"};if(c.includedWithAppleOnePlan.includedInPlan){if(c.includedWithAccountPurchasedPlan.includedInPlan){var p,f,h,m,g,v,y,b;if(o)return{type:"error"};if(a||!i)return{type:"loading"};var _=c.includedWithAppleOnePlan,C=c.includedWithAccountPurchasedPlan,I=c.summary;return{type:"apple-one-with-extra",storageSize:zL(null!=(p=_.limit)?p:0,null!=(f=_.limitUnits)?f:"GIB"),extraStorageSize:zL(null!=(h=C.limit)?h:0,null!=(m=C.limitUnits)?m:"GIB"),totalStorageSize:zL(null!=(g=I.limit)?g:0,null!=(v=I.limitUnits)?v:"GIB"),price:null!=(y=i.priceForDisplay)?y:"",renewalPeriod:null!=(b=i.renewalPeriod)?b:"MONTHLY"}}var w,E,S=c.includedWithAppleOnePlan;return{type:"apple-one",storageSize:zL(null!=(w=S.limit)?w:0,null!=(E=S.limitUnits)?E:"GIB")}}if(c.includedWithSharedPlan.includedInPlan){var T,O;if(!d.ok)return{type:"error"};if(!d.value)return{type:"loading"};var P=c.includedWithSharedPlan;return{type:"family-sharing",storageSize:zL(null!=(T=P.limit)?T:0,null!=(O=P.limitUnits)?O:"GIB"),sharerName:Fw(d.value.firstName,d.value.lastName)}}if(c.includedWithAccountPurchasedPlan.includedInPlan){var x,A,N,R;if(o)return{type:"error"};if(!i)return{type:"loading"};var D=c.includedWithAccountPurchasedPlan;return{type:"icloud+",storageSize:zL(null!=(x=D.limit)?x:0,null!=(A=D.limitUnits)?A:"GIB"),price:null!=(N=i.priceForDisplay)?N:"",renewalPeriod:null!=(R=i.renewalPeriod)?R:"MONTHLY"}}return{type:"free",storageSize:zL(null!=(e=c.summary.limit)?e:0,null!=(t=c.summary.limitUnits)?t:"GIB")}}function zL(e,t){return{limit:e,limitUnits:t}}function HL(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("GIB"===e.limitUnits){var n=1073741824*e.limit;return xw(n,2,t)}if("TIB"===e.limitUnits){var r=1099511627776*e.limit;return xw(r,2,t)}Aw(e.limitUnits)}function WL(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?"DescribePlanPricing.Monthly.WithSpace":"DescribePlanPricing.Monthly",i=n?"DescribePlanPricing.Yearly.WithSpace":"DescribePlanPricing.Yearly";return""===e?gc("DescribePlanPricing.Free"):"MONTHLY"===t?gc(r,{price:e}):"YEARLY"===t?gc(i,{price:e}):void Aw(t)}function VL(e){switch(e){case zf.Lite:return gc("NavigationDrawer.Plan.Type.Lite");case zf.Standard:return gc("NavigationDrawer.Plan.Type.Standard");case zf.Plus:return gc("NavigationDrawer.Plan.Type.Icloud+");default:Aw(e)}}n(1171);var ZL=function(e){var t=Ts()("plan-widget",e.className),n=Yf(),i=function(e){var t=e.type;return"loading"===t||"error"===t?{largeDescription:"",smallDescription:""}:"apple-one"===t?{largeDescription:gc("NavigationDrawer.Plan.Description.Large",{size:HL(e.storageSize,!1)}),smallDescription:gc("NavigationDrawer.Plan.Description.Small.AppleOne")}:"apple-one-with-extra"===t?{largeDescription:gc("NavigationDrawer.Plan.Description.Large",{size:HL(e.totalStorageSize,!1)}),smallDescription:gc("NavigationDrawer.Plan.Description.Small.AppleOneWithExtra")}:"family-sharing"===t?{largeDescription:gc("NavigationDrawer.Plan.Description.Large",{size:HL(e.storageSize,!1)}),smallDescription:gc("NavigationDrawer.Plan.Description.Small.FamilySharing",{planOwnerName:e.sharerName})}:"free"===t?{largeDescription:gc("NavigationDrawer.Plan.Description.Large",{size:HL(e.storageSize,!1)}),smallDescription:gc("NavigationDrawer.Plan.Description.Small.Free")}:"icloud+"===t?{largeDescription:gc("NavigationDrawer.Plan.Description.Large",{size:HL(e.storageSize,!1)}),smallDescription:WL(e.price,e.renewalPeriod,!0)}:void Aw(t)}(BL()),o=i.largeDescription,a=i.smallDescription;return r.createElement(bT,{className:t,navLinkTitleKey:e.isBeneficiary?"ShortName.NavLinks.Plan":"NavLinks.Plan",graphic:r.createElement("div",{className:"plan-graphic"},r.createElement(FL,{layoutMode:"glyphBox",desiredFontSize:16,"aria-hidden":!0}),VL(n)),largeDescription:o,smallDescription:a,route:eZ.plan})},qL=(n(1172),function(e){var t=e.id,n=e.usedBytes,i=e.totalBytes,o=e.hideInfo,a=void 0!==o&&o,s=e.usageByMedia,c=function(e){return Math.max(Math.min(e,i),0)},u=function(e){return i?c(e)/i*100:0};i=Math.max(i,0),n=c(n);var l=mc("StorageUsage.Message",{used:xw(n,1),total:xw(i,1)});return r.createElement("div",{className:"storage-usage",id:t},r.createElement("div",{className:"meter-gauge"},s.length?s.map((function(e,t){return r.createElement("div",{key:t,className:"segment",style:{inlineSize:u(e.usageInBytes)+"%",backgroundColor:"#"+e.displayColor}})})):r.createElement("div",{className:"meter-filled segment","data-testid":"meter-filled",style:{inlineSize:u(n)+"%"}})),a||r.createElement("div",{className:"message","data-testid":"message"},l))}),KL=(n(1173),function(e){var t=Ts()("storage-widget",e.className),n=e.storageUsage,i="",o="";if(n){var a=xw(n.usedBytes),s=xw(n.totalBytes),c=n.usedBytes/n.totalBytes*100;i=gc("NavigationDrawer.Storage.Description.Small",{percentageUsed:Math.trunc(c),totalSize:s}),o=gc("NavigationDrawer.Storage.Description.Large",{usedSize:a})}return r.createElement(bT,{className:t,navLinkTitleKey:e.isBeneficiary?"ShortName.NavLinks.Storage":"NavLinks.Storage",graphic:r.createElement("div",{className:"storage-graphic","aria-hidden":!0},!!n&&r.createElement(qL,{usedBytes:n.usedBytes,totalBytes:n.totalBytes,hideInfo:!0,usageByMedia:n.usageByMedia})),largeDescription:o,smallDescription:i,route:eZ.storage})}),GL=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.crop.circle.fill",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM58.4961-26.9043C49.1211-27.002 41.748-34.8145 41.748-45.3125C41.6992-55.1758 49.1699-63.3789 58.4961-63.3789C67.8711-63.3789 75.2441-55.1758 75.2441-45.3125C75.2441-34.8145 67.9199-26.8066 58.4961-26.9043ZM58.4961 7.12891C47.3145 7.12891 35.9863 2.53906 28.5156-5.41992C33.7891-13.7207 45.2637-18.6035 58.4961-18.6035C71.6309-18.6035 83.2031-13.8184 88.5254-5.41992C81.0059 2.53906 69.7266 7.12891 58.4961 7.12891Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},YL=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"bookmark.circle.fill",svgPath:"M58.5449 14.5996C85.791 14.5996 108.35-7.95898 108.35-35.2051C108.35-62.4023 85.7422-85.0098 58.4961-85.0098C31.2988-85.0098 8.74023-62.4023 8.74023-35.2051C8.74023-7.95898 31.3477 14.5996 58.5449 14.5996ZM43.6523-8.49609C41.9922-8.49609 40.918-9.7168 40.918-11.7188L40.918-54.1504C40.918-59.0332 43.457-61.6211 48.3398-61.6211L68.75-61.6211C73.6328-61.6211 76.1719-59.0332 76.1719-54.1504L76.1719-11.7188C76.1719-9.7168 75.0977-8.49609 73.4375-8.49609C72.1191-8.49609 71.3867-9.27734 69.0918-11.5234L58.7891-21.6309C58.6426-21.7773 58.4473-21.7773 58.3008-21.6309L48.0469-11.5234C45.7031-9.27734 44.9707-8.49609 43.6523-8.49609Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6591796875",width:99.6099853515625,height:99.6591796875,translateX:-8.740039062500045,translateY:85.0595703125,baseline:85.0595703125,capline:14.599609375}}})},QL=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"calendar.circle.fill",svgPath:"M58.5449 14.5996C85.791 14.5996 108.35-7.95898 108.35-35.2051C108.35-62.4023 85.7422-85.0098 58.4961-85.0098C31.2988-85.0098 8.74023-62.4023 8.74023-35.2051C8.74023-7.95898 31.3477 14.5996 58.5449 14.5996ZM40.1367-10.3027C34.4727-10.3027 31.6406-13.0859 31.6406-18.7012L31.6406-51.709C31.6406-57.2754 34.4727-60.1074 40.1367-60.1074L76.9531-60.1074C82.6172-60.1074 85.4492-57.2754 85.4492-51.709L85.4492-18.7012C85.4492-13.0859 82.6172-10.3027 76.9531-10.3027ZM39.7461-14.9414L77.2949-14.9414C79.6387-14.9414 80.8105-16.0645 80.8105-18.457L80.8105-43.9453C80.8105-46.4355 79.4434-47.7051 77.0996-47.7051L39.9902-47.7051C37.5977-47.7051 36.2793-46.4355 36.2793-43.9453L36.2793-18.457C36.2793-16.0645 37.5-14.9414 39.7461-14.9414ZM53.125-37.5977C51.9531-37.5977 51.6113-37.9395 51.6113-39.0137L51.6113-40.9668C51.6113-42.0898 51.9531-42.4805 53.125-42.4805L54.9805-42.4805C56.1523-42.4805 56.543-42.0898 56.543-40.9668L56.543-39.0137C56.543-37.9395 56.1523-37.5977 54.9805-37.5977ZM62.1094-37.5977C60.9375-37.5977 60.5957-37.9395 60.5957-39.0137L60.5957-40.9668C60.5957-42.0898 60.9375-42.4805 62.1094-42.4805L63.9648-42.4805C65.1367-42.4805 65.4785-42.0898 65.4785-40.9668L65.4785-39.0137C65.4785-37.9395 65.1367-37.5977 63.9648-37.5977ZM71.0938-37.5977C69.873-37.5977 69.5312-37.9395 69.5312-39.0137L69.5312-40.9668C69.5312-42.0898 69.873-42.4805 71.0938-42.4805L72.9004-42.4805C74.0723-42.4805 74.4629-42.0898 74.4629-40.9668L74.4629-39.0137C74.4629-37.9395 74.0723-37.5977 72.9004-37.5977ZM44.1895-28.8086C43.0176-28.8086 42.627-29.1016 42.627-30.2246L42.627-32.1289C42.627-33.3008 43.0176-33.6426 44.1895-33.6426L46.0449-33.6426C47.2168-33.6426 47.5586-33.3008 47.5586-32.1289L47.5586-30.2246C47.5586-29.1016 47.2168-28.8086 46.0449-28.8086ZM53.125-28.8086C51.9531-28.8086 51.6113-29.1016 51.6113-30.2246L51.6113-32.1289C51.6113-33.3008 51.9531-33.6426 53.125-33.6426L54.9805-33.6426C56.1523-33.6426 56.543-33.3008 56.543-32.1289L56.543-30.2246C56.543-29.1016 56.1523-28.8086 54.9805-28.8086ZM62.1094-28.8086C60.9375-28.8086 60.5957-29.1016 60.5957-30.2246L60.5957-32.1289C60.5957-33.3008 60.9375-33.6426 62.1094-33.6426L63.9648-33.6426C65.1367-33.6426 65.4785-33.3008 65.4785-32.1289L65.4785-30.2246C65.4785-29.1016 65.1367-28.8086 63.9648-28.8086ZM71.0938-28.8086C69.873-28.8086 69.5312-29.1016 69.5312-30.2246L69.5312-32.1289C69.5312-33.3008 69.873-33.6426 71.0938-33.6426L72.9004-33.6426C74.0723-33.6426 74.4629-33.3008 74.4629-32.1289L74.4629-30.2246C74.4629-29.1016 74.0723-28.8086 72.9004-28.8086ZM44.1895-19.9707C43.0176-19.9707 42.627-20.3125 42.627-21.4844L42.627-23.3887C42.627-24.5117 43.0176-24.8047 44.1895-24.8047L46.0449-24.8047C47.2168-24.8047 47.5586-24.5117 47.5586-23.3887L47.5586-21.4844C47.5586-20.3125 47.2168-19.9707 46.0449-19.9707ZM53.125-19.9707C51.9531-19.9707 51.6113-20.3125 51.6113-21.4844L51.6113-23.3887C51.6113-24.5117 51.9531-24.8047 53.125-24.8047L54.9805-24.8047C56.1523-24.8047 56.543-24.5117 56.543-23.3887L56.543-21.4844C56.543-20.3125 56.1523-19.9707 54.9805-19.9707ZM62.1094-19.9707C60.9375-19.9707 60.5957-20.3125 60.5957-21.4844L60.5957-23.3887C60.5957-24.5117 60.9375-24.8047 62.1094-24.8047L63.9648-24.8047C65.1367-24.8047 65.4785-24.5117 65.4785-23.3887L65.4785-21.4844C65.4785-20.3125 65.1367-19.9707 63.9648-19.9707Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6591796875",width:99.6099853515625,height:99.6591796875,translateX:-8.740039062500045,translateY:85.0595703125,baseline:85.0595703125,capline:14.599609375}}})},XL=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"doc.circle.fill",svgPath:"M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM45.4102-8.1543C39.7949-8.1543 37.0117-10.9375 37.0117-16.6504L37.0117-55.1758C37.0117-60.791 39.8438-63.6719 45.4102-63.6719L54.9805-63.6719L54.9805-43.4082C54.9805-39.8926 56.5918-38.2812 60.0586-38.2812L80.0781-38.2812L80.0781-16.6504C80.0781-11.0352 77.2461-8.1543 71.6309-8.1543ZM60.4492-42.3828C59.5215-42.3828 59.0332-42.8711 59.0332-43.8477L59.0332-63.3789C60.1562-63.2324 61.2793-62.4512 62.5488-61.1328L77.4902-45.9473C78.7598-44.6289 79.541-43.5059 79.7363-42.3828Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46503906249995,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 99.6099853515625 99.6572265625",width:99.6099853515625,height:99.6572265625,translateX:-8.740039062500045,translateY:85.05859375,baseline:85.05859375,capline:14.5986328125}}})},JL=(n(1174),function(e){var t=Ts()("recovery-widget",e.className),n=Yf()!==zf.Lite,i=mc("NavigationDrawer.Recovery.Description"),o=mc("NavigationDrawer.Recovery.Description.Lite"),a=n?i:o;return r.createElement(bT,{className:t,navLinkTitleKey:"NavLinks.DataRecovery",graphic:r.createElement("div",{className:"recovery-graphic","aria-hidden":!0},r.createElement(XL,{className:"recovery-graphic-icon document-icon",layoutMode:"glyphBox",desiredFontSize:16}),n&&r.createElement(YL,{className:"recovery-graphic-icon bookmark-icon",layoutMode:"glyphBox",desiredFontSize:16}),r.createElement(GL,{className:"recovery-graphic-icon account-icon",layoutMode:"glyphBox",desiredFontSize:16}),n&&r.createElement(QL,{className:"recovery-graphic-icon calendar-icon",layoutMode:"glyphBox",desiredFontSize:16})),largeDescription:"",smallDescription:a,route:eZ.recovery})}),$L=function(e){var t=e.className,n=e.isBeneficiary,i=void 0!==n&&n,o=wA().storageUsage,a=mc("NavigationDrawer.Recovery.Drawer.AriaLabel");return r.createElement("div",{role:"region",className:Ts()("navigation-drawer",t),"aria-label":mc("NavigationDrawer.AriaLabel")},r.createElement("article",{"aria-label":mc("NavigationDrawer.Plan.Drawer.AriaLabel")},r.createElement(ZL,{isBeneficiary:i})),r.createElement("article",{"aria-label":mc("NavigationDrawer.Storage.Drawer.AriaLabel")},o&&r.createElement(KL,{storageUsage:o,isBeneficiary:i})),!i&&r.createElement("article",{"aria-label":a},!i&&r.createElement(JL,null)))},eM=function(e){var t,n=e.hmeInfo,i=e.tileSize,o=e.isLoading,a=e.tileIndex,s=e.error,c=e.appId,u=mc("HideMyEmailTile.Heading"),l=mc("HideMyEmailTile.Description"),d=mc("HideMyEmailTile.Content.Title"),p=[mc("HideMyEmailTile.Content.ListItem.Active",{count:n?n.active:0}),mc("HideMyEmailTile.Content.ListItem.Inactive",{count:n?n.inactive:0})],f=xs(),h=r.useCallback((function(){f.launchApp("hidemyemail",void 0,{presentationStyle:"modal"})}),[f]),m="hidemyemail"===(null==(t=bZ.sharedInstance.applicationParameter.informationalPageDetails)?void 0:t.relativePath);r.useEffect((function(){m&&h()}),[h,m]);var g=xm().isInCustomizationMode;return r.createElement(dm,{appId:c,tileIndex:a,icon:r.createElement(gd,{"aria-hidden":!0,width:42,height:42}),className:"hide-my-email-tile",heading:u,description:l,isLoading:o,tileSize:i,onTileClick:g?void 0:h,error:s},e.error?r.createElement(HS,{refetch:e.refetch,showClouds:!1}):r.createElement(lT,{contentTitleText:d,contentListItems:p}))},tM=function(e){var t,n=e.onSuccess,i=e.onError,o=e.appId,a=e.tileIndex,s=e.tileSize,c=(t={onSuccess:n,onError:i},iS(Object.assign({},t,{endpoint:vE.hmeList,fetchProvider:function(e){return function(){return function(e){var t=e.webServices,n=e.dsid;if(null==t||!t.ckdatabasews||!n)throw new Error("no service url or dsid available");var r=he.c((null==t?void 0:t.premiummailsettings)+"/v2/hme/list");return TE(r,n),JE({url:r,includeCredentials:!0,validate:{type:"WireHmeListResponse",schema:NA}}).then((function(e){return function(e){if(UA(e.success))return{active:0,inactive:0};if(e.success&&e.result){var t=e.result.hmeEmails;return{active:t.filter((function(e){return e.isActive})).length,inactive:t.filter((function(e){return!e.isActive})).length}}var n;throw new Error((null==e||null==(n=e.error)?void 0:n.errorMessage)||"hide my email api returns error")}(e)}))}(e)}}}))),u=c.data,l=c.error,d=c.isLoading,p=c.isSuccess,f=c.refetch;return r.createElement(eM,{appId:o,tileIndex:null!=a?a:0,error:l,isLoading:d,isSuccess:p,hmeInfo:u,refetch:f,tileSize:null!=s?s:cm.Small})},nM=function(e){var t,n=e.customEmailDomainNames,i=e.tileSize,o=e.isLoading,a=e.tileIndex,s=e.error,c=e.appId,u=mc("CustomEmailDomainTile.Heading"),l=mc("CustomEmailDomainTile.Description"),d=vc({zero:"CustomEmailDomainTile.Content.Title.Zero",one:"CustomEmailDomainTile.Content.Title.One",two:"CustomEmailDomainTile.Content.Title.Two",many:"CustomEmailDomainTile.Content.Title.Many"},n?n.length:0),p=xs(),f=r.useCallback((function(){p.launchApp("customdomainsettings",void 0,{presentationStyle:"modal"})}),[p]),h="customdomain"===(null==(t=bZ.sharedInstance.applicationParameter.informationalPageDetails)?void 0:t.relativePath);r.useEffect((function(){h&&f()}),[f,h]);var m=xm().isInCustomizationMode;return r.createElement(dm,{appId:c,tileIndex:a,icon:r.createElement(Id,{"aria-hidden":!0,width:42,height:42}),className:"custom-email-domain-tile",heading:u,description:l,isLoading:o,tileSize:i,onTileClick:m?void 0:f,error:s},e.error?r.createElement(HS,{refetch:e.refetch,showClouds:!1}):r.createElement(lT,{contentTitleText:d,contentListItems:n}))},rM=function(e){var t,n=e.onSuccess,i=e.onError,o=e.appId,a=e.tileIndex,s=e.tileSize,c=(t={onSuccess:n,onError:i},iS(Object.assign({},t,{endpoint:vE.customEmailDomains,fetchProvider:function(e){return function(){return function(e){var t=e.webServices,n=e.dsid;if(null==t||!t.ckdatabasews||!n)throw new Error("no service url or dsid available");var r=he.c((null==t?void 0:t.premiummailsettings)+"/v2/domain/list");return TE(r,n),JE({url:r,includeCredentials:!0,validate:{type:"WireCustomDomainListResponse",schema:kA}}).then((function(e){return function(e){if(UA(e.success))return[];var t;if(!e.success||!e.result)throw new Error((null==e||null==(t=e.error)?void 0:t.errorMessage)||"hide my email api returns error");return e.result.domains.map((function(e){return e.status===EA.InProgress?gc("CustomEmailDomainTile.Status.InProgress",{domain:e.name}):e.name}))}(e)}))}(e)}}}))),u=c.data,l=c.error,d=c.isLoading,p=c.isSuccess,f=c.refetch;return r.createElement(nM,{appId:o,tileIndex:null!=a?a:0,error:l,isLoading:d,isSuccess:p,customEmailDomainNames:u,refetch:f,tileSize:null!=s?s:cm.Small})},iM=["styles"];function oM(){return(oM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var aM=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,iM);return i.a.createElement("svg",oM({viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"25b9b589b5fa1345e20d0c5091c2f386b"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"})),i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"25b9b589b5fa1345e20d0c5091c2f386c"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"})),i.a.createElement("path",{d:"M22.643 20.03a6.62 6.62 0 002.445-.446 6.25 6.25 0 001.988-1.24 5.746 5.746 0 001.33-1.837 5.343 5.343 0 00.476-2.247 5.896 5.896 0 00-1.686-4.16 5.768 5.768 0 00-1.94-1.296c.009-1.284-.2-2.463-.625-3.535a8.49 8.49 0 00-1.783-2.794 7.98 7.98 0 00-2.674-1.83 8.413 8.413 0 00-3.3-.645c-1.02 0-1.947.163-2.782.488-.835.325-1.58.76-2.234 1.307a8.717 8.717 0 00-1.669 1.842 4.474 4.474 0 00-2.131-.084A4.852 4.852 0 004.764 6.01c-.35.642-.536 1.37-.56 2.18-.868.145-1.614.48-2.24 1.006a5.262 5.262 0 00-1.452 1.969C.17 11.952 0 12.815 0 13.755c0 .85.175 1.654.524 2.408.35.755.837 1.424 1.463 2.006a6.788 6.788 0 002.204 1.36 7.533 7.533 0 002.734.489l15.718.012z",id:"25b9b589b5fa1345e20d0c5091c2f386a"})),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M29.744.333c3.472 0 4.736.35 6.006 1.03a6.94 6.94 0 012.888 2.887c.679 1.27 1.029 2.534 1.029 6.006v19.488c0 3.472-.35 4.736-1.03 6.006a6.94 6.94 0 01-2.887 2.888c-1.27.679-2.534 1.029-6.006 1.029H10.256c-3.472 0-4.736-.35-6.006-1.03a6.94 6.94 0 01-2.888-2.887C.683 34.48.333 33.216.333 29.744V10.256c0-3.472.35-4.736 1.03-6.006A6.94 6.94 0 014.25 1.362C5.52.683 6.784.333 10.256.333z",fill:"#FFF",stroke:"#CDCDCD",strokeWidth:".667"}),i.a.createElement("g",{fillRule:"nonzero",transform:"translate(5.559 9.444)"},i.a.createElement("use",{fill:"#575757",xlinkHref:"#25b9b589b5fa1345e20d0c5091c2f386a"}),i.a.createElement("use",{fill:"url(#25b9b589b5fa1345e20d0c5091c2f386b)",xlinkHref:"#25b9b589b5fa1345e20d0c5091c2f386a"})),i.a.createElement("path",{d:"M20 15.333A4.667 4.667 0 0124.667 20v5.102a.898.898 0 01-.898.898H16.23a.898.898 0 01-.898-.898V20A4.667 4.667 0 0120 15.333z",fill:"#FFF"}),i.a.createElement("path",{d:"M4.667 8.013c2.017 0 3.653-1.605 3.653-3.585S6.684.843 4.667.843c-2.018 0-3.654 1.606-3.654 3.585 0 1.98 1.636 3.585 3.654 3.585z",fill:"url(#25b9b589b5fa1345e20d0c5091c2f386c)",fillRule:"nonzero",transform:"translate(15.333 15.333)"}),i.a.createElement("path",{d:"M18.496 19.762c0 .815.673 1.476 1.504 1.476.83 0 1.504-.661 1.504-1.476 0-.816-.673-1.477-1.504-1.477-.83 0-1.504.661-1.504 1.477",fillOpacity:".599",fill:"#FFF"}),i.a.createElement("path",{d:"M20.223 19.157a.32.32 0 00.322.316.32.32 0 00.322-.316.32.32 0 00-.322-.316.32.32 0 00-.322.316",fill:"#FFF",fillRule:"nonzero"})))},sM=["styles"];function cM(){return(cM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var uM=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,sM);return i.a.createElement("svg",cM({viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"b9206f478ff2dc9d9768090abff7f682b"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"})),i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"b9206f478ff2dc9d9768090abff7f682c"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"})),i.a.createElement("path",{d:"M22.643 20.03a6.62 6.62 0 002.445-.446 6.25 6.25 0 001.988-1.24 5.746 5.746 0 001.33-1.837 5.343 5.343 0 00.476-2.247 5.896 5.896 0 00-1.686-4.16 5.768 5.768 0 00-1.94-1.296c.009-1.284-.2-2.463-.625-3.535a8.49 8.49 0 00-1.783-2.794 7.98 7.98 0 00-2.674-1.83 8.413 8.413 0 00-3.3-.645c-1.02 0-1.947.163-2.782.488-.835.325-1.58.76-2.234 1.307a8.717 8.717 0 00-1.669 1.842 4.474 4.474 0 00-2.131-.084A4.852 4.852 0 004.764 6.01c-.35.642-.536 1.37-.56 2.18-.868.145-1.614.48-2.24 1.006a5.262 5.262 0 00-1.452 1.969C.17 11.952 0 12.815 0 13.755c0 .85.175 1.654.524 2.408.35.755.837 1.424 1.463 2.006a6.788 6.788 0 002.204 1.36 7.533 7.533 0 002.734.489l15.718.012z",id:"b9206f478ff2dc9d9768090abff7f682a"})),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M29.744.333c3.472 0 4.736.35 6.006 1.03a6.94 6.94 0 012.888 2.887c.679 1.27 1.029 2.534 1.029 6.006v19.488c0 3.472-.35 4.736-1.03 6.006a6.94 6.94 0 01-2.887 2.888c-1.27.679-2.534 1.029-6.006 1.029H10.256c-3.472 0-4.736-.35-6.006-1.03a6.94 6.94 0 01-2.888-2.887C.683 34.48.333 33.216.333 29.744V10.256c0-3.472.35-4.736 1.03-6.006A6.94 6.94 0 014.25 1.362C5.52.683 6.784.333 10.256.333z",fill:"#FFF",stroke:"#CDCDCD",strokeWidth:".667"}),i.a.createElement("g",{fillRule:"nonzero",transform:"translate(5.559 9.444)"},i.a.createElement("use",{fill:"#575757",xlinkHref:"#b9206f478ff2dc9d9768090abff7f682a"}),i.a.createElement("use",{fill:"url(#b9206f478ff2dc9d9768090abff7f682b)",xlinkHref:"#b9206f478ff2dc9d9768090abff7f682a"})),i.a.createElement("path",{d:"M20 15.333A4.667 4.667 0 0124.667 20v5.102a.898.898 0 01-.898.898H16.23a.898.898 0 01-.898-.898V20A4.667 4.667 0 0120 15.333z",fill:"#FFF"}),i.a.createElement("path",{d:"M4.667 8.013c2.017 0 3.653-1.605 3.653-3.585S6.684.843 4.667.843c-2.018 0-3.654 1.606-3.654 3.585 0 1.98 1.636 3.585 3.654 3.585z",fill:"url(#b9206f478ff2dc9d9768090abff7f682c)",fillRule:"nonzero",transform:"translate(15.333 15.333)"}),i.a.createElement("path",{d:"M18.496 19.762c0 .815.673 1.476 1.504 1.476.83 0 1.504-.661 1.504-1.476 0-.816-.673-1.477-1.504-1.477-.83 0-1.504.661-1.504 1.477",fillOpacity:".599",fill:"#FFF"}),i.a.createElement("path",{d:"M20.223 19.157a.32.32 0 00.322.316.32.32 0 00.322-.316.32.32 0 00-.322-.316.32.32 0 00-.322.316",fill:"#FFF",fillRule:"nonzero"})))},lM=n(866);function dM(e){var t=e.variant,n=void 0===t?"standard":t,r=e.className,o=e.id,a=e.style,s=e.description,c=e.ariaHidden,u=e.nibStyle,l=Ts()(n,r);return i.a.createElement("ui-activity-indicator",{role:"progressbar",class:l,id:o,style:a,"aria-label":s,"aria-hidden":c},i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}),i.a.createElement("ui-spinner-nib",{style:u}))}n(1176);var pM,fM=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"laptopcomputer.and.iphone",svgPath:"M17.9688 4.54102L138.77 4.54102C145.215 4.54102 149.658 0.341797 149.658-5.85938L149.658-52.3926C149.658-58.5938 145.215-62.793 138.77-62.793L137.061-62.793L137.061-64.5508C137.061-71.3867 133.398-74.9023 126.611-74.9023L39.1113-74.9023C32.666-74.9023 28.6621-71.3867 28.6621-64.5508L28.6621-6.5918L17.9688-6.5918C14.9414-6.5918 12.4512-4.10156 12.4512-1.02539C12.4512 2.05078 14.9414 4.54102 17.9688 4.54102ZM106.641-52.3926L106.641-6.5918L36.5234-6.5918L36.5234-62.3535C36.5234-65.4785 38.0859-67.041 41.2109-67.041L124.512-67.041C127.49-67.041 129.053-65.625 129.199-62.793L117.529-62.793C111.084-62.793 106.641-58.5938 106.641-52.3926ZM113.232-51.3672C113.232-54.3945 115.137-56.2012 118.408-56.2012L118.945-56.2012L118.945-54.248C118.945-52.5391 120.068-51.3184 121.777-51.3184L134.57-51.3184C136.279-51.3184 137.402-52.5391 137.402-54.248L137.402-56.2012L137.939-56.2012C141.162-56.2012 143.066-54.3945 143.066-51.3672L143.066-6.88477C143.066-3.85742 141.162-2.05078 137.939-2.05078L118.408-2.05078C115.137-2.05078 113.232-3.85742 113.232-6.88477ZM120.898-5.17578L135.498-5.17578C136.621-5.17578 137.402-5.9082 137.402-7.03125C137.402-8.25195 136.621-8.98438 135.498-8.98438L120.898-8.98438C119.727-8.98438 118.945-8.25195 118.945-7.03125C118.945-5.9082 119.727-5.17578 120.898-5.17578Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:52.955039062499964,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 137.2076416015625 79.5419921875",width:137.2076416015625,height:79.5419921875,translateX:-12.451210937500036,translateY:75.0009765625,baseline:75.0009765625,capline:4.541015625}}})};function hM(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}n(1175),function(e){e.PLAN_UPGRADE="iCloudPlanUpgrade",e.PRIVATE_RELAY="setupPrivateRelay",e.HOMEKIT_SECURE_VIDEO="homeKitSecureVideo",e.FAMILY_SHARING_ORGANIZER_NO_FAMILY="iCloudPlusFamilySharing.OrganizerNoFamily",e.FAMILY_SHARING_MEMBER="iCloudPlusFamilySharing.Member",e.FAMILY_SHARING_ORGANIZER="iCloudPlusFamilySharing.Organizer",e.STORAGE_MANAGE="iCloudStorageManage",e.STORAGE_FULL="iCloudStorageManage.StorageFull"}(pM||(pM={}));var mM=function(e){var t,n,i,o,a,s,c=e.feature,u=e.variant,l=Ts()("continue-section",e.className,c),d=qf(),p=Fw(null!=(t=null==d||null==(n=d.details)?void 0:n.firstName)?t:"",null!=(i=null==d||null==(o=d.details)?void 0:o.lastName)?i:"",!0),f=null!=(a=null==d||null==(s=d.details)?void 0:s.ContinueOnDeviceEligibleDeviceInfo)?a:[],h=f.length,m=Tp("link","continue-on-device"),g=m[0],v=m[1],y=wh(),b=function(){var e=function(){switch(h){case 0:return"";case 1:return gc("ContinueOnDevice.SuccessDialog.Description.LineOne.OneDevice",{device1:f[0]});case 2:return gc("ContinueOnDevice.SuccessDialog.Description.LineOne.TwoDevices",{device1:f[0],device2:f[1]});case 3:return gc("ContinueOnDevice.SuccessDialog.Description.LineOne.ThreeDevices",{device1:f[0],device2:f[1],device3:f[2]});default:return gc("ContinueOnDevice.SuccessDialog.Description.LineOne.MoreThanThree",{device1:f[0],device2:f[1],device3:f[2],restCount:h-3})}}();y({title:gc("ContinueOnDevice.SuccessDialog.Title"),description:e,accessory:r.createElement("p",{className:"description"},gc("ContinueOnDevice.SuccessDialog.Description.LineTwo")),buttons:[gc("Alert.OkButton")]})},_=function(){y({title:gc("ContinueOnDevice.FailedDialog.Title"),description:gc("ContinueOnDevice.FailedDialog.Description"),buttons:[gc("Alert.OkButton")]})},C=r.useState(!1),I=C[0],w=C[1],E=mc("ContinueOnDevice.NoDevice.IOS.Description"),S=mc("ContinueOnDevice.NoDevice.Mac.Description"),T=mc("ContinueOnDevice.homeKitSecureVideo.NoDevice.Notice"),O=mc("ContinueOnDevice.setupPrivateRelay.NoDevice.Notice"),P="rtl"===x()?gT:mT,A=c===QN.HOMEKIT_SECURE_VIDEO,N=c===QN.PRIVATE_RELAY,R=h>0,D=R?"":".NoDevice",k=mc("ContinueOnDevice."+u+D+".Title"),U=mc("ContinueOnDevice."+u+D+".Description",{fullName:p}),L=mc("ContinueOnDevice."+u+".NoDevice.Description2"),M=mc("ContinueOnDevice.ContinueButton.Title"),j=mc("ContinueOnDevice.ContinueButton.Title.Sending"),F=Ts()("standard-button",{sending:I});return R?r.createElement("section",{className:l},r.createElement("h3",{className:"continue-section-heading"},k),A?r.createElement("p",{className:"continue-section-body"},r.createElement(lM.a,{interpolations:{"#{chevron}":r.createElement(P,{layoutMode:"glyphBox",desiredFontSize:7})}},U)):r.createElement(r.Fragment,null,r.createElement("p",{className:"continue-section-body"},U),r.createElement(Wc,{className:F,onActivate:function(){w(!0),function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,JN(c);case 3:e.sent.success?(g(c,{variant:u}),b()):(v(c,{variant:u}),_()),w(!1),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),v(c,{variant:u}),_(),w(!1);case 14:case"end":return e.stop()}}),e,null,[[0,9]])})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){hM(o,r,i,a,s,"next",e)}function s(e){hM(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}()()}},I?r.createElement(r.Fragment,null,r.createElement(dM,{description:""})," ",r.createElement("span",{className:"sending"},j)):r.createElement(r.Fragment,null,r.createElement(fM,{"aria-hidden":!0,desiredFontSize:14,layoutMode:"glyphBox"})," ",M)))):r.createElement("section",{className:l},r.createElement("h3",{className:"continue-section-heading"},k),A?r.createElement(r.Fragment,null,r.createElement("p",{className:"continue-section-body"},r.createElement(lM.a,{interpolations:{"#{chevron}":r.createElement(P,{layoutMode:"glyphBox",desiredFontSize:7})}},U)),r.createElement("p",{className:"continue-section-body"},T)):r.createElement(r.Fragment,null,r.createElement("p",{className:"continue-section-body"},r.createElement("span",null,E),r.createElement("br",null),r.createElement(lM.a,{interpolations:{"#{chevron}":r.createElement(P,{layoutMode:"glyphBox",desiredFontSize:7})}},U),r.createElement("br",null),r.createElement("span",null,S),r.createElement("br",null),r.createElement(lM.a,{interpolations:{"#{chevron}":r.createElement(P,{layoutMode:"glyphBox",desiredFontSize:7})}},L)),N&&r.createElement("p",{className:"continue-section-body"},O)))},gM=(n(1177),function(e){var t=e.icon,n=e.modalTitle,i=e.modalSubTitle,o=e.modalSectionTitle,a=e.modalDescription,s=e.learnMoreLink,c=e.titleId,u=e.feature,l=e.variant,d=mc("ICloudPlusPage.ModalContent.LearnMore");return r.createElement("div",{className:"modal-content feature-info"},r.createElement("div",{className:"modal-icon","data-testid":"icon"},t),r.createElement("h2",{className:"modal-title","data-testid":"title",id:c},n),r.createElement("div",{className:"modal-subtitle","data-testid":"subtitle"},i),o&&r.createElement("h3",{className:"modal-section-title","data-testid":"sectiontitle"},o),r.createElement("div",{className:"modal-section-description","data-testid":"description"},a," ",r.createElement(uT,{href:s},d)),r.createElement(mM,{feature:u,variant:l}))});function vM(e){var t=e.ariaLabelledBy,n=e.closeButtonDisabled,r=void 0!==n&&n,i=e.paneType,o=void 0===i?of.Dismissible:i,a=e.className;return{ariaLabelledBy:t,closeButtonDisabled:r,paneType:o,className:void 0===a?"":a}}function yM(e,t){var n=vM(t),i=n.ariaLabelledBy,o=n.closeButtonDisabled,a=n.paneType,s=n.className,c=mc("VoiceOver.RecoveryPage.ArchivesRecoveryModal.CloseButtonLabel"),u=function(){return r.createElement(Wc,{onActivate:p,ariaLabel:c,disabled:o,className:"modal-close-button"},r.createElement(lf,{layoutMode:"glyphBox",desiredFontSize:14}))},l=ch(r.createElement(r.Fragment,null,r.createElement("div",{className:"close-button-bar"},r.createElement(u,null)),r.createElement("div",{className:"modal-with-icon"},e)),{variant:"standard modal-with-close-button",paneType:a,ariaLabelledBy:i,className:s,animates:Fp.IN}),d=l[0],p=l[1];return d}n(1178);var bM=function(e){var t=e.numberOfCamsSupported,n=r.createElement(uM,{width:54,height:54}),i=mc("ICloudPlusPage.HomeKitSecureVideoModalContent.Title"),o=1===t?gc("ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.One"):5===t?gc("ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.Five"):"unlimited"===t?gc("ICloudPlusPage.HomeKitSecureVideoModalContent.SubTitle.Unlimited"):void Aw(t),a=mc("ICloudPlusPage.HomeKitSecureVideoModalContent.Section.Description"),s=fL("homeKitSecureVideo");return r.createElement(gM,{icon:n,modalTitle:i,modalSubTitle:o,modalDescription:a,learnMoreLink:s,titleId:"homekit-secure-video-modal-title",feature:QN.HOMEKIT_SECURE_VIDEO,variant:pM.HOMEKIT_SECURE_VIDEO})};function _M(e){return yM(r.createElement(bM,e),{ariaLabelledBy:"homekit-secure-video-modal-title"})}n(1179);var CM=function(e){var t=e.tileSize,n=e.isLoading,i=e.tileIndex,o=e.numberOfCamsSupported,a=e.ariaLevel,s=void 0===a?3:a,c=mc("HomeKitSecureVideoTile.Heading"),u=1===o?gc("HomeKitSecureVideoTile.Description.One"):5===o?gc("HomeKitSecureVideoTile.Description.Five"):"unlimited"===o?gc("HomeKitSecureVideoTile.Description.Unlimited"):void Aw(o),l=mc("HomeKitSecureVideoTile.Content.Description"),d=_M({numberOfCamsSupported:o});return r.createElement(dm,{tileIndex:i,icon:r.createElement(aM,{"aria-hidden":!0,width:40,height:40}),className:"home-kit-secure-video-tile",heading:c,description:u,isLoading:n,tileSize:t,ariaLevel:s,onTileClick:function(){return d()}},r.createElement(lT,{contentDescriptionText:l,continueOnDevice:!0}))},IM=function(){var e=gR();return r.createElement(CM,{tileIndex:0,error:null,isLoading:!1,isSuccess:!0,refetch:function(){},tileSize:cm.Small,numberOfCamsSupported:e})},wM=["styles"];function EM(){return(EM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var SM=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,wM);return i.a.createElement("svg",EM({viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"c57b3bfad91ad7451781c65d984fbc97a"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"}))),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M29.744.333c3.472 0 4.736.35 6.006 1.03a6.94 6.94 0 012.888 2.887c.679 1.27 1.029 2.534 1.029 6.006v19.488c0 3.472-.35 4.736-1.03 6.006a6.94 6.94 0 01-2.887 2.888c-1.27.679-2.534 1.029-6.006 1.029H10.256c-3.472 0-4.736-.35-6.006-1.03a6.94 6.94 0 01-2.888-2.887C.683 34.48.333 33.216.333 29.744V10.256c0-3.472.35-4.736 1.03-6.006A6.94 6.94 0 014.25 1.362C5.52.683 6.784.333 10.256.333z",stroke:"#CDCDCD",strokeWidth:".667",fill:"#FFF"}),i.a.createElement("path",{d:"M21.785 11.595c.282 0 .653.06.946.144.443.122 2.402.775 2.894.98.803.343 1.074.735 1.074 1.637v4.024c0 2.014-1.184 2.96-4.472 4.61a1.13 1.13 0 01-.442.127 1.13 1.13 0 01-.443-.128c-3.293-1.649-4.471-2.595-4.471-4.61v-4.023c0-.902.27-1.289 1.073-1.638.197-.084.629-.235 1.104-.395l.362-.121a103.79 103.79 0 011.428-.463c.294-.089.665-.144.947-.144zM11.085 0c5.75 0 10.557 4.494 11.064 10.114a3.596 3.596 0 00-.364-.019c-.434 0-.95.078-1.38.208l.035-.01a9.446 9.446 0 00-.33-1.774 13.53 13.53 0 01-3.653 1.826 1.79 1.79 0 01-.559.988c.122.229.252.453.388.672a2.653 2.653 0 00-.812 1.395 13.393 13.393 0 01-.994-1.637 1.76 1.76 0 01-1.224-.795 10.73 10.73 0 01-1.02.043c-.27 0-.549 0-.817-.022.021 1.16.161 2.288.408 3.395a1.784 1.784 0 011.343 1.085c.733-.033 1.47-.115 2.2-.245v1.48c-.75.121-1.506.196-2.265.226-.085.16-.182.3-.311.43.397.891.86 1.75 1.407 2.578.43-.154.846-.339 1.245-.551a4.12 4.12 0 00.614 1.615 10.928 10.928 0 01-4.963 1.191C5.027 22.193 0 17.177 0 11.097 0 5.027 5.017 0 11.086 0zm10.667 13.128c-.128 0-.25.033-.476.105-.432.155-1.882.642-2.634.935-.166.061-.216.16-.216.382v3.614c0 1.394.791 1.798 3.115 3.165.122.072.16.089.21.094zM6.649 15.974c.13 1.3.43 2.567.892 3.78a9.14 9.14 0 003.556.72 8.93 8.93 0 001.622-.15 18.67 18.67 0 01-1.279-2.428 1.765 1.765 0 01-1.579-1.149 18.643 18.643 0 01-3.212-.773zm-4.565-2.31a9.518 9.518 0 003.588 5.049 15.945 15.945 0 01-.526-3.32 18.338 18.338 0 01-3.062-1.729zm5.704-3.362c-.236.28-.57.472-.934.548a16.239 16.239 0 00-.29 3.545 17.22 17.22 0 003.394.902c.118-.215.269-.398.451-.548a18.183 18.183 0 01-.451-3.91c-.73-.118-1.46-.3-2.17-.537zm-5.21-3.094a9.238 9.238 0 00-.86 3.889l.011.45a16.8 16.8 0 003.384 2.214 17.76 17.76 0 01.323-3.223 1.75 1.75 0 01-.72-1.418c0-.086.01-.172.021-.247a14.099 14.099 0 01-2.159-1.665zm10.796-4.254a16.443 16.443 0 00-1.912 6.585c.258.01.516.022.763.01.279 0 .558-.01.827-.02a1.78 1.78 0 01.365-.656 13.277 13.277 0 01-.043-5.919zm-1.407-1.192a16.616 16.616 0 00-4.243 6.101c.279.28.472.645.515 1.053.58.193 1.171.344 1.773.451a18.03 18.03 0 012.33-7.562c-.117-.011-.246-.033-.375-.043zm3.008.816a11.44 11.44 0 00-.452 3.362c0 .795.097 1.58.258 2.331.527.011 1 .269 1.31.656a12.106 12.106 0 003.47-1.837 9.593 9.593 0 00-4.586-4.512zM9.86 1.805a9.433 9.433 0 00-6.52 4.06 12.374 12.374 0 002.191 1.773c.247-.161.527-.258.827-.28A18.128 18.128 0 019.86 1.805z",fill:"url(#c57b3bfad91ad7451781c65d984fbc97a)",fillRule:"nonzero",transform:"translate(7.313 8.124)"})))},TM=["styles"];function OM(){return(OM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var PM=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,TM);return i.a.createElement("svg",OM({viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"cc3165b79460df272c3a9c0e83b19b9da"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"}))),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M29.744.333c3.472 0 4.736.35 6.006 1.03a6.94 6.94 0 012.888 2.887c.679 1.27 1.029 2.534 1.029 6.006v19.488c0 3.472-.35 4.736-1.03 6.006a6.94 6.94 0 01-2.887 2.888c-1.27.679-2.534 1.029-6.006 1.029H10.256c-3.472 0-4.736-.35-6.006-1.03a6.94 6.94 0 01-2.888-2.887C.683 34.48.333 33.216.333 29.744V10.256c0-3.472.35-4.736 1.03-6.006A6.94 6.94 0 014.25 1.362C5.52.683 6.784.333 10.256.333z",stroke:"#CDCDCD",strokeWidth:".667",fill:"#FFF"}),i.a.createElement("path",{d:"M21.785 11.595c.282 0 .653.06.946.144.443.122 2.402.775 2.894.98.803.343 1.074.735 1.074 1.637v4.024c0 2.014-1.184 2.96-4.472 4.61a1.13 1.13 0 01-.442.127 1.13 1.13 0 01-.443-.128c-3.293-1.649-4.471-2.595-4.471-4.61v-4.023c0-.902.27-1.289 1.073-1.638.197-.084.629-.235 1.104-.395l.362-.121a103.79 103.79 0 011.428-.463c.294-.089.665-.144.947-.144zM11.085 0c5.75 0 10.557 4.494 11.064 10.114a3.596 3.596 0 00-.364-.019c-.434 0-.95.078-1.38.208l.035-.01a9.446 9.446 0 00-.33-1.774 13.53 13.53 0 01-3.653 1.826 1.79 1.79 0 01-.559.988c.122.229.252.453.388.672a2.653 2.653 0 00-.812 1.395 13.393 13.393 0 01-.994-1.637 1.76 1.76 0 01-1.224-.795 10.73 10.73 0 01-1.02.043c-.27 0-.549 0-.817-.022.021 1.16.161 2.288.408 3.395a1.784 1.784 0 011.343 1.085c.733-.033 1.47-.115 2.2-.245v1.48c-.75.121-1.506.196-2.265.226-.085.16-.182.3-.311.43.397.891.86 1.75 1.407 2.578.43-.154.846-.339 1.245-.551a4.12 4.12 0 00.614 1.615 10.928 10.928 0 01-4.963 1.191C5.027 22.193 0 17.177 0 11.097 0 5.027 5.017 0 11.086 0zm10.667 13.128c-.128 0-.25.033-.476.105-.432.155-1.882.642-2.634.935-.166.061-.216.16-.216.382v3.614c0 1.394.791 1.798 3.115 3.165.122.072.16.089.21.094zM6.649 15.974c.13 1.3.43 2.567.892 3.78a9.14 9.14 0 003.556.72 8.93 8.93 0 001.622-.15 18.67 18.67 0 01-1.279-2.428 1.765 1.765 0 01-1.579-1.149 18.643 18.643 0 01-3.212-.773zm-4.565-2.31a9.518 9.518 0 003.588 5.049 15.945 15.945 0 01-.526-3.32 18.338 18.338 0 01-3.062-1.729zm5.704-3.362c-.236.28-.57.472-.934.548a16.239 16.239 0 00-.29 3.545 17.22 17.22 0 003.394.902c.118-.215.269-.398.451-.548a18.183 18.183 0 01-.451-3.91c-.73-.118-1.46-.3-2.17-.537zm-5.21-3.094a9.238 9.238 0 00-.86 3.889l.011.45a16.8 16.8 0 003.384 2.214 17.76 17.76 0 01.323-3.223 1.75 1.75 0 01-.72-1.418c0-.086.01-.172.021-.247a14.099 14.099 0 01-2.159-1.665zm10.796-4.254a16.443 16.443 0 00-1.912 6.585c.258.01.516.022.763.01.279 0 .558-.01.827-.02a1.78 1.78 0 01.365-.656 13.277 13.277 0 01-.043-5.919zm-1.407-1.192a16.616 16.616 0 00-4.243 6.101c.279.28.472.645.515 1.053.58.193 1.171.344 1.773.451a18.03 18.03 0 012.33-7.562c-.117-.011-.246-.033-.375-.043zm3.008.816a11.44 11.44 0 00-.452 3.362c0 .795.097 1.58.258 2.331.527.011 1 .269 1.31.656a12.106 12.106 0 003.47-1.837 9.593 9.593 0 00-4.586-4.512zM9.86 1.805a9.433 9.433 0 00-6.52 4.06 12.374 12.374 0 002.191 1.773c.247-.161.527-.258.827-.28A18.128 18.128 0 019.86 1.805z",fill:"url(#cc3165b79460df272c3a9c0e83b19b9da)",fillRule:"nonzero",transform:"translate(7.313 8.124)"})))},xM=function(){var e=r.createElement(PM,{width:54,height:54}),t=mc("ICloudPlusPage.PrivateRelayModalContent.Title"),n=mc("ICloudPlusPage.PrivateRelayModalContent.SubTitle"),i=mc("ICloudPlusPage.PrivateRelayModalContent.Section.Description"),o=fL("privateRelay");return r.createElement(gM,{icon:e,modalTitle:t,modalSubTitle:n,modalDescription:i,learnMoreLink:o,titleId:"private-relay-modal-title",feature:QN.PRIVATE_RELAY,variant:pM.PRIVATE_RELAY})};function AM(){return yM(r.createElement(xM,null),{ariaLabelledBy:"private-relay-modal-title"})}n(1180);var NM=function(e){var t=e.tileSize,n=e.isLoading,i=e.tileIndex,o=e.ariaLevel,a=void 0===o?3:o,s=mc("PrivateRelayTile.Heading"),c=mc("PrivateRelayTile.Description"),u=mc("PrivateRelayTile.Content.Description"),l=AM();return r.createElement(dm,{tileIndex:i,icon:r.createElement(SM,{"aria-hidden":!0,width:40,height:40}),className:"private-relay-tile",heading:s,description:c,isLoading:n,tileSize:t,onTileClick:function(){return l()},ariaLevel:a},r.createElement(lT,{contentDescriptionText:u,continueOnDevice:!0}))},RM=function(){return r.createElement(NM,{tileIndex:0,error:null,isLoading:!1,isSuccess:!0,refetch:function(){},tileSize:cm.Small})},DM=["styles"];function kM(){return(kM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var UM=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,DM);return i.a.createElement("svg",kM({viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t),i.a.createElement("defs",null,i.a.createElement("path",{d:"M10.256 0h19.488c3.567 0 4.86.371 6.163 1.069a7.27 7.27 0 013.024 3.024C39.63 5.396 40 6.689 40 10.256v19.488c0 3.567-.371 4.86-1.069 6.163a7.27 7.27 0 01-3.024 3.024C34.604 39.63 33.311 40 29.744 40H10.256c-3.567 0-4.86-.371-6.163-1.069a7.27 7.27 0 01-3.024-3.024C.37 34.604 0 33.311 0 29.744V10.256c0-3.567.371-4.86 1.069-6.163a7.27 7.27 0 013.024-3.024C5.396.37 6.689 0 10.256 0z",id:"e8c22eefd0dab7a7421e42c78b9a9ddda"})),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("mask",{id:"e8c22eefd0dab7a7421e42c78b9a9dddb",fill:"#fff"},i.a.createElement("use",{xlinkHref:"#e8c22eefd0dab7a7421e42c78b9a9ddda"})),i.a.createElement("path",{fill:"#fff",stroke:"#CDCDCD",strokeWidth:".667",d:"M29.744.333c3.472 0 4.736.35 6.006 1.03a6.94 6.94 0 012.888 2.887c.679 1.27 1.029 2.534 1.029 6.006v19.488c0 3.472-.35 4.736-1.03 6.006a6.94 6.94 0 01-2.887 2.888c-1.27.679-2.534 1.029-6.006 1.029H10.256c-3.472 0-4.736-.35-6.006-1.03a6.94 6.94 0 01-2.888-2.887C.683 34.48.333 33.216.333 29.744V10.256c0-3.472.35-4.736 1.03-6.006A6.94 6.94 0 014.25 1.362C5.52.683 6.784.333 10.256.333z"}),i.a.createElement("image",{mask:"url(#e8c22eefd0dab7a7421e42c78b9a9dddb)",x:"5",y:"4.5",width:"30",height:"30",xlinkHref:"data:image/png;base64, "}),i.a.createElement("path",{d:"M29.744.333c3.472 0 4.736.35 6.006 1.03a6.94 6.94 0 012.888 2.887c.679 1.27 1.029 2.534 1.029 6.006v19.488c0 3.472-.35 4.736-1.03 6.006a6.94 6.94 0 01-2.887 2.888c-1.27.679-2.534 1.029-6.006 1.029H10.256c-3.472 0-4.736-.35-6.006-1.03a6.94 6.94 0 01-2.888-2.887C.683 34.48.333 33.216.333 29.744V10.256c0-3.472.35-4.736 1.03-6.006A6.94 6.94 0 014.25 1.362C5.52.683 6.784.333 10.256.333z",stroke:"#CDCDCD",strokeWidth:".667",mask:"url(#e8c22eefd0dab7a7421e42c78b9a9dddb)"})))},LM=function(e){var t=e.role,n=e.ownerShortName,i=e.ownerLongName,o=t===$N.NonOrganizerMember,a=t===$N.OrganizerWithNoMember,s=r.createElement(UM,{width:54,height:54}),c=mc("ICloudPlusPage.FamilySharingModalContent.Title"),u=o?gc("ICloudPlusPage.FamilySharingModalContent.SubTitle.Sharing",{name:n}):gc("ICloudPlusPage.FamilySharingModalContent.SubTitle.NotSharing"),l=o?gc("ICloudPlusPage.FamilySharingModalContent.Section.Description.Sharing",{name:i}):gc("ICloudPlusPage.FamilySharingModalContent.Section.Description.NotSharing"),d=fL("familySharing");return o?r.createElement(gM,{icon:s,modalTitle:c,modalSubTitle:u,modalDescription:l,learnMoreLink:d,titleId:"family-sharing-modal-title",feature:QN.FAMILY_SHARING,variant:pM.FAMILY_SHARING_MEMBER}):a?r.createElement(gM,{icon:s,modalTitle:c,modalSubTitle:u,modalDescription:l,learnMoreLink:d,titleId:"family-sharing-modal-title",feature:QN.FAMILY_SHARING,variant:pM.FAMILY_SHARING_ORGANIZER_NO_FAMILY}):r.createElement(gM,{icon:s,modalTitle:c,modalSubTitle:u,modalDescription:l,learnMoreLink:d,titleId:"family-sharing-modal-title",feature:QN.FAMILY_SHARING,variant:pM.FAMILY_SHARING_ORGANIZER})};n(1181);var MM=function(e){var t,n=e.tileSize,i=e.tileIndex,o=e.error,a=e.isLoading,s=e.role,c=e.organizer,u=e.ariaLevel,l=void 0===u?3:u,d=null!==o,p=s===$N.NonOrganizerMember,f=Fw(c.firstName,c.lastName),h=Fw(c.firstName,c.lastName,!0),m=mc("FamilySharingTile.Heading"),g=p?gc("FamilySharingTile.Description.Member",{name:f}):gc("FamilySharingTile.Description.Five"),v=p?gc("FamilySharingTile.Content.Description.Member",{name:h}):gc("FamilySharingTile.Content.Description"),y=(t={role:s,ownerShortName:f,ownerLongName:h},function(e,t){var n=vM({ariaLabelledBy:"family-sharing-modal-title"}),i=n.ariaLabelledBy,o=n.closeButtonDisabled,a=n.paneType,s=n.className,c=mc("VoiceOver.RecoveryPage.ArchivesRecoveryModal.CloseButtonLabel"),u=uh();return function(){return u((function(t){var n=t.hidePopup;return r.createElement(r.Fragment,null,r.createElement("div",{className:"close-button-bar"},r.createElement(Wc,{onActivate:n,ariaLabel:c,disabled:o,className:"modal-close-button"},r.createElement(lf,{layoutMode:"glyphBox",desiredFontSize:14}))),r.createElement("div",{className:"modal-with-icon"},e))}),{variant:"standard modal-with-close-button",paneType:a,ariaLabelledBy:i,className:s})}}(r.createElement(LM,t)));return r.createElement(dm,{tileIndex:i,icon:r.createElement(UM,{"aria-hidden":!0,width:40,height:40}),className:"family-sharing-tile",heading:m,description:g,isLoading:a,tileSize:n,onTileClick:function(){return y()},ariaLevel:l,error:o},d?r.createElement(HS,{refetch:e.refetch,showClouds:!1}):r.createElement(lT,{contentDescriptionText:v,continueOnDevice:!0}))},jM=function(){var e=function(){var e=qf(),t=rR(),n=t.data,r=t.isError,i=t.error,o=t.refetch;if(r)return{result:Ls.Result.failure(i),refetch:o};if(!n||null==e||!e.details)return{result:Ls.Result.success(void 0),refetch:o};if(!n.isMemberOfFamily||!n.family||!n.familyMembers)return{result:Ls.Result.success($N.None),refetch:o};var a=n.family.organizer,s=n.familyMembers.find((function(e){return e.dsid===a}));return s?s.dsid===e.details.dsid?{result:Ls.Result.success($N.Organizer),refetch:o}:{result:Ls.Result.success($N.NonOrganizerMember),refetch:o}:{result:Ls.Result.failure(new Error("Cannot find family organizer")),refetch:o}}(),t=e.result,n=e.refetch,i=iR(),o=t.ok&&void 0===t.value||i.ok&&void 0===i.value,a=t.ok&&(t.value===$N.None||i.ok),s=a?null:new Error("Missing family data"),c=t.ok&&t.value?t.value:$N.Organizer,u=i.ok&&i.value?i.value:{dsid:"",firstName:"",lastName:"",fullName:""};return r.createElement(MM,{tileIndex:0,error:s,isLoading:o,isSuccess:a,role:c,organizer:u,refetch:n,tileSize:cm.Small})},FM=(n(1182),function(e){var t=Ts()("landing-page-tile",e.className);return r.createElement("div",{className:t},r.createElement("div",{className:Ts()("tile-icon")},r.createElement("img",{src:e.iconSrc,alt:e.iconDescription})),r.createElement("div",{className:"tile-title"},e.title),r.createElement("div",{className:"tile-description"},e.description," ",e.descriptionLink?r.createElement("a",{target:"_blank",rel:"noreferrer",href:e.descriptionLink.href,className:"unstyled-link","aria-label":e.descriptionLink.ariaLabel},e.descriptionLink.text):""))});function BM(){var e=xm(),t=e.isInCustomizationMode,n=e.toggleCustomizationMode,i=gc("HomePage.CustomizeDashboard");return t?null:r.createElement("article",{"aria-label":i,"aria-hidden":t,style:{visibility:t?"hidden":"visible"}},r.createElement(Wc,{className:"customize-dashboard-button",onActivate:n,variant:"push secondary"},i))}n(1183),n(1184);var zM=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"plus.circle.fill",svgPath:"M59.1797 15.1855C86.7676 15.1855 109.619-7.61719 109.619-35.2539C109.619-62.8418 86.7676-85.6934 59.1309-85.6934C31.543-85.6934 8.74023-62.8418 8.74023-35.2539C8.74023-7.61719 31.5918 15.1855 59.1797 15.1855ZM36.9629-35.2051C36.9629-38.0371 38.9648-40.0391 41.748-40.0391L54.3945-40.0391L54.3945-52.6855C54.3945-55.5176 56.3477-57.5195 59.1309-57.5195C61.9629-57.5195 63.9648-55.5176 63.9648-52.6855L63.9648-40.0391L76.6602-40.0391C79.3945-40.0391 81.4453-38.0371 81.4453-35.2051C81.4453-32.4219 79.3945-30.4688 76.6602-30.4688L63.9648-30.4688L63.9648-17.8223C63.9648-15.0391 61.9629-13.0371 59.1309-13.0371C56.3477-13.0371 54.3945-15.0391 54.3945-17.8223L54.3945-30.4688L41.748-30.4688C38.9648-30.4688 36.9629-32.4219 36.9629-35.2051Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46508300781261,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 102.1480712890625 100.9267578125",width:102.1480712890625,height:100.9267578125,translateX:-7.470952148437391,translateY:85.693359375,baseline:85.693359375,capline:15.2333984375}}})};function HM(e){var t=e["aria-hidden"],n=gc("HomePage.CustomizeDashboard.Header.Button.AddTile"),i=gc("HomePage.CustomizeDashboard.Header.Button.Done"),o=xm().toggleCustomizationMode,a=r.useState(!1),s=a[0],c=a[1],u=r.useRef(null),l=_p(),d=Kc()===f.COMPACT,p=eh({buttonRef:u,labelLocKey:"HomePage.CustomizeDashboard.TilePicker.Add.Label",action:function(e){l({type:fp.INSERT,configuration:{identifier:e,uuid:Np()},index:0})},appIconAriaLabelLocKey:"VoiceOver.AppIconButton.TilePicker.Add.Label",onClose:function(){return c(!1)}}),h=bp(),m=h.configurations,g=h.maxTiles,v=m&&m.length>=g;return r.createElement("div",{"aria-hidden":t,className:Ts()("dashboard-customization-header",e.className)},r.createElement("div",{className:"header-container-background"},r.createElement("div",{className:"header-container"},r.createElement("div",{className:"header-start-view"},r.createElement(Wc,{ref:u,onActivate:function(){c(!0),p()},className:Ts()("add-tile",{compact:d,active:s}),ariaHasPopup:"menu",disabled:t||v,ariaLabel:n,"aria-hidden":t},r.createElement(zM,{layoutMode:"glyphBox",width:"20",height:"20"}),d?"":n)),r.createElement("div",{className:"header-end-view"},r.createElement(Wc,{onActivate:o,className:"done",ariaLabel:i,"aria-hidden":t,disabled:t},i)))))}n(1185);var WM=function(e){return r.createElement(Bf,{className:"app-switcher-onboarding-popover",anchorRef:e.anchorRef,positioner:ZM},r.createElement(Wc,{onActivate:e.hide,variant:"push",ariaLabel:mc("AppSwitcherOnboardingPopover.CloseButton.AriaLabel")},"\xd7"),r.createElement("article",null,r.createElement(aL,{"aria-hidden":!0,className:"quick-access-symbol",height:30,width:30,layoutMode:"glyphBox"}),r.createElement("h2",null,mc("AppSwitcherOnboardingPopover.QuickAccess.Title")),r.createElement("p",null,mc("AppSwitcherOnboardingPopover.QuickAccess.Content"))),r.createElement("article",null,r.createElement(MU,{"aria-hidden":!0,className:"customize-symbol",height:30,width:30,layoutMode:"glyphBox"}),r.createElement("h2",null,mc("AppSwitcherOnboardingPopover.Customize.Title")),r.createElement("p",null,mc("AppSwitcherOnboardingPopover.Customize.Content"))),r.createElement("svg",{"aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg",id:"app-switcher-onboarding-popover-arrow",width:"0",height:"0"},r.createElement("defs",null,r.createElement("clipPath",{id:"app-switcher-onboarding-popover-arrow-path"},r.createElement("path",{d:"M0-.5h32v.5c-1.835 0-3.582.754-4.805 2.072l-7.873 8.492c-1.775 1.915-4.869 1.915-6.644 0L4.805 2.072A6.554 6.554 0 000 0v-.5z",transform:"rotate(180 16 6.5)"})))))},VM=mf(Object.assign({},hf,{inset:{top:0,left:100,right:100,bottom:0}}));function ZM(e,t,n,r,i){var o=VM(e,t,n,r,i);return void 0===o.contentRect||void 0===o.arrowRect||void 0===e||o.contentRect.width<e.width&&(o.contentRect.width=e.width,o.contentRect.left=o.contentRect.right=(r.width-e.width)/2),o}var qM="true"===localStorage.getItem("debugShowAppSwitcherOnboardingPopover");n(1186);var KM=n.p+"fc2b7d9c646c188a2aed32221a4fe795.jpg",GM=n.p+"62fa42f6867d6ddd8ebacde0258fdb80.jpg",YM=n.p+"3cd0028caadf7d5e3796db097b4b1b40.jpg",QM=n.p+"4162db32066c04705afd33769238e2c9.png",XM=n.p+"41166dada6559cb93c7a4ff0ea681e52.png",JM=n.p+"cc97674b6043ecdb1554eed74f4cb2f9.png",$M=(n(1187),function(e){var t=Ts()("icloud-hero",e.className);return r.createElement("div",{className:t},r.createElement("div",{className:Ts()("clouds","small"===e.iconSize?"icon-size-small":"")},r.createElement("img",{src:"small"===e.iconSize?QM:GM,srcSet:"small"===e.iconSize?QM+", "+XM+" 2x, "+JM+" 3x":KM+", "+GM+" 2x, "+YM+" 3x",width:430,height:388,alt:"","aria-hidden":!0})),r.createElement("h1",{className:"small"===e.titleSize?"title-size-small":""},e.title?e.title:gc("Application.Title")))}),ej=r.forwardRef((function(e,t){var n,i,o,a,s,c=up.getAccountPreferences(),u=!(null!=(n=null==c?void 0:c.seenOnboardingVersion)&&!n),l=Ts()("welcome-page",e.className),d=qf(),p=Fw(null==d||null==(i=d.details)?void 0:i.firstName,null==d||null==(o=d.details)?void 0:o.lastName),f=null==d||null==(a=d.details)||null==(s=a.beneficiaryInfo)?void 0:s.isBeneficiary,h=mc(f?"WelcomePage.Welcome.Beneficiary":u?"WelcomePage.WelcomeBack.Text":"WelcomePage.Welcome.Text",{name:p});return r.createElement("div",{ref:t,className:l},r.createElement($M,{title:h,titleSize:"small",iconSize:"small"}),r.createElement(dM,{className:"welcome-page-spinner",description:mc("CloudOS.NavigationLayout.Loading")}))}));function tj(e){var t=r.useRef(null);return r.useLayoutEffect((function(){e.forEach((function(e){var n=e[0],r=e[1],i=e[2],o=t.current;o&&("set"===n?o.setAttribute(r,null!=i?i:""):"remove"===n&&o.removeAttribute(r))}))}),[e]),t}var nj,rj={canNavigateToHomePage:!1};!function(e){e[e.VISIBLE=0]="VISIBLE",e[e.FADING=1]="FADING",e[e.HIDDEN=2]="HIDDEN"}(nj||(nj={}));var ij=function(e){var t,n,i,o=e.className,a=e.isCNDomain,s=e.legalFooter,c=e.onPageLoaded,u=e.inlineBannerData,l=mc("VoiceOver.HomePage"),d=xm().isInCustomizationMode,p=function(){var e=Object(r.useState)(!1),t=e[0],n=e[1],i=Object(r.useState)(!1),o=i[0],a=i[1],s=Object(r.useState)((function(){var e=window.sessionStorage.getItem("iCloud.hasSeenWelcomeBackPage"),t=window.localStorage.getItem("iCloud.User.Tiles.Customization.ForceRun");return!(e&&!t)})),c=s[0],u=s[1],l=Tp("load","welcome-page",{measureFromBaseline:!0})[0];return Object(r.useEffect)((function(){if(c){window.sessionStorage.setItem("iCloud.hasSeenWelcomeBackPage","true");var e=setTimeout((function(){a(!0)}),1e3),t=setTimeout((function(){n(!0)}),2500);return function(){clearTimeout(e),clearTimeout(t)}}}),[c]),Object(r.useEffect)((function(){t&&o&&c&&(u(!1),l())}),[t,o,c,l]),{showWelcomePage:c,setTilesReady:n}}(),f=p.showWelcomePage,h=p.setTilesReady,m=function(e){var t=r.useRef(null),n=r.useMemo((function(){if(qM)return!0;var e=up.getAccountPreferences(),t=null==e?void 0:e.seenOnboardingVersion;return void 0===t||t<sp.APP_SWITCHER_MENU}),[]),i=r.useState(!1),o=i[0],a=i[1],s=Gp(r.createElement(WM,{anchorRef:t,hide:function(){var e=up.getAccountPreferences();up.setAccountPreferences(Object.assign({},e,{seenOnboardingVersion:sp.APP_SWITCHER_MENU})),u()}}),{paneType:of.Modal}),c=s[0],u=s[1];return r.useEffect((function(){o||!n||e||(c({animate:!1}),a(!0))}),[c,o,e,n]),t}(f),g=tj(r.useMemo((function(){return[d?["set","inert"]:["remove","inert"]]}),[d])),v=r.useRef(f).current,y=r.useState(f?nj.VISIBLE:nj.HIDDEN),b=y[0],_=y[1],C=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;r.useEffect((function(){v&&!f&&_(nj.FADING)}),[v,f]);var I=r.useRef(null);return r.useEffect((function(){var e=I.current;if(e){var t=function(e){"welcome-page-fade-out"===e.animationName&&_(nj.HIDDEN)};return e.addEventListener("animationend",t),function(){e.removeEventListener("animationend",t)}}}),[I]),r.createElement("div",{className:Ts()("homepage-viewport",o)},r.createElement("div",{className:"welcome-page-gradient-background"}),r.createElement("div",{className:Ts()("homepage-gradient-background",{"homepage-gradient-background-fade-in":!f})}),r.createElement("div",{className:Ts()("homepage-scrollview",{scrollable:!f})},r.createElement("div",{className:"homepage-content"},d?r.createElement("div",{style:{blockSize:44}}):r.createElement(bL.Provider,{value:rj},r.createElement(jL,{appSwitcherButtonRef:m,isCNDomain:a,allowFeedbackButton:!0})),r.createElement(HM,{"aria-hidden":!d,className:Ts()({visible:d})}),b!==nj.HIDDEN?r.createElement(Sp,{scope:"welcome-page"},r.createElement(ej,{ref:I,className:Ts()({"welcome-page-fade-out":b===nj.FADING})})):null,r.createElement("main",null,r.createElement("div",{className:"home-page"},!d&&r.createElement(pT,{ariaLevel:1,text:l}),r.createElement(Ck,{onTilesLayoutReady:function(){h(!0),null==c||c()},inlineBannerData:u}),!C&&r.createElement(BM,null))),r.createElement("footer",{ref:g},r.createElement("div",{className:"navigation-drawer-container"},r.createElement($L,{isBeneficiary:C})),s,d?r.createElement("div",{className:"overlay"}):null))))},oj=(n(1188),n(1189),Ne.sharedInstance.isDomainCN),aj=function(e){var t=e.text;return r.createElement("li",null,r.createElement("span",{className:"bullet-dot"}),r.createElement("span",null,t))},sj=function(e){var t=e.planType,n=e.planFeatures,i=e.isBeneficiary,o=void 0!==i&&i,a=r.createElement(uT,{href:fL("iCloudAppsFeatures")},gc("PlanDetailsPage.Included.iCloudFeatures.Link.Title")),s=function(e,t){if(e===zf.Lite)return{storage:gc("PlanDetailsPage.Bullets.Lite.Storage"),premium:[],featuresHeader:gc("PlanDetailsPage.Bullets.Lite.FeaturesHeader"),features:[gc("PlanDetailsPage.Bullets.Features.Drive"),gc("PlanDetailsPage.Bullets.Features.Notes"),gc("PlanDetailsPage.Bullets.Features.Contacts"),gc("PlanDetailsPage.Bullets.Features.Pages"),gc("PlanDetailsPage.Bullets.Features.Numbers"),gc("PlanDetailsPage.Bullets.Features.Keynote")]};if(e===zf.Standard)return{storage:gc("PlanDetailsPage.Bullets.Standard.Storage"),premium:[],featuresHeader:gc("PlanDetailsPage.Bullets.StandardPlus.FeaturesHeader"),features:[gc("PlanDetailsPage.Bullets.Features.Photos"),gc("PlanDetailsPage.Bullets.Features.Drive"),gc("PlanDetailsPage.Bullets.Features.Backup"),gc("PlanDetailsPage.Bullets.Features.Mail"),gc("PlanDetailsPage.Bullets.Features.PasswordAndKeychain")]};if(e===zf.Plus){var n,r,i=t&&1!==t.numberOfSupportedCameras?5===t.numberOfSupportedCameras?gc("PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.Five"):gc("PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.Unlimited"):gc("PlanDetailsPage.Bullets.Plus.Premium.HomeKitSecureCam.One");return oj?{storage:gc("PlanDetailsPage.Bullets.Plus.Storage",{storage:null!=(n=null==t?void 0:t.storageSize)?n:""}),premium:[gc("PlanDetailsPage.Bullets.Plus.Premium.HideMyEmail"),i,gc("PlanDetailsPage.Bullets.Plus.Premium.FamilySharing")],featuresHeader:gc("PlanDetailsPage.Bullets.StandardPlus.FeaturesHeader"),features:[gc("PlanDetailsPage.Bullets.Features.Photos"),gc("PlanDetailsPage.Bullets.Features.Drive"),gc("PlanDetailsPage.Bullets.Features.Backup"),gc("PlanDetailsPage.Bullets.Features.Mail"),gc("PlanDetailsPage.Bullets.Features.PasswordAndKeychain")]}:{storage:gc("PlanDetailsPage.Bullets.Plus.Storage",{storage:null!=(r=null==t?void 0:t.storageSize)?r:""}),premium:[gc("PlanDetailsPage.Bullets.Plus.Premium.PrivateRelay"),gc("PlanDetailsPage.Bullets.Plus.Premium.HideMyEmail"),gc("PlanDetailsPage.Bullets.Plus.Premium.CustomEmailDomain"),i,gc("PlanDetailsPage.Bullets.Plus.Premium.FamilySharing")],featuresHeader:gc("PlanDetailsPage.Bullets.StandardPlus.FeaturesHeader"),features:[gc("PlanDetailsPage.Bullets.Features.Photos"),gc("PlanDetailsPage.Bullets.Features.Drive"),gc("PlanDetailsPage.Bullets.Features.Backup"),gc("PlanDetailsPage.Bullets.Features.Mail"),gc("PlanDetailsPage.Bullets.Features.PasswordAndKeychain")]}}Aw(e)}(t,n),c=gc(o?"PlanDetailsPage.Included":"PlanDetailsPage.Includes"),u=Ts()("included-in-plan-section",e.className);return r.createElement("section",{className:u},r.createElement("h2",{className:"heading"},c),r.createElement("ul",null,r.createElement(aj,{text:s.storage})),s.premium.length>0?r.createElement(r.Fragment,null,r.createElement("h3",{className:"heading-secondary"},gc("PlanDetailsPage.Bullets.Plus.Premium.Header")),r.createElement("ul",null,s.premium.map((function(e,t){return r.createElement(aj,{key:t,text:e})})))):null,r.createElement("h3",{className:"heading-secondary"},s.featuresHeader),r.createElement("ul",null,s.features.map((function(e,t){return r.createElement(aj,{key:t,text:e})}))),t!==zf.Lite&&r.createElement("p",{className:"included-in-plan-learn-more"},r.createElement(lM.a,{interpolations:{"#{iCloudFeaturesLink}":a}},gc("PlanDetailsPage.Included.StandardPlus.LearnMore.Features"))))},cj=(n(1190),function(){return r.createElement("section",{className:"change-plan-section learn-more-section"},r.createElement("div",{className:"change-plan-section-heading"},r.createElement(lM.a,{interpolations:{"#{iCloudPlusLink}":r.createElement(uT,{href:fL("iCloudPlusPlanPricing")},gc("PlanDetailsPage.ChangePlanSection.LearnMore.Link.Title"))}},gc("PlanDetailsPage.ChangePlanSection.LearnMore.Text"))))}),uj=function(e){var t=Ts()("change-plan-section",e.className);return r.createElement(r.Fragment,null,e.plan===zf.Lite&&r.createElement("section",{className:t},r.createElement("h2",{className:"change-plan-section-heading"},gc("PlanDetailsPage.ChangePlanSection.Title.Lite")),r.createElement("p",{className:"change-plan-section-body"},gc("PlanDetailsPage.ChangePlanSection.Body.Lite")," ",r.createElement(uT,{href:fL("webOnlyPlan")},gc("PlanDetailsPage.ChangePlanSection.Body.Lite.LearnMore.Title")))),e.plan!==zf.Lite&&r.createElement(r.Fragment,null,r.createElement(mM,{feature:QN.PLAN_UPGRADE,variant:pM.PLAN_UPGRADE}),r.createElement(cj,null)))},lj=["styles"];function dj(){return(dj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var pj=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,lj);return i.a.createElement("svg",dj({width:"60",height:"60",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("defs",null,i.a.createElement("clipPath",{id:"259b092f487eb386dbef7b6e45e23f2ca"},i.a.createElement("path",{d:"M42.053 0c6.24 0 8.503.65 10.785 1.87a12.721 12.721 0 015.292 5.292C59.35 9.444 60 11.707 60 17.947v24.106c0 6.24-.65 8.503-1.87 10.785a12.721 12.721 0 01-5.292 5.292C50.556 59.35 48.293 60 42.053 60H17.947c-6.24 0-8.503-.65-10.785-1.87a12.721 12.721 0 01-5.292-5.292C.65 50.556 0 48.293 0 42.053V17.947c0-6.24.65-8.503 1.87-10.785A12.721 12.721 0 017.162 1.87C9.444.65 11.707 0 17.947 0h24.106z"})),i.a.createElement("clipPath",{id:"259b092f487eb386dbef7b6e45e23f2cb"},i.a.createElement("path",{d:"M12.017 13.606c3.383 0 6.018 2.619 6.038 6.301 1.554.69 2.557 2.186 2.557 3.899 0 2.304-1.928 4.194-4.425 4.194l-11.25-.02C2.124 27.98 0 25.913 0 23.471c0-2.008 1.101-3.682 2.97-3.997.04-2.304 2.222-3.86 4.268-3.308 1.003-1.398 2.616-2.56 4.779-2.56zm26.807.236c3.698 0 6.176 2.481 6.176 6.164 0 3.662-2.478 6.143-6.176 6.143H22.461a6.214 6.214 0 00.452-2.343c0-2.245-1.003-4.056-2.655-5.277-.275-1.851-1.062-3.446-2.242-4.687zm-.275 4.135c-1.101 0-2.046.926-2.046 2.029 0 1.122.945 2.047 2.046 2.028 1.101-.02 2.026-.906 2.026-2.028a2.05 2.05 0 00-2.026-2.029zM33.416 0c2.792 0 4.936 1.32 5.9 3.741l3.5 8.684c-1.16-.571-2.517-.886-3.992-.886H15.656c-.354 0-.807 0-1.279.078a7.157 7.157 0 00-2.439-.295l3.069-7.58C15.99 1.318 18.134 0 20.927 0z"})),i.a.createElement("linearGradient",{id:"259b092f487eb386dbef7b6e45e23f2cc",x1:"22.5",y1:"0",x2:"22.5",y2:"28",gradientUnits:"userSpaceOnUse"},i.a.createElement("stop",{stopColor:"#3980FF",offset:"0%"}),i.a.createElement("stop",{stopColor:"#5CBEFF",offset:"100%"}))),i.a.createElement("g",{clipPath:"url(#259b092f487eb386dbef7b6e45e23f2ca)"},i.a.createElement("path",{fill:"#FFF",d:"M0 0h60v60H0V0z"}),i.a.createElement("path",{d:"M17.947 0h24.106c6.24 0 8.503.65 10.785 1.87a12.721 12.721 0 015.292 5.292C59.35 9.444 60 11.707 60 17.947v24.106c0 6.24-.65 8.503-1.87 10.785a12.721 12.721 0 01-5.292 5.292C50.556 59.35 48.293 60 42.053 60H17.947c-6.24 0-8.503-.65-10.785-1.87a12.721 12.721 0 01-5.292-5.292C.65 50.556 0 48.293 0 42.053V17.947c0-6.24.65-8.503 1.87-10.785A12.721 12.721 0 017.162 1.87C9.444.65 11.707 0 17.947 0z",stroke:"#CDCDCD",fill:"none",strokeMiterlimit:"5"})),i.a.createElement("g",{clipPath:"url(#259b092f487eb386dbef7b6e45e23f2cb)",transform:"translate(6.5 16)"},i.a.createElement("path",{fill:"#1C1C1F",d:"M0 0h45v28H0V0z"}),i.a.createElement("path",{fill:"url(#259b092f487eb386dbef7b6e45e23f2cc)",d:"M0 0h45v28H0V0z"})))},fj=(n(1191),Ne.sharedInstance.isDomainCN),hj=function(e){return r.createElement("div",{className:Ts()("upgrade-plan-tiles",e.className)},r.createElement("div",{className:"application-content"},r.createElement("h2",{className:"upgrade-heading"},gc("UpgradePlanTiles.Upgrade")),r.createElement("p",{className:"upgrade-description"},gc("UpgradePlanTiles.Upgrade.Description")),r.createElement("div",{className:"upgrade-plan-info-tiles"},r.createElement(_T,{icon:r.createElement(pj,{width:60,height:60,"aria-hidden":!0}),title:gc("UpgradePlanTiles.MoreStorage"),tileId:"more-storage-tile",textContent:gc("UpgradePlanTiles.MoreStorage.Description"),linkInfo:{text:gc("UpgradePlanTiles.MoreStorage.LinkText"),href:fL("iCloudPlusPlanPricing")}}),fj?null:r.createElement(_T,{icon:r.createElement(PM,{width:60,height:60,"aria-hidden":!0}),title:gc("UpgradePlanTiles.PrivateRelay"),tileId:"private-relay-tile",textContent:gc("UpgradePlanTiles.PrivateRelay.Description"),linkInfo:{text:gc("UpgradePlanTiles.PrivateRelay.LinkText"),href:fL("privateRelay")}}),r.createElement(_T,{icon:r.createElement(gd,{width:60,height:60,"aria-hidden":!0}),title:gc("UpgradePlanTiles.HideMyEmail"),tileId:"hide-my-email-tile",textContent:gc("UpgradePlanTiles.HideMyEmail.Description"),linkInfo:{text:gc("UpgradePlanTiles.HideMyEmail.LinkText"),href:fL("hideMyEmail")}}),r.createElement(_T,{icon:r.createElement(uM,{width:60,height:60,"aria-hidden":!0}),title:gc("UpgradePlanTiles.HomeKitSecureVideo"),tileId:"homekit-secure-video-tile",textContent:gc("UpgradePlanTiles.HomeKitSecureVideo.Description"),linkInfo:{text:gc("UpgradePlanTiles.HomeKitSecureVideo.LinkText"),href:fL("homeKitSecureVideo")}}),fj?null:r.createElement(_T,{icon:r.createElement(Id,{width:60,height:60,"aria-hidden":!0}),title:gc("UpgradePlanTiles.CustomEmailDomain"),tileId:"custom-email-domain-tile",textContent:gc("UpgradePlanTiles.CustomEmailDomain.Description"),linkInfo:{text:gc("UpgradePlanTiles.CustomEmailDomain.LinkText"),href:fL("customEmailDomains")}}),r.createElement(_T,{icon:r.createElement(UM,{width:60,height:60,"aria-hidden":!0}),title:gc("UpgradePlanTiles.FamilySharing"),tileId:"family-sharing-tile",textContent:gc("UpgradePlanTiles.FamilySharing.Description"),linkInfo:{text:gc("UpgradePlanTiles.FamilySharing.LinkText"),href:fL("familySharing")}}))))},mj=(n(1192),n(1193),function(e){var t=e.crossed,n=e.onChange;return r.createElement("button",{className:"sandwich-menu-toggle-icon","aria-label":mc("SandwichMenu.NavLinks.ToggleIcon"),"data-cross-activated":t,onClick:function(){return n({crossed:t})}},r.createElement("div",{className:"sandwich-menu-toggle-icon-top"},r.createElement("div",{className:"sandwich-menu-toggle-icon-crust-top"})),r.createElement("div",{className:"sandwich-menu-toggle-icon-bottom"},r.createElement("div",{className:"sandwich-menu-toggle-icon-crust-bottom"})))});function gj(){return(gj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vj=function(e){var t=e.useHorizontalSizeClass||Kc,n=t()===(e.collapsedSizeClass||function(e){if(e)return f.COMPACT;throw new TypeError("When bringing your own sizeClass media query, you need to set a `collapsedSizeClass`!")}(t===Kc)),i=r.useState(!1),o=i[0],a=i[1],s=r.useCallback((function(){return a(!1)}),[a]);r.useEffect((function(){n||s()}),[n,s]);var c=r.useState(!0),u=c[0],l=c[1];r.useLayoutEffect((function(){l(n)}),[n]);var d=n&&o;r.useEffect((function(){document.documentElement.classList[d?"add":"remove"]("sandwich-menu-open")}),[d]);var p=s,h=r.useCallback((function(e){" "!==e.key&&"Return"!==e.key||p()}),[p]),m=e.liProps,g=e.selectedItem,v=e.menuItems.map((function(e){var t=e.key;if(!t)throw new TypeError("menuItems need to set a `key` prop!");var n=g&&t===g?"selected":null,i=Ts()(null==m?void 0:m.className,n)||void 0;return r.createElement("li",gj({key:t,className:i,onClick:p,onKeyDown:h},m),e)}));return r.createElement("div",{className:Ts()("sandwich-menu",d?"open":"closed",u?"animated":null)},r.createElement("div",{className:"sandwich-menu-button-container"},r.createElement(mj,{crossed:o,onChange:function(e){var t=e.crossed;return a(!t)}})),r.createElement("div",{className:"sandwich-menu-header"},e.compactHeader),r.createElement("section",{className:"sandwich-menu-items-container","aria-label":gc("SandwichMenu.AriaLabel")},r.createElement("ul",null,v)))};n(1194);var yj=function(e){var t=e.route,n=iZ(t,""+e.locPrefix+rZ[t],void 0,!0);return r.createElement(n,null)},bj=function(e){var t,n,i,o=e.current,a=e.tabs,s=function(){var e,t,n,r=null==(e=qf())||null==(t=e.details)||null==(n=t.beneficiaryInfo)?void 0:n.isBeneficiary;return[eZ.plan,eZ.storage,Qf()&&!r?eZ.icloudplus:null,r?null:eZ.recovery,r?null:eZ.settings].filter(Ra)}();a||(a=s);var c=Qf(),u="MD"===Tm(),l=(null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary)?"ShortName.":c&&u?"":"LongName.",d=a.map((function(e){return r.createElement(yj,{key:e,route:e,locPrefix:l})}));return r.createElement(vj,{menuItems:d,selectedItem:o,useHorizontalSizeClass:Tm,collapsedSizeClass:"SM"})},_j=function(e){var t,n,i,o,a,s=e.className,c=e.onPageLoaded,u=e.setIsNotICloudPlusUser,l=Ts()("plan-details-page",s),d=Yf(),p=BL(),f=null!=(t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.type;if("error"!==n&&"loading"!==n){var r="apple-one-with-extra"===e.type?e.totalStorageSize:e.storageSize;return HL(r,t)}}(p))?t:"",h=gR(),m=qf(),g=null==m||null==(n=m.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary,v=null!=(o=null==m||null==(a=m.details)?void 0:a.firstName)?o:"",y=g?gc("PlanDetailsPage.TitleWithName",{firstName:v}):gc("PlanDetailsPage.Title"),b=function(e,t){if(e===zf.Lite)return{planDetails:gc("PlanDetailsPage.Lite.Details"),price:gc("PlanDetailsPage.Lite.Price")};if(e===zf.Standard)return{planDetails:gc("PlanDetailsPage.Standard.Details"),price:gc("PlanDetailsPage.Standard.Price")};if(e===zf.Plus){var n=t.type;if("loading"===n||"error"===n)return{};if("apple-one"===n)return{planDetails:gc("PlanDetailsPage.Plus.Details",{storage:HL(t.storageSize)}),planDescription:gc("PlanDetailsPage.AppleOne")};if("apple-one-with-extra"===n)return{planDetails:gc("PlanDetailsPage.Plus.Details",{storage:HL(t.storageSize)}),planDescription:gc("PlanDetailsPage.AppleOne"),extraPlanDetails:gc("PlanDetailsPage.ExtraStorage",{storage:HL(t.extraStorageSize)}),price:WL(t.price,t.renewalPeriod)};if("icloud+"===n)return{planDetails:gc("PlanDetailsPage.Plus.Details",{storage:HL(t.storageSize)}),price:WL(t.price,t.renewalPeriod)};if("family-sharing"===n)return{planDetails:gc("PlanDetailsPage.Plus.Details",{storage:HL(t.storageSize)}),planDescription:gc("PlanDetailsPage.SharedBy",{planOwnerName:t.sharerName})};if("free"===n)return{planDetails:gc("PlanDetailsPage.Plus.Details",{storage:HL(t.storageSize)}),price:gc("PlanDetailsPage.Plus.Free")};Aw(n)}else Aw(e)}(d,p),_=b.planDetails,C=b.planDescription,I=b.extraPlanDetails,w=b.price;return r.useEffect((function(){"loading"!==p.type&&(null==c||c())}),[p,c]),r.useEffect((function(){d!==zf.Plus&&u(!0)}),[d,u]),r.createElement("div",{className:l},r.createElement(bj,{current:eZ.plan}),r.createElement(CT,{title:y,subtitle:_,subtitleDescription:C,extraSubtitle:I,description:w}),r.createElement("div",{className:"plan-details-page-first-row"},r.createElement("div",{className:"application-content plan-section-wrapper"},r.createElement("div",{className:"plan-section"},r.createElement("div",{className:"border-box"},r.createElement(sj,{planType:d,planFeatures:{storageSize:f,numberOfSupportedCameras:h},isBeneficiary:g}))),!g&&r.createElement("div",{className:"plan-section change-plan"},r.createElement(uj,{plan:d})))),d===zf.Plus||g?null:r.createElement(hj,null))};function Cj(e,t,n){if(0===e.length)return[];var r=0;e.length>n&&(r=e.length-(n-1),e=e.slice(0,n-1));var i=e.map((function(e){return t(e)}));if(r>0){var o=yc({zero:"Truncate.ExtraItems.Zero",one:"Truncate.ExtraItems.One",two:"Truncate.ExtraItems.Two",many:"Truncate.ExtraItems.Many"},r);i.push(o)}return i}n(1195);var Ij,wj=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"bookmark",svgPath:"M26.2695 20.6055C29.3457 20.6055 31.4453 19.2383 35.3027 15.4297L53.7109-2.97852C53.9551-3.17383 54.2969-3.17383 54.541-2.97852L72.998 15.4785C76.8555 19.2383 78.8574 20.6055 81.9824 20.6055C86.9141 20.6055 90.1855 17.1387 90.1855 11.7676L90.1855-74.1211C90.1855-84.5215 84.4238-90.2832 74.1211-90.2832L34.1309-90.2832C23.8281-90.2832 18.0664-84.5215 18.0664-74.1211L18.0664 11.7676C18.0664 17.1387 21.2891 20.6055 26.2695 20.6055ZM31.9824 0.0488281C31.3965 0.683594 30.6641 0.439453 30.6641-0.439453L30.6641-72.8027C30.6641-76.2207 32.1777-77.6855 35.5469-77.6855L72.7051-77.6855C76.0742-77.6855 77.5879-76.2207 77.5879-72.8027L77.5879-0.439453C77.5879 0.439453 76.9043 0.683594 76.2695 0.0488281L58.3984-17.2363C55.5176-20.0195 52.7344-20.0195 49.8535-17.2363Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:83.03499755859366,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 78.421142578125 111.6708984375",width:78.421142578125,height:111.6708984375,translateX:-11.764501953125091,translateY:91.0654296875,baseline:91.0654296875,capline:20.60546875}}})},Ej=(n(1196),r.createContext(null));!function(e){e.Small="small",e.Large="large"}(Ij||(Ij={}));var Sj=function(e){var t=e.icon,n=e.appId,i=e.url,o=e.children,a=e.isLoading,s=e.description,c=e.heading,u=e.ariaLabel,l=e.primaryAction,d=e.tileSize,p=e.onTileClick,f=e.error,h=function(){var e=r.useState(gm.matches?cm.Small:void 0),t=e[0],n=e[1];return r.useEffect((function(){var e=function(e){var r=e.matches?cm.Small:void 0;r!==t&&n(r)};return gm.addEventListener("change",e),function(){gm.removeEventListener("change",e)}}),[t]),t}()||d,m=Ts()(e.className,"recovery-tile",h,{loading:a}),g=Ts()("banner",{"banner-with-primary-action":!(null==l||!l.description)}),v=mc("VoiceOver.HomeTile.LoadingComplete"),y=r.useRef(null),b=Us().setAriaLiveText;r.useEffect((function(){s&&document.activeElement===y.current&&b(v+" "+s)}),[s,v,b]);var _=xs(),C=r.createElement(r.Fragment,null,r.createElement("div",{className:"icon-wrapper"},t),r.createElement("div",{className:"text"},r.createElement("h2",{className:"heading"},c),s&&r.createElement("div",{className:"description"},r.createElement("span",{className:"description-content"},s),a&&r.createElement("div",{className:"ellipsis"},r.createElement("div",{className:"dots"}))))),I=r.createElement(r.Fragment,null,r.createElement("div",{className:g},i?r.createElement("a",{href:i,className:"link header-content unstyled-link",onClick:function(e){n&&(e.preventDefault(),e.stopPropagation(),_.launchApp(n,void 0,{presentationStyle:"fullscreen"}))},ref:y},C):r.createElement("div",{className:"header-content"}," ",C," ")),l&&n&&r.createElement(bc,{ariaLabel:l.description,className:"primary-action",icon:l.icon,action:function(){l.callback?l.callback():_.launchApp(n,{options:{source:{reason:Cc.CREATE}}})}}),r.createElement("div",{className:"content"},o));return r.createElement("article",{"aria-label":null!=u?u:c,className:m+" "+(f?"error":"")},r.createElement(Ej.Provider,{value:h},r.createElement(r.Fragment,null,p&&!f&&r.createElement("button",{className:"unstyled-button tile-button","aria-haspopup":"dialog","aria-label":"Show more options for "+(null!=u?u:c),onClick:p}),I)))};function Tj(e){var t=e.deletedBookmarks,n=gc("RecoveryPage.BookmarksTile.Title"),i=vc({zero:"RecoveryPage.BookmarksTile.TotalNumber.Zero",one:"RecoveryPage.BookmarksTile.TotalNumber.One",two:"RecoveryPage.BookmarksTile.TotalNumber.Two",many:"RecoveryPage.BookmarksTile.TotalNumber.Many"},t.length),o=e.isLoading?gc("RecoveryPage.Loading"):i;t.sort((function(e,t){return t.deletionDate.getTime()-e.deletionDate.getTime()}));var a=Cj(t,(function(e){return e.title}),e.maxTileLines);return r.createElement(Sj,{icon:r.createElement(wd,{iconSize:40,symbolSize:20,symbol:wj,backgroundColor:"FF9500"}),className:"bookmarks-recovery-tile",heading:n,description:o,tileSize:e.tileSize,isLoading:e.isLoading,onTileClick:e.onTileClick},!e.isLoading&&r.createElement(lT,{contentListItems:a.length>0?a:[gc("RecoveryPage.TileContent.NoItems")],contentDescriptionText:""}))}function Oj(e){var t=[];return e.forEachBookmarkRecord((function(n){var r;if(function(e){var t,n;if("BookmarkLeaf"!==e.recordType)return!1;var r=Date.now()-2592e6,i=!(null==(t=e.fields.Deleted)||!t.value),o=e.modified.timestamp,a=null==(n=e.fields.ParentFolder)?void 0:n.value.recordName;return i&&"Reading List"!==a&&o>=r}(n)){var i=null==(r=n.fields.ParentFolder)?void 0:r.value.recordName,o=i?e.getBookmarkRecord(i):void 0;t.push({recordName:n.recordName,title:Nj(n),deletionDate:new Date(n.modified.timestamp),url:Rj(n),folder:o?Nj(o):"",isFavoritesBar:"Favorites Bar"===i})}})),t}function Pj(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oA.shared;return t.restoreBookmarkRecords(e.map((function(e){return e.recordName})))}function xj(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oA.shared;return t.deleteBookmarkRecords(e.map((function(e){return e.recordName})))}function Aj(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oA.shared,t=r.useState((function(){return Oj(e)})),n=t[0],i=t[1],o=r.useState(e.isLoading),a=o[0],s=o[1],c=r.useRef({bookmarksDidChange:function(){i(Oj(e))},loadingDidChange:function(e,t){s(t)}}).current;return r.useEffect((function(){return e.addListener(c),function(){e.removeListener(c)}}),[e,c]),[n,a]}function Nj(e){switch(e.recordName){case"Favorites Bar":return gc("RecoveryPage.BookmarksRecoveryModal.LocalizedName.FavoritesBar");case"Bookmarks Menu":return gc("RecoveryPage.BookmarksRecoveryModal.LocalizedName.BookmarksMenu");default:var t,n=null==(t=e.fields.Title)?void 0:t.value;if(!n)return"";for(var r=atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return(new TextDecoder).decode(i)}}function Rj(e){var t,n=null==(t=e.fields.URL)?void 0:t.value;if(!n)return"";for(var r=atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return(new TextDecoder).decode(i)}var Dj=Nn.object({dateCreated:Nn.string(),archiveId:Nn.string(),sharedCalendars:Nn.boolean().optional(),sharedEvents:Nn.boolean().optional()}),kj=Nn.object({archives:Nn.array(Dj).optional(),status:Nn.string().optional(),sharedCalendars:Nn.boolean().optional(),sharedEvents:Nn.boolean().optional()}),Uj=Nn.object({dateCreated:Nn.string(),drivewsid:Nn.string(),docwsid:Nn.string(),zone:Nn.string(),name:Nn.string(),extension:Nn.string(),isDeleted:Nn.boolean(),parentId:Nn.string(),hierarchy:Nn.array(Nn.object({drivewsid:Nn.string(),name:Nn.string(),etag:Nn.string()})),isChainedToParent:Nn.boolean().optional(),dateModified:Nn.string(),dateChanged:Nn.string(),size:Nn.number(),etag:Nn.string(),type:Nn.string()}),Lj=Nn.object({hasMoreItems:Nn.boolean().optional(),items:Nn.array(Uj).optional(),jobId:Nn.string(),jobStatus:Nn.string(),retryAfterMilliseconds:Nn.number().optional()}),Mj=Nn.object({status:Nn.union([Nn.literal("BUSY"),Nn.literal("FREE")])});function jj(e){if(e.dateModified&&e.name&&e.extension)return{deletionDate:new Date(e.dateModified),titleWithExtension:e.name+"."+e.extension}}function Fj(e){return e.archives?e.archives.map((function(e){var t=e.dateCreated,n=e.archiveId;return{deletionDate:new Date(t),archiveId:n}})):[]}function Bj(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function zj(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Bj(o,r,i,a,s,"next",e)}function s(e){Bj(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Hj=function(){var e=zj(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]?u[2]:0,i=u.length>3&&void 0!==u[3]?u[3]:[],e.next=4,JE({url:t,method:"POST",includeCredentials:!0,body:{jobId:n,offset:r},validate:{type:"WireDeletedItemDetailsResponse",schema:Lj}});case 4:if(o=e.sent,a=o.items,s=void 0===a?[]:a,c=i.concat(s),"PENDING"===o.jobStatus){e.next=9;break}return e.abrupt("return",Promise.resolve(c));case 9:return e.next=11,Xo(o.retryAfterMilliseconds||0);case 11:return e.abrupt("return",Hj(t,o.jobId,s.length,c));case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Wj=function(){var e=zj(regeneratorRuntime.mark((function e(t){var n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.webServices,r=t.dsid,null!=n&&n.drivews&&r){e.next=3;break}throw new Error("fetchDevices: no service url or dsid available");case 3:return e.next=5,Hj(UE(n.drivews,r));case 5:return i=e.sent,o=new Map(i.map((function(e){return[e.drivewsid,e]}))),a=Array.from(o.values()),e.abrupt("return",a.map(jj).filter(Ra));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Vj=function(e,t){var n=e.webServices,r=e.dsid;if(null==n||!n.archivews||!r)throw new Error("fetchDevices: no service url or dsid available");return JE({url:kE(n.archivews,r),method:"POST",includeCredentials:!0,body:{service:t},validate:{type:"WireListArchivesResponse",schema:kj}}).then(Fj)},Zj=function(e,t,n){var r=e.webServices,i=e.dsid;if(null==r||!r.archivews||!i)throw new Error("restoreDeletedArchives: no service url or dsid available");return JE({url:jE(r.archivews,i),method:"POST",includeCredentials:!0,body:{service:t,archiveId:n},validate:{type:"WireServiceStatusResponse",schema:Mj}})},qj=function(e,t){var n=e.webServices,r=e.dsid;if(null==n||!n.archivews||!r)throw new Error("retrieveServiceStatus: no service url or dsid available");return JE({url:FE(n.archivews,r),method:"POST",includeCredentials:!0,body:{service:t},validate:{type:"WireServiceStatusResponse",schema:Mj}})},Kj=function(e){return qj(e,"CALENDAR-REMINDERS")},Gj=function(e){return qj(e,"CONTACTS")},Yj=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"doc.plaintext",svgPath:"M12.4512 1.26953C12.4512 12.4512 18.5059 18.5059 29.5898 18.5059L81.8848 18.5059C92.9688 18.5059 99.0234 12.4512 99.0234 1.26953L99.0234-71.7285C99.0234-82.8613 92.9688-88.9648 81.8848-88.9648L29.5898-88.9648C18.5059-88.9648 12.4512-82.8613 12.4512-71.7285ZM25.0488-0.0976562L25.0488-70.3125C25.0488-74.2676 26.9531-76.3672 31.1035-76.3672L80.3711-76.3672C84.5215-76.3672 86.4258-74.2676 86.4258-70.3125L86.4258-0.0976562C86.4258 3.80859 84.5215 5.9082 80.3711 5.9082L31.1035 5.9082C26.9531 5.9082 25.0488 3.80859 25.0488-0.0976562ZM39.0137-56.8359L72.5098-56.8359C74.3652-56.8359 75.7324-58.3008 75.7324-60.1562C75.7324-61.9629 74.3652-63.3301 72.5098-63.3301L39.0137-63.3301C37.1094-63.3301 35.7422-61.9629 35.7422-60.1562C35.7422-58.3008 37.1094-56.8359 39.0137-56.8359ZM39.0137-40.7715L72.5098-40.7715C74.3652-40.7715 75.7324-42.2363 75.7324-44.0918C75.7324-45.8496 74.3652-47.2656 72.5098-47.2656L39.0137-47.2656C37.1094-47.2656 35.7422-45.8496 35.7422-44.0918C35.7422-42.2363 37.1094-40.7715 39.0137-40.7715ZM39.0137-24.707L55.8594-24.707C57.7148-24.707 59.1309-26.0742 59.1309-27.8809C59.1309-29.7363 57.7148-31.2012 55.8594-31.2012L39.0137-31.2012C37.1094-31.2012 35.7422-29.7363 35.7422-27.8809C35.7422-26.0742 37.1094-24.707 39.0137-24.707Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:80.49506591796853,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 91.016845703125 107.4716796875",width:91.016845703125,height:107.4716796875,translateX:-8.006582031250218,translateY:88.9658203125,baseline:88.9658203125,capline:18.505859375}}})},Qj=(n(1197),function(){var e=r.createElement(wd,{iconSize:54,symbolSize:30,symbol:Yj,backgroundColor:"AF52DF"}),t=mc("RecoveryPage.FilesRecoveryModalContent.Title"),n=mc("RecoveryPage.FilesRecoveryModalContent.Description"),i=fL("restoreFiles"),o=mc("RecoveryPage.ArchivesRecoveryModalContent.LearnMore");return r.createElement(r.Fragment,null,r.createElement("div",{className:"modal-icon","data-testid":"icon"},e),r.createElement("h2",{className:"modal-title","data-testid":"title",id:"files-recovery-modal-title"},t),r.createElement("div",{className:"modal-description","data-testid":"description"},n," ",r.createElement(uT,{href:i},o)),r.createElement("p",{className:"files-recovery-unsupported-modal-content"},mc("RecoveryPage.FilesRecoveryUnsupportedModal.Content")))}),Xj=function(e){var t=e.deletedDriveItems,n=void 0===t?[]:t,i=e.tileSize,o=e.isLoading,a=e.error,s=gc("RecoveryPage.DriveItemsTile.Title"),c=vc({zero:"RecoveryPage.DriveItemsTile.TotalNumber.Zero",one:"RecoveryPage.DriveItemsTile.TotalNumber.One",two:"RecoveryPage.DriveItemsTile.TotalNumber.Two",many:"RecoveryPage.DriveItemsTile.TotalNumber.Many"},n.length),u=o?gc("RecoveryPage.Loading"):c;n.sort((function(e,t){return t.deletionDate.getTime()-e.deletionDate.getTime()}));var l=Cj(n,(function(e){return e.titleWithExtension}),JF),d=xs(),p=yM(r.createElement(Qj,null),{ariaLabelledBy:""}),f=Tp("load","iclouddrive-recovery-tile",{measureFromBaseline:!0}),h=f[0],m=f[1];return r.useEffect((function(){e.isLoading||(e.isSuccess?h():m())}),[e.isLoading,e.isSuccess,h,m]),r.createElement(Sj,{icon:r.createElement(wd,{iconSize:40,symbolSize:20,symbol:Yj,backgroundColor:"AF52DF"}),className:"driveitems-recovery-tile",heading:s,description:u,tileSize:i,isLoading:o,onTileClick:function(){var e=gl.sharedInstance.getApplicationInfo("iclouddrivefilerecovery");e&&ky.sharedInstance.canLaunchChildApplication(e)?d.launchApp("iclouddrivefilerecovery",void 0,{presentationStyle:"modal"}):p()},error:a},o?null:a?r.createElement(HS,{refetch:e.refetch,showClouds:!1}):r.createElement(lT,{contentListItems:l.length>0?l:[gc("RecoveryPage.TileContent.NoItems")],contentDescriptionText:""}))},Jj=function(e){var t=e.deletedArchives,n=void 0===t?[]:t,i=e.tileSize,o=e.headingText,a=e.iconSymbol,s=e.iconColor,c=e.isLoading,u=e.onTileClick,l=e.error,d=vc({zero:"RecoveryPage.ArchivesTile.TotalNumber.Zero",one:"RecoveryPage.ArchivesTile.TotalNumber.One",two:"RecoveryPage.ArchivesTile.TotalNumber.Two",many:"RecoveryPage.ArchivesTile.TotalNumber.Many"},n.length),p=c?gc("RecoveryPage.Loading"):d;n.sort((function(e,t){return t.deletionDate.getTime()-e.deletionDate.getTime()}));var f=Cj(n,(function(e){return Dw(e.deletionDate,"long")}),JF);return r.createElement(Sj,{icon:r.createElement(wd,{iconSize:40,symbolSize:20,symbol:a,backgroundColor:s}),className:"archives-recovery-tile",heading:o,description:p,tileSize:i,isLoading:c,onTileClick:u,error:l},c?null:l?r.createElement(HS,{refetch:e.refetch,showClouds:!1}):r.createElement(lT,{contentListItems:f.length>0?f:[gc("RecoveryPage.TileContent.NoItems")],contentDescriptionText:""}))},$j=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"calendar",svgPath:"M29.6875 11.4746L97.7051 11.4746C108.887 11.4746 114.941 5.41992 114.941-5.66406L114.941-64.7461C114.941-75.8301 108.887-81.8848 97.7051-81.8848L29.6875-81.8848C18.5547-81.8848 12.4512-75.8301 12.4512-64.7461L12.4512-5.66406C12.4512 5.41992 18.5547 11.4746 29.6875 11.4746ZM30.6152-1.12305C26.9531-1.12305 25.0488-2.88086 25.0488-6.73828L25.0488-50.1465C25.0488-54.0039 26.9531-55.7617 30.6152-55.7617L96.7773-55.7617C100.391-55.7617 102.344-54.0039 102.344-50.1465L102.344-6.73828C102.344-2.88086 100.391-1.12305 96.7773-1.12305ZM54.541-39.9414L57.4219-39.9414C59.1797-39.9414 59.8145-40.4785 59.8145-42.2852L59.8145-45.166C59.8145-46.9238 59.1797-47.5098 57.4219-47.5098L54.541-47.5098C52.7344-47.5098 52.0996-46.9238 52.0996-45.166L52.0996-42.2852C52.0996-40.4785 52.7344-39.9414 54.541-39.9414ZM70.0684-39.9414L72.9492-39.9414C74.707-39.9414 75.3418-40.4785 75.3418-42.2852L75.3418-45.166C75.3418-46.9238 74.707-47.5098 72.9492-47.5098L70.0684-47.5098C68.2617-47.5098 67.627-46.9238 67.627-45.166L67.627-42.2852C67.627-40.4785 68.2617-39.9414 70.0684-39.9414ZM85.5957-39.9414L88.4277-39.9414C90.2344-39.9414 90.8691-40.4785 90.8691-42.2852L90.8691-45.166C90.8691-46.9238 90.2344-47.5098 88.4277-47.5098L85.5957-47.5098C83.7891-47.5098 83.1543-46.9238 83.1543-45.166L83.1543-42.2852C83.1543-40.4785 83.7891-39.9414 85.5957-39.9414ZM39.0137-24.6582L41.8945-24.6582C43.7012-24.6582 44.2871-25.1953 44.2871-27.002L44.2871-29.8828C44.2871-31.6406 43.7012-32.2266 41.8945-32.2266L39.0137-32.2266C37.207-32.2266 36.6211-31.6406 36.6211-29.8828L36.6211-27.002C36.6211-25.1953 37.207-24.6582 39.0137-24.6582ZM54.541-24.6582L57.4219-24.6582C59.1797-24.6582 59.8145-25.1953 59.8145-27.002L59.8145-29.8828C59.8145-31.6406 59.1797-32.2266 57.4219-32.2266L54.541-32.2266C52.7344-32.2266 52.0996-31.6406 52.0996-29.8828L52.0996-27.002C52.0996-25.1953 52.7344-24.6582 54.541-24.6582ZM70.0684-24.6582L72.9492-24.6582C74.707-24.6582 75.3418-25.1953 75.3418-27.002L75.3418-29.8828C75.3418-31.6406 74.707-32.2266 72.9492-32.2266L70.0684-32.2266C68.2617-32.2266 67.627-31.6406 67.627-29.8828L67.627-27.002C67.627-25.1953 68.2617-24.6582 70.0684-24.6582ZM85.5957-24.6582L88.4277-24.6582C90.2344-24.6582 90.8691-25.1953 90.8691-27.002L90.8691-29.8828C90.8691-31.6406 90.2344-32.2266 88.4277-32.2266L85.5957-32.2266C83.7891-32.2266 83.1543-31.6406 83.1543-29.8828L83.1543-27.002C83.1543-25.1953 83.7891-24.6582 85.5957-24.6582ZM39.0137-9.375L41.8945-9.375C43.7012-9.375 44.2871-9.96094 44.2871-11.7188L44.2871-14.5996C44.2871-16.4062 43.7012-16.9434 41.8945-16.9434L39.0137-16.9434C37.207-16.9434 36.6211-16.4062 36.6211-14.5996L36.6211-11.7188C36.6211-9.96094 37.207-9.375 39.0137-9.375ZM54.541-9.375L57.4219-9.375C59.1797-9.375 59.8145-9.96094 59.8145-11.7188L59.8145-14.5996C59.8145-16.4062 59.1797-16.9434 57.4219-16.9434L54.541-16.9434C52.7344-16.9434 52.0996-16.4062 52.0996-14.5996L52.0996-11.7188C52.0996-9.96094 52.7344-9.375 54.541-9.375ZM70.0684-9.375L72.9492-9.375C74.707-9.375 75.3418-9.96094 75.3418-11.7188L75.3418-14.5996C75.3418-16.4062 74.707-16.9434 72.9492-16.9434L70.0684-16.9434C68.2617-16.9434 67.627-16.4062 67.627-14.5996L67.627-11.7188C67.627-9.96094 68.2617-9.375 70.0684-9.375Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:72.90506103515645,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 107.671875 93.4091796875",width:107.671875,height:93.4091796875,translateX:-7.2690722656248,translateY:81.9345703125,baseline:81.9345703125,capline:11.474609375}}})};var eF=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"calendar",svgPath:"M27.7832 9.76562L94.4824 9.76562C104.688 9.76562 109.766 4.6875 109.766-5.37109L109.766-64.9902C109.766-75.0488 104.688-80.127 94.4824-80.127L27.7832-80.127C17.5781-80.127 12.4512-75.0977 12.4512-64.9902L12.4512-5.37109C12.4512 4.73633 17.5781 9.76562 27.7832 9.76562ZM27.0508 1.9043C22.7051 1.9043 20.3125-0.390625 20.3125-4.93164L20.3125-50.9766C20.3125-55.4688 22.7051-57.8125 27.0508-57.8125L95.1172-57.8125C99.4629-57.8125 101.904-55.4688 101.904-50.9766L101.904-4.93164C101.904-0.390625 99.4629 1.9043 95.1172 1.9043ZM51.6113-40.2832L54.4922-40.2832C56.2012-40.2832 56.7383-40.7715 56.7383-42.4805L56.7383-45.3613C56.7383-47.0703 56.2012-47.6074 54.4922-47.6074L51.6113-47.6074C49.9023-47.6074 49.3164-47.0703 49.3164-45.3613L49.3164-42.4805C49.3164-40.7715 49.9023-40.2832 51.6113-40.2832ZM67.8223-40.2832L70.7031-40.2832C72.4121-40.2832 72.998-40.7715 72.998-42.4805L72.998-45.3613C72.998-47.0703 72.4121-47.6074 70.7031-47.6074L67.8223-47.6074C66.1133-47.6074 65.5273-47.0703 65.5273-45.3613L65.5273-42.4805C65.5273-40.7715 66.1133-40.2832 67.8223-40.2832ZM84.0332-40.2832L86.9141-40.2832C88.623-40.2832 89.209-40.7715 89.209-42.4805L89.209-45.3613C89.209-47.0703 88.623-47.6074 86.9141-47.6074L84.0332-47.6074C82.3242-47.6074 81.7871-47.0703 81.7871-45.3613L81.7871-42.4805C81.7871-40.7715 82.3242-40.2832 84.0332-40.2832ZM35.4004-24.3164L38.2324-24.3164C39.9902-24.3164 40.5273-24.8047 40.5273-26.5137L40.5273-29.3945C40.5273-31.1035 39.9902-31.5918 38.2324-31.5918L35.4004-31.5918C33.6426-31.5918 33.1055-31.1035 33.1055-29.3945L33.1055-26.5137C33.1055-24.8047 33.6426-24.3164 35.4004-24.3164ZM51.6113-24.3164L54.4922-24.3164C56.2012-24.3164 56.7383-24.8047 56.7383-26.5137L56.7383-29.3945C56.7383-31.1035 56.2012-31.5918 54.4922-31.5918L51.6113-31.5918C49.9023-31.5918 49.3164-31.1035 49.3164-29.3945L49.3164-26.5137C49.3164-24.8047 49.9023-24.3164 51.6113-24.3164ZM67.8223-24.3164L70.7031-24.3164C72.4121-24.3164 72.998-24.8047 72.998-26.5137L72.998-29.3945C72.998-31.1035 72.4121-31.5918 70.7031-31.5918L67.8223-31.5918C66.1133-31.5918 65.5273-31.1035 65.5273-29.3945L65.5273-26.5137C65.5273-24.8047 66.1133-24.3164 67.8223-24.3164ZM84.0332-24.3164L86.9141-24.3164C88.623-24.3164 89.209-24.8047 89.209-26.5137L89.209-29.3945C89.209-31.1035 88.623-31.5918 86.9141-31.5918L84.0332-31.5918C82.3242-31.5918 81.7871-31.1035 81.7871-29.3945L81.7871-26.5137C81.7871-24.8047 82.3242-24.3164 84.0332-24.3164ZM35.4004-8.30078L38.2324-8.30078C39.9902-8.30078 40.5273-8.83789 40.5273-10.5469L40.5273-13.4277C40.5273-15.1367 39.9902-15.625 38.2324-15.625L35.4004-15.625C33.6426-15.625 33.1055-15.1367 33.1055-13.4277L33.1055-10.5469C33.1055-8.83789 33.6426-8.30078 35.4004-8.30078ZM51.6113-8.30078L54.4922-8.30078C56.2012-8.30078 56.7383-8.83789 56.7383-10.5469L56.7383-13.4277C56.7383-15.1367 56.2012-15.625 54.4922-15.625L51.6113-15.625C49.9023-15.625 49.3164-15.1367 49.3164-13.4277L49.3164-10.5469C49.3164-8.83789 49.9023-8.30078 51.6113-8.30078ZM67.8223-8.30078L70.7031-8.30078C72.4121-8.30078 72.998-8.83789 72.998-10.5469L72.998-13.4277C72.998-15.1367 72.4121-15.625 70.7031-15.625L67.8223-15.625C66.1133-15.625 65.5273-15.1367 65.5273-13.4277L65.5273-10.5469C65.5273-8.83789 66.1133-8.30078 67.8223-8.30078Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:72.90510009765626,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 97.322021484375 89.9912109375",width:97.322021484375,height:89.9912109375,translateX:-12.443959960937491,translateY:80.2255859375,baseline:80.2255859375,capline:9.765625}}})},tF=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"archivebox",svgPath:"M34.4727 9.76562L88.0371 9.76562C97.6562 9.76562 102.783 4.78516 102.783-4.78516L102.783-53.418C107.52-54.1992 110.059-57.7637 110.059-62.9883L110.059-70.4102C110.059-76.3672 106.787-80.127 100.781-80.127L21.7285-80.127C16.0156-80.127 12.4512-76.3672 12.4512-70.4102L12.4512-62.9883C12.4512-57.7637 14.9902-54.1992 19.7266-53.418L19.7266-4.78516C19.7266 4.83398 24.8535 9.76562 34.4727 9.76562ZM23.7305-60.6445C21.2891-60.6445 20.3125-61.6699 20.3125-64.1113L20.3125-69.2871C20.3125-71.7285 21.2891-72.7539 23.7305-72.7539L98.8281-72.7539C101.27-72.7539 102.197-71.7285 102.197-69.2871L102.197-64.1113C102.197-61.6699 101.27-60.6445 98.8281-60.6445ZM34.375 2.39258C29.9805 2.39258 27.5879 0 27.5879-4.39453L27.5879-53.2715L94.9219-53.2715L94.9219-4.39453C94.9219 0 92.4805 2.39258 88.1348 2.39258ZM45.166-33.5938L77.3926-33.5938C79.4434-33.5938 80.9082-35.0098 80.9082-37.1582L80.9082-38.7207C80.9082-40.8691 79.4434-42.2363 77.3926-42.2363L45.166-42.2363C43.1152-42.2363 41.6992-40.8691 41.6992-38.7207L41.6992-37.1582C41.6992-35.0098 43.1152-33.5938 45.166-33.5938Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:72.75510009765617,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 97.60791015625 89.9912109375",width:97.60791015625,height:89.9912109375,translateX:-12.451015625000082,translateY:80.2255859375,baseline:80.2255859375,capline:9.765625}}})},nF=(n(1198),function(e){var t=e.items,n=e.listDescription,i=e.isLoading,o=e.restoringArchiveId,a=e.onRestoreArchive,s=vc({zero:"RecoveryPage.ArchivesTile.TotalNumber.Zero",one:"RecoveryPage.ArchivesTile.TotalNumber.One",two:"RecoveryPage.ArchivesTile.TotalNumber.Two",many:"RecoveryPage.ArchivesTile.TotalNumber.Many"},t.length),c=mc("VoiceOver.RecoveryPage.ArchivesRecoveryList.ArchiveTableLabel"),u=mc("RecoveryPage.ArchivesRecoveryList.LoadingDescription"),l=mc("RecoveryPage.ArchivesRecoveryList.EmptyList"),d=t.map((function(e){var t=e.deletionDate;return{archiveId:e.archiveId,deletionDate:Dw(t,"long")}})),p=r.createElement("div",{role:"table","aria-label":c},d.map((function(e){return r.createElement("div",{key:e.archiveId,role:"row"},r.createElement("div",{role:"cell",className:"date-cell"},r.createElement(tF,{"aria-hidden":!0,desiredFontSize:10,layoutMode:"glyphBox"}),e.deletionDate),r.createElement("div",{role:"cell",className:"restore-cell"},e.archiveId===o?r.createElement("span",{className:"restoring"},r.createElement(dM,{description:gc("RecoveryPage.ArchivesRecoveryList.RestoringArchiveDescription",{date:e.deletionDate})}),gc("RecoveryPage.ArchivesRecoveryList.Restoring")):r.createElement(Wc,{className:"restore-button",ariaLabel:gc("VoiceOver.RecoveryPage.ArchivesRecoveryList.RestoreButtonLabel",{date:e.deletionDate}),onActivate:function(){return a(e.archiveId)},disabled:void 0!==o},gc("RecoveryPage.ArchivesRecoveryList.RestoreButton"))))}))),f=r.createElement("div",{className:"empty-list"},l);return r.createElement("div",{className:"archives-recovery-list"},r.createElement("div",{className:"count"},s),r.createElement("div",{className:"description"},n),i?r.createElement("div",{className:"loading"},r.createElement(dM,{description:u})):t.length?p:f)}),rF=["icon","modalTitle","modalDescription","learnMoreLink","titleId"],iF=function(e){var t=e.icon,n=e.modalTitle,i=e.modalDescription,o=e.learnMoreLink,a=e.titleId,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,rF),c=mc("RecoveryPage.ArchivesRecoveryModalContent.LearnMore");return r.createElement("div",{className:"modal-content"},r.createElement("div",{className:"modal-icon","data-testid":"icon"},t),r.createElement("h2",{className:"modal-title","data-testid":"title",id:a},n),r.createElement("div",{className:"modal-description","data-testid":"description"},i," ",r.createElement(uT,{href:o},c)),r.createElement(nF,s))},oF=function(e){var t=e.items,n=e.isLoading,i=e.onRestoreArchive,o=e.restoringArchiveId,a=r.createElement(wd,{iconSize:54,symbolSize:30,symbol:eF,backgroundColor:"F04634"}),s=mc("RecoveryPage.CalendarsRecoveryModalContent.Title"),c=mc("RecoveryPage.CalendarsRecoveryModalContent.Description"),u=fL("restoreCalendars"),l=r.createElement(r.Fragment,null,mc("RecoveryPage.CalendarsRecoveryModalContent.ListDescription.FirstLine"),r.createElement("ul",null,r.createElement("li",null,mc("RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointOne")),r.createElement("li",null,mc("RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointTwo")),r.createElement("li",null,mc("RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointThree")),r.createElement("li",null,mc("RecoveryPage.CalendarsRecoveryModalContent.ListDescription.BulletPointFour"))));return r.createElement(iF,{icon:a,modalTitle:s,modalDescription:c,learnMoreLink:u,items:t,listDescription:l,isLoading:n,onRestoreArchive:i,titleId:"calendars-recovery-modal-title",restoringArchiveId:o})};function aF(e,t){var n=r.useRef();r.useEffect((function(){n.current=e}),[e]),r.useEffect((function(){if(null!==t){var e=setInterval((function(){null==n.current||n.current()}),t);return function(){return clearInterval(e)}}}),[t])}function sF(e,t,n){var i,o=wm(),a=qf(),s=null==a||null==(i=a.details)?void 0:i.dsid;return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:3,a=r.useRef(0),s=r.useState("idle"),c=s[0],u=s[1];aF((function(){e().then((function(e){"pending"===c&&"idle"===e&&(u("idle"),t())}),(function(){a.current++,a.current>=o&&"pending"===c&&(u("idle"),n())}))}),"pending"===c?i:null);var l=function(){a.current=0,u("pending")};return l}((function(){return e({webServices:o,dsid:s}).then((function(e){return"FREE"===e.status?"idle":"pending"}))}),t,n)}n(1199);var cF=function(){var e,t=a(),n=iS({endpoint:vE.listCalendarArchives,fetchProvider:function(e){return function(){return Vj(e,"CALENDAR-REMINDERS")}}}),i=gc("RecoveryPage.ArchivesTile.Title.Calendars"),o=r.useState(void 0),s=o[0],c=o[1],u=mc("RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.Title"),l=mc("RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.Description"),d=mc("Alert.CancelButton"),p=mc("RecoveryPage.CalendarArchivesRecoveryTileWrapper.Confirmation.RestoreButton"),f=mc("RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertSuccess.Title"),h=mc("Alert.OkButton"),m=mc("RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertFailure.Title"),g=mc("RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertFailure.Description"),v=mc("Alert.ContactSupport"),y=wh(),b=Tp("workflow","restore-calendar"),_=b[0],C=b[1],I=Tp("load","calendar-recovery-tile",{measureFromBaseline:!0}),w=I[0],E=I[1];r.useEffect((function(){n.isLoading||(n.isSuccess?w():E())}),[n,w,E]);var S,T=function(){C(),y({title:m,description:g,accessory:r.createElement(uT,{className:"calendar-recovery-failure-alert-support-link",href:fL("contactAppleSupport")},v),buttons:[h]}),x()},O=sF(Kj,(function(){_(),y({title:f,description:gc("RecoveryPage.CalendarArchivesRecoveryTileWrapper.AlertSuccess.Description",{time:(new Date).toLocaleTimeString(t,{hour12:!0,hour:"numeric",minute:"2-digit"})}),buttons:[h]}),x()}),T),P=function(e,t){var n,r=wm(),i=qf(),o=null==i||null==(n=i.details)?void 0:n.dsid;return Object(nS.useMutation)((function(e){return function(e,t){return Zj(e,"CALENDAR-REMINDERS",t)}({webServices:r,dsid:o},e)}),{onSuccess:e,onError:t})}((function(){O()}),(function(){T()})),x=function(){c(void 0),n.refetch()},A=(S={items:null!=(e=n.data)?e:[],isLoading:n.isLoading,onRestoreArchive:function(e){!function(e){y({title:u,description:l,buttons:[{title:p,action:"restore"},{title:d,action:"cancel"}],cancelAction:"cancel",onActionSelected:function(t){"cancel"===t?x():"restore"===t&&(c(e),P.mutate(e))}})}(e)},restoringArchiveId:s},yM(r.createElement(oF,S),{ariaLabelledBy:"calendars-recovery-modal-title"}));return r.createElement(Jj,{error:n.error,isLoading:n.isLoading,isSuccess:n.isSuccess,refetch:n.refetch,deletedArchives:n.data,tileSize:cm.Small,headingText:i,iconColor:"FF3B30",iconSymbol:$j,onTileClick:function(){return A()}})},uF=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"person.crop.circle",svgPath:"M60.3027 16.3574C88.623 16.3574 111.865-6.93359 111.865-35.2539C111.865-63.5254 88.5742-86.8164 60.3027-86.8164C31.9824-86.8164 8.74023-63.5254 8.74023-35.2539C8.74023-6.93359 32.0312 16.3574 60.3027 16.3574ZM60.3027-18.0176C47.8027-18.0176 38.0859-13.623 32.5684-8.1543C25.7812-15.1367 21.6309-24.6582 21.6309-35.2539C21.6309-56.6895 38.8184-73.9746 60.3027-73.9746C81.7383-73.9746 99.0234-56.6895 99.0234-35.2539C99.0723-24.6582 94.873-15.1367 88.0371-8.1543C82.5684-13.623 72.8516-18.0176 60.3027-18.0176ZM60.3027-25.5859C69.873-25.5371 77.2461-33.6914 77.2461-44.1406C77.2461-53.9551 69.7754-62.3047 60.3027-62.3047C50.8301-62.3047 43.3105-53.9551 43.4082-44.1406C43.4082-33.6914 50.7812-25.6348 60.3027-25.5859Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:75.46515624999984,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 106.6400146484375 103.1748046875",width:106.6400146484375,height:103.1748046875,translateX:-5.224907226562664,translateY:86.8173828125,baseline:86.8173828125,capline:16.357421875}}})},lF=function(e){var t=e.items,n=e.isLoading,i=e.onRestoreArchive,o=e.restoringArchiveId,a=r.createElement(wd,{iconSize:54,symbolSize:30,symbol:ZR,backgroundColor:"61BFF4"}),s=mc("RecoveryPage.ContactsRecoveryModalContent.Title"),c=mc("RecoveryPage.ContactsRecoveryModalContent.Description"),u=fL("restoreContacts"),l=r.createElement(r.Fragment,null,mc("RecoveryPage.ContactsRecoveryModalContent.ListDescription.FirstLine"),r.createElement("ul",null,r.createElement("li",null,mc("RecoveryPage.ContactsRecoveryModalContent.ListDescription.BulletPointOne")),r.createElement("li",null,mc("RecoveryPage.ContactsRecoveryModalContent.ListDescription.BulletPointTwo"))));return r.createElement(iF,{icon:a,modalTitle:s,modalDescription:c,learnMoreLink:u,items:t,listDescription:l,isLoading:n,onRestoreArchive:i,restoringArchiveId:o,titleId:"contacts-recovery-modal-title"})};n(1200);var dF=function(){var e,t=a(),n=iS({endpoint:vE.listContactArchives,fetchProvider:function(e){return function(){return Vj(e,"CONTACTS")}}}),i=gc("RecoveryPage.ArchivesTile.Title.Contacts"),o=r.useState(void 0),s=o[0],c=o[1],u=mc("RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.Title"),l=mc("RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.Description"),d=mc("Alert.CancelButton"),p=mc("RecoveryPage.ContactArchivesRecoveryTileWrapper.Confirmation.RestoreButton"),f=mc("RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertSuccess.Title"),h=mc("Alert.OkButton"),m=mc("RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertFailure.Title"),g=mc("RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertFailure.Description"),v=mc("Alert.ContactSupport"),y=wh(),b=Tp("workflow","restore-contacts"),_=b[0],C=b[1],I=Tp("load","contacts-recovery-tile",{measureFromBaseline:!0}),w=I[0],E=I[1];r.useEffect((function(){n.isLoading||(n.isSuccess?w():E())}),[n,w,E]);var S=function(){C(),y({title:m,description:g,accessory:r.createElement(uT,{className:"contact-recovery-failure-alert-support-link",href:fL("contactAppleSupport")},v),buttons:[h]}),P()},T=sF(Gj,(function(){_(),y({title:f,description:gc("RecoveryPage.ContactArchivesRecoveryTileWrapper.AlertSuccess.Description",{time:(new Date).toLocaleTimeString(t,{hour12:!0,hour:"numeric",minute:"2-digit"})}),buttons:[h]}),P()}),S),O=function(e,t){var n,r=wm(),i=qf(),o=null==i||null==(n=i.details)?void 0:n.dsid;return Object(nS.useMutation)((function(e){return function(e,t){return Zj(e,"CONTACTS",t)}({webServices:r,dsid:o},e)}),{onSuccess:e,onError:t})}((function(){T()}),(function(){S()})),P=function(){c(void 0),n.refetch()},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=yM(r.createElement(lF,e),{ariaLabelledBy:"contacts-recovery-modal-title",closeButtonDisabled:t});return n}({items:null!=(e=n.data)?e:[],isLoading:n.isLoading,onRestoreArchive:function(e){!function(e){y({title:u,description:l,buttons:[{title:p,action:"restore"},{title:d,action:"cancel"}],cancelAction:"cancel",onActionSelected:function(t){"cancel"===t?P():"restore"===t&&(c(e),O.mutate(e))}})}(e)},restoringArchiveId:s},void 0!==s);return r.createElement(Jj,{error:n.error,isLoading:n.isLoading,isSuccess:n.isSuccess,refetch:n.refetch,deletedArchives:n.data,tileSize:cm.Small,headingText:i,iconColor:"5AC8FA",iconSymbol:uF,onTileClick:function(){return x()}})},pF=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"chevron.down",svgPath:"M54.8828-9.22852C56.1035-9.22852 57.3242-9.7168 58.1543-10.6445L95.9473-49.3652C96.7773-50.1953 97.2656-51.2695 97.2656-52.4902C97.2656-55.0293 95.3613-56.9824 92.8223-56.9824C91.6016-56.9824 90.4785-56.4941 89.6484-55.7129L54.8828-20.166L20.0684-55.7129C19.2871-56.4941 18.1641-56.9824 16.8945-56.9824C14.3555-56.9824 12.4512-55.0293 12.4512-52.4902C12.4512-51.2695 12.9395-50.1953 13.7695-49.3164L51.5625-10.6445C52.4902-9.7168 53.6133-9.22852 54.8828-9.22852Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:79.15510009765626,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 84.8212890625 52.0029296875",width:84.8212890625,height:52.0029296875,translateX:-12.444326171874991,translateY:61.2314453125,baseline:61.2314453125,capline:-9.228515625}}})},fF=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"star",svgPath:"M30.7617 12.207C32.7637 13.7695 35.3027 13.2324 38.3301 11.0352L64.1602-7.95898L90.0391 11.0352C93.0664 13.2324 95.5566 13.7695 97.6074 12.207C99.6094 10.6934 100.049 8.20312 98.8281 4.63867L88.623-25.7324L114.697-44.4824C117.725-46.6309 118.945-48.877 118.164-51.3184C117.383-53.6621 115.088-54.834 111.328-54.7852L79.3457-54.5898L69.6289-85.1074C68.457-88.7207 66.6992-90.5273 64.1602-90.5273C61.6699-90.5273 59.9121-88.7207 58.7402-85.1074L49.0234-54.5898L17.041-54.7852C13.2812-54.834 10.9863-53.6621 10.2051-51.3184C9.375-48.877 10.6445-46.6309 13.6719-44.4824L39.7461-25.7324L29.541 4.63867C28.3203 8.20312 28.7598 10.6934 30.7617 12.207ZM37.793 2.53906C37.6953 2.44141 37.7441 2.39258 37.793 2.09961L47.5098-25.8301C48.1934-27.7344 47.8027-29.248 46.0938-30.4199L21.7773-47.2168C21.5332-47.3633 21.4844-47.4609 21.5332-47.6074C21.582-47.7539 21.6797-47.7539 21.9727-47.7539L51.5137-47.2168C53.5156-47.168 54.7852-47.998 55.4199-50L63.916-78.2715C63.9648-78.5645 64.0625-78.6621 64.1602-78.6621C64.3066-78.6621 64.4043-78.5645 64.4531-78.2715L72.9492-50C73.584-47.998 74.8535-47.168 76.8555-47.2168L106.396-47.7539C106.689-47.7539 106.787-47.7539 106.836-47.6074C106.885-47.4609 106.787-47.3633 106.592-47.2168L82.2754-30.4199C80.5664-29.248 80.1758-27.7344 80.8594-25.8301L90.5762 2.09961C90.625 2.39258 90.6738 2.44141 90.5762 2.53906C90.4785 2.68555 90.332 2.58789 90.1367 2.44141L66.6504-15.4785C65.0879-16.6992 63.2812-16.6992 61.7188-15.4785L38.2324 2.44141C38.0371 2.58789 37.8906 2.68555 37.793 2.53906Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:69.82503906250008,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 108.4573974609375 110.5947265625",width:108.4573974609375,height:110.5947265625,translateX:-9.956333007812418,translateY:90.52734375,baseline:90.52734375,capline:20.0673828125}}})},hF=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"folder",svgPath:"M27.7832 9.13086L109.473 9.13086C118.213 9.13086 123.34 4.05273 123.34-6.00586L123.34-56.1523C123.34-66.2109 118.164-71.2891 108.008-71.2891L61.1328-71.2891C57.8125-71.2891 55.8105-72.0703 53.3691-74.1699L50.3906-76.6113C47.168-79.3457 44.6777-80.2246 39.8438-80.2246L25.9277-80.2246C17.3828-80.2246 12.4512-75.3418 12.4512-65.5273L12.4512-6.00586C12.4512 4.10156 17.5781 9.13086 27.7832 9.13086ZM20.3125-65.0879C20.3125-69.9219 22.8516-72.4121 27.5391-72.4121L37.8418-72.4121C41.0645-72.4121 43.0176-71.582 45.5078-69.4824L48.4863-66.9922C51.6602-64.3555 54.248-63.4277 59.082-63.4277L107.861-63.4277C112.695-63.4277 115.479-60.791 115.479-55.7129L115.479-52.9297L20.3125-52.9297ZM27.8809 1.26953C22.998 1.26953 20.3125-1.31836 20.3125-6.39648L20.3125-45.5566L115.479-45.5566L115.479-6.34766C115.479-1.31836 112.695 1.26953 107.861 1.26953Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:66.1151000976563,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 110.889892578125 89.9892578125",width:110.889892578125,height:89.9892578125,translateX:-12.450024414062455,translateY:80.224609375,baseline:80.224609375,capline:9.7646484375}}})},mF=(n(1202),["styles"]);function gF(){return(gF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vF=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,mF);return i.a.createElement("svg",gF({className:n.icon||"icon",viewBox:"0 0 28 28"},r),i.a.createElement("rect",{className:n.shadow||"shadow",y:"22",width:"28",height:"8",rx:"3.5",ry:"3.5"}),i.a.createElement("rect",{className:n.border||"border",width:"28",height:"28",rx:"3.5",ry:"3.5"}),i.a.createElement("rect",{className:n.background||"background",x:"2",y:"2",width:"24",height:"24",rx:"1.5",ry:"1.5"}),i.a.createElement("rect",{className:(n.background||"background")+" "+(n.hdpr||"hdpr"),x:"1",y:"1",width:"26",height:"26",rx:"2.5",ry:"2.5"}),i.a.createElement("path",{className:n.checkmark||"checkmark",d:"M27.464 2L29.8 4.362 13.366 21.997l-.696-.704-.035.035L4.8 13.356l2.242-2.263 6.132 6.24z"}),i.a.createElement("path",{className:n.mixedmark||"mixedmark",d:"M6 12h16v4H6z"}))},yF=function(){return(yF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},bF=i.a.forwardRef((function(e,t){var n=e.checked,o=e.defaultChecked,a=e.children,s=e.variant,c=e.inputId,u=e.id,l=e.name,d=e.form,p=e.value,f=e.disabled,h=e.required,m=e.onStateChange,g=e.style,v=e.tabIndex,y=e.tooltip,b=e.className,_=e.onInvalid,C=e.ariaLabel,I=e.indeterminate;null!=n&&null==m&&console.warn("You provided a 'checked' prop to a component without an associated change handler. This will render a read-only component. If the component should be mutable use 'defaultChecked'. Otherwise, provide an 'onStateChange' handler.");var w=Object(r.useRef)(null),E=Object(r.useState)(o||!1),S=E[0],T=E[1];Object(r.useLayoutEffect)((function(){T(w.current.checked)})),Object(r.useLayoutEffect)((function(){var e=w.current;e&&void 0!==I&&(e.indeterminate=I)}),[I]);var O=Object(r.useState)(!1),P=O[0],x=O[1],A=function(){!0!==f&&x(!0)},N=function(){!0!==f&&x(!1)},R=function(){!0!==f&&w.current.click()},D=function(){!0!==f&&x(!1)},k=jc(u,{onActivationStart:A,onActivationEnd:N,onActivationComplete:R,onActivationCancel:D}),U=zc(yF(yF({active:P,disabled:f,className:b},e.hasOwnProperty("tabIndex")?{tabIndex:v}:{}),{onActivate:R,onActivationStart:A,onActivationEnd:N,onActivationCancel:D,variant:s||"standard"}));return i.a.createElement("ui-checkbox",yF({},U,{id:u,style:g,title:y,role:"checkbox","aria-label":C,"aria-labelledby":C?void 0:k,"aria-required":h,"aria-checked":I?"mixed":S,ref:t}),i.a.createElement("input",{ref:w,id:c,type:"checkbox",checked:n,defaultChecked:o,"aria-hidden":!0,name:l,value:p||"on",disabled:f,required:h,form:d,tabIndex:-1,onChange:function(e){var t=e.target.checked;I&&(t=!1,w.current.checked=!1),T(t),m&&m({checked:t,indeterminate:!1},["checked"])},onInvalid:_}),e.checkboxAsset||i.a.createElement(vF,null),a)})),_F=n(1204),CF=null,IF=["styles"];function wF(){return(wF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var EF=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,IF);return i.a.createElement("svg",wF({className:n.icon||"icon",width:"9",height:"14",xmlns:"http://www.w3.org/2000/svg",stroke:"#000"},r),i.a.createElement("path",{stroke:"inherit",strokeWidth:"1.2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.38 9.63l3.13 3.068L7.64 9.63"}),i.a.createElement("path",{strokeWidth:"1.2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.38 4.368L4.509 1.3l3.13 3.068h0"}))},SF=(n(1203),function(){return(SF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)});function TF(e){var t;t=e.children,i.a.Children.forEach(t,(function(e){if(e){if(!Object(ih.a)(e)||e.type!==zF&&e.type!==BF)throw new Error(jF(e));e.type===BF&&i.a.Children.forEach(e.props.children,(function(t){if(!Object(ih.a)(t)||t.type!==zF)throw new Error(jF(e))}))}}));var n=(Array.isArray(e.children)?e.children:[e.children]).filter(Boolean),o=Object(r.useRef)(null),a=Object(r.useRef)(null),s=Object(r.useState)(null),c=s[0],u=s[1],l={},d=new Map,p=i.a.Children.map(n,(function(e,t){return function(e,t,n,r){if(FF(n))return DF(e,t,n,UF(r));var o=i.a.Children.map(n.props.children,(function(n,i){return DF(e,t,n,UF(r,i))}));return i.a.createElement("optgroup",{key:n.key||r,label:n.props.name},o)}(l,d,e,t)})),f=function(e,t){for(var n=function(t){return null==e||null!=e&&t.props.value===e},r=0;r<t.length;r++){var i=t[r];if(i.type===BF){var o=i.props.children;if(null!=o)if(Array.isArray(o))for(var a=0;a<o.length;a++){var s=o[a];if(n(s))return s}else if(n(o))return o}else if(n(i))return i}return null}(null!=e.value?e.value:null!=c?c:e.defaultValue,n),h=null!=f?f.props.value:null,m=null===h?void 0:d.get(h),g=Object(r.useMemo)((function(){return null!=e.shouldUseNativeSelect?(console.warn("UISelectButton's prop shouldUseNativeSelect has been deprecated. Please replace with shouldUseNativeControl."),e.shouldUseNativeSelect):null!=e.shouldUseNativeControl?e.shouldUseNativeControl:function(){if(null!=CF)return CF;var e=Object(_F.detect)();return"Mac OS"===(null===e||void 0===e?void 0:e.os)&&"safari"===(null===e||void 0===e?void 0:e.name)?window.navigator.maxTouchPoints>0:CF=null!=e&&("iOS"===e.os||"Android OS"===e.os||"BlackBerry OS"===e.os||"Windows Mobile"===e.os||"Amazon OS"===e.os)}()}),[e.shouldUseNativeControl,e.shouldUseNativeSelect]),v=e.onStateChange,y=Object(r.useCallback)((function(e){var t=v;if(t){var n=[];e===h&&n.push("value"),t({value:e},n)}}),[v,h]),b=e.ariaLabel,_=e.tooltip,C=i.a.createElement("select",{ref:a,style:{fontSize:16},tabIndex:e.tabIndex||0,disabled:e.disabled,"aria-hidden":g?void 0:"true",onChange:function(e){var t=e.target.value;if(null!=t){var n=l[t];null!=n&&(u(n),y(n))}},value:m,required:e.required,autoComplete:e.autoComplete,form:e.form,name:e.name},p),I=Object(r.useRef)(null),w=function(e){var t=e.buttonRef,n=e.menuRef,o=e.currentValue,a=e.onItemSelected,s=e.childrenProp,c=Object(r.useRef)(void 0),u=Object(r.useRef)(!1),l=Object(r.useRef)(null),d=Gp(i.a.createElement(OF,{buttonRef:t,menuRef:n,shouldMouseUpRef:u,currentValue:o,onItemSelected:function(e){c.current=e,m()},initiallySelectedMenuItemRef:l},s),{animates:Fp.NONE,__spi__hasMenuBehavior:!0,initialFocus:function(){return l.current},onClose:function(){h.current=!1,void 0!==c.current&&a(c.current)},onRequestClose:function(e){e===jp.ESCAPE?m({animate:!1}):e===jp.MOUSE_UP&&u.current&&m()}}),p=d[0],f=d[1],h=Object(r.useRef)(!1),m=function(e){h.current=!0,f(e)};return function(){h.current||(u.current=!1,c.current=void 0,p())}}({menuRef:I,nativeSelectRef:a,buttonRef:o,currentValue:h,onItemSelected:function(e){u(e),y(e)},childrenProp:n}),E=jc(e.id,{onActivationComplete:function(){o.current&&o.current.focus()}});return Object(r.useEffect)((function(){o.current&&(o.current.focus=function(e){a.current&&a.current.focus(e)})}),[]),i.a.createElement("ui-select-button",{id:e.id||void 0,class:Ts()(e.className,e.variant||"standard"),role:"button","aria-haspopup":"dialog","aria-disabled":e.disabled||void 0,"aria-label":b,"aria-labelledby":b?void 0:E,"data-focusyn":"allow",ref:o,style:e.style,title:_,onMouseDown:g||e.disabled?void 0:function(e){0===e.button&&(e.preventDefault(),w())},onKeyDown:function(t){if(!g&&!e.disabled)switch(t.key){case"Enter":case" ":case"ArrowUp":case"ArrowDown":t.preventDefault(),w()}},onFocus:function(e){null!=I.current&&(e.preventDefault(),I.current.focus())}},i.a.createElement("ui-select-button-title",null,null!=f?f.props.children:null),i.a.createElement("ui-select-button-divider",null),e.chevronAsset||i.a.createElement(EF,null),C)}function OF(e){var t,n=e.buttonRef,o=e.children,a=e.menuRef,s=e.shouldMouseUpRef,c=e.currentValue,u=e.onItemSelected,l=e.initiallySelectedMenuItemRef,d=function(e,t){var n=[];return i.a.Children.forEach(e,(function(e,r){FF(e)?n.push(kF(t,e,UF(r))):(r>0&&n.push(i.a.createElement(Dk,{key:"divider-"+r})),null!=e.props.name&&n.push(i.a.createElement(Nk,{key:"item-"+r,value:"item-"+r,disabled:!0},e.props.name)),i.a.Children.forEach(e.props.children,(function(e,i){return n.push(kF(t,e,UF(r,i)))})))})),n}(o,c),p=Object(r.useRef)(-1),f=!!n.current&&(t=n.current,"rtl"===getComputedStyle(t).getPropertyValue("direction"));Object(r.useEffect)((function(){var e=a.current.querySelector("ui-menu-scroll-container");if(!e)throw new Error("UISelectButton: Attempted to measure menu without a scroll container.");for(var t=e.children,n=0;n<t.length;n++){var r=t[n];if(MF(r)){if(LF(r))continue;if("true"===r.getAttribute("aria-checked")){l.current=r,p.current=n;break}}}if(!l.current)throw new Error("Could not find the selected item.")}),[a,l]);var h=Object(r.useState)((function(){return{width:window.innerWidth,height:window.innerHeight}})),m=h[0],g=h[1];Object(r.useEffect)((function(){function e(){g({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]);var v=Object(Vc.a)(),y=Object(r.useMemo)((function(){return{left:10,top:10,width:m.width-20,height:m.height-20}}),[m]),b=a.current,_=n.current,C=Object(r.useMemo)((function(){var e=function(){for(var e,t=null===b||void 0===b?void 0:b.querySelector("ui-menu-scroll-container"),n=null!==(e=null===t||void 0===t?void 0:t.children)&&void 0!==e?e:[],r=0;r<n.length;r++){var i=n[r];if(MF(i)){if(LF(i))continue;if("true"===i.getAttribute("aria-checked"))return[i,r]}}return null}();if(null!=b&&null!=e&&null!=_&&o.length>0){var t,n=null;if(_.childNodes.length>0){var r=_.childNodes[0];if(r.childNodes.length>0){var i=r.childNodes[0];if(i.nodeType===Node.TEXT_NODE){var a=document.createRange();a.selectNode(i),n=a.getBoundingClientRect()}else i instanceof HTMLElement&&null!==i.offsetParent&&(n=i.getBoundingClientRect())}}t=_.getBoundingClientRect();var s=e[0],c=e[1],u=function(e,t,n,r,i,o,a,s,c){void 0===c&&(c=132);var u=r.querySelector("ui-menu-scroll-container");if(!u)throw new Error("UISelectButton: Attempted to measure menu without a scroll container.");for(var l=u.children,d=r.getBoundingClientRect(),p=o.getBoundingClientRect(),f=p.top-d.top,h=t.top+t.height/2-p.height/2-f,m=0,g=0,v=a-1;v>=0&&m<2;v--){var y=l[v];if(MF(y)&&!LF(y)){if(h+f-(g+=y.offsetHeight)<e.top)break;m++}}var b=0;if(m<2)for(v=a+1;v<l.length&&m+b<2;v++){var _=l[v];if(MF(_)&&!LF(_)){if(g+=_.offsetHeight,h+p.height+f+g>e.top+e.height)break;b++}}var C=!0,I=!1,w=b+m;w<2&&(i.length<=3&&i.length>0&&0!==w||(C=!1,I=a<3));var E=Math.max(c,p.width),S=s?"right":"left",T=(n||t)[S];if(!(o.childNodes.length>1))throw new Error("Internal Error: UIMenuItem did not have the expected children");var O=o.childNodes[1],P=p[S];if(O.nodeType===Node.TEXT_NODE){var x=document.createRange();x.selectNode(O),P=x.getBoundingClientRect()[S]}else O instanceof HTMLElement&&null!==O.offsetParent&&(P=O.getBoundingClientRect()[S]);var A=Math.abs(P-p[S]);if(s?T+=A:T-=A,E<t.width){var N=Math.abs(t[S]-T);E=Math.max(c,t.width+N-13)}var R=PF(T,E,e,s);T=function(e,t,n,r,i){return(i?xF:AF)(e,t,n,r)}(T,E,R,e.left,s),R<E&&(E=PF(T,E,e,s));var D=function(e,t,n){return n?-window.innerWidth+e-t:e}(T,E,s),k=Math.max(h,e.top),U=e.top+e.height,L=Math.min(k+d.height,U)-k,M=0;if(C){var j=h+d.height>e.top+e.height;if(h<e.top){var F=e.top;M=0===a?0:a===l.length-1?d.height-L:-h+e.top,h=F}else j&&(L=U-(F=Math.max(e.top,U-d.height)),M=-h+F,h=F)}else I?t.top-d.height>=e.top?(h=t.top-d.height,L=d.height):(h=e.top,M=f,L=t.top-h):t.top+t.height+d.height<=e.top+e.height?(h=t.top+t.height,L=d.height):(h=t.top+t.height,M=f-(L=e.height-h));return[{left:D,top:h,width:E,height:L},M,o]}(y,t,n,b,o,s,c,f);return[u[0],u[1]]}return[{top:-9999,left:-9999},0]}),[b,_,o,y,f]),I=C[0],w=C[1];return Object(r.useEffect)((function(){var e=function(e){s.current||e.stopPropagation()},t=a.current;return t.addEventListener("mouseup",e,{capture:!0}),setTimeout((function(){s.current=!0}),200),v(),function(){t.removeEventListener("mouseup",e,{capture:!0})}}),[a,v,s]),i.a.createElement(Lk,{ref:a,className:Ts()(null==a.current?"is-measuring":void 0,"ui-select-button-menu"),onItemSelected:Object(r.useCallback)((function(e){s.current&&(s.current=!1,u(e))}),[u,s]),frame:null!=I?I:void 0,initialScrollOffset:w},d)}function PF(e,t,n,r){return Math.abs(Math.min(r?e-t:e+t,n.left+n.width)-e)}function xF(e,t,n,r){return e-t<r?r+t:e+n-t}function AF(e,t,n,r){return Math.max(e+n-t,r)}var NF,RF=!1;function DF(e,t,n,r){var o=null!=n.key?n.key:r,a=n.props,s=a.nativeValue,c=a.value,u=null!=s?s:"string"===typeof c||"number"===typeof c?c:o;t.has(c)||t.set(c,u),void 0===e[u]&&(e[u]=c);var l=n.props.hasOwnProperty("nativeText")?n.props.nativeText:n.props.children;return i.a.Children.forEach(l,(function(e){null!==e&&void 0!==e&&(RF||"string"===typeof e||"number"===typeof e||(RF=!0,console.warn("UISelectItem should either have string or number as a child node or provide nativeText prop.")))})),i.a.createElement("option",{key:o,value:u,disabled:n.props.disabled},l)}function kF(e,t,n){var r=null!=e&&t.props.value===e;return i.a.createElement(Nk,SF({},t.props,{key:t.key||n,exclusiveCheckable:!0,checked:r,initialHighlighted:r}),t.props.children)}function UF(e,t){return null==t?e:e+"-"+t}function LF(e){return"true"===e.getAttribute("aria-disabled")}function MF(e){return"UI-MENU-ITEM"===e.tagName}function jF(e){return"UIComponent error: Unsupported child component found.\nGot: '"+Object(Ek.a)(e)+"'\nWanted: 'UISelectItem' or 'UISelectGroup'"}function FF(e){return e.type===zF}function BF(e){return null}function zF(e){return null}function HF(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function WF(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){HF(o,r,i,a,s,"next",e)}function s(e){HF(o,r,i,a,s,"throw",e)}a(void 0)}))}}function VF(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return ZF(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ZF(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ZF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qF(e){var t=e.bookmark,n=e.checked,i=e.onCheck,o=t.deletionDate,a=Math.min(Math.max(0,Math.floor((Date.now()-o.getTime())/1e3/60/60/24)),30),s=Math.max(30-a,0),c=function(){switch(a){case 0:return gc("RecoveryPage.BookmarksRecoveryModal.DeletedToday",{daysRemaining:s});case 1:return gc("RecoveryPage.BookmarksRecoveryModal.DeletedYesterday",{daysRemaining:s});default:return gc("RecoveryPage.BookmarksRecoveryModal.DeletedDaysAgo",{daysAgo:a,daysRemaining:s})}}();return r.createElement("div",{className:"deleted-bookmark-row"},r.createElement("div",null,r.createElement(bF,{id:t.recordName,checked:n,onStateChange:function(e){return i(e.checked,t.recordName)}})),r.createElement("div",{className:"middle-column"},r.createElement(Lc,{htmlFor:t.recordName},t.title),r.createElement("div",{className:"bookmark-date"},c),r.createElement("div",{className:"bookmark-link"},r.createElement(uT,{hideArrow:!0,href:t.url},t.url))),r.createElement("div",{className:"folder-label"},t.folder,"\xa0",t.isFavoritesBar?r.createElement(fF,{"aria-hidden":"true",desiredFontSize:8,layoutMode:"glyphBox"}):r.createElement(hF,{"aria-hidden":"true",desiredFontSize:8,layoutMode:"glyphBox"})))}function KF(e,t){var n={};if(t.newChecked)for(var r,i=VF(t.deletedBookmarks);!(r=i()).done;){var o=r.value;t.newChecked[o.recordName]&&(n[o.recordName]=!0)}else for(var a,s=VF(t.deletedBookmarks);!(a=s()).done;){var c=a.value;e[c.recordName]&&(n[c.recordName]=!0)}return n}n(1201),function(e){e[e.SELECTING=0]="SELECTING",e[e.RESTORING=1]="RESTORING",e[e.DELETING=2]="DELETING"}(NF||(NF={}));var GF=function(){var e=Aj(),t=e[0],n=e[1],i=vc({zero:"RecoveryPage.BookmarksTile.TotalNumber.Zero",one:"RecoveryPage.BookmarksTile.TotalNumber.One",two:"RecoveryPage.BookmarksTile.TotalNumber.Two",many:"RecoveryPage.BookmarksTile.TotalNumber.Many"},t.length),o=r.useState(NF.SELECTING),a=o[0],s=o[1],c=a===NF.RESTORING,u=a===NF.DELETING,l=a!==NF.SELECTING,d=r.useReducer(KF,{}),p=d[0],f=d[1],h=uh(),m=Tp("workflow","restore-bookmarks"),g=m[0],v=m[1],y=function(){var e=WF(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(NF.RESTORING),e.next=3,Pj(t.filter((function(e){return!!p[e.recordName]})));case 3:e.sent?g():v(),s(NF.SELECTING);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();r.useEffect((function(){f({deletedBookmarks:t})}),[t]);var b=r.useState("date"),_=b[0],C=b[1],I=function(){switch(_){case"name":return[].concat(t).sort((function(e,t){return e.title.localeCompare(t.title)}));case"folder":return[].concat(t).sort((function(e,t){return e.folder.localeCompare(t.folder)}));case"date":default:return[].concat(t).sort((function(e,t){return t.deletionDate.getTime()-e.deletionDate.getTime()}))}}(),w=I.every((function(e){return!!p[e.recordName]})),E=I.some((function(e){return!!p[e.recordName]})),S=function(e,n){var r=Object.assign({},p);r[n]=e,f({deletedBookmarks:t,newChecked:r})},T=tj(r.useMemo((function(){return[l?["set","inert"]:["remove","inert"]]}),[l]));return r.createElement(r.Fragment,null,r.createElement("div",{className:"bookmarks-recovery-modal-content"},r.createElement("div",{className:"bookmarks-recovery-modal-icon","data-testid":"icon"},r.createElement(wd,{iconSize:54,symbolSize:30,symbol:wj,backgroundColor:"FF9500"})),r.createElement("h2",{className:"bookmarks-recovery-modal-title","data-testid":"title",id:"bookmarks-recovery-modal-title-id"},gc("RecoveryPage.BookmarksRecoveryModal.Title")),r.createElement("div",{className:"bookmarks-recovery-modal-description","data-testid":"description"},gc("RecoveryPage.BookmarksRecoveryModal.Description")," ",r.createElement(uT,{href:fL("restoreBookmarks")},gc("RecoveryPage.BookmarksRecoveryModal.LearnMore"))),r.createElement("div",{className:Ts()("bookmarks-recovery-list",{blocked:l}),ref:T},r.createElement("div",{className:"count"},i),r.createElement("div",{className:"description"},gc("RecoveryPage.BookmarksRecoveryModal.ListDescription.FirstLine")),n?r.createElement("div",{className:"loading"},r.createElement(dM,{description:gc("RecoveryPage.BookmarksRecoveryModal.LoadingDescription")})):I.length?r.createElement(r.Fragment,null,r.createElement("div",{className:"header"},r.createElement(Wc,{variant:"standard bookmarks-recovery",onActivate:function(){for(var e,n={},r=VF(t);!(e=r()).done;)n[e.value.recordName]=!w;f({deletedBookmarks:t,newChecked:n})}},gc(w?"RecoveryPage.BookmarksRecoveryModal.DeselectAll":"RecoveryPage.BookmarksRecoveryModal.SelectAll")),r.createElement("div",{className:"flex-space"}),r.createElement(YF,{onSortChange:function(e){var t=e.value;C(t)}})),I.map((function(e){return r.createElement(qF,{bookmark:e,checked:!!p[e.recordName],onCheck:S,key:e.recordName})}))):r.createElement("div",null,gc("RecoveryPage.BookmarksRecoveryModal.EmptyList")))),!l&&r.createElement(XF,{hidden:!E},r.createElement(Wc,{className:"delete",disabled:!E,onActivate:function(){h((function(e){var n=e.hidePopup,i=function(){var e=WF(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(),s(NF.DELETING),e.next=4,xj(t.filter((function(e){return!!p[e.recordName]})));case 4:s(NF.SELECTING);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement("div",{className:"bookmarks-recovery-modal-delete-prompt"},r.createElement("h2",{className:"title",id:"bookmarks-recovery-modal-delete-prompt-modal-title-id"},gc("RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Title")),r.createElement("div",{className:"description"},gc("RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Description")),r.createElement("div",{className:"buttons"},r.createElement(Wc,{className:"cancel",onActivate:n},gc("RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Cancel")),r.createElement(Wc,{className:"delete",onActivate:i},gc("RecoveryPage.BookmarksRecoveryModal.DeletePrompt.Delete"))))}),{className:"bookmarks-recovery-modal-delete-prompt-modal",onRequestClose:function(){},ariaLabelledBy:"bookmarks-recovery-modal-delete-prompt-modal-title-id"})}},gc("RecoveryPage.BookmarksRecoveryModal.Delete")),r.createElement("div",{className:"flex-space"}),r.createElement(Wc,{className:"restore",disabled:!E,onActivate:y},gc("RecoveryPage.BookmarksRecoveryModal.Restore"))),c&&r.createElement(QF,{text:gc("RecoveryPage.BookmarksRecoveryModal.Restoring")}),u&&r.createElement(QF,{text:gc("RecoveryPage.BookmarksRecoveryModal.Deleting")}))};function YF(e){return r.createElement(TF,{variant:"standard bookmarks-recovery",shouldUseNativeControl:!0,defaultValue:"date",onStateChange:e.onSortChange,chevronAsset:r.createElement(pF,{layoutMode:"glyphBox",desiredFontSize:9})},r.createElement(zF,{value:"date"},gc("RecoveryPage.BookmarksRecoveryModal.DateDeleted")),r.createElement(zF,{value:"name"},gc("RecoveryPage.BookmarksRecoveryModal.Name")),r.createElement(zF,{value:"folder"},gc("RecoveryPage.BookmarksRecoveryModal.Folder")))}function QF(e){return r.createElement(XF,null,r.createElement("div",{className:"bottom-spinner-bar"},r.createElement(dM,{variant:"standard bookmarks-recovery",description:"","aria-hidden":"true"}),r.createElement("span",{className:"status"},e.text)))}function XF(e){return r.createElement("div",{className:Ts()("bottom-bar",{"visually-hidden":!0===e.hidden})},e.children)}var JF=6;function $F(e){var t=Aj(),n=t[0],i=t[1],o=Tp("load","bookmarks-recovery-tile",{measureFromBaseline:!0})[0];return r.useEffect((function(){i||o()}),[i,o]),r.createElement(Tj,{isLoading:i,deletedBookmarks:null!=n?n:[],tileSize:cm.Small,maxTileLines:JF,onTileClick:e.onBookmarksRecoveryModalClicked})}var eB=function(e){var t=Ts()("recovery-page",e.className),n=gc("RecoveryPage.Title"),i=gc("RecoveryPage.Details.Standard"),o=iS({endpoint:vE.retrieveDeletedItemDetails,fetchProvider:function(e){return function(){return Wj(e)}}}),a=yM(r.createElement(GF,null),{className:"bookmarks-recovery-modal",paneType:of.Modal,ariaLabelledBy:"bookmarks-recovery-modal-title-id"}),s=Yf()!==zf.Lite;return r.createElement(Sp,{scope:"data-recovery-page",baseline:!0},r.createElement("div",{className:t},r.createElement(bj,{current:eZ.recovery}),r.createElement(CT,{title:n,description:i}),r.createElement("div",{className:"application-content"},r.createElement("div",{className:"recovery-page-tiles"},r.createElement(Xj,{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,deletedDriveItems:o.data,refetch:o.refetch,tileSize:cm.Small}),s&&r.createElement($F,{onBookmarksRecoveryModalClicked:a}),r.createElement(dF,null),s&&r.createElement(cF,null)))))};function tB(e){return e.devices.filter((function(e){return e.latestBackup})).map((function(e){return{latestBackup:new Date(e.latestBackup),name:e.name,modelSmallPhotoURL1x:e.modelSmallPhotoURL1x,modelSmallPhotoURL2x:e.modelSmallPhotoURL2x,modelLargePhotoURL1x:e.modelLargePhotoURL1x,modelLargePhotoURL2x:e.modelLargePhotoURL2x,backupSizeBytes:0}}))}n(1205);var nB=Nn.object({imei:Nn.string().optional(),latestBackup:Nn.string().optional(),model:Nn.string(),modelDisplayName:Nn.string(),modelLargePhotoURL1x:Nn.string(),modelLargePhotoURL2x:Nn.string(),modelSmallPhotoURL1x:Nn.string(),modelSmallPhotoURL2x:Nn.string(),name:Nn.string(),osVersion:Nn.string().optional(),paymentMethods:Nn.array(Nn.string()).optional(),serialNumber:Nn.string().optional(),udid:Nn.string().optional(),hasActivationLock:Nn.boolean().optional(),isMissing:Nn.boolean().optional()}),rB=Nn.object({balanceStatus:Nn.union([Nn.literal("YES"),Nn.literal("NO"),Nn.literal("NOTAPPLICABLE"),Nn.literal("UNAVAILABLE"),Nn.literal("NEGATIVE")]),id:Nn.string(),isCarKey:Nn.boolean().optional(),lastFourDigits:Nn.string().optional(),suspensionReason:Nn.string().optional(),type:Nn.string(),balanceTime:Nn.string().optional(),balanceCode:Nn.string().optional(),balance:Nn.string().optional(),name:Nn.string().optional(),routeDestinationStation:Nn.string().optional(),routeOriginStation:Nn.string().optional()}),iB=Nn.object({devices:Nn.array(nB),paymentMethods:Nn.array(rB).optional()});var oB=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"arrow.clockwise",svgPath:"M8.74023-31.7383C8.74023-7.76367 27.9785 11.4746 51.9043 11.4746C75.8301 11.4746 95.0195-7.76367 95.0195-31.7383C95.0195-34.082 93.3594-35.791 90.9668-35.791C88.6719-35.791 87.1582-34.082 87.1582-31.7383C87.1582-12.1094 71.4844 3.61328 51.9043 3.61328C32.3242 3.61328 16.6016-12.1094 16.6016-31.7383C16.6016-51.3184 32.3242-66.9922 51.9043-66.9922C55.6152-66.9922 59.082-66.6992 61.9629-66.0156L47.3633-51.5625C46.6309-50.7812 46.2402-49.8047 46.2402-48.7793C46.2402-46.5332 47.9004-44.873 50.0977-44.873C51.3184-44.873 52.2461-45.2637 52.9297-45.9961L73.0469-66.2109C73.9258-67.041 74.2676-68.0176 74.2676-69.1406C74.2676-70.2148 73.8281-71.2891 73.0469-72.0703L52.9297-92.4805C52.2461-93.2617 51.2695-93.6523 50.0977-93.6523C47.9004-93.6523 46.2402-91.8945 46.2402-89.6484C46.2402-88.623 46.6309-87.6465 47.3145-86.8652L60.3027-74.0234C57.7637-74.5117 54.8828-74.8535 51.9043-74.8535C27.9785-74.8535 8.74023-55.6641 8.74023-31.7383Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:82.13010498046879,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 86.279541015625 116.8447265625",width:86.279541015625,height:116.8447265625,translateX:-8.740195312499964,translateY:93.65234375,baseline:93.65234375,capline:23.1923828125}}})},aB=function(e){var t,n,i,o,a=e.className,s=e.isError,c=e.isLoading,u=e.refetch,l=e.storageUsage,d=e.firstName,p=e.isBeneficiary,f=Ts()("storage-usage-list",a,{loading:c,error:s}),h=gc("VoiceOver.StorageUsageList.Table"),m=p&&d?gc("StorageUsageList.Family.Personal.TitleWithName",{firstName:d}):gc("StorageUsageList.Family.Personal.Title"),g=null!=(t=null==l?void 0:l.usageByMedia.filter((function(e){return"family"!==e.mediaKey})))?t:[],v=(null!=(n=null==l?void 0:l.usedBytes)?n:0)-(null!=(i=null==l||null==(o=l.familyStorageUsage)?void 0:o.usageInBytes)?i:0),y=oN(),b=y.data,_=y.isSuccess,C=iS({endpoint:vE.devicesBackup,fetchProvider:function(e){return function(){return function(e){var t=e.webServices,n=e.dsid;if(null==t||!t.account||!n)throw new Error("fetchDevices: no service url or dsid available");return JE({url:DE(t.account,n),includeCredentials:!0,validate:{type:"WireDevicesResponse",schema:iB}}).then(tB)}(e)}}}),I=C.data,w=C.isSuccess;return r.createElement("article",{className:f,"aria-labelledby":"storage-usage-heading"},s?r.createElement("div",null,r.createElement("div",{className:"error-description"},gc("StorageUsageList.Content.Error.Description")),r.createElement(Wc,{className:"reload-button",onActivate:u},r.createElement(oB,{layoutMode:"glyphBox",width:"20px",height:"20px"}),gc("ErrorHomeTileContent.TryAgain"))):r.createElement(r.Fragment,null,null!=l&&l.familyStorageUsage?r.createElement("div",{className:"title"},r.createElement("h2",{id:"family-storage-list"},m),r.createElement("h2",null,xw(v,1))):null,g.length>0?r.createElement("div",{role:"table","aria-label":h},g.filter((function(e){return e.usageInBytes})).map((function(e,t){var n,i;return r.createElement("div",{key:t,role:"row"},r.createElement(sB,{usageInfo:e,totalBytes:null!=(n=null==l?void 0:l.totalBytes)?n:0,itemDescription:(i=e.mediaKey,"photos"===i&&_?gc("PhotosHomeTile.Description",{photoCount:yc({zero:"PhotosHomeTile.TotalNumber.Photo.Zero",one:"PhotosHomeTile.TotalNumber.Photo.One",two:"PhotosHomeTile.TotalNumber.Photo.Two",many:"PhotosHomeTile.TotalNumber.Photo.Many"},(null==b?void 0:b.numPhotos)||0),videoCount:yc({zero:"PhotosHomeTile.TotalNumber.Video.Zero",one:"PhotosHomeTile.TotalNumber.Video.One",two:"PhotosHomeTile.TotalNumber.Video.Two",many:"PhotosHomeTile.TotalNumber.Video.Many"},(null==b?void 0:b.numVideos)||0)}):"mail"===i?gc("StoragePage.AppCounts.Mail.All"):"backup"===i&&w?yc({zero:"DeviceBackupList.TotalNumber.Zero",one:"DeviceBackupList.TotalNumber.One",two:"DeviceBackupList.TotalNumber.Two",many:"DeviceBackupList.TotalNumber.Many"},I.length):"messages"===i?gc("StorageUsageList.Messages.Count"):"docs"===i?gc("StorageUsageList.Drive.Count"):"family"===i?gc("StorageUsageList.Family.Count"):"")}))}))):null))},sB=function(e){var t,n,i=(e.usageInfo.usageInBytes/e.totalBytes*100).toFixed(1)+"%",o=xw(e.usageInfo.usageInBytes,1),a=mc("VoiceOver.StorageUsageList.StorageUsed",{percentage:i});return r.createElement(r.Fragment,null,r.createElement("span",{className:"app-name-icon",role:"cell"},r.createElement(Sd,{className:"icon",applicationIdentifier:e.usageInfo.mediaKey,iconSize:32}),r.createElement("div",null,r.createElement("span",{className:"label"},null!=(t="photos"===(n=e.usageInfo.mediaKey)?gc("Photos.DisplayName"):"docs"===n?gc("StorageUsageList.Drive.Heading"):"backup"===n?gc("DeviceBackupList.Heading"):void 0)?t:e.usageInfo.displayLabel),r.createElement("span",{className:"item-description-small"},e.itemDescription))),r.createElement("span",{className:"item-description",role:"cell"},e.itemDescription),r.createElement("span",{className:"usage",role:"cell"},o,r.createElement(dT,null,r.createElement(r.Fragment,null,", ",a)),r.createElement("span",{className:"dot",style:{backgroundColor:"#"+e.usageInfo.displayColor}})))},cB=(n(1206),n(1207),n.p+"5718fbd9b4a6e283ff3e0e085dcc1df6.png"),uB=function(e){var t=cy(e.firstName)&&cy(e.lastName),n=e.firstName.charAt(0)+e.lastName.charAt(0),i=Fw(e.firstName,e.lastName);return t?r.createElement("img",{alt:gc("StorageUsageList.Family.ImageAlt",{familyMemberName:i}),className:"cjk-profile-photo",src:cB}):r.createElement(r.Fragment,null,e.profilePhoto?r.createElement(r.Fragment,null,e.profilePhoto):r.createElement("div",{className:"profile-photo-placeholder","aria-label":gc("StorageUsageList.Family.ImageAlt",{familyMemberName:i})},r.createElement("div",{className:"initials"},n)))},lB=function(e){var t,n,i=e.member,o=hc().contacts,a=null==o?void 0:o.get(i.appleId),s=Fw(i.firstName,i.lastName),c=r.createElement(qR,{imageAlt:gc("StorageUsageList.Family.ImageAlt",{familyMemberName:s}),profilePhoto:a?{contactId:a.contactId,url:null==(t=a.photo)?void 0:t.url,crop:null==(n=a.photo)?void 0:n.crop}:void 0,isProfilePhotoLoading:!1,size:36});return r.createElement(uB,{firstName:i.firstName,lastName:i.lastName,profilePhoto:a&&c})},dB=function(e){var t=Ts()("family-usage-list",e.className),n=e.familyMembers.reduce((function(e,t){return e+t.usageInBytes}),0),i=e.isBeneficiary&&e.ownerFirstName?gc("StorageUsageList.Family.TitleWithName",{firstName:e.ownerFirstName}):gc("StorageUsageList.Family.Title");return r.createElement("article",{className:t,"aria-labelledby":"family-storage-list"},r.createElement("div",{className:"title"},r.createElement("h2",{id:"family-storage-list"},i),r.createElement("h2",null,xw(n,1))),!e.isBeneficiary&&r.createElement("div",{role:"table","aria-label":gc("VoiceOver.StorageUsageList.FamilyUsageList")},e.familyMembers.map((function(e){return r.createElement("div",{key:e.appleId,role:"row"},r.createElement("div",{role:"cell"},r.createElement(lB,{member:e}),r.createElement("span",{className:"member-name"},e.fullName)),r.createElement("div",{role:"cell"},xw(e.usageInBytes,1),r.createElement("span",{className:"dot"})))}))))},pB=(n(1208),function(e){var t,n,i,o,a,s,c=e.storageUsage,u=e.isLoading,l=e.isError,d=e.isBeneficiary,p=null!=(t=null==c?void 0:c.usedBytes)?t:0,f=null!=(n=null==c?void 0:c.totalBytes)?n:0,h=(null!=(i=null==c?void 0:c.totalBytes)?i:0)-p,m=TL(),g=Ts()("callout",{"has-family-storage":null==c?void 0:c.familyStorageUsage});return r.createElement("div",{className:"meter-header"},r.createElement("div",{className:"usage-header"},r.createElement("div",{className:"storage-label-section"},r.createElement("span",{className:"storage-label"},l||u?r.createElement(DU,{layoutMode:"glyphBox",height:26,width:39,fill:"#FFF"}):r.createElement(r.Fragment,null,xw(f,1))),m&&r.createElement(NL,{"aria-hidden":!0,className:"warning-icon",width:24,height:24})),r.createElement(pT,{ariaLevel:2,text:gc("StorageUsageList.Heading"),id:"storage-usage-heading"}),u?r.createElement("div",{className:"loading"},gc("StorageUsageList.Description.Loading")):l?r.createElement("div",{className:"error"},gc("StorageUsageList.Description.Error")):r.createElement("div",{className:"usage-description"},r.createElement(lM.a,{interpolations:{"#{freeStorage}":r.createElement("span",{className:"free-storage"},gc("StorageUsageList.FreeStorage",{free:xw(h,1)})),"#{usedStorage}":r.createElement("span",{className:"used-storage"},gc("StorageUsageList.UsedStorage",{used:xw(p,1)}))}},gc("StorageUsageList.Description")))),r.createElement(qL,{hideInfo:!0,usedBytes:null!=(o=null==c?void 0:c.usedBytes)?o:0,totalBytes:null!=(a=null==c?void 0:c.totalBytes)?a:0,usageByMedia:null!=(s=null==c?void 0:c.usageByMedia)?s:[]}),m&&r.createElement(r.Fragment,null,r.createElement(fB,{type:m}),!d&&r.createElement("div",{className:"xl-no-display"},r.createElement(mM,{className:g,feature:QN.STORAGE_MANAGE,variant:pM.STORAGE_FULL}),r.createElement(cj,null))))});function fB(e){switch(e.type){case wL.AlmostFull:return r.createElement(hB,null);case wL.Full:return r.createElement(mB,null)}}function hB(){return r.createElement(gB,null,mc("StoragePage.StorageWarning.AlmostFull"))}function mB(){return r.createElement(gB,null,mc("StoragePage.StorageWarning.Full"))}function gB(e){var t=e.children;return r.createElement("div",{className:"usage-warning",role:"note"},r.createElement(NL,{className:"warning-icon",width:17,height:17}),t)}var vB=function(e){var t,n,i,o,a=e.className,s=e.onPageLoaded,c=qf(),u=null==c||null==(t=c.details)||null==(n=t.beneficiaryInfo)?void 0:n.isBeneficiary,l=null!=(i=null==c||null==(o=c.details)?void 0:o.firstName)?i:"",d=Ts()("storage-page",a),p=u&&l?gc("StoragePage.TitleWithName",{firstName:l}):gc("StoragePage.Title"),f=gc(u?"StoragePage.Description.Neutral":"StoragePage.Description.Standard"),h=wA(),m=h.storageUsage,g=h.isLoading,v=Ts()("callout manage-storage",{"has-family-storage":null==m?void 0:m.familyStorageUsage}),y=TL();return r.useEffect((function(){!g&&s&&s()}),[g,s]),r.createElement("div",{className:d},r.createElement(bj,{current:eZ.storage}),r.createElement(CT,{title:p,description:f}),r.createElement("div",{className:"application-content"},r.createElement(pB,{storageUsage:m,isLoading:g,isError:null==m&&!g,isBeneficiary:u}),r.createElement("div",{className:"content-section"},r.createElement("div",{className:"content-column"},r.createElement(aB,{storageUsage:m,isError:null==m&&!g,isLoading:g,refetch:function(){return YV.cloudOSApplication.quotaController.refreshQuotaData()},firstName:l,isBeneficiary:u}),null!=m&&m.familyStorageUsage&&y?r.createElement(dB,{familyMembers:m.familyStorageUsage.familyMembers,className:"family-usage",ownerFirstName:l,isBeneficiary:u}):null),r.createElement("div",{className:"content-column"},null!=m&&m.familyStorageUsage&&!y?r.createElement(dB,{familyMembers:m.familyStorageUsage.familyMembers,className:"family-usage",ownerFirstName:l,isBeneficiary:u}):null,!u&&y?r.createElement("div",{className:"xl-display"},r.createElement(mM,{className:v,feature:QN.PLAN_UPGRADE,variant:pM.STORAGE_FULL}),r.createElement(cj,null)):null,!u&&r.createElement(mM,{className:v,feature:QN.STORAGE_MANAGE,variant:pM.STORAGE_MANAGE})))))},yB=(n(1209),n(1301)),bB=n(721),_B=(n(1210),{video1x:"/system/icloud.com/current/static/fpo@1x.mp4",video2x:"/system/icloud.com/current/static/fpo@2x.mp4",video3x:"/system/icloud.com/current/static/fpo@3x.mp4",cn_video1x:"/system/icloud.com/current/static/fpo-3@1x.mp4",cn_video2x:"/system/icloud.com/current/static/fpo-3@2x.mp4",cn_video3x:"/system/icloud.com/current/static/fpo-3@3x.mp4"}),CB=function(){var e=window.devicePixelRatio,t=yB.a.sharedInstance.deviceType,n=Ne.sharedInstance.isDomainCN?"cn_video":"video",i=e<2?_B[n+"1x"]:2===e||t===bB.a.PHONE?_B[n+"2x"]:_B[n+"3x"];return r.createElement("div",{className:"hero-wrapper"},r.createElement("div",{className:"icloud-animated-hero"},r.createElement("video",{src:i,width:430,height:388,autoPlay:!0,playsInline:!0,loop:!0,muted:!0,"x-webkit-airplay":"deny",title:gc("CloudOS.LandingPage.Animation.Description")})),r.createElement($M,null))},IB=(n(1211),function(e){var t=Ts()("sign-in-button",e.className);return r.createElement(Wc,{className:t,onActivate:e.onSignInPressed,ariaHasPopup:!1},e.title)}),wB=n.p+"e6ffc52737977fe1700d423a10874d0b.png",EB=n.p+"cb89b6112cb1d8e18fac821612c25717.png",SB=n.p+"62609bb40e727fc0243d2ef42765ca7a.png",TB=n.p+"9f6f65d3e62b682bad98a982415e8a8e.png",OB=(n(1212),function(e){return r.createElement("div",{className:Ts()("gcbd-branding-text",e.className)},"\u7531\u4e91\u4e0a\u8d35\u5dde\u8fd0\u8425")}),PB=function(e){var t,n,i,o,a,s,c,u,l,d,p=Ts()("landing-page",e.className),f={href:"https://apple.com/icloud",text:gc("CloudOS.LandingPage.iCloudPlusTile.Description.Link")+".",ariaLabel:gc("CloudOS.LandingPage.iCloudPlusTile.Description.LinkLabel")+" "+gc("VoiceOver.ExternalLink.Description")},h=e.configuration&&"newspublisher"===e.configuration.identifier,m=e.configuration?"find"===e.configuration.identifier?gc("CloudOS.LandingPage.Find.DisplayName"):h?e.configuration.displayName:gc(e.configuration.displayNameLocKey):null,g=e.configuration?gc(e.configuration.titleNameLocKey):null,v=e.description,y="",b=qf();if(e.configuration)switch(null==(t=e.configuration)?void 0:t.identifier){case"find":v=gc("CloudOS.LandingPage.Find.Description"),y=fL("findDevices");break;case"mail":v=gc("CloudOS.LandingPage.Mail.Description"),y=fL("mail");break;case"photos":v=gc("CloudOS.LandingPage.Photos.Description"),y=fL("photos");break;case"iclouddrive":v=gc("CloudOS.LandingPage.IClouddrive.Description"),y=fL("drive");break;case"notes":v=gc("CloudOS.LandingPage.Notes.Description"),y=fL("notes");break;case"reminders":v=gc("CloudOS.LandingPage.Reminders.Description"),y=fL("reminders");break;case"calendar":v=gc("CloudOS.LandingPage.Calendar.Description"),y=fL("calendar");break;case"pages":v=gc("CloudOS.LandingPage.Pages.Description"),y=fL("pages");break;case"numbers":v=gc("CloudOS.LandingPage.Numbers.Description"),y=fL("numbers");break;case"keynote":v=gc("CloudOS.LandingPage.Keynote.Description"),y=fL("keynote");break;case"newspublisher":break;case"contacts":v=gc("CloudOS.LandingPage.Contacts.Description"),y=fL("contacts");break;default:throw new Error("Unable to identify the configuration for id "+(null==(n=e.configuration)?void 0:n.identifier))}var _=null==(i=e.configuration)?void 0:i.identifier,C=_&&-1!==["mail","photos","iclouddrive"].indexOf(_)?g:m,I=e.configuration&&C?gc("CloudOS.LandingPage.LearnMoreLink.Text",{applicationNameToBeDisplayed:C}):null,w=function(){var e=wZ.sharedInstance.cloudOSUser;if(null!=e&&e.details&&ma(e.details))return"LiteAccount";var t=yB.a.sharedInstance.deviceType;return t===bB.a.PHONE?"Phone":t===bB.a.TABLET?"Tablet":"Others"}(),E=function(){if(!C)return"";switch(w){case"LiteAccount":return gc("CloudOS.LandingPage.Unsupported.LiteAccount.Description",{applicationNameToBeDisplayed:C});case"Phone":return gc("CloudOS.LandingPage.Unsupported.Phone.Description",{applicationNameToBeDisplayed:C});case"Tablet":return gc("CloudOS.LandingPage.Unsupported.Tablet.Description",{applicationNameToBeDisplayed:C});default:return""}}(),S=function(){var e;return"LiteAccount"===w?C?gc("CloudOS.LandingPage.Unsupported.LiteAccount.Subdescription",{applicationNameToBeDisplayed:C,appleId:null!=b&&null!=(e=b.details)&&e.appleId?"\u201c"+b.details.appleId+"\u201d":""}):"":null!=b&&b.isAuthenticated?"":"Phone"===w?gc("CloudOS.LandingPage.Unsupported.Phone.Subdescription"):"Tablet"===w?gc("CloudOS.LandingPage.Unsupported.Tablet.Subdescription"):""}(),T="rtl"===x()?SB:EB;return Ne.sharedInstance.isDomainCN&&(T=TB),r.createElement("div",{className:p},void 0===e.configuration&&r.createElement(CB,null),_&&r.createElement(r.Fragment,null,r.createElement("div",{className:"chiclet-hero"},r.createElement(Sd,{applicationIdentifier:_,iconSize:"Phone"===w?70:100}))),e.configuration&&r.createElement("h1",{className:"application-title"},C),r.createElement(r.Fragment,null,Ne.sharedInstance.isDomainCN?r.createElement(OB,null):null),r.createElement("div",{className:Ts()("landing-page-content",e.configuration?"application-content":"",e.configuration&&null!=(o=e.configuration)&&o.isHidden?"unsupported-content":"")},(null==(a=e.configuration)?void 0:a.isHidden)&&E&&r.createElement("div",{className:"unsupported-description"},E),(null==(s=e.configuration)?void 0:s.isHidden)&&S&&r.createElement("div",{className:"unsupported-subdescription"},S),e.onSignInPressed&&!(null!=(c=e.configuration)&&c.isHidden)&&r.createElement(IB,{title:gc("CloudOS.Authentication.SignIn.Button"),onSignInPressed:e.onSignInPressed}),(null==(u=e.configuration)?void 0:u.isHidden)&&r.createElement("div",{className:Ts()("button-container","LiteAccount"===w?"lite-account":void 0)},"LiteAccount"===w&&r.createElement(Wc,{className:"sign-out-button secondary",variant:"pill",onActivate:function(){wZ.sharedInstance.unauthenticateUserFromAllBrowsers()}},gc("CloudOS.LandingPage.Unsupported.LiteAccount.SignOut")),r.createElement(IB,{className:Ts()("redirect",null!=b&&b.isAuthenticated?"authenticated":""),title:null!=b&&b.isAuthenticated?gc("CloudOS.AccountNeedsSetup.HomePageButton.Title"):gc("CloudOS.AccountNeedsSetup.Domain.icloud.com"),onSignInPressed:e.onSignInPressed?e.onSignInPressed:function(){Object(Qn.a)(window.location.origin)}})),!(null!=(l=e.configuration)&&l.isHidden)&&!h&&r.createElement("h2",{className:Ts()("description",e.configuration?"application-description":"")},v),e.configuration&&!(null!=(d=e.configuration)&&d.isHidden)&&!h&&r.createElement(uT,{href:y},I),!e.configuration&&r.createElement("div",{className:"tiles"},r.createElement(FM,{title:gc("CloudOS.LandingPage.iCloudWeb.Title"),description:gc("CloudOS.LandingPage.iCloudWeb.Description"),iconSrc:wB,iconDescription:gc("CloudOS.LandingPage.iCloudWeb.Image.Description")}),r.createElement(FM,{title:gc("CloudOS.LandingPage.iCloudPlusTile.Title"),description:Ne.sharedInstance.isDomainCN?gc("CloudOS.LandingPage.iCloudPlusTile.Description.gcbd"):gc("CloudOS.LandingPage.iCloudPlusTile.Description"),descriptionLink:f,iconSrc:T,iconDescription:gc("CloudOS.LandingPage.iCloudPlusTile.Image.Description")}))))},xB=(n(1213),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"icloud.and.arrow.down",svgPath:"M84.7168-13.5742L84.7168-5.71289L107.52-5.71289C122.51-5.71289 131.494-14.7461 131.494-26.5625C131.494-36.4258 125.586-44.5312 116.064-48.3887C116.162-70.166 100.488-85.8887 80.5176-85.8887C67.2852-85.8887 57.8613-78.8086 52.002-70.2637C40.918-73.2422 26.9043-64.6484 26.6602-50.9277C15.625-49.2188 8.74023-40.1855 8.74023-28.6621C8.74023-15.9668 18.2617-5.71289 34.2773-5.71289L55.957-5.71289L55.957-13.5742L34.2285-13.5742C22.6562-13.5742 16.6016-20.2637 16.6016-28.6621C16.6016-37.9883 22.5098-44.9219 32.8613-44.9219C33.5449-44.9219 33.7891-45.3125 33.7891-45.9473C33.7891-60.9375 44.5801-65.0879 54.6387-62.1582C55.2246-61.9629 55.5664-62.0605 55.8594-62.5977C60.5957-71.0449 67.8711-78.0273 80.5176-78.0273C96.5332-78.0273 107.617-65.332 108.447-50.7812C108.594-48.584 108.447-45.9473 108.252-43.6523C108.203-43.0176 108.447-42.627 109.033-42.5293C117.92-40.5762 123.633-35.0098 123.633-26.5625C123.633-19.043 118.164-13.5742 107.471-13.5742ZM70.3613 23.291C71.3379 23.291 72.1191 22.9004 73.1445 21.9727L89.6484 6.54297C90.4297 5.85938 90.8203 5.0293 90.8203 3.95508C90.8203 2.00195 89.2578 0.537109 87.2559 0.537109C86.3281 0.537109 85.3516 0.976562 84.6191 1.70898L77.1973 9.13086L73.9258 12.5488L74.2188 5.27344L74.2188-36.6211C74.2188-38.6719 72.4609-40.4297 70.3613-40.4297C68.2617-40.4297 66.4551-38.6719 66.4551-36.6211L66.4551 5.27344L66.748 12.5977L63.4766 9.13086L56.0547 1.70898C55.3223 0.976562 54.2969 0.537109 53.3691 0.537109C51.3184 0.537109 49.8535 2.00195 49.8535 3.95508C49.8535 5.0293 50.2441 5.85938 51.0254 6.54297L67.5293 21.9727C68.5547 22.9004 69.3359 23.291 70.3613 23.291Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 117.0419921875",width:122.758056640625,height:117.0419921875,translateX:-8.735942382812482,translateY:93.7509765625,baseline:93.7509765625,capline:23.291015625}}})}),AB=function(e){var t=Ts()("unauthed-share-acceptance-page",e.className),n=gc("CloudOS.Authentication.SignIn.ShareAcceptance.Title"),i=gc("CloudOS.Authentication.SignIn.ShareAcceptance.Subtitle",{name:e.sharerName}),o=gc("CloudOS.Authentication.SignIn.ShareAcceptance.CreateDescription"),a=gc("CloudOS.Authentication.SignIn.ShareAcceptance.CreateButton"),s=gc("CloudOS.Authentication.SignIn.ShareAcceptance.CreateAriaLabel");return r.createElement("div",{className:Ts()(t,"gradient-background")},r.createElement("div",{className:"unauthed-share-acceptance-page-content application-content"},r.createElement("div",{className:"header-section"},r.createElement(xB,{className:"header-image",width:60,height:60,layoutMode:"glyphBox"}),r.createElement("h2",null,n),r.createElement("p",null,i)),e.onSignInPressed&&r.createElement(IB,{onSignInPressed:e.onSignInPressed,title:gc("CloudOS.Authentication.SignIn.Button")}),r.createElement("div",{className:"bottom-section"},r.createElement("p",null,o),r.createElement(Wc,{className:"create-apple-id-button",onActivate:function(){return wZ.sharedInstance.createAccount()},ariaLabel:s,variant:"pill secondary"},a))))},NB=(n(1214),Ne.sharedInstance.isDomainCN),RB=function(e){var t=e.className,n=e.onPageLoaded,i=Ts()("icloud-plus-page",t),o=gc("ICloudPlusPage.Title"),a=gc("ICloudPlusPage.Description"),s=Rm(),c=s.modalToOpen,u=s.setModalToOpen,l=AM(),d=_M({numberOfCamsSupported:gR()}),p=r.useState(!1),f=p[0],h=p[1],m=r.useState(!1),g=m[0],v=m[1];return r.useEffect((function(){f&&g&&(null==n||n())}),[f,g,n]),r.useEffect((function(){if(""!==c){switch(c){case"private-relay":l();break;case"homekit-secure-video":d()}u("")}}),[c,u,l,d]),r.createElement("div",{className:i},r.createElement(bj,{current:eZ.icloudplus}),r.createElement(CT,{title:o,description:a}),r.createElement("div",{className:"application-content"},r.createElement("div",{className:"tile-grid-content"},r.createElement(tM,{onSuccess:function(){return h(!0)},onError:function(){return h(!0)}}),NB?null:r.createElement(rM,{onSuccess:function(){return v(!0)},onError:function(){return v(!0)}})),r.createElement("section",{"aria-labelledby":"icloud-plus-device-only-header",className:"device-only-content"},r.createElement("h2",{id:"icloud-plus-device-only-header",className:"heading"},gc("ICloudPlusPage.OnlyOnDevices.Title")),r.createElement("p",null,gc("ICloudPlusPage.OnlyOnDevices.Description")),r.createElement("div",{className:"tile-grid-content"},NB?null:r.createElement(RM,null),r.createElement(IM,null),r.createElement(jM,null)))))};function DB(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}n(1215);var kB=function(e){var t=e.className,n=e.action,i=Ts()("redirect-page",t),o=r.useRef(null),a=he.c(window.location.href),s=function(e){var t=e||"PROD",n="ICLOUD3"===t?"https://appleid-qa1.corp.apple.com":"ICLOUD2"===t||"ICLOUD1"===t?"https://appleid-ut.corp.apple.com":"https://appleid.apple.com";return he.c(""+n)}(a.searchParams.get("env")||"PROD").toString(),c=he.c(s+"account/signin/sso").toString(),u=a.searchParams.get("alternateDSID")||"",l=a.searchParams.get("isTiburonLogin")||"false",d=n||"manage_appleid",p=r.useState(""),f=p[0],h=p[1];return r.useEffect((function(){!function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,YN();case 3:if(t=e.sent,n=t.status,r=t.centralizedWebToken,"success"===n&&r){e.next=9;break}return Qn.a(s),e.abrupt("return");case 9:h(window.btoa(u+":"+r)),e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(0),Qn.a(s),e.abrupt("return");case 16:case"end":return e.stop()}}),e,null,[[0,12]])})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){DB(o,r,i,a,s,"next",e)}function s(e){DB(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}()()}),[s,u]),r.useEffect((function(){o.current&&""!==f&&o.current.submit()}),[f]),r.createElement("div",{className:i},r.createElement("form",{ref:o,action:c,method:"POST"},r.createElement("input",{type:"hidden",name:"referrer",value:"icloud"}),r.createElement("input",{type:"hidden",name:"nativeTakeOver",value:l}),r.createElement("input",{type:"hidden",name:"action",value:d}),r.createElement("input",{type:"hidden",name:"token",value:f})))};n(1216);var UB=function(e){var t,n,i=Ne.sharedInstance.isDomainCN;return r.createElement("div",{className:Ts()("legal-footer",{transparent:e.isTransparent})},r.createElement("div",{className:"application-content"},r.createElement("div",{className:"legal-footer-content"},r.createElement("div",{className:"inner-row",role:"presentation"},null!=(t=null==(n=Gf())?void 0:n.isManagedAppleID)&&t?r.createElement(r.Fragment,null,r.createElement(LB,null,r.createElement(jB,null)),r.createElement(LB,null,r.createElement(BB,null)),i?r.createElement(LB,null,r.createElement(zB,null)):r.createElement(zB,null)):r.createElement(r.Fragment,null,r.createElement(LB,null,r.createElement(MB,null)),r.createElement(LB,null,r.createElement(jB,null)),i?r.createElement(LB,null,r.createElement(FB,null)):r.createElement(FB,null)),i&&r.createElement(HB,null)),r.createElement("div",{className:"inner-row",role:"presentation"},r.createElement(WB,null)))))};function LB(e){var t=e.children;return r.createElement("div",{className:"with-separator"},t,r.createElement("div",{"aria-hidden":!0,className:"separator"}))}function MB(){return r.createElement("a",{className:"systemStatus",target:"_blank",rel:"noreferrer",href:D("systemStatus"),"aria-label":mc("CloudOS.LegalFooterView.Text.Fragment.StatusUrl.Title")+" "+mc("VoiceOver.ExternalLink.Description")},mc("CloudOS.LegalFooterView.Text.Fragment.StatusUrl.Title"))}function jB(){return r.createElement("a",{className:"privacy",target:"_blank",rel:"noreferrer",href:Ne.sharedInstance.isDomainCN?D("cnPrivacyPolicy"):D("privacyPolicy"),"aria-label":mc("CloudOS.LegalFooterView.Text.Fragment.PrivacyUrl.Title")+" "+mc("VoiceOver.ExternalLink.Description")},mc("CloudOS.LegalFooterView.Text.Fragment.PrivacyUrl.Title"))}function FB(){return r.createElement("a",{className:"terms",target:"_blank",rel:"noreferrer",href:D("termsAndCondition"),"aria-label":mc("CloudOS.LegalFooterView.Text.Fragment.TermsUrl.Title")+" "+mc("VoiceOver.ExternalLink.Description")},mc("CloudOS.LegalFooterView.Text.Fragment.TermsUrl.Title"))}function BB(){return r.createElement("a",{className:"terms",target:"_blank",rel:"noreferrer",href:D("schoolTerms"),"aria-label":mc("CloudOS.SchoolLegalFooterView.Text.Fragment.TermsUrl.Title")+" "+mc("VoiceOver.ExternalLink.Description")},mc("CloudOS.SchoolLegalFooterView.Text.Fragment.TermsUrl.Title"))}function zB(){return r.createElement("a",{className:"terms",target:"_blank",rel:"noreferrer",href:D("businessTerms"),"aria-label":mc("CloudOS.BusinessLegalFooterView.Text.Fragment.TermsUrl.Title")+" "+mc("VoiceOver.ExternalLink.Description")},mc("CloudOS.BusinessLegalFooterView.Text.Fragment.TermsUrl.Title"))}function HB(){return r.createElement("a",{className:"chinaICP",target:"_blank",rel:"noreferrer",href:"https://beian.miit.gov.cn"},"\u9ed4ICP\u590718008477\u53f7")}function WB(){return r.createElement("span",{className:"copyright"},mc("CloudOS.LegalFooterView.Text.Fragment.Copyright",{currentYear:(new Date).getFullYear()}))}n(1217);var VB,ZB=n(1218),qB=(ZB.domToReact,ZB.htmlToDOM,ZB.attributesToProps,ZB.Element,ZB),KB=n.p+"91e650a4bffba882d11735917c16a796.png",GB=function(e){var t=e.pageTitle,n=e.isIconVisible,i=e.renderIcon,o=e.renderAdditionalIcons,a=e.descriptionOne,s=e.descriptionTwo,c=e.descriptionThree,u=e.decriptionClassOverrides,l=void 0===u?{}:u,d=e.isButtonTwoVisible,p=e.renderButtonOne,f=e.renderButtonTwo,h=e.renderButtonThree,m=e.className,g=e.isSpinnerViewVisible,v=void 0!==g&&g,y=e.spinnerNibStyle,b=void 0===y?{fillStyle:"#FFFFFF"}:y,_=r.useMemo((function(){return(i||function(){return r.createElement(MI,{iconSrc:KB})})()}),[i]),C=n||!!_,I=r.useMemo((function(){return p()}),[p]),w=r.useMemo((function(){return f?f():null}),[f]),E=r.useMemo((function(){return h?h():null}),[h]),S=void 0!==d?d:!!w,T=Ts()("interstitial-page",m),O={lineOne:l.lineOne||"page-description-one",lineTwo:l.lineTwo||"page-description-two",lineThree:l.lineThree||"page-description-three"};return r.createElement("div",{className:T},r.createElement("div",{className:v?"hide-page-container-view":"page-container-view"},r.createElement("div",{className:"page-content-container-view"},r.createElement("div",null,r.createElement("div",{className:C?"page-icon-view":"hide-view"},_),o?o():null),r.createElement("div",{className:"page-title-view"},t),r.createElement("div",{className:"page-description-view"},r.createElement("div",{className:O.lineOne},a||null),r.createElement("div",{className:O.lineTwo},s?qB(s):null),r.createElement("div",{className:O.lineThree},c||null))),r.createElement("div",{className:"page-button-container-view"},r.createElement("div",{className:"page-button-view"},r.createElement("div",{className:(S?"show-button":"hide-button")+" page-button-two"},w),r.createElement("div",{className:(E?"show-button":"hide-button")+" page-button-three"},E),r.createElement("div",{className:"show-dismiss-button page-button-one"},I)))),v?r.createElement(dM,{description:Xn("CloudOS.InterstitialPage.Loading"),nibStyle:b}):null)};function YB(e){var t=function(){switch(e.noticeType){case VB.LITE:return Xn("Notice.Lite.Title");case VB.WINDOWS:return Xn("Notice.Windows.Title");default:return}}(),n=gl.sharedInstance,i=function(){switch(e.noticeType){case VB.LITE:return["pages","numbers","keynote"];case VB.WINDOWS:return["iclouddrive"];default:return[]}}();return r.createElement("div",{className:"notice-component"},r.createElement("div",{className:"notice-component-inner"},r.createElement("div",{className:Ts()("notice-icon",e.noticeType)},i.map((function(e,t){var i,o=n.getApplicationInfo(e),a=o&&null!=(i=gu(o))?i:void 0;return r.createElement("img",{alt:"App Icon",key:t,src:a,className:"app-icon"})}))),r.createElement("div",{className:"notice-info"},r.createElement("div",{className:"title"},t),r.createElement(QB,{noticeType:e.noticeType,onLiteSubtitleClick:e.onLiteSubtitleClick,onWindowsSubtitleClick:function(){var e=TT("HT201391");fr.sharedInstance.recordStat(new ur("windowsNoticeClicked")),Object(ae.a)(e)}}))),r.createElement(Wc,{variant:"close-button",onActivate:e.onClose},r.createElement(lf,{"aria-hidden":!0,desiredFontSize:14})))}function QB(e){switch(e.noticeType){case VB.LITE:var t=_.sharedInstance.deviceType!==p.PHONE?Xn("Notice.Lite.Subtitle.Desktop"):Xn("Notice.Lite.Subtitle.Phone");return r.createElement(Wc,{variant:"notice-lite-subtitle",onActivate:e.onLiteSubtitleClick},t," ",r.createElement(fT,{"aria-hidden":!0,desiredFontSize:8}));case VB.WINDOWS:return r.createElement("div",{className:"notice-windows-subtitle"},Xn("Notice.Windows.Subtitle"),r.createElement(Wc,{variant:"notice-windows-subtitle",onActivate:e.onWindowsSubtitleClick},Xn("Notice.Windows.DownloadNow.Text")," ",r.createElement(fT,{desiredFontSize:8})))}}n(1235),n(1236),function(e){e.LITE="lite",e.WINDOWS="windows"}(VB||(VB={})),n(1237);var XB=n.p+"4b8b3ce81ee3f38d252523b8d9728531.png",JB=n.p+"a2a2bf48024226e87df48998ab12336c.png",$B=n.p+"e7ed96b512884a994dfffdff779c53ff.png",ez=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"ipad.and.iphone",svgPath:"M27.7789 9.76808L92.6089 9.76808C91.4587 8.13106 90.6086 6.17297 90.2453 3.95612C90.1724 3.29287 90.0996 2.62962 90.0785 1.86286L27.9035 1.86286C23.0272 1.86286 20.3144-0.694633 20.3144-5.77797L20.3144-64.5976C20.3144-69.6292 23.0272-72.2384 27.9035-72.2384L112.108-72.2384C116.942-72.2384 119.697-69.6292 119.697-64.5976L119.697-62.8481C122.518-62.8481 125.045-62.8481 127.551-62.8375L127.551-64.981C127.551-75.0367 122.465-80.1437 112.233-80.1437L27.7789-80.1437C17.5986-80.1437 12.4609-75.0578 12.4609-64.981L12.4609-5.3946C12.4609 4.6822 17.5986 9.76808 27.7789 9.76808ZM51.1572-1.87542L89.8474-1.87542C89.8474-3.34762 89.8474-4.89269 89.8474-6.37545L51.1572-6.37545C49.8508-6.37545 48.8761-5.50418 48.8761-4.09428C48.8761-2.73613 49.8508-1.87542 51.1572-1.87542ZM105.09 9.76808L127.288 9.76808C133.371 9.76808 136.847 6.40563 136.847 0.622849L136.847-47.9874C136.847-53.8219 133.36-57.1431 127.288-57.1431L105.09-57.1431C99.0077-57.1431 95.5417-53.8219 95.5417-47.9874L95.5417 0.622849C95.5417 6.40563 98.9971 9.76808 105.09 9.76808ZM105.205 3.36372C103.059 3.36372 101.946 2.19903 101.946-0.0393971L101.946-47.3663C101.946-49.6153 103.059-50.7388 105.205-50.7388L109.608-50.7388C109.784-50.7388 109.898-50.6247 109.898-50.4378L109.898-50.0228C109.898-48.3215 111.019-47.1703 112.731-47.1703L119.648-47.1703C121.36-47.1703 122.491-48.3215 122.491-50.0228L122.491-50.4378C122.491-50.6247 122.594-50.7388 122.749-50.7388L127.174-50.7388C129.361-50.7388 130.443-49.6153 130.443-47.3663L130.443-0.0393971C130.443 2.19903 129.361 3.36372 127.174 3.36372ZM109.532 0.871532L122.743 0.871532C123.749 0.871532 124.517 0.16608 124.517-0.840344C124.517-1.77391 123.739-2.50047 122.743-2.50047L109.532-2.50047C108.536-2.50047 107.872-1.77391 107.872-0.840344C107.872 0.217834 108.474 0.871532 109.532 0.871532Z",layoutBox:{viewBox:"0 0 145.67578125 111.1806640625",width:145.67578125,height:111.1806640625,translateX:-1.8170800781249454,translateY:90.8203125,baseline:90.8203125,capline:20.3603515625},glyphBox:{viewBox:"0 0 124.38818359375 89.99609375",width:124.38818359375,height:89.99609375,translateX:-12.460878906249945,translateY:80.22802734375,baseline:80.22802734375,capline:9.76806640625}}})};function tz(){var e=r.createElement(Wc,{onActivate:function(){wZ.sharedInstance.updateAuthenticationState(),ky.sharedInstance.switchToApplication("find",{hash:"",route:void 0})}},r.createElement("img",{className:"push",src:XB,srcSet:XB+", "+JB+" 2x, "+$B+" 3x",width:37,"aria-hidden":"true",alt:""}),r.createElement("div",{className:"title"},Xn("CloudOS.Authentication.QuickAccess.FMIP.Title"))),t=r.createElement(Wc,{onActivate:function(){Jk("manage_applepay")}},r.createElement(ez,{width:47}),r.createElement("div",{className:"title"},Xn("CloudOS.Authentication.QuickAccess.ManageDevices.Title"),r.createElement(Xk,null)));return r.createElement("div",{className:"quick-access"},r.createElement("div",{className:"quick-access-label"},Xn("CloudOS.Authentication.QuickAccess.Title")),r.createElement("div",{className:"quick-access-buttons"},r.createElement("div",{className:"quick-access-button"},e),r.createElement("div",{className:"quick-access-button"},t)))}function nz(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function rz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var iz=function(){function e(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];this.authenticationController=void 0,this.appleIdController=void 0,this.retrieveSessionAtStep=null,this.delegate=null,this.authenticationController=e;var c=i||void 0,u=!(!i||a),l=!!i,d=!i;"number"===typeof o&&(this.retrieveSessionAtStep=o);var p=iu(_r.locale),f=new ea(n,t,p,this,r,c,d,u,l,s);this.appleIdController=f}var t,n,r=e.prototype;return r.appleIdWillStart=function(e,t){var n;null==(n=this.delegate)||n.appleIdWillStart(e,t)},r.getElement=function(){var e,t;return null!=(e=null==(t=this.delegate)?void 0:t.getElement())?e:null},r.appleIdStepDidComplete=function(){var e,t=(e=regeneratorRuntime.mark((function e(t,n,r,i,o,a,s){var c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(c=this.delegate)||c.appleIdStepDidComplete(t,n,r,i,o,a,s),!this.retrieveSessionAtStep){e.next=5;break}this.retrieveSessionAtStep===a&&a<s?this.authenticationController.processSessionRetrieveFinish(n,r,i,o):this.authenticationController.continueAuthentication()&&this.appleIdController.continueAuthentication(),e.next=6;break;case 5:return e.abrupt("return",this.authenticationController.processAuthenticationStep(n,r,i,o,a,s));case 6:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){nz(o,r,i,a,s,"next",e)}function s(e){nz(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e,n,r,i,o,a,s){return t.apply(this,arguments)}}(),r.continueAuthentication=function(){this.appleIdController.continueAuthentication()},r.appleIdModeWillChange=function(e,t){var n;null==(n=this.delegate)||n.appleIdModeWillChange(e,t)},r.appleIdModeDidChange=function(e,t){var n;null==(n=this.delegate)||n.appleIdModeDidChange(e,t)},r.appleIdRepairDidStart=function(e){var t;null==(t=this.delegate)||t.appleIdRepairDidStart(e),this.authenticationController.processRepairDidStart()},r.appleIdDidFinish=function(e,t,n,r,i,o,a){var s;null==(s=this.delegate)||s.appleIdDidFinish(e,t,n,r,i,o,a),this.retrieveSessionAtStep?this.authenticationController.processSessionRetrieveFinish(t,n,r,i):this.authenticationController.processAuthenticationFinish(t,n,r,i,o,a)},r.appleIdDidCancel=function(e,t){var n;null==(n=this.delegate)||n.appleIdDidCancel(e,t)},r.appleIdError=function(e,t,n){this.authenticationController.processAuthenticationError(t,n)},t=e,(n=[{key:"appleIdUIMode",get:function(){return this.appleIdController.appleIdUIMode}}])&&rz(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function oz(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function az(e){var t=e.appleIdUrl,n=e.trustTokens,i=e.applicationIconUrl,o=e.appleId,a=e.atStep,s=e.ignoreForceCRAuth,c=e.pauseBetweenSteps,u=e.appName,l=e.appleIdControllerRef,d=e.isInAppLogin,p=e.isReauthenticateUser,f=e.signInLabel,h=_r.platformType!==m.WINDOWS?VB.LITE:VB.WINDOWS,g=function(){if(h===VB.LITE)return"hasDismissediCloudLiteNotice";if(h===VB.WINDOWS)return"hasDismissediCloudWindowsNotice";throw new Error("Unknown NoticeType value")}(),v=r.useState((function(){return"true"===function(){try{return window.localStorage.getItem(g)}catch(e){return null}}()?null:h!==VB.LITE||_r.configuration.accountCreateEnabled?h:null})),y=v[0],b=v[1],C=r.useState(!1),I=C[0],w=C[1],E=qf(),S=function(){var e=_r.configuration.accountCreateEnabled;return!(void 0===e||!e)&&(!E||!E.isAuthenticated)}(),T=u||f||Xn("CloudOS.Authentication.SignIn.AppleIdView.Title"),O=r.useState(!0),P=O[0],x=O[1],A=r.useState(!1),N=A[0],R=A[1],D=r.useState(!1),k=D[0],U=D[1],L=r.useState(!1),M=L[0],j=L[1],F=r.useState(!1),B=F[0],z=F[1],H=r.useState(!0),W=H[0],V=H[1],Z=r.useRef("idms-auth-"+$n()).current,q=r.useRef(null),K=r.useState("apple-id-frame-value"),G=K[0],Y=K[1],Q=r.useState(!0),X=Q[0],J=Q[1],$=r.useRef(null);r.useEffect((function(){var e=q.current;if(e){b(null);var r=function(){if(h===VB.LITE){b(null);try{window.localStorage.setItem("hasDismissediCloudLiteNotice","true")}catch(e){}}};if(!$.current){var i=new iz(wZ.sharedInstance,Z,t,n,o,a,s,c);i.delegate=new(function(){function t(){}var n=t.prototype;return n.getElement=function(){return e},n.appleIdWillStart=function(e,t){S&&(t?d?(V(!0),z(!1),U(!0)):(V(!1),z(!0)):R(!0))},n.appleIdModeWillChange=function(e,t){R(!1),p&&U(!1),t!==qo.SIGNIN&&(x(!1),Y("no-sign-in-label")),t===qo.INTERSTITIAL&&J(!1),t===qo.FEDERATED&&(J(!0),x(!0))},n.appleIdStepDidComplete=function(){var e,t=(e=regeneratorRuntime.mark((function e(t,n,i,o,a,s,c){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:R(!1),1===s&&(2===c&&(x(!1),Y("no-sign-in-label"),U(!0)),r(),"SA"===i&&j(!0)),s>=2&&(U(!0),j(!0));case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){oz(o,r,i,a,s,"next",e)}function s(e){oz(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e,n,r,i,o,a,s){return t.apply(this,arguments)}}(),n.appleIdDidFinish=function(e,t,n,i,o,a,s){i.dsMethod!==Ho.TIBURON_LOGIN&&U(!0),r()},n.appleIdModeDidChange=function(e,t){var n,r,i,o,a,s;U(!1);var c=!(null==(n=wZ.sharedInstance.cloudOSUser)||!n.details)&&ma(null==(r=wZ.sharedInstance.cloudOSUser)?void 0:r.details),u=null!=(i=null==(o=wZ.sharedInstance.cloudOSUser)||null==(a=o.details)||null==(s=a.beneficiaryInfo)?void 0:s.isBeneficiary)&&i;t!==qo.HSA2||c||u||d?w(!1):w(!0)},n.appleIdRepairDidStart=function(){Y("repair-id-frame"),J(!1),w(!1)},n.appleIdDidCancel=function(e,t){Y("apple-id-frame"),e.appleIdUIMode===qo.REPAIR&&window.location.reload(),t&&(V(!0),U(!1)),U(!1),z(!1)},n.appleIdError=function(){},t}()),$.current=i}}}),[Z,h,S,$,u,o,t,i,a,s,c,n,d,p]),r.useEffect((function(){return l&&(l.current=$.current),function(){l&&(l.current=null)}}),[l,$]);var ee=r.useRef(null);return r.useLayoutEffect((function(){var e=ee.current,t=function(){V(!0)},n=function(e){wZ.sharedInstance.createAccount(t),V(!1),e.preventDefault()};return null==e||e.addEventListener("click",n),function(){null==e||e.removeEventListener("click",n)}}),[N]),r.createElement("div",{className:Ts()("home-login-component",{"has-visible-quick-access":I&&!d,"in-app-login":d})},y&&r.createElement("div",{className:"notice-container"},r.createElement(YB,{noticeType:y,onLiteSubtitleClick:function(){fr.sharedInstance.recordStat(new ur("liteAccountCreationNoticeClickedStat")),wZ.sharedInstance.createAccount()},onClose:function(){return function(){b(null);var e=g;try{window.localStorage.setItem(e,"true")}catch(t){}}()}})),B&&r.createElement(dM,{description:Xn("CloudOS.LoginSpinner.Description")}),r.createElement("div",{className:Ts()("parent-container",{"has-visible-quick-access":!B&&I&&!d,"is-visible":!B&&W,"is-icon-not-visible":!B&&!X})},d&&!M||p&&_.sharedInstance.isTouch?r.createElement("div",{className:"header-view"},r.createElement(Wc,{onActivate:function(){var e,t=null==(e=$.current)?void 0:e.appleIdUIMode;t!==qo.REPAIR&&t!==qo.HSA2||window.location.reload(),wZ.sharedInstance.cancelUserAuthenticate()},className:"cancel-button"},Xn("CloudOS.Button.Cancel.Title"))):null,k&&r.createElement(dM,{description:Xn("CloudOS.LoginSpinner.Description")}),r.createElement("div",{style:{visibility:k?"hidden":"visible",height:k?"0px":"auto"}},W&&X&&r.createElement("div",{className:"widget-icon-text"},r.createElement("img",{className:"icon",draggable:"false",alt:"","aria-hidden":!0,src:i}),P&&r.createElement("div",{className:"sign-in-label"},T)),r.createElement("div",{id:Z,ref:q,className:Ts()("apple-id-container",G)}),N&&r.createElement("div",{className:"create"},r.createElement("a",{target:"_blank",rel:"noreferrer",href:" ",className:"unstyled-link","aria-label":"Create",ref:ee},Xn("CloudOS.LegalFooterView.Text.Fragment.CreateAccount.Title"))),!d&&I&&r.createElement("div",{className:"quick-access-container"},r.createElement(tz,null)))),e.legalFooter&&r.createElement(e.legalFooter,null))}function sz(e){var t=Im(),n=function(){var e,t,n,i=r.useState(null!=(e=null==(t=wZ.sharedInstance.cloudOSUser)||null==(n=t.details)?void 0:n.completedAuthenticationStep)?e:null),o=i[0],a=i[1],s=Gf();return r.useEffect((function(){var e;a(null!=(e=null==s?void 0:s.completedAuthenticationStep)?e:null)}),[s]),r.useEffect((function(){var e={authenticationStepsDidChange:function(){var e;a(null!=(e=null==s?void 0:s.completedAuthenticationStep)?e:null)}};return wZ.sharedInstance.authenticationStepObservers.add(e),function(){wZ.sharedInstance.authenticationStepObservers.delete(e)}}),[s]),r.useDebugValue(o),o}(),i=!t.isProduction&&bZ.sharedInstance.showEnvironmentInfo&&(null===n||0===n);return r.createElement(r.Fragment,null,i&&r.createElement(Wc,{variant:"environment-sash",onActivate:e.onActivate,className:"environment-sash"},t.environment," -"," ",_r.masteringNumber))}n(1238),n(1239);var cz=1;function uz(e){var t,n=r.useRef("alert-m-"+cz++).current,i=r.useRef("alert-d-"+cz++).current;return r.createElement("div",{className:"cloudos-alert"},r.createElement("div",{className:"main-container"},r.createElement("div",{className:"alert-main-content"},r.createElement("div",{className:"alert-icon "+(null!=(t=e.iconClass)?t:"icloud-icon")}),r.createElement("div",{className:"alert-text-container"},r.createElement("h1",{id:n,className:"message",tabIndex:0},e.message),r.createElement("p",{id:i,className:"description",tabIndex:0},e.description)))),r.createElement("div",{className:"alert-button-container"},e.otherButton&&r.createElement(Wc,{variant:"cloudos-alert-button",onActivate:e.otherButton.onActivate},e.otherButton.title),r.createElement("div",{style:{flex:1}}),e.alternateButton&&r.createElement(r.Fragment,null,r.createElement(Wc,{variant:"cloudos-alert-button",onActivate:e.alternateButton.onActivate},e.alternateButton.title),r.createElement("div",{className:"cloudos-alert-button-divider"})),r.createElement(Wc,{variant:"cloudos-alert-button primary",onActivate:e.primaryButton.onActivate},e.primaryButton.title)))}function lz(e){var t=Ne.sharedInstance.isDomainCN?Xn("AutoUpdate.Domain.icloud.com.cn"):Xn("AutoUpdate.Domain.icloud.com");return r.createElement(uz,{message:Xn("AutoUpdate.Title",{currentDomain:t}),description:Xn("AutoUpdate.Description"),primaryButton:{title:Xn("AutoUpdate.Reload"),onActivate:function(){return e.onAutoUpdateReload()}},alternateButton:{title:Xn("AutoUpdate.Later"),onActivate:function(){return e.onAutoUpdateIgnore()}}})}var dz=n(1240);function pz(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function fz(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){pz(o,r,i,a,s,"next",e)}function s(e){pz(o,r,i,a,s,"throw",e)}a(void 0)}))}}var hz=Nn.object({buildNumber:Nn.string(),autoUpdate:Nn.number()});function mz(e){return hz.safeParse(e).success}function gz(){return(gz=fz(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=regeneratorRuntime.mark((function e(){var n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xo(18e5);case 2:return n="https://"+window.location.hostname+"/system/icloud.com/current/build.json",e.next=5,es.fetchURL(n);case 5:if(null!=(r=e.sent)&&r.ok){e.next=8;break}return e.abrupt("return","continue");case 8:return e.next=10,fz(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.json();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))();case 10:if(mz(i=e.sent)){e.next=13;break}return e.abrupt("return","continue");case 13:if(o=i.buildNumber,__CW_BUILD_INFO.buildNumber!==o){e.next=16;break}return e.abrupt("return","continue");case 16:if(function(){try{return window.localStorage.getItem("didReloadToBuild")}catch(e){return null}}()!==o){e.next=19;break}return e.abrupt("return","continue");case 19:a=i.autoUpdate,e.t0=a,e.next=e.t0===dz.d?23:e.t0===dz.b?25:e.t0===dz.a?28:(e.t0,dz.c,33);break;case 23:return t(o),e.abrupt("break",34);case 25:try{window.localStorage.setItem("didReloadToBuild",o)}catch(s){}return window.location.reload(),e.abrupt("break",34);case 28:return e.next=30,Xo(30*Math.random()*6e4);case 30:try{window.localStorage.setItem("didReloadToBuild",o)}catch(c){}return window.location.reload(),e.abrupt("break",34);case 33:return e.abrupt("break",34);case 34:case"end":return e.stop()}}),e)}));case 1:return e.delegateYield(n(),"t0",3);case 3:if("continue"!==e.t0){e.next=6;break}return e.abrupt("continue",1);case 6:e.next=1;break;case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vz(){var e=qp();return function(t,n){e(t,Object.assign({animates:Fp.IN,className:"show-modal-pane-centered"},n))}}n(1241);var yz=1;function bz(e){var t=e.to,n=r.useRef([]),i=Object(Vc.a)(),o=r.useMemo((function(){if(t)return{key:yz++,element:t,isCurrent:!0}}),[t]),a=Em(o);if(a!==o&&a){var s=Object.assign({},a,{isCurrent:!1});n.current=[].concat(n.current,[s]),setTimeout((function(){n.current=n.current.filter((function(e){return e!==s})),i()}),500)}var c=o?[].concat(n.current,[o]):n.current;return r.createElement("div",{className:"notification-presenter"},c.map((function(e){var t=e.element,n=e.key,i=e.isCurrent;return r.cloneElement(t,{className:Ts()(t.props.className,i?"slide-in":"slide-out"),key:n,ariaHidden:!i})})))}function _z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(1242);var Cz=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"folder.fill.badge.person.crop",svgPath:"M118.945-32.1777C132.373-32.1777 143.75-43.4082 143.75-56.9824C143.75-70.5566 132.52-81.7871 118.945-81.7871C105.322-81.7871 94.1406-70.5566 94.1406-56.9824C94.1406-43.3105 105.322-32.1777 118.945-32.1777ZM12.4512-52.4414L88.2324-52.4414C88.0371-53.7109 87.8418-55.0293 87.8418-56.4453C87.8418-61.377 89.0137-66.6992 91.3086-71.2891L61.1328-71.2891C57.8125-71.2891 55.8105-72.0703 53.3691-74.1699L50.3906-76.6113C47.168-79.3457 44.6777-80.2246 39.8438-80.2246L25.9277-80.2246C17.3828-80.2246 12.4512-75.3418 12.4512-65.5273ZM118.896-55.5176C114.404-55.5176 110.986-59.2285 110.986-64.3066C110.986-68.8477 114.453-72.7051 118.896-72.7051C123.389-72.7051 126.904-68.8477 126.904-64.3066C126.904-59.2285 123.389-55.5176 118.896-55.5176ZM118.945-37.8906C111.816-37.8906 106.201-41.5527 104.59-44.9219L104.59-45.166C106.201-48.1934 111.182-51.5625 118.945-51.5625C126.709-51.5625 131.689-48.1934 133.252-45.1172L133.252-44.9219C131.641-41.5039 126.074-37.8906 118.945-37.8906ZM27.7832 9.13086L109.473 9.13086C118.213 9.13086 123.34 4.05273 123.34-6.00586L123.34-25.6836C122.07-25.5371 120.85-25.4883 119.629-25.4883C106.152-25.4883 94.4824-33.4961 89.7949-46.0449L12.4512-46.0449L12.4512-6.00586C12.4512 4.10156 17.5781 9.13086 27.7832 9.13086Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:66.1151000976563,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 151.7099609375 93.1142578125",width:151.7099609375,height:93.1142578125,translateX:7.9600097656250455,translateY:81.787109375,baseline:81.787109375,capline:11.3271484375}}})},Iz=function(e){switch(e){case"key":case"numbers":case"pages":return{width:36,height:40,viewBox:"0 0 18 20"};case"pptx":case"ppt":case"xlsx":case"xls":case"xlam":case"docx":case"doc":return{width:40,height:40,viewBox:"0 0 20 20"};case"jpg":case"jpeg":case"png":case"gif":case"tiff":case"tif":case"bmp":return{width:48,height:36,viewBox:"0 0 24 18"};case"aac":case"wav":case"m4a":case"m4p":case"aiff":case"midi":case"wave":case"mp3":return{width:36,height:40,viewBox:"0 0 22 24"};case"mp4":case"m4v":case"mov":return{width:44,height:36,viewBox:"0 0 22 18"};case"pdf":case"zip":default:return{width:32,height:40,viewBox:"0 0 16 20"}}},wz=function(e){switch(e){case"key":return gc("Drive.Icon.Description.Key");case"numbers":return gc("Drive.Icon.Description.Numbers");case"pages":return gc("Drive.Icon.Description.Pages");case"pptx":case"ppt":return gc("Drive.Icon.Description.PowerPoint");case"xlsx":case"xls":case"xlam":return gc("Drive.Icon.Description.Excel");case"docx":case"doc":return gc("Drive.Icon.Description.Word");case"jpg":case"jpeg":case"png":case"gif":case"tiff":case"tif":case"bmp":return gc("Drive.Icon.Description.Image",{fileExtension:e.toUpperCase()});case"aac":case"wav":case"m4a":case"m4p":case"aiff":case"midi":case"wave":case"mp3":return gc("Drive.Icon.Description.Audio",{fileExtension:e.toUpperCase()});case"mp4":case"m4v":case"mov":return gc("Drive.Icon.Description.Video",{fileExtension:e.toUpperCase()});case"zip":return gc("Drive.Icon.Description.Archive");case"pdf":return gc("Drive.Icon.Description.Pdf");case"folder":return gc("ShareAcceptancePage.User.Description.Folder.Name");default:return gc("Drive.Icon.Description.Default")}};function Ez(e,t){var n=t.controlledKey,r=t.uncontrolledKey;if(void 0===e[n])return!1;if(void 0===e[r])return!0;throw new TypeError("You provided conflicting props `"+n+"` and `"+r+"` to the same component. You may only provide one.")}function Sz(e,t,n){for(var r=[],i=n.length,o=0;o<i;o++){var a=n[o];e[a]!==t[a]&&r.push(a)}return r}function Tz(e,t,n){var r=Object.assign({},t);return n.forEach((function(t){if(Ez(e,t)){var n=t.controlledKey;r[n]=e[n]}})),r}var Oz=i.a.createContext(null);function Pz(e){var t=e.children,n=e.onStateChange,o=e.disabled,a=e.form,s=e.required,c=e.id,u=e.style,l=e.variant,d=e.className,p=e.tabIndex,f=e.name,h=Object(r.useState)(void 0),m=h[0],g=h[1],v=Object(r.useState)((function(){return kc()}))[0],y=null!=f?f:v;return i.a.createElement(Oz.Provider,{value:{form:a,name:y,required:s,disabled:o,checkedRadioButton:m,hasOnStateChangeHandler:!!n,notifyChangeToUIRadioGroup:function(t,n){g((function(r){return function(e,t){var n=t.onStateChange,r=e.state,i=e.changedKeys;n&&i.length>0&&n(r,i)}({state:{value:n},changedKeys:r!==t?["value"]:[]},e),t}))},initialRadioButtonValue:g}},i.a.createElement("ui-radio-group",{id:c,style:u,"aria-disabled":o,"aria-required":s,class:Ts()(d,l),tabindex:p,role:"radiogroup"},t))}function xz(e,t){return void 0!==e?e:t}var Az=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.routeInboundMessage=function(e){Rz(e,[[Dz(Oc),function(e){var n=e.payload;return t.onLabelId(n)}],[Dz(Pc),function(e){var n=e.payload;return t.onActivationStart(n)}],[Dz(xc),function(e){var n=e.payload;return t.onActivationEnd(n)}],[Dz(Ac),function(e){var n=e.payload;return t.onActivationComplete(n)}],[Dz(Nc),function(e){var n=e.payload;return t.onActivationCancel(n)}]])},t}return Az(t,e),Object.defineProperty(t,"messageTransmitter",{get:function(){return Lc.messageTransmitter},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.subscribe(this.props.id)},t.prototype.componentDidUpdate=function(e,t){var n=e.id,r=this.props.id;n!==r&&(this.unsubscribe(n),this.subscribe(r))},t.prototype.componentWillUnmount=function(){this.unsubscribe(this.props.id)},Object.defineProperty(t.prototype,"messageTransmitter",{get:function(){return t.messageTransmitter},enumerable:!0,configurable:!0}),t.prototype.subscribe=function(e){e&&this.messageTransmitter.registerComponent(e,this.routeInboundMessage)},t.prototype.unsubscribe=function(e){e&&this.messageTransmitter.unregisterComponent(e,this.routeInboundMessage)},t.prototype.onActivationStart=function(e){},t.prototype.onActivationEnd=function(e){},t.prototype.onActivationComplete=function(e){},t.prototype.onActivationCancel=function(e){},t}(r.Component);function Rz(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(o(e))return a(e)}}function Dz(e){return function(t){return t instanceof e}}n(1244);var kz=["styles"];function Uz(){return(Uz=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Lz=function(e){var t=e.styles,n=void 0===t?{}:t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,kz);return i.a.createElement("svg",Uz({className:n.icon||"icon",viewBox:"0 0 28 28"},r),i.a.createElement("circle",{className:n.shadow||"shadow",cx:"14",cy:"16",r:"14"}),i.a.createElement("circle",{className:n.border||"border",cx:"14",cy:"14",r:"14"}),i.a.createElement("circle",{className:n.background||"background",cx:"14",cy:"14",r:"12"}),i.a.createElement("circle",{className:(n.background||"background")+" "+(n.hdpr||"hdpr"),cx:"14",cy:"14",r:"13"}),i.a.createElement("circle",{className:n.dot||"dot",cx:"14",cy:"14",r:"6"}))},Mz=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jz=function(){return(jz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Fz=function(e){function t(t){var n=e.call(this,t)||this;n.onActivate=function(){n.inputRef.current.click()},n.onInputChange=function(e){var t=e.currentTarget.checked;n.toggleOn((function(){return{checked:t}})),n.props.onChange&&n.props.onChange(e)},n.inputRef=r.createRef(),n.validateAllControllableProps=function(){void 0===n.props.checked||null==n.context||n.context.hasOnStateChangeHandler||n.props.onChange||console.warn("You're controlling a UIRadioButton by passing the 'checked' but you're not passing a callback to it or the UIRadioGroup surrounding that component, making the radio button read-only which is probably not what you want. If you meant to set a default value on the radio button, use the 'defaultChecked' prop.")},n.toggleOn=function(e){if(!n.computeApparentState().checked&&(function(e,t,n){var r,i,o,a;r=this,i=void 0,a=function(){var r,i,o,a;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(s){for(r=t.length,i=[],o=0;o<r;o++)a=t[o],Ez(e.props,a)||i.push(a);return[2,new Promise((function(r,o){var a=t.map((function(e){return e.controlledKey}));if(i.length>0){var s,c;e.setState((function(e,r){c=Tz(r,e,t),s=Object.assign({},c,n(c,r));var o=Object.assign({},e);return i.forEach((function(e){var t=e.controlledKey;o[t]=s[t]})),o}),(function(){var e=Sz(c,s,a);r({state:s,changedKeys:e})}))}else{var u=e.state,l=e.props,d=Tz(l,u,t),p=Object.assign({},d,n(d,l)),f=Sz(d,p,a);r({state:p,changedKeys:f})}}))]}))},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{c(a.next(e))}catch(n){t(n)}}function s(e){try{c(a.throw(e))}catch(n){t(n)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}c((a=a.apply(r,i||[])).next())}))}(n,[{controlledKey:"checked",uncontrolledKey:"defaultChecked",callbackKeys:[]}],e),null!=n.context)){var t=n.propsPlusContextStuff().value;n.context.notifyChangeToUIRadioGroup(n.internalId,t)}},n.computeApparentState=function(){return null!=n.props.checked?jz(jz({},n.state),{checked:n.props.checked}):null!=n.context&&null!=n.context.checkedRadioButton?jz(jz({},n.state),{checked:n.context.checkedRadioButton===n.internalId}):n.state},n.propsPlusContextStuff=function(){var e,t=n.context,r=jz(jz({},n.props),{form:void 0,required:void 0,variant:xz(n.props.variant,"standard")});return null==t?r:jz(jz({},r),{name:null!==(e=t.name)&&void 0!==e?e:r.name,form:t.form,required:xz(r.required,t.required),disabled:xz(t.disabled,r.disabled)})},n.onLabelId=function(e){n.setState({labelId:e})},n.onActivationStart=function(){!0!==n.propsPlusContextStuff().disabled&&n.setState({active:!0})},n.onActivationEnd=function(){!0!==n.propsPlusContextStuff().disabled&&n.setState({active:!1})},n.onActivationCancel=function(){!0!==n.propsPlusContextStuff().disabled&&n.setState({active:!1})};var i=void 0!==t.checked?t.checked:void 0!==t.defaultChecked&&t.defaultChecked;return n.state={checked:i},n.internalId=kc(),n}return Mz(t,e),t.prototype.componentDidMount=function(){var t;e.prototype.componentDidMount.call(this),this.validateAllControllableProps(),this.computeApparentState().checked&&(null===(t=this.context)||void 0===t||t.initialRadioButtonValue(this.internalId))},t.prototype.render=function(){this.validateAllControllableProps();var e=this.computeApparentState(),t=e.checked,n=e.active,i=e.labelId,o=this.propsPlusContextStuff(),a=o.name,s=o.form,c=o.value,u=o.children,l=o.variant,d=o.inputId,p=o.required,f=o.disabled,h=o.id,m=o.style,g=o.className,v=o.tabIndex,y=o.onInvalid,b=o.radioButtonAsset,_=o.ariaLabel,C=zc(jz(jz({active:n,disabled:f,className:g},o.hasOwnProperty("tabIndex")?{tabIndex:v}:{}),{onActivate:this.onActivate,onActivationStart:this.onActivationStart,onActivationEnd:this.onActivationEnd,onActivationCancel:this.onActivationCancel,variant:l}));return r.createElement("ui-radio-button",jz({},C,{id:h,style:m,role:"radio","aria-label":_,"aria-labelledby":_?void 0:i,"aria-required":p,"aria-checked":t}),r.createElement("input",{type:"radio",ref:this.inputRef,id:d,tabIndex:-1,checked:t,name:a,value:c,disabled:f,form:s,"aria-hidden":!0,required:p,onChange:this.onInputChange,onInvalid:y}),b||r.createElement(Lz,null),u)},t.prototype.onActivationComplete=function(){!0!==this.propsPlusContextStuff().disabled&&this.inputRef.current.click()},t}(Nz);Fz.contextType=Oz,n(1243);var Bz=function(e){var t,n,i=e.titleId,o=e.participants,a=e.onCancelSelected,s=e.onVerifySelected,c=r.useRef(null!=(t=null==(n=o[0])?void 0:n.id)?t:"");return r.createElement("div",{className:"veriy-access-list-modal"},r.createElement("div",{className:"icon"},r.createElement(Ih,null)),r.createElement("div",{className:"content"},r.createElement("h2",{className:"title","data-testid":"title",id:i},gc("ShareAcceptancePage.EmailVerificationDialog.Title")),r.createElement("div",{className:"description","data-testid":"description"},gc("ShareAcceptancePage.EmailVerificationDialog.Content")," "),r.createElement("div",{className:"participants-list"},r.createElement(Pz,{name:"participants",onStateChange:function(e){e.value&&(c.current=e.value.toString())}},o.map((function(e,t){return r.createElement("div",{className:"list-row",key:e.id},r.createElement(Fz,{id:e.id,value:e.id,defaultChecked:0===t}),r.createElement(Lc,{htmlFor:e.id},e.emailAddress||e.phoneNumber))}))))),r.createElement("div",{className:"actions"},r.createElement(Wc,{variant:"block secondary",onActivate:a},gc("ShareAcceptancePage.EmailVerificationDialog.Buttons.Cancel")),r.createElement(Wc,{variant:"block primary",onActivate:function(){return s(c.current)}},gc("ShareAcceptancePage.EmailVerificationDialog.Buttons.Verify"))))};function zz(){return(zz=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Hz(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}var Wz=function(e){var t,n,i=e.outOfNetworkParticipantList,o=qf(),a=r.useRef(!1),s=r.useState(!1),c=s[0],u=s[1],l=r.useRef(),d=r.useRef(Iy.NetworkError),p=function(e,t){var n=wh();return function(){return n({title:gc("ShareAcceptancePage.VerifyAccessDialog.Title"),description:gc("ShareAcceptancePage.VerifyAccessDialog.Content",{sharer:e}),buttons:[{title:gc("ShareAcceptancePage.VerifyAccessDialog.Buttons.Continue"),action:"continue"},{title:gc("ShareAcceptancePage.VerifyAccessDialog.Buttons.NotNow"),action:"notNow"}],defaultAction:"continue",cancelAction:"notNow",onActionSelected:t})}}(null!=(t=null==o||null==(n=o.details)?void 0:n.appleId)?t:"",(function(e){"notNow"===e?Oy.sharedInstance.declineShare():g()})),f=function(e,t){var n=wh();return function(){return n({title:gc("ShareAcceptancePage.EmailVerificationSentDialog.Title"),description:gc(e()?"ShareAcceptancePage.EmailVerificationSentDialog.Content.Email":"ShareAcceptancePage.EmailVerificationSentDialog.Content.Message"),buttons:[{title:gc("ShareAcceptancePage.EmailVerificationSentDialog.Buttons.Ok"),action:"ok"}],defaultAction:"ok",onActionSelected:t})}}((function(){var e;return!(null==(e=l.current)||!e.emailAddress)}),(function(){YV.cloudOSApplication.switchToSpringboard()})),h=function(e,t,n){var r=wh();return function(){var e;return r({title:gc("CloudOS.OutOfNetworkAcceptance.Error.Title"),description:d.current===Iy.VettingError&&t()?gc("CloudOS.OutOfNetworkAcceptance.PhoneVettedError.Description",{phoneNumber:null!=(e=t())?e:""}):gc("CloudOS.OutOfNetworkAcceptance.Error.Description"),buttons:[{title:gc("ShareAcceptancePage.EmailVerificationSentDialog.Buttons.Ok"),action:"ok"}],defaultAction:"ok",onActionSelected:n})}}(0,(function(){var e;return null==(e=l.current)?void 0:e.phoneNumber}),(function(){YV.cloudOSApplication.switchToSpringboard()})),m=function(e){var t=ch(r.createElement(Bz,zz({},e,{titleId:"verify-access-list-modal-title"})),{paneType:of.Modal,ariaLabelledBy:"verify-access-list-modal-title"});return[t[0],t[1]]}({participants:i,onCancelSelected:function(){v(),Oy.sharedInstance.declineShare()},onVerifySelected:function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=Oy.sharedInstance).currentShareRecord instanceof wy){e.next=3;break}throw new Error("Expected ShareRecord instance");case 3:return v(),u(!0),i.forEach((function(e){e.id===t&&(l.current=e)})),e.next=8,n.sendVerificationLink(n.currentShareRecord.shortGuid,t);case 8:r=e.sent,u(!1),r.ok?f():(d.current=r.error,h());case 11:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Hz(o,r,i,a,s,"next",e)}function s(e){Hz(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}()}),g=m[0],v=m[1];return r.useEffect((function(){a.current||(p(),a.current=!0)}),[p]),r.createElement(r.Fragment,null,c?r.createElement("div",null,r.createElement(dM,{description:gc("CloudOS.LoginSpinner.Description")})):null)};function Vz(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function Zz(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Vz(o,r,i,a,s,"next",e)}function s(e){Vz(o,r,i,a,s,"throw",e)}a(void 0)}))}}function qz(){return(qz=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Kz(e,t){switch(e){case tl.identifier:return gc("ShareAcceptancePage.User.Description.Document",{displayName:t});case Hu.identifier:return gc("ShareAcceptancePage.User.Description.Keynote",{displayName:t});case $u.identifier:return gc("ShareAcceptancePage.User.Description.Numbers",{displayName:t});default:Aw(e)}}var Gz=function(e){var t,n,i,o=e.className,a=e.shareInfo,s=e.isAuthenticated,c=e.onSignInPressed,u=r.useState(!1),l=u[0],d=u[1],p=Ts()("share-acceptance-page",o,{"spinner-view":l}),f=gc("ShareAcceptancePage.Title"),h=function(e){var t=e.applicationIdentifier,n=e.fileExtension,i=e.displayName,o=e.isFolderSharing,a=!0,s=o?"folder":n;if(o){var c=bZ.sharedInstance.applicationParameter,u=c.isMac,l=c.isIOS,d=c.osMajorVersion,p=c.osMinorVersion,f=c.osMicroVersion;a=u&&10===d&&(p>15||15===p&&f>=4)||l&&(d>13||13===d&&p>=4)}switch(t){case Ou.identifier:return{sharingDescription:gc("ShareAcceptancePage.User.Description.Calendar",{displayName:i}),icon:r.createElement(Sd,{applicationIdentifier:t,iconSize:40}),itemDescription:gc("ShareAcceptancePage.User.Description.Calendar.Name"),acceptDescription:gc("ShareAcceptancePage.Accept.Description.Calendar")};case cl.identifier:return{sharingDescription:gc("ShareAcceptancePage.User.Description.RemindersList",{displayName:i}),icon:r.createElement(Sd,{applicationIdentifier:t,iconSize:40}),itemDescription:gc("ShareAcceptancePage.User.Description.Reminders.Name"),acceptDescription:gc("ShareAcceptancePage.Accept.Description.RemindersList")};case Xu.identifier:return{sharingDescription:gc("ShareAcceptancePage.User.Description.Note",{displayName:i}),icon:r.createElement(Sd,{applicationIdentifier:t,iconSize:40}),itemDescription:gc("ShareAcceptancePage.User.Description.Note.Name"),acceptDescription:gc("ShareAcceptancePage.Accept.Description.Note")};case tl.identifier:case Hu.identifier:case $u.identifier:return{sharingDescription:Kz(t,i),icon:r.createElement(Sd,{applicationIdentifier:t,iconSize:40}),itemDescription:gc("ShareAcceptancePage.User.Description.iWorks.Name",{appName:Bw(t)}),acceptDescription:gc("ShareAcceptancePage.Accept.Description.Document")};case Du.identifier:return{sharingDescription:o?gc("ShareAcceptancePage.User.Description.Folder",{displayName:i}):gc("ShareAcceptancePage.User.Description.DriveFile",{displayName:i,fileExtension:s}),icon:o?r.createElement(Cz,{width:40,height:40,layoutMode:"glyphBox",fill:"#32ADE6"}):r.createElement(_w,qz({fileExtension:s},Iz(s))),itemDescription:wz(s),acceptDescription:gc(o?a?"ShareAcceptancePage.Accept.Description.Folder":"ShareAcceptancePage.Accept.Description.Folder.UnsupportedDevices":"ShareAcceptancePage.Accept.Description.Document")};default:Aw(t)}}(a),m=h.sharingDescription,g=h.icon,v=h.itemDescription,y=h.acceptDescription,b=gc("ShareAcceptancePage.Button.Accept"),_=gc("ShareAcceptancePage.Button.NotNow");function C(){s?(d(!0),Oy.sharedInstance.acceptShare(s)):null==c||c()}function I(){return(I=Zz(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new lE(" ","icloud-content.com"),!a.isPackage){e.next=14;break}if(a.shortGuid&&a.databaseScope){e.next=4;break}throw new Error("Could not created validated download url");case 4:return e.next=6,tE.packageUrlFromShortToken(a.shortGuid,a.databaseScope);case 6:if(!((n=e.sent)instanceof tE)){e.next=11;break}t.download(n),e.next=12;break;case 11:throw new Error("Could not created validated download url");case 12:e.next=18;break;case 14:if(a.downloadURL){e.next=16;break}throw new Error("Invalid download URL");case 16:r=new tE(a.downloadURL," "),t.download(r);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var w=qf();return a.outOfNetworkParticipantList&&a.outOfNetworkParticipantList.length>0?r.createElement(Wz,{outOfNetworkParticipantList:a.outOfNetworkParticipantList}):r.createElement("div",{className:p},l?r.createElement("div",null,r.createElement(dM,{description:gc("CloudOS.LoginSpinner.Description")})):r.createElement("div",{className:"share-contant-container"},r.createElement("div",{className:"header-section"},r.createElement(xB,{className:"header-image",width:60,height:60,layoutMode:"glyphBox"}),r.createElement("h2",null,f),r.createElement("p",null,s?m:gc("ShareAcceptancePage.Public.Sharing.Description",{displayName:a.displayName})),r.createElement("div",{className:"sharing-details"},g,r.createElement("div",{className:"sharing-title"},a.shareTitle),r.createElement("div",{className:"sharing-item-description"},v))),r.createElement("div",{className:"bottom-section"},s?r.createElement(r.Fragment,null,r.createElement("div",{className:"buttons-row"},r.createElement(Wc,{onActivate:function(){Oy.sharedInstance.declineShare()},className:"not-now-button",ariaLabel:gc("ShareAcceptancePage.Button.NotNow.AriaLabel"),variant:"block secondary"},_),r.createElement(Wc,{onActivate:C,className:"accept-button",ariaLabel:gc("ShareAcceptancePage.Button.Accept.AriaLabel"),variant:"block primary"},b)),r.createElement("p",{className:"join-name"},gc("ShareAcceptancePage.Description.Private",{userName:Fw(null==w||null==(t=w.details)?void 0:t.firstName,null==w||null==(n=w.details)?void 0:n.lastName,!0),shareeId:null!=(i=null==w?void 0:w.primaryEmail)?i:""})),r.createElement("p",{className:"accept-description"},y)):r.createElement(r.Fragment,null,r.createElement("div",{className:"buttons-row"},a.isFolderSharing?null:r.createElement(Wc,{onActivate:function(){return I.apply(this,arguments)},ariaLabel:gc("ShareAcceptancePage.Button.Download.AriaLabel"),variant:"block secondary"},gc("ShareAcceptancePage.Button.Download")),r.createElement(Wc,{onActivate:C,ariaLabel:gc("ShareAcceptancePage.Button.Add.iCloud.Drive"),variant:"block primary"},gc("ShareAcceptancePage.Button.Add.iCloud.Drive"))),r.createElement("p",{className:"download-add-description"},gc(a.isFolderSharing?"ShareAcceptancePage.Description.Public.Folder":"ShareAcceptancePage.Description.Public"))))))},Yz=(n(1245),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"arrow.up.forward",svgPath:"M84.5703-17.334L84.5215-66.4551C84.5215-69.2383 82.7148-71.1914 79.7852-71.1914L30.6641-71.1914C27.9297-71.1914 26.0742-69.0918 26.0742-66.748C26.0742-64.4043 28.1738-62.4023 30.4688-62.4023L47.4609-62.4023L71.2891-63.1836L62.207-55.2246L13.8184-6.73828C12.9395-5.85938 12.4512-4.73633 12.4512-3.66211C12.4512-1.31836 14.5508 0.878906 16.9922 0.878906C18.1152 0.878906 19.1895 0.488281 20.0684-0.439453L68.5547-48.877L76.6113-58.0078L75.7324-35.2051L75.7324-17.1387C75.7324-14.8438 77.7344-12.6953 80.127-12.6953C82.4707-12.6953 84.5703-14.6973 84.5703-17.334Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:85.49510009765618,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 72.127685546875 72.2177734375",width:72.127685546875,height:72.2177734375,translateX:-12.451127929687573,translateY:71.3388671875,baseline:71.3388671875,capline:.87890625}}})}),Qz=(n(1246),function(e){var t=Ts()("wallpaper",e.className);return r.createElement("picture",{className:t},r.createElement("source",{type:"image/webp",srcSet:"/system/icloud.com/current/static/wallpaper.webp"}),r.createElement("img",{src:"/system/icloud.com/current/static/wallpaper.jpeg",alt:"","aria-hidden":"true"}))}),Xz=function(e){var t=Yf(),n=Ts()("plan-card",e.className,t),i=wA().storageUsage,o=function(e){switch(e){case zf.Lite:return{title:gc("AccountPage.PlanCard.WebOnly.Title"),description:gc("AccountPage.PlanCard.WebOnly.Description"),links:[eZ.plan,eZ.storage]};case zf.Standard:return{title:gc("AccountPage.PlanCard.iCloud.Title"),links:[eZ.plan,eZ.storage]};case zf.Plus:return{title:gc("AccountPage.PlanCard.iCloud+.Title"),links:[eZ.plan,eZ.storage,eZ.icloudplus]};default:Aw(e)}}(t);return r.createElement("article",{"aria-label":gc("VoiceOver.AccountPage.PlanCard"),className:n},r.createElement(Qz,{className:"shadow"}),r.createElement(Qz,null),r.createElement("div",{className:"plan-card-content"},r.createElement("div",{className:"plan-card-title"},o.title),o.description&&r.createElement("div",{className:"plan-card-description"},o.description),r.createElement("div",{className:"plan-card-info"},r.createElement("div",{className:"plan-card-links"},o.links.map((function(e){var t=e===eZ.plan?gc("AccountPage.PlanCard.Plan.Link.Name"):e===eZ.storage?gc("AccountPage.PlanCard.Storage.Link.Name"):e===eZ.icloudplus?gc("AccountPage.PlanCard.iCloud+.Link.Name"):void Aw(e);return r.createElement("div",{key:t,className:"link"},r.createElement(aZ,{to:e,name:t},t,r.createElement(vT,{layoutMode:"glyphBox",desiredFontSize:12})))}))),i?r.createElement("div",{className:"quota"},xw(i.totalBytes,0)):null)))},Jz=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"hand.raised",svgPath:"M57.5684 15.4785C74.707 15.4785 86.8164 6.20117 93.3105-12.1094L101.904-36.2793C102.49-37.9395 102.783-39.5508 102.783-41.0156C102.783-46.1914 98.877-49.8047 93.8965-49.8047C90.5273-49.8047 87.5-47.8027 85.8398-43.9453L82.666-36.1328C82.5684-35.9375 82.4219-35.791 82.2266-35.791C81.9824-35.791 81.8848-35.9863 81.8848-36.2305L81.8848-75.3906C81.8848-81.1035 78.3203-84.7168 72.8516-84.7168C70.8496-84.7168 69.043-83.9844 67.6758-82.7148C67.041-87.7441 63.8184-90.8203 58.9844-90.8203C54.248-90.8203 50.9277-87.6465 50.1953-82.8125C48.9746-84.0332 47.2168-84.7168 45.459-84.7168C40.3809-84.7168 37.0117-81.1523 37.0117-75.7324L37.0117-70.3125C35.6934-71.6797 33.6914-72.4121 31.6406-72.4121C26.5625-72.4121 23.0469-68.7012 23.0469-63.1836L23.0469-21.2402C23.0469 1.61133 36.9141 15.4785 57.5684 15.4785ZM57.3242 8.74023C40.0391 8.74023 29.4922-2.39258 29.4922-22.0215L29.4922-62.5C29.4922-64.5996 30.8105-66.0156 32.8613-66.0156C34.8633-66.0156 36.3281-64.5996 36.3281-62.5L36.3281-37.5488C36.3281-35.7422 37.793-34.5215 39.3555-34.5215C41.0156-34.5215 42.5293-35.7422 42.5293-37.5488L42.5293-74.8535C42.5293-76.9531 43.8477-78.418 45.8496-78.418C47.9004-78.418 49.3164-76.9531 49.3164-74.8535L49.3164-40.0391C49.3164-38.2324 50.7812-37.0117 52.3926-37.0117C54.0527-37.0117 55.5176-38.2324 55.5176-40.0391L55.5176-80.9082C55.5176-83.0078 56.9336-84.5215 58.9844-84.5215C60.9375-84.5215 62.3535-83.0078 62.3535-80.9082L62.3535-40.0391C62.3535-38.3301 63.7207-37.0117 65.4297-37.0117C67.0898-37.0117 68.5547-38.3301 68.5547-40.0391L68.5547-74.8535C68.5547-76.9531 69.9707-78.418 71.9727-78.418C73.9746-78.418 75.3906-76.9531 75.3906-74.8535L75.3906-26.8066C75.3906-24.3652 76.8066-22.9492 78.8574-22.9492C80.6152-22.9492 82.0801-23.7305 83.2031-26.1719L90.2344-41.8457C91.1621-43.9453 92.9688-44.6777 94.6777-44.043C96.582-43.3594 97.168-41.5527 96.2891-39.1602L87.3535-14.209C81.3965 2.44141 70.9473 8.74023 57.3242 8.74023Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:74.90510009765626,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 87.35595703125 111.1806640625",width:87.35595703125,height:111.1806640625,translateX:-15.426992187499991,translateY:90.8203125,baseline:90.8203125,capline:20.3603515625}}})},$z=(n(1247),n.p+"eec23e311e07b52d13d853f0c7746612.png");function eH(e){var t;return null!=(t=function(e,t){var n,r,i,o;for(var a in t){var s=parseFloat(a);(!o||!i||s>i)&&(o=t[a],i=s);var c=s-e;(void 0===n||c>=0&&c<n)&&(n=c,r=t[s])}return r||o}(window.devicePixelRatio>1?58:29,e.iconURLs))?t:$z}var tH=lp((function(e,t,n){n(Object.assign({},t,{isDiscoverable:e}))}),2e3),nH=function(e){return r.createElement("div",{className:"modal-content look-me-up-by-email-modal-content"},r.createElement("div",{className:"modal-icon","data-testid":"icon"},r.createElement(Jz,{layoutMode:"glyphBox",width:39,height:52})),r.createElement("h2",{className:"modal-title","data-testid":"title",id:e.titleId},gc("AccountPage.Settings.LookMeUpByEmail.Modal.Title")),r.createElement("div",{className:"modal-description","data-testid":"description"},gc("AccountPage.Settings.LookMeUpByEmail.Modal.Description")," ",r.createElement(uT,{href:fL("lookMeUp")},gc("AccountPage.Settings.LookMeUpByEmail.Modal.LearnMore"))),r.createElement("div",{className:"look-me-up-by-email-list"},e.isLoading?r.createElement("div",{className:"loading"},r.createElement(dM,{description:gc("AccountPage.Settings.LookMeUpByEmail.Modal.LoadingDescription")})):function(e,t){if(e&&0!==e.length){var n=yc({one:"AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.One",two:"AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.Two",zero:"AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.One",many:"AccountPage.Settings.LookMeUpByEmail.Modal.List.Title.Many"},e.length);return r.createElement(r.Fragment,null,r.createElement("div",{className:"count"},n),r.createElement("div",{className:"description"},gc("AccountPage.Settings.LookMeUpByEmail.Modal.List.Description")),r.createElement("div",{role:"table","aria-label":gc("VoiceOver.AccountPage.LookMeUpByEmail.Modal.List.AriaLabel")},e.map((function(e){return r.createElement("div",{key:e.id,role:"row"},r.createElement("div",{role:"cell",className:"checkbox-cell"},r.createElement(bF,{defaultChecked:e.isDiscoverable,ariaLabel:gc("VoiceOver.AccountPage.LookMeUpByEmail.Modal.List.Checkbox.AriaLbel",{appName:e.name}),onStateChange:function(n){return tH(n.checked,e,t)}})),r.createElement("div",{role:"cell",className:"text-cell"},r.createElement("img",{src:eH(e),"aria-hidden":!0,alt:""}),r.createElement("span",null,e.name)))}))))}return r.createElement("div",{className:"empty-list"},r.createElement("div",{className:"title"},gc("AccountPage.Settings.LookMeUpByEmail.Modal.List.Empty.Title")),r.createElement("div",{className:"content"},gc("AccountPage.Settings.LookMeUpByEmail.Modal.List.Empty.Content")))}(e.items,e.onUpdateLookMeUpByEmail)))};function rH(){return(rH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var iH,oH=Nn.object({bundleId:Nn.string(),displaySetId:Nn.string(),applicationNameLocalized:Nn.string(),applicationIconUrls:Nn.record(Nn.string())}),aH=Nn.object({isDiscoverable:Nn.boolean(),containerType:Nn.string(),containerName:Nn.string(),bundleIdAndIcons:Nn.record(Nn.array(oH).or(Nn.null()))}),sH=Nn.array(aH);function cH(e){var t=null==e?void 0:e.bundleIdAndIcons;if(t){var n=void 0,r="";for(var i in t){var o;r=i;for(var a=null!=(o=t[i])?o:[],s=0;s<a.length;s++){var c=a[s],u={id:c.bundleId||"",name:c.applicationNameLocalized||"",iconURLs:c.applicationIconUrls,containerName:e.containerName,containerType:e.containerType,isDiscoverable:e.isDiscoverable};(!n||u.id&&u.name&&u.iconURLs)&&(n=u)}}return!n&&r&&(n={id:r,name:r,iconURLs:{},containerName:e.containerName,containerType:e.containerType,isDiscoverable:e.isDiscoverable}),n}}function uH(e){for(var t=[],n=0;n<e.length;n++){var r=cH(e[n]);r&&t.push(r)}return t}function lH(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function dH(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){lH(o,r,i,a,s,"next",e)}function s(e){lH(o,r,i,a,s,"throw",e)}a(void 0)}))}}function pH(e){return"/ws/v1/"+e.containerName+"/"+e.containerType+"/privacy/set"}function fH(){return(fH=dH(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.webServices,r=t.dsid,null!=n&&n.ckdatabasews&&r){e.next=3;break}throw new Error("no service url or dsid available");case 3:return i=he.c((null==n?void 0:n.cksharews)+"/ws/v1/com.apple.cloudkit/production/privacy/getall"),TE(i,r),e.next=7,JE({url:i,method:"POST",includeCredentials:!0,body:{lang:a(),platform:null},validate:{type:"WireLookMeUpByEmailListResponse",schema:sH}});case 7:return o=e.sent,e.abrupt("return",uH(o));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hH(){return(hH=dH(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.webServices,i=t.dsid,null!=r&&r.ckdatabasews&&i){e.next=3;break}throw new Error("no service url or dsid available");case 3:return o=he.c(""+(null==r?void 0:r.cksharews)+pH(n)),TE(o,i),e.next=7,XE({url:o,method:"POST",includeCredentials:!0,body:{bundleId:n.id,isDiscoverable:n.isDiscoverable}});case 7:return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.Deg0=0]="Deg0",e[e.DegNeg90=1]="DegNeg90",e[e.DegNeg180=2]="DegNeg180",e[e.DegNeg270=3]="DegNeg270"}(iH||(iH={}));var mH=n(1251),gH=n.n(mH);function vH(e){var t=this;return new Promise((function(n){var r=new FileReader;r.onload=function(e){return i=t,o=void 0,s=function(){var e,t,i,o,a,s,c,u,l,d,p,f,h,m,g;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(v){switch(v.label){case 0:return(e=r.result)instanceof ArrayBuffer?(t=gH.a.readFromBinaryFile(e)||{Orientation:1},i=t.Orientation||1,o=function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return"data:image/jpeg;base64,"+window.btoa(t)}(e),i>1?((a=new Image).src=o,[4,a.decode()]):[3,2]):[3,4];case 1:if(v.sent(),s=document.createElement("canvas"),c=s.getContext("2d"),u=7===i||8===i?270:3===i||4===i?180:5===i||6===i?90:0,l=a.naturalWidth,d=a.naturalHeight,p=u%180===0?l:d,f=u%180===0?d:l,h=2===i||4===i?-1:1,m=5===i||7===i?-1:1,s.width=p,s.height=f,c){for(g=0;g<u;g+=90)c.translate(g%180?f:p,0),c.rotate(Math.PI/2);c.scale(h,m),c.translate((h-1)/2*l,(m-1)/2*d),c.drawImage(a,0,0)}return n(s.toDataURL()),[3,3];case 2:n(o),v.label=3;case 3:return[3,5];case 4:throw new Error("readAsArrayBuffer did not return ArrayBuffer");case 5:return[2]}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{c(s.next(e))}catch(n){t(n)}}function r(e){try{c(s.throw(e))}catch(n){t(n)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}c((s=s.apply(i,o||[])).next())}));var i,o,a,s},r.readAsArrayBuffer(e)}))}n(1248);var yH=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"minus",svgPath:"M16.7969-30.8105L88.6719-30.8105C91.0156-30.8105 93.0176-32.8125 93.0176-35.2051C93.0176-37.5977 91.0156-39.5508 88.6719-39.5508L16.7969-39.5508C14.4531-39.5508 12.4512-37.5977 12.4512-35.2051C12.4512-32.8125 14.4531-30.8105 16.7969-30.8105Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:81.27510009765615,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 80.567626953125 8.8388671875",width:80.567626953125,height:8.8388671875,translateX:-12.4511572265626,translateY:39.6494140625,baseline:39.6494140625,capline:-30.810546875}}})},bH=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"plus",svgPath:"M12.4512-35.2539C12.4512-32.8613 14.4531-30.9082 16.7969-30.9082L48.3887-30.9082L48.3887 0.683594C48.3887 3.02734 50.3418 5.0293 52.7344 5.0293C55.127 5.0293 57.1289 3.02734 57.1289 0.683594L57.1289-30.9082L88.6719-30.9082C91.0156-30.9082 93.0176-32.8613 93.0176-35.2539C93.0176-37.6465 91.0156-39.6484 88.6719-39.6484L57.1289-39.6484L57.1289-71.1914C57.1289-73.5352 55.127-75.5371 52.7344-75.5371C50.3418-75.5371 48.3887-73.5352 48.3887-71.1914L48.3887-39.6484L16.7969-39.6484C14.4531-39.6484 12.4512-37.6465 12.4512-35.2539Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:81.27510009765615,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 80.567626953125 80.6142578125",width:80.567626953125,height:80.6142578125,translateX:-12.4511572265626,translateY:75.537109375,baseline:75.537109375,capline:5.0771484375}}})};n(1249);var _H=function(e){var t=Ts()("zoom-control",e.className,e.disabled?"disabled":void 0),n=mc("ImagePicker.ZoomControl.ZoomLabel"),i=99*(e.zoomLevel-1)/7;return r.createElement("div",{className:t},r.createElement("input",{type:"range",min:"0",max:99,id:"zoom-control",value:i,onChange:function(t){var n=Number(t.target.value);e.onZoomLevelChange(7*n/99+1)},disabled:e.disabled}),r.createElement("div",{className:"label-container"},r.createElement(yH,{width:12,height:12,layoutMode:"glyphBox","aria-hidden":"true"}),r.createElement("label",{htmlFor:"zoom-control"},n),r.createElement(bH,{width:12,height:12,layoutMode:"glyphBox","aria-hidden":"true"})))},CH=function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"rotate.left",svgPath:"M107.227-54.2969C108.887-54.2969 110.303-55.6641 110.303-57.3242L110.303-64.6484C110.303-78.6133 100.977-88.0371 86.9629-88.0371L85.9375-88.0371L85.9375-94.4824C85.9375-98.0957 83.2031-98.877 80.4688-96.875L68.1641-87.8418C66.1133-86.2793 66.0645-84.5703 68.1641-83.0566L80.4688-74.0723C83.2031-72.0703 85.9375-72.9004 85.9375-76.416L85.9375-82.373L86.9141-82.373C97.5098-82.373 104.199-75.0488 104.199-64.5996L104.199-57.3242C104.199-55.6641 105.566-54.2969 107.227-54.2969ZM25 9.76562L73.3887 9.76562C81.7383 9.76562 85.9375 5.76172 85.9375-2.7832L85.9375-51.0742C85.9375-59.6191 81.7383-63.623 73.3887-63.623L25-63.623C16.6504-63.623 12.4512-59.6191 12.4512-51.0742L12.4512-2.7832C12.4512 5.76172 16.6504 9.76562 25 9.76562ZM25.1465 1.9043C21.8262 1.9043 20.3125 0.537109 20.3125-2.88086L20.3125-50.9277C20.3125-54.3945 21.8262-55.7617 25.1465-55.7617L73.2422-55.7617C76.6113-55.7617 78.0762-54.3945 78.0762-50.9277L78.0762-2.88086C78.0762 0.537109 76.6113 1.9043 73.2422 1.9043Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:84.81503906250009,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.2159423828125 125.445556640625",width:122.2159423828125,height:125.445556640625,translateX:11.912939453125091,translateY:97.9527587890625,baseline:97.9527587890625,capline:27.4927978515625}}})},IH=(n(1250),[iH.Deg0,iH.DegNeg90,iH.DegNeg180,iH.DegNeg270]),wH=function(e){var t=Ts()("rotation-control",e.className,e.disabled?"disabled":void 0),n=mc("ImagePicker.RotationControl.RotateLabel"),i=mc("VoiceOver.ImagePicker.RotationControl.RotateLabel");return r.createElement("div",{className:t},r.createElement(Wc,{className:"rotate-button",variant:"push",ariaLabel:i,onActivate:function(){e.onRotate(IH[(e.orientation+1)%4])},disabled:e.disabled},r.createElement(CH,{width:26,height:26,layoutMode:"glyphBox"})),r.createElement("div",{className:"rotate-label"},n))};function EH(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function SH(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){EH(o,r,i,a,s,"next",e)}function s(e){EH(o,r,i,a,s,"throw",e)}a(void 0)}))}}var TH=r.forwardRef((function(e,t){var n=e.id,i=e.className,o=e.style,a=e.cancelButtonLabel,s=e.doneButtonLabel,c=e.compactDoneButtonLabel,u=e.changeImageButtonLabel,l=e.imageAlt,d=e.loadingAriaLabel,p=e.onComplete,f=e.onCancel,h=e.imageURL,m=e.meCardCrop,g=e.onUserSelectedImage,v=e.acceptType,y=e.instructionsLabel,b=e.errorTextForImageFailedToLoad,_=e.ariaLabel,C=e.title,I=e.dropZoneLabel,w=Object(r.useState)(!h),E=w[0],S=w[1],T=Object(r.useState)(null),O=T[0],P=T[1],x=Object(r.useState)(0),A=x[0],N=x[1],R=Object(r.useState)(0),D=R[0],k=R[1],U=Object(r.useState)(!1),L=U[0],M=U[1],j=Object(r.useState)(1),F=j[0],B=j[1],z=Object(r.useState)(iH.Deg0),H=z[0],W=z[1],V=["rotate(0)","rotate(-90deg)","rotate(-180deg)","rotate(-270deg)"][H],Z=Object(r.useState)(!1),q=Z[0],K=Z[1],G=Object(r.useRef)(void 0),Y=Object(r.useRef)(null),Q=Object(r.useRef)(null),X=Object(r.useRef)(null),J=Object(r.useRef)(null),$=Object(r.useRef)(null),ee=Object(r.useState)(1),te=ee[0],ne=ee[1],re=te*F;Object(r.useEffect)((function(){O&&m&&!G.current&&!L&&(G.current=Uw(m,O))}),[m,O,L]),Object(r.useEffect)((function(){if(!q&&O){var e=200/Math.min(O.width,O.height);if(ne(e),G.current){var t=200/G.current.width;B(t/e),K(!0)}else G.current={top:(O.height*e-200)/e/2,left:(O.width*e-200)/e/2,width:200/e,height:200/e},K(!0)}}),[O,q,m]),Object(r.useLayoutEffect)((function(){q&&G.current&&X.current&&Se({scrollLeft:G.current.left*re+(G.current.width*re-200)/2,scrollTop:G.current.top*re+(G.current.height*re-200)/2})}),[q,re]);var ie=Object(r.useState)(h),oe=ie[0],ae=ie[1];function se(e){return ce.apply(this,arguments)}function ce(){return(ce=SH(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null==t?void 0:t[0],r=!g||g(n),!n||!r){e.next=11;break}return ae(void 0),e.next=6,vH(n);case 6:i=e.sent,ae(i),M(!0),W(iH.Deg0),B(1);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ue=q?42/re:0,le=Object(r.useRef)(oe);Object(r.useEffect)((function(){oe!==le.current&&(le.current=oe,G.current=void 0,S(!1),P(null),ne(1),K(!1))}),[oe]),Object(r.useEffect)((function(){var e=function(){ne(1),K(!1)};return window.addEventListener("orientationchange",e),function(){return window.removeEventListener("orientationchange",e)}}),[]),Object(r.useEffect)((function(){var e=X.current;if(e){var t=function(e){e.preventDefault(),e.stopPropagation()};return e.addEventListener("wheel",t,{passive:!1}),function(){e.removeEventListener("wheel",t)}}}),[]);var de=Object(r.useRef)(!1),pe=Object(r.useRef)(0),fe=Object(r.useRef)(0),he=Object(r.useRef)(0),me=Object(r.useRef)(0);function ge(e,t){E&&X.current&&(H===iH.Deg0?Se({scrollLeft:he.current+pe.current-e,scrollTop:me.current+fe.current-t}):H===iH.DegNeg90?Se({scrollLeft:me.current-fe.current+t,scrollTop:he.current+pe.current-e}):H===iH.DegNeg180?Se({scrollLeft:he.current-pe.current+e,scrollTop:me.current-fe.current+t}):Se({scrollLeft:me.current+fe.current-t,scrollTop:he.current-pe.current+e}))}function ve(){de.current=!1}function ye(e,t){de.current=!0,pe.current=e,fe.current=t;var n=X.current;n&&(H===iH.Deg0||H===iH.DegNeg180?(he.current=n.scrollLeft,me.current=n.scrollTop):(he.current=n.scrollTop,me.current=n.scrollLeft))}function be(e){var t=e.up,n=void 0===t?0:t,r=e.left,i=void 0===r?0:r,o=e.down,a=void 0===o?0:o,s=e.right,c=void 0===s?0:s,u=X.current;E&&u&&(H===iH.Deg0?(u.scrollLeft+=i,u.scrollTop+=n,u.scrollLeft-=c,u.scrollTop-=a):H===iH.DegNeg90?(u.scrollTop+=i,u.scrollLeft-=n,u.scrollTop-=c,u.scrollLeft+=a):H===iH.DegNeg180?(u.scrollLeft-=i,u.scrollTop-=n,u.scrollLeft+=c,u.scrollTop+=a):(u.scrollTop-=i,u.scrollLeft+=n,u.scrollTop+=c,u.scrollLeft-=a))}var _e=Object(r.useState)(!1),Ce=_e[0],Ie=_e[1];function we(){return f?f():null}function Ee(){if(X.current&&oe&&G.current)return p(oe,G.current,H)}function Se(e){var t=e.scrollLeft,n=e.scrollTop,r=X.current;r&&("function"===typeof r.scrollTo?r.scrollTo(t,n):(r.scrollTop=n,r.scrollLeft=t))}return r.createElement("div",{"aria-label":_,id:n,style:o,className:Ts()(i,A>0?"drag-over":void 0,"image-picker",E?"is-loaded":"is-loading",Ce?"has-error":void 0,oe?void 0:"no-image"),ref:t,onDragOver:function(e){return e.preventDefault()},onDragEnter:function(){return N((function(e){return e+1}))},onDragLeave:function(){return N((function(e){return e-1}))},onDrop:function(){N(0),k(0)}},r.createElement("div",{className:"close-button"},r.createElement(Wc,{onActivate:we,ariaLabel:mc("VoiceOver.ImagePicker.CloseButtonLabel"),className:"modal-close-button",variant:"reset"},r.createElement(lf,{layoutMode:"glyphBox",desiredFontSize:14}))),r.createElement("div",{className:"content"},r.createElement("div",{className:"title-icon"},r.createElement(ZR,{layoutMode:"glyphBox",width:48,height:48})),r.createElement("h2",null,C),r.createElement("div",{className:Ts()("image-wrapper",D>0?"drag-over":void 0),ref:Y,onDragOver:function(e){return e.preventDefault()},onDragEnter:function(){return k((function(e){return e+1}))},onDragLeave:function(){return k((function(e){return e-1}))},onDrop:function(e){var t,n;e.preventDefault(),e.stopPropagation(),N(0),k(0),se(null!=(t=null==(n=e.dataTransfer)?void 0:n.files)?t:void 0)}},A>0?r.createElement("div",{className:"drop-zone-label"},r.createElement("span",null,I)):oe?Ce?r.createElement("div",{className:"error-message"},r.createElement("span",null,b)):E?void 0:r.createElement("div",{className:"loading-indicator"},r.createElement(dM,{description:d})):r.createElement("div",{className:"empty-profile-image"}),r.createElement("div",{className:"scroll-container",tabIndex:0,ref:X,onScroll:function(e){if(E&&q&&G.current){var t=e.target;e.preventDefault(),G.current={top:t.scrollTop/re,left:t.scrollLeft/re,width:200/re,height:200/re}}},onMouseDown:function(e){E&&ye(e.clientX,e.clientY)},onMouseMove:function(e){de.current&&ge(e.clientX,e.clientY)},onMouseUp:ve,onMouseLeave:ve,onTouchStart:function(e){E&&ye(e.touches[0].clientX,e.touches[0].clientY)},onTouchEnd:ve,onTouchMove:function(e){de.current&&ge(e.touches[0].clientX,e.touches[0].clientY)},style:{transform:V},onKeyDown:function(e){switch(e.key){case"Enter":e.preventDefault(),Ee();break;case"Esc":e.preventDefault(),we();break;case"Left":case"ArrowLeft":e.preventDefault(),be({left:10});break;case"Up":case"ArrowUp":e.preventDefault(),be({up:10});break;case"Right":case"ArrowRight":e.preventDefault(),be({right:10});break;case"Down":case"ArrowDown":e.preventDefault(),be({down:10});break;default:return}}},r.createElement(VR,{alt:l,src:oe,style:{transform:"scale("+re+") ",transformOrigin:"left top",padding:ue},ref:J,onLoad:function(){S(!0),P({width:J.current.offsetWidth,height:J.current.offsetHeight}),Ce&&Ie(!1)},onLoadFailure:function(){Ie(!0)}})),r.createElement(OH,{ref:Q})),r.createElement("div",{className:"controls"},r.createElement(_H,{zoomLevel:F,onZoomLevelChange:B,disabled:!oe||!E}),r.createElement(wH,{orientation:H,onRotate:W,disabled:!oe||!E})),r.createElement("div",{className:Ts()("instructions-label",E||Ce?void 0:"muted")},y),r.createElement(Wc,{onActivate:function(){var e;null==$||null==(e=$.current)||e.click()},variant:"link",className:"file-upload",disabled:!E&&!Ce},r.createElement("input",{ref:$,type:"file",title:"",accept:v||"image/jpeg",onChange:function(e){!function(e){var t=e.target.files;t&&!t.length||se(null!=t?t:void 0)}(e)}}),u)),r.createElement("div",{className:"button-container"},r.createElement(Wc,{className:"compact-done-button",onActivate:Ee,variant:"push primary"},c),r.createElement(Wc,{onActivate:we,variant:"push secondary"},a),r.createElement(Wc,{className:"regular-done-button",disabled:!E||void 0,onActivate:Ee,variant:"push primary"},s)))}));TH.displayName="UIImagePicker";var OH=r.forwardRef((function(e,t){return r.createElement("svg",{viewBox:"0 0 284 284",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"image-picker-mask"},r.createElement("defs",null,r.createElement("filter",{id:"d"},r.createElement("feTurbulence",{type:"fractalNoise",baseFrequency:".5",numOctaves:"3"}),r.createElement("feColorMatrix",{values:"0.3 0.3 0.3 0 0 0.3 0.3 0.3 0 0 0.3 0.3 0.3 0 0 0 0 0 1 0"})),r.createElement("circle",{id:"b",cx:"50%",cy:"50%",r:"100"}),r.createElement("rect",{id:"a",rx:"8",width:"284",height:"284"}),r.createElement("mask",{id:"c"},r.createElement("use",{xlinkHref:"#a",fill:"#fff"}),r.createElement("use",{xlinkHref:"#b"}))),r.createElement("use",{xlinkHref:"#a",mask:"url(#c)",filter:"url(#d)"}),r.createElement("use",{xlinkHref:"#a",mask:"url(#c)",fill:"rgba(0, 102, 204, 0.25)",className:"square"}),r.createElement("use",{xlinkHref:"#b",fill:"none",stroke:"#fff",ref:t,className:"circle"}))}));function PH(){return(PH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function xH(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function AH(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){xH(o,r,i,a,s,"next",e)}function s(e){xH(o,r,i,a,s,"throw",e)}a(void 0)}))}}function NH(e,t,n,r){var i=t.width,o=t.height,a=Math.round(i*n),s=Math.round(o*n),c=document.createElement("canvas");c.width=a,c.height=s;var u=c.getContext("2d");if(!u)throw new Error("extractImageData: cannot get canvas context");u.fillStyle="#ffffff",u.fillRect(0,0,a,s),u.drawImage(e,t.left,t.top,i,o,0,0,a,s);var l=c.toDataURL("image/jpeg",r);return{dataURL:l,width:a,height:s,size:l.length,scale:n,quality:r}}function RH(e,t,n,r,i,o,a){var s=0;if(n.size>a&&++s,r.size>a&&++s,i.size>a&&++s,o.size>a&&++s,4===s||0===s)return null;var c=n.scale,u=o.scale,l=n.quality,d=o.quality;if(u-c<.05||d-l<.05)return n;var p,f=(c+u)/2,h=(l+d)/2,m=NH(e,t,f,d),g=NH(e,t,u,h),v=NH(e,t,f,h);if(p=RH(e,t,v,g,m,o,a))return p;var y=NH(e,t,f,l);if(p=RH(e,t,y,r,v,g,a))return p;var b=NH(e,t,c,h);return(p=RH(e,t,b,v,i,m,a))?p:p=RH(e,t,n,y,b,v,a)}function DH(e,t,n,r,i){return kH.apply(this,arguments)}function kH(){return(kH=AH(regeneratorRuntime.mark((function e(t,n,r,i,o){var a,s,c,u,l,d,p,f,h,m,g,v,y,b,_,C,I,w,E=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=E.length>5&&void 0!==E[5]?E[5]:1e7,s=E.length>6&&void 0!==E[6]&&E[6],u=.1,d=.1,(f=NH(t,c=s?o:{left:0,top:0,width:n,height:r},l=1,p=1)).size>a&&(h=NH(t,c,u,d),m=NH(t,c,l,d),g=NH(t,c,u,p),f=RH(t,c,h,m,g,f,a)),f){e.next=11;break}throw new Error("extractImageData: cannot convert image to data URL");case 11:return s?v={left:0,top:0,width:f.width,height:f.height}:(y=f.scale,b=Math.round(o.top*y),_=Math.round(o.left*y),C=Math.round(o.width*y),I=Math.round(o.height*y),v={top:b,left:_,width:C,height:I}),e.next=14,LH(f,v,i);case 14:return w=e.sent,e.abrupt("return",Promise.resolve(w));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UH(e,t){var n=e.left,r=e.top,i=e.right,o=e.bottom,a=e.width,s=[a,e.height,a],c=[n,r,i,o,n].slice(t,t+2),u=c[0],l=c[1],d=s.slice(t%2,t%2+2);return{left:u,top:l,width:d[0],height:d[1]}}function LH(e,t,n){return MH.apply(this,arguments)}function MH(){return(MH=AH(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c,u,l,d,p,f,h,m,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.width,o=t.height,a=n.left,s=n.top,c=i-n.width-a,u=o-n.height-s,l=UH(Object.assign({},n,{right:c,bottom:u}),r),d=document.createElement("canvas"),p=r===iH.Deg0||r===iH.DegNeg180?i:o,f=r===iH.Deg0||r===iH.DegNeg180?o:i,d.width=p,d.height=f,h=d.getContext("2d")){e.next=13;break}return e.abrupt("return",Promise.resolve(Object.assign({},t,{crop:n})));case 13:return(m=new Image).src=t.dataURL,e.prev=15,e.next=18,m.decode();case 18:e.next=23;break;case 20:return e.prev=20,e.t0=e.catch(15),e.abrupt("return",Promise.resolve(Object.assign({},t,{crop:n})));case 23:return h.translate(p/2,f/2),h.rotate(-Math.PI/2*r),h.drawImage(m,-i/2,-o/2),g=d.toDataURL("image/jpeg"),e.abrupt("return",Promise.resolve({dataURL:g,width:p,height:f,size:g.length,scale:t.scale,quality:t.quality,crop:l}));case 28:case"end":return e.stop()}}),e,null,[[15,20]])})))).apply(this,arguments)}function jH(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}OH.displayName="ImagePickerMask";var FH=["image/jpeg","image/gif","image/png","image/bmp"];var BH=function(e){var t,n,i,o,s,c=e.className,u=e.onPageLoaded,l=e.setIsNotICloudPlusUser,d=Ts()("account-page",c),p=function(){var e=wh();return function(){return e({title:gc("AccountPage.Settings.Access.Signout.Modal.Title"),description:gc("AccountPage.Settings.Access.Signout.Modal.Description"),buttons:[{title:gc("AccountPage.Settings.Access.Signout.Confirm"),action:"signout"},{title:gc("AccountPage.Settings.Access.Signout.Cancel"),action:"cancel"}],defaultAction:"cancel",cancelAction:"cancel",onActionSelected:function(e){"signout"===e&&wZ.sharedInstance.unauthenticateUserFromAllBrowsers()}})}}(),f=Yf(),h=Yf(),m=qf(),g=Mw(a(),{givenName:null==m||null==(t=m.details)?void 0:t.firstName,familyName:null==m||null==(n=m.details)?void 0:n.lastName}),v=iS({endpoint:vE.lookMeUpByEmailList,fetchProvider:function(e){return function(){return function(e){return fH.apply(this,arguments)}(e)}}}),y=v.data,b=v.isLoading,_=function(){var e,t=wm(),n=qf(),r=Object(nS.useQueryClient)(),i=null==n||null==(e=n.details)?void 0:e.dsid;return Object(nS.useMutation)((function(e){return function(e,t){return hH.apply(this,arguments)}({webServices:t,dsid:i},e)}),{onSuccess:function(e,t){var n,o=null!=(n=r.getQueryData([vE.lookMeUpByEmailList,i]))?n:[],a=o.findIndex((function(e){return e.id===t.id}));a<0||r.setQueryData([vE.lookMeUpByEmailList,i],[].concat(o.slice(0,a),[t],o.slice(a+1)))}})}(),C=(s={items:y,isLoading:b,onUpdateLookMeUpByEmail:function(e){_.mutate(e)}},yM(r.createElement(nH,rH({},s,{titleId:"look-me-up-by-email-modal-title"})),{ariaLabelledBy:"look-me-up-by-email-modal-title"})),I=function(){var e=KN(),t=e.data,n=e.isLoading,i=Object(nS.useMutation)((function(e){return YV.cloudOSApplication.meCardController.saveMeCardPhotoForUser(Object.assign({},e))})),o=mc("ImagePicker.Alert.Title.UnsupportedFileType"),a=mc("ImagePicker.Alert.Title.FileTooLarge"),s=mc("ImagePicker.Alert.Title.Generic"),c=mc("ImagePicker.Alert.Description.UnsupportedFileType"),u=mc("ImagePicker.Alert.Description.FileTooLarge"),l=mc("ImagePicker.Alert.Description.Generic"),d=mc("ImagePicker.Alert.Action.Ok"),p=wh(),f=r.useState(null==t?void 0:t.url),h=f[0],m=f[1],g=r.useRef(h);(null==t?void 0:t.url)!==g.current&&(g.current=null==t?void 0:t.url,m(null==t?void 0:t.url));var v=r.useState(!1),y=v[0],b=v[1],_=function(){var e,n=(e=regeneratorRuntime.mark((function e(n,r,o){var a,s,c,u,l,d,p,f,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return b(!0),e.next=5,Il(n,void 0,void 0,"use-credentials");case 5:if(l=e.sent,b(!1),d=Lw(r,{height:l.height,width:l.width}),n===g.current&&d.x===(null==(a=t.crop)?void 0:a.x)&&d.y===(null==(s=t.crop)?void 0:s.y)&&d.height===(null==(c=t.crop)?void 0:c.height)&&d.width===(null==(u=t.crop)?void 0:u.width)&&o===iH.Deg0){e.next=15;break}return e.next=11,DH(l,l.width,l.height,o,r,96256,!1);case 11:p=e.sent,f=""!==t.contactId?t.contactId:$n().toUpperCase(),h={contactId:f,url:p.dataURL,crop:Lw(p.crop,{width:p.width,height:p.height}),signature:t.signature},i.mutate(h);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){jH(o,r,i,a,s,"next",e)}function s(e){jH(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e,t,r){return n.apply(this,arguments)}}(),C=function(e){var t=Object(r.useRef)(null),n=ch(r.createElement(TH,PH({ref:t},e,{onComplete:function(t,n,r){e.onComplete(t,n,r),o()},onCancel:function(){e.onCancel(),o()}})),{initialFocus:t,className:"for-image-picker"}),i=n[0],o=n[1];return i}({cancelButtonLabel:gc("ImagePicker.CancelButtonLabel"),compactDoneButtonLabel:gc("ImagePicker.CompactDoneButtonLabel"),doneButtonLabel:gc("ImagePicker.DoneButtonLabel"),changeImageButtonLabel:gc("ImagePicker.ChangeImageButtonLabel"),imageAlt:gc("Avatar.ImageAlt"),loadingAriaLabel:gc("VoiceOver.ImagePicker.LoadingAriaLabel"),instructionsLabel:gc("ImagePicker.Instructions"),title:gc("ImagePicker.Title"),errorTextForImageFailedToLoad:gc("ImagePicker.ErrorImageFailedToLoad"),onUserSelectedImage:function(e){if(e){var t=e.type;return FH.includes(t)?!(e.size>1e7)||(p({title:a,description:u,buttons:[d]}),!1):(p({title:o,description:c,buttons:[d]}),!1)}return p({title:s,description:l,buttons:[d]}),!1},onComplete:_,acceptType:"image/*",onCancel:function(){},imageURL:null==t?void 0:t.url,meCardCrop:null==t?void 0:t.crop,dropZoneLabel:gc("ImagePicker.DropZoneLabel")});return{isImageLoading:n||i.isLoading||y,showImagePicker:C}}(),w=I.isImageLoading,E=I.showImagePicker,S="lookmeupbyemail"===(null==(i=bZ.sharedInstance.applicationParameter.informationalPageDetails)?void 0:i.relativePath);return r.useEffect((function(){b||null==u||u()}),[b,u]),r.useEffect((function(){S&&C()}),[S,C]),r.useEffect((function(){f!==zf.Plus&&l(!0)}),[f,l]),r.createElement("div",{className:d},r.createElement(bj,{current:eZ.settings}),r.createElement("div",{className:"account-info-wrapper"},r.createElement("div",{className:"application-content"},r.createElement("div",{className:"account-page-header"},r.createElement("h1",null,g)),r.createElement("div",{className:"page-content"},r.createElement("div",{className:"content-column"},r.createElement(Xz,null),r.createElement("section",null,r.createElement("h2",null,gc("AccountPage.Settings.Title")),r.createElement("section",null,r.createElement("h3",null,gc("AccountPage.Settings.Customize.Title")),r.createElement("p",null,gc("AccountPage.Settings.Customize.Description")),r.createElement(Wc,{className:"standard-button",onActivate:function(){YV.cloudOSApplication.switchToSpringboard(!1,!0)}},gc("AccountPage.Settings.Customize.Button.Name"),r.createElement(vT,{layoutMode:"glyphBox",desiredFontSize:8}))),r.createElement("section",null,r.createElement("h3",null,gc("AccountPage.Settings.LookMeUpByEmail.Title")),r.createElement("p",null,gc("AccountPage.Settings.LookMeUpByEmail.Description")),r.createElement(Wc,{className:"standard-button",onActivate:C},gc("AccountPage.Settings.LookMeUpByEmail.Button.Name"),r.createElement(vT,{layoutMode:"glyphBox",desiredFontSize:8}))),r.createElement("section",null,r.createElement("h3",null,gc("AccountPage.Settings.Access.Title")),r.createElement("p",null,gc("AccountPage.Settings.Access.Description")),r.createElement(Wc,{className:"destructive-button",onActivate:p},gc("AccountPage.Settings.Access.Button.Name"))))),r.createElement("div",{className:"content-column second"},r.createElement("section",null,r.createElement("section",{className:"apple-id"},r.createElement("h2",null,gc("AccountPage.AppleId.Title")),r.createElement("p",{className:"account-email"},null==m||null==(o=m.details)?void 0:o.appleId)),r.createElement("section",null,r.createElement("h3",null,gc("AccountPage.Settings.Photo.Title")),r.createElement(Wc,{className:"standard-button",onActivate:E,disabled:w},gc("AccountPage.Settings.Photo.ChangeAppleIDPhoto.Button.Name"),r.createElement(vT,{layoutMode:"glyphBox",desiredFontSize:8}))),r.createElement("section",{className:Ts()(h===zf.Lite&&"final-section")},r.createElement("h3",null,gc("AccountPage.Settings.AppleID.Title")),r.createElement("p",null,gc("AccountPage.Settings.AppleID.Description")),r.createElement(Wc,{className:"standard-button",onActivate:function(){return Jk()}},gc("AccountPage.Settings.AppleID.Button.Name"),r.createElement(Yz,{layoutMode:"glyphBox",desiredFontSize:8}))),h!==zf.Lite&&r.createElement("section",{className:"final-section"},r.createElement("h3",null,gc("AccountPage.Settings.FindDevices.Title")),r.createElement("p",null,gc("AccountPage.Settings.FindDevices.Description")),r.createElement(Wc,{className:"standard-button",onActivate:function(){ky.sharedInstance.switchToApplication("find",{hash:"",route:void 0})}},gc("AccountPage.Settings.FindDevices.Button.Name"),r.createElement(vT,{layoutMode:"glyphBox",desiredFontSize:8})))))))),h!==zf.Plus?r.createElement(hj,null):null)};function zH(){var e=Object(bA.useRecentDriveDocs)(_A("app")),t=dA.sharedInstance;return e.result&&t.setTileData(Du.identifier,JSON.stringify(e.result)),t.switchDriveToAppMode=e.appIsLaunching,null}function HH(){return(HH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function WH(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}n(1252);var VH=function(e){var t,n=e.className,i=e.mailDropDetail,o=Ts()("maildrop-page",n),a=gc("ShareAcceptancePage.Title"),s=gh(),c=i.downloadURL?i.title:"",u=xw(i.downloadURL?i.size:0,1),l=function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return e.replace(/[&<>]/g,(function(e){return t[e]||""}))}(i.downloadURL&&null!=(t=i.fileType)?t:"dmg"),d=gc("MailDropPage.Download.Item.Description",{fileType:wz(l),size:u}),p=r.useRef(void 0),f=r.useRef(),h=r.useRef();function m(){YV.cloudOSApplication.switchToSpringboard(!0)}var g=r.useCallback((function(e,t){s({icon:r.createElement(Ih,null),title:gc(e),description:gc(t),variant:"modern",buttons:[{title:gc("CloudOS.Button.OK.Title"),action:"ok"}],defaultAction:"ok",onActionSelected:m})}),[s]);r.useEffect((function(){i.downloadURL?f.current=hr(i.downloadURL,{teh:"1"}):g("MailDropPage.Error.Title","MailDropPage.Error.Description")}),[i.downloadURL,g]);var v=function(e){switch(h.current=e,null==e?void 0:e.status){case 403:case 410:g("MailDropPage.Error.Title.Expired","MailDropPage.Error.Description.Expired");break;case 404:g("MailDropPage.Error.Title.NotFound","MailDropPage.Error.Description.NotFound");break;case 429:g("MailDropPage.Error.Title.MaxDownloads","MailDropPage.Error.Description.MaxDownloads");break;default:g("MailDropPage.Error.Title","MailDropPage.Error.Description")}var t=new ur("MaildropAttachment.failure",{status:null==e?void 0:e.status});fr.sharedInstance.recordStat(t)},y=function(){var e=p.current;e&&(p.current=void 0,window.removeEventListener("message",e))},b=function(){if(!p.current){var e=p.current=function(e){return function(e){var t;if(e.origin===(null==(t=f.current)?void 0:t.origin)){var n=e.data;try{n=JSON.parse(n)}catch(r){n={}}v(n)}y()}(e)};window.addEventListener("message",e)}},_=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.current){e.next=3;break}return g("MailDropPage.Error.Title","MailDropPage.Error.Description"),e.abrupt("return");case 3:return t=new lE(" ",f.current.hostname),n=new tE(f.current.href," "),b(),e.next=8,t.download(n);case 8:e.sent.success?(fr.sharedInstance.recordStat(new ur("MaildropAttachment.success",{status:200})),y()):setTimeout((function(){h.current||(y(),v())}),3e3);case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){WH(o,r,i,a,s,"next",e)}function s(e){WH(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return r.createElement("div",{className:o},r.createElement("div",{className:"header-section"},r.createElement(xB,{className:"header-image",width:60,height:60,layoutMode:"glyphBox"}),r.createElement("h2",null,a),r.createElement("p",null,gc("MailDropPage.Description")),r.createElement("div",{className:"maildrop-details"},r.createElement(_w,HH({fileExtension:l},Iz(l))),r.createElement("div",{className:"item-title"},c),r.createElement("div",{className:"item-description"},d))),r.createElement("div",{className:"bottom-section"},r.createElement("div",{className:"buttons-row"},r.createElement(Wc,{onActivate:_,className:"download-button",variant:"block primary"},gc("MailDropPage.Download.Button.Text")))))};n(1253);var ZH=function(e){var t=e.className,n=e.errorTitle,i=e.errorDescription,o=Ts()("share-acceptance-error-page",t),a=gc("ShareAcceptancePage.Title");return r.createElement("div",{className:o},r.createElement("div",{className:"header-section"},r.createElement(xB,{className:"header-image",width:60,height:60,layoutMode:"glyphBox"}),r.createElement("h2",null,a),r.createElement("div",{className:"error-details"},r.createElement("div",{className:"error-title"},n),r.createElement("div",{className:"error-description"},i))))};function qH(e){var t=Ne.sharedInstance.isDomainCN?Xn("CloudOS.AccountNeedsSetup.Domain.icloud.com.cn"):Xn("CloudOS.AccountNeedsSetup.Domain.icloud.com");return r.createElement(uz,{message:Xn("CloudOS.AccountNeedsSetup.Title",{currentDomain:t}),description:Xn("CloudOS.AccountNeedsSetup.Description",{currentDomain:t}),primaryButton:{title:Xn("CloudOS.AccountNeedsSetup.LearnMoreButton.Title"),onActivate:function(){Object(ae.a)(TT("HT208681"))}},alternateButton:{title:Xn("CloudOS.AccountNeedsSetup.CloseButton.Title"),onActivate:function(){window.location.reload(),e.onRequestClose()}}})}function KH(e){return r.createElement(uz,{message:Xn("CloudOS.Error.AppPCSDeleted.Title",{applicationName:bu(e.configuration)}),description:Xn("CloudOS.Error.AppPCSDeleted.Description"),primaryButton:{title:Xn("CloudOS.Button.OK.Title"),onActivate:function(){e.onRequestClose()}}})}function GH(e){var t;return r.createElement(uz,{message:e.title,description:null!=(t=e.description)?t:"",iconClass:"photos"===e.configuration.identifier?"photos-icon":"icloud-icon",primaryButton:{title:Xn("CloudOS.Button.OK.Title"),onActivate:function(){e.onRequestClose()}}})}n(1254);var YH=n(1255);function QH(e,t){if(!e)throw new YH.AssertionError(t?{message:t}:void 0)}var XH=1;function JH(e){var t=r.useRef("alert-m-"+ ++XH).current,n=r.useRef("alert-d-"+XH++).current;return r.createElement("div",{className:"cw-alert"},r.createElement("div",{className:"main-container"},r.createElement("div",{className:"alert-main-content"},r.createElement("div",{className:"alert-icon"}),r.createElement("div",{className:"alert-text-container"},r.createElement("h1",{id:t,className:"message",tabIndex:0},e.title),r.createElement("p",{id:n,className:"description",tabIndex:0},e.description)))),e.buttons.map((function(t,n){return r.createElement(Wc,{key:n,onActivate:function(){e.createAccountController.alertButtonClicked(e.alertGUID,n,t),e.onRequestClose()}},t)})))}function $H(e,t){var n,r;e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n=e,r=t,(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(n,r)}var eW,tW=new Ig.a("MessagingFromCreateAccountViewProtocol",new Set(["receivePingRequest","ready","getConfig","completed","createAlert","updateAlert","hideAlert","isAlertVisible","exit","passwordChanged","resize"])),nW=new Ig.a("MessagingToCreateAccountViewProtocol",new Set(["acknowledge","configPayload","alertGUID","isAlertVisible","alertButtonClicked"])),rW=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).responseMethods=["acknowledge","configPayload","alertGUID","isAlertVisible"],t.prefix="AppleID.",t}$H(t,e);var n=t.prototype;return n.encode=function(e){if("string"===typeof e)return e;var t=e.method;this.responseMethods.some((function(e){return t===e}))&&e.params&&e.params.length>=2&&(e.id=e.params[0],e.result=e.params[1],delete e.params,delete e.method);try{return e=JSON.stringify(e),this.prefix+e}catch($O){throw new Error("Could not encode object to JSON.")}},n.decode=function(e){if("string"!==typeof e)return e;var t=this.prefix;0===e.indexOf(t)&&(e=e.substr(t.length));try{for(var n in(e=JSON.parse(e)).params.splice(0,0,e.id),e)e.hasOwnProperty(n)&&"method"!==n&&"params"!==n&&"jsonrpc"!==n&&(e.params.push(e[n]),delete e[n])}catch($O){console.warn("Could not decode string as JSON",e),e=null}return e},t}(Av.a),iW=function(e){function t(){return e.apply(this,arguments)||this}$H(t,e);var n=t.prototype;return n._constructRPCMethodName=function(e,t){return""+t},n._createJsonRpcListener=function(t){var n=e.prototype._createJsonRpcListener.call(this,t);return n.serializer=new rW,n},n._createJsonRpcCaller=function(t){var n=e.prototype._createJsonRpcCaller.call(this,t);return n.serializer=new rW,n},t}(xv.a);function oW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.TIMEOUT="TIMEOUT",e.INVALID_DATA="INVALID_DATE",e.DID_NOT_LOAD="DID_NOT_LOAD"}(eW||(eW={}));var aW=function(){function e(e,t){var n=this;this.locale=e,this.delegate=null,this.remoteProxy={},this.messagingChannel=void 0,this.protocolMessages=[],this.timer=void 0,this.createAccountHasTimedOut=function(){n.delegate&&n.notifyErrorDelegate(eW.TIMEOUT),n.messagingChannel.stop()};var r=new iW(t);r.setListener(tW.protocolName,tW.protocolMethodNames,this),r.setConnection(nW.protocolName,nW.protocolMethodNames,this.remoteProxy),this.messagingChannel=r,r.start(),this.timer=window.setTimeout(this.createAccountHasTimedOut,45e3)}var t=e.prototype;return t.protocolMessageForIdentifier=function(e){for(var t,n=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return oW(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oW(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.protocolMessages);!(t=n()).done;){var r=t.value;if(r.id===e)return r}},t.receivePingRequest=function(e,t){var n={id:e,method:"receivePingRequest",completed:!1,nextMessageToBeReceived:t};this.protocolMessages.push(n),this.remoteProxy.acknowledge(e,!0),n.completed=!0},t.ready=function(e){var t,n={id:e,method:"ready",completed:!1};this.protocolMessages.push(n),null==(t=this.delegate)||t.createAccountWillStart(this),this.remoteProxy.acknowledge(e,!0),n.completed=!0},t.getConfig=function(e){var t={id:e,method:"getConfig",completed:!1};this.protocolMessages.push(t),this.remoteProxy.configPayload(e,{language:this.locale,customAlerts:!0}),window.clearTimeout(this.timer),this.timer=void 0,this.remoteProxy.acknowledge(e,!0),t.completed=!0},t.completed=function(e,t){var n,r={id:e,method:"completed",completed:!1};this.protocolMessages.push(r),this.remoteProxy.acknowledge(e,!0),"boolean"!==typeof t||t?null==(n=this.delegate)||n.createAccountCompleted(this,t):this.notifyErrorDelegate(eW.INVALID_DATA),r.completed=!0},t.createAlert=function(e,t){var n={id:e,method:"createAlert",completed:!1};if(this.protocolMessages.push(n),this.delegate){var r=this.delegate.createAccountCreateAlert(this,t);this.remoteProxy.alertGUID(e,r)}this.remoteProxy.acknowledge(e,!0),n.completed=!0},t.updateAlert=function(e,t,n){var r,i={id:e,method:"updateAlert",completed:!1};this.protocolMessages.push(i),null==(r=this.delegate)||r.createAccountUpdateAlert(this,t,n),this.remoteProxy.acknowledge(e,!0),i.completed=!0},t.hideAlert=function(e,t){var n,r={id:e,method:"hideAlert",completed:!1};this.protocolMessages.push(r),null==(n=this.delegate)||n.createAccountHideAlert(this,t),this.remoteProxy.acknowledge(e,!0),r.completed=!0},t.isAlertVisible=function(e,t){var n={id:e,method:"isAlertVisible",completed:!1};if(this.protocolMessages.push(n),this.delegate){var r=this.delegate.createAccountIsAlertVisible(this,t);this.remoteProxy.isAlertVisible(e,r)}this.remoteProxy.acknowledge(e,!0),n.completed=!0},t.exit=function(e,t){var n,r={id:e,method:"exit",completed:!1};this.protocolMessages.push(r),this.remoteProxy.acknowledge(e,!0),t&&t.error?this.notifyErrorDelegate(t.error):null==(n=this.delegate)||n.createAccountCanceled(this),r.completed=!0},t.passwordChanged=function(e){var t,n={id:e,method:"passwordChanged",completed:!1};this.protocolMessages.push(n),this.remoteProxy.acknowledge(e,!0),null==(t=this.delegate)||t.createAccountPasswordChange(this),n.completed=!0},t.resize=function(e,t){var n,r={id:e,method:"resize",completed:!1};this.protocolMessages.push(r),null==(n=this.delegate)||n.createAccountResize(this,t),this.remoteProxy.acknowledge(e,!0),r.completed=!0},t.alertButtonClicked=function(e,t,n){this.remoteProxy.alertButtonClicked(e,t,n)},t.notifyErrorDelegate=function(e){var t;null==(t=this.delegate)||t.createAccountError(this,e)},e}();function sW(e){var t=_r.configuration;QH(t.createAccountUrl);var n=r.useState(!0),i=n[0],o=n[1],a=iu(_r.locale),s=hr(t.createAccountUrl,{locale:a}),c=qp(),u=r.useRef(null);return r.useEffect((function(){var t=u.current;if(t&&(t.src=s.href,t.contentWindow)){var n=new xg({allowedRemoteOrigins:[s.origin],remoteOrigin:s.origin,iframe:t});new aW(a,n).delegate=new(function(){function t(){}var n=t.prototype;return n.createAccountWillStart=function(){o(!1)},n.createAccountCompleted=function(t,n){fr.sharedInstance.recordStat(new ur("createAccountSuccess")),wZ.sharedInstance.createAccountCompleted(n),o(!0),null==e.onDismiss||e.onDismiss()},n.createAccountError=function(t,n){fr.sharedInstance.recordStat(new ur("createAccountError",{errorType:n,message:function(){switch(n){case eW.TIMEOUT:return"Timeout loading authentication";case eW.INVALID_DATA:return"Invalid data received";case eW.DID_NOT_LOAD:return"Authentication did not load"}}()})),null==e.onDismiss||e.onDismiss()},n.createAccountPasswordChange=function(t){null==e.onDismiss||e.onDismiss()},n.createAccountCanceled=function(t){wZ.sharedInstance.createAccountCanceled(),null==e.onDismiss||e.onDismiss(),null==e.createWidgetCancelled||e.createWidgetCancelled()},n.createAccountResize=function(e,t){},n.createAccountCreateAlert=function(e,t){var n=$n();return c((function(i){var o=i.hidePane;return r.createElement(JH,{alertGUID:n,title:t.title,description:t.description,buttons:t.buttons,createAccountController:e,onRequestClose:o})})),n},n.createAccountUpdateAlert=function(e,t,n){},n.createAccountHideAlert=function(e,t){},n.createAccountIsAlertVisible=function(e,t){return!0},t}())}}),[a,e,c,s.href,s.origin]),r.createElement("div",{className:"create-account"},i&&r.createElement(dM,{description:Xn("CloudOS.CreateAccountSpinner.Loading")}),r.createElement("div",{className:"create-account-inner"},r.createElement("iframe",{style:{visibility:i?"hidden":"visible"},ref:u,title:"Create Apple ID",id:"create-account-frame",className:"create-account-iframe"})))}function cW(e){var t,n,i,o=null==(t=e.applicationConfiguration)?void 0:t.applicationInfo,a=o?"error-title-app":"error-title",s=o&&null!=(n=gu(o))?n:KB,c="calendar"===(null==(i=e.applicationConfiguration)?void 0:i.identifier)?r.createElement(HI,{iconSize:128}):r.createElement(MI,{iconSrc:s}),u=Xn("CloudOS.Sharing.Unavailable.OkButton.Title");return r.createElement("div",{className:"error-dialog no-error-button"},r.createElement("div",{className:"error-dialog-content"},r.createElement("div",{className:"error-icon"},c),r.createElement("div",{className:a},e.title),e.subtitle&&r.createElement("div",{className:"error-description",dangerouslySetInnerHTML:{__html:e.subtitle}}),e.description&&r.createElement("div",{className:"error-description"},e.description)),r.createElement("div",{className:"error-button-container"},r.createElement("div",{className:"error-buttons"},r.createElement(Wc,{variant:"badge-button-one",onActivate:function(){Object(Qn.a)(window.location.origin)}},u))))}n(1259);var uW=function(){var e=r.createElement(wd,{iconSize:54,symbolSize:30,symbol:Yj,backgroundColor:"AF52DF"}),t=mc("RecoveryPage.FilesRecoveryModalContent.Title"),n=mc("RecoveryPage.FilesRecoveryModalContent.Description"),i=fL("restoreFiles"),o=mc("RecoveryPage.ArchivesRecoveryModalContent.LearnMore");return r.createElement("div",{className:"modal-content"},r.createElement("div",{className:"modal-icon","data-testid":"icon"},e),r.createElement("h2",{className:"modal-title","data-testid":"title",id:"files-recovery-modal-title"},t),r.createElement("div",{className:"modal-description","data-testid":"description"},n," ",r.createElement(uT,{href:i},o)))};function lW(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}n(1260);var dW=["hidemyemail","customdomainsettings"],pW=["iclouddrivefilerecovery"];function fW(e){var t=e.applicationInfo,n=e.applicationContext,i=e.onClose,o=r.useRef(null),a=r.useRef(),s=t.configuration.identifier,c=dW.indexOf(s)<0,u=pW.indexOf(s)>=0,l=Kc(),d=function(){var e;(e=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.current){e.next=3;break}return e.abrupt("return");case 3:if(n=t.remoteApplicationViewController){e.next=6;break}return e.abrupt("return");case 6:n.terminateRemoteInstance(!0),null==i||i();case 8:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){lW(o,r,i,a,s,"next",e)}function s(e){lW(o,r,i,a,s,"throw",e)}a(void 0)}))})()};r.useEffect((function(){a.current=new Jv(t.configuration,{childApplicationIsReadyToTerminateDidChange:function(e,t){},childApplicationIsLoadingSlowly:function(e){},childApplicationDidFinishLaunching:function(e){var t=e.remoteApplicationViewController;if(t){var n=t.iframe;n&&(t.transitionRemoteInstanceToActiveForeground(),n.style.display="block")}},childApplicationDidTerminate:function(e,t,n){null==i||i()},childApplicationWantsToRemoveViewController:function(e){},childApplicationDidBecomeInteractive:function(e){}});var e=a.current,r=e.currentHistoryState,s=Object.assign({},n);if(s){var c=n.hash,u=n.relativePath;void 0!==c&&(r.applicationHash=c),void 0!==u&&(r.applicationRelativePath=u)}var l=r.applicationRelativePath,d=r.applicationHash,p=bZ.sharedInstance.shortGuid,f=bZ.sharedInstance.applicationIdentifier,h=mu(t);s.launchUrl=null!=h?h:void 0,s.relativePath=l,s.hash=d,s.shareRecord=void 0,s.targetUIStateWhenLaunched=ug.ACTIVE_FOREGROUND,f===t.configuration.identifier&&(s.shortGuid=null!=p?p:void 0),e.launchRemoteApplicationWithContext(s);var m=e.remoteApplicationViewController;if(m){var g=m.iframe;if(g){var v=o.current;if(v)return g.style.display="none",v.appendChild(g),m.loadRemoteInstance(),function(){v.removeChild(g)}}}}),[t,n,i]);var p=mc("VoiceOver.RecoveryPage.ArchivesRecoveryModal.CloseButtonLabel"),h=function(){return r.createElement(Wc,{onActivate:d,ariaLabel:p,className:"modal-close-button"},r.createElement(lf,{layoutMode:"glyphBox",desiredFontSize:14}))},m=Ts()("modal-child-application-modal",u?"sprinkles":"");return r.createElement("div",{className:Ts()("modal-child-application",l===f.COMPACT&&"compact")},r.createElement("div",{className:m},c&&r.createElement("div",{className:"close-button-bar"},r.createElement(h,null)),u&&"iclouddrivefilerecovery"===s&&r.createElement(uW,null),r.createElement("div",{className:"modal-child-application-content",ref:o})))}n(1261),n(1262);var hW=["styles"];function mW(){return(mW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gW=function(e){e.styles;var t=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,hW);return i.a.createElement("svg",mW({viewBox:"0 0 18 24",xmlns:"http://www.w3.org/2000/svg"},t),i.a.createElement("path",{d:"M16.33 14.1c-.93-.87-1.41-1.95-1.42-3.26-.01-1.68.75-2.99 2.29-3.92-.86-1.23-2.16-1.91-3.88-2.04-.64-.05-1.41.08-2.33.41-.97.36-1.55.54-1.72.54-.23 0-.74-.15-1.55-.45-.81-.3-1.45-.45-1.95-.45-.9.01-1.75.25-2.52.71-.78.46-1.4 1.09-1.86 1.89C.8 8.5.5 9.69.5 11.06c0 1.2.22 2.44.66 3.72.41 1.18.93 2.22 1.57 3.12.59.84 1.09 1.43 1.48 1.78.62.58 1.24.85 1.86.83.41-.01.95-.15 1.61-.42.66-.27 1.28-.4 1.86-.4.55 0 1.16.13 1.81.4.66.27 1.22.4 1.69.4.65-.01 1.26-.28 1.82-.8.37-.32.84-.89 1.42-1.71a11.17 11.17 0 001.46-2.93c-.51-.24-.98-.55-1.41-.95zM12.32 3.28c.75-.89 1.12-1.84 1.12-2.87 0-.14-.01-.27-.02-.41-.52.03-1.07.18-1.66.47-.58.29-1.07.65-1.45 1.09-.76.86-1.19 1.91-1.19 2.9 0 .14.01.27.02.39 1.19.09 2.28-.52 3.18-1.57z"}))},vW=function(){return r.createElement(Wc,{className:"apple-icon-view",onActivate:function(){Object(ae.a)("https://www.apple.com",{target:"_blank",features:[]})}},r.createElement(gW,null))};function yW(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}var bW=function(e){var t=e.stages,n=e.errorStage,i=e.onComplete,o=r.useState(0),a=o[0],s=o[1],c=r.useState(void 0),u=c[0],l=c[1],d=r.useState(!1),p=d[0],f=d[1],h=r.useState(!1),m=h[0],g=h[1],v=r.useState(!0),y=v[0],b=v[1],_=p?n(u):t[a](u),C=function(){var e,n=(e=regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g(!0),b(!1),!_.performPrimaryAction){e.next=8;break}return e.next=5,_.performPrimaryAction();case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0={isOK:!0,data:void 0};case 9:if(n=e.t0,!p){e.next=13;break}return i(),e.abrupt("return");case 13:g(!1),b(!0),n.isOK?(r=n.data,a+1<t.length?(s(a+1),l(r)):i()):f(!0);case 16:case"end":return e.stop()}var r}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){yW(o,r,i,a,s,"next",e)}function s(e){yW(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return n.apply(this,arguments)}}(),I=_.navigationHeaderTitle||"",w=_.primaryButtonDisabled;return r.createElement("div",null,r.createElement("div",{className:I?"navigation-header-view":"hide-navigation-header"},r.createElement("div",{className:"hide-apple-logo"},r.createElement(vW,null)),r.createElement("div",{className:"cw-label-view cw-ui-label-view navigation-header-title"},I),r.createElement("div",{className:"hide-cancel-button"},r.createElement(Wc,{onActivate:function(){_.performCancelAction&&_.performCancelAction()},className:"cancel-button"},Xn("CloudOS.Button.Cancel.Title")))),r.createElement("div",{className:(m?"view-hidden":"")+"navigation-container-view"},r.createElement("div",{className:"navigation-content-view"},_.renderContent())),r.createElement("div",{className:"navigation-footer-view"},r.createElement("div",{className:(y?"":"view-hidden")+"navigation-footer-container-view"},_.secondaryButtonTitle?r.createElement(r.Fragment,null,r.createElement(Wc,{onActivate:function(){_.performSecondaryAction&&_.performSecondaryAction()},className:"secondary-button-view"},_.secondaryButtonTitle),r.createElement("div",{className:"separator-view"})):null,r.createElement(Wc,{onActivate:C,className:"primary-button-view",disabled:w},_.primaryButtonTitle))),m?r.createElement(dM,{description:Xn("CloudOS.NavigationLayout.Loading"),nibStyle:{fillStyle:"#FFFFFF"}}):null)};function _W(){return r.createElement(uz,{message:Xn("CloudOS.Error.AuthDidNotValidateOffline.Title"),description:Xn("CloudOS.Error.AuthDidNotValidateOffline.Description"),primaryButton:{title:Xn("CloudOS.Button.OK.Title"),onActivate:function(){fr.sharedInstance.recordStat(new ur("cloudosAuthFailureReload")),window.location.reload()}}})}function CW(e){return r.createElement(uz,{message:Xn("CloudOS.Error.AuthDidNotConnect.Title"),description:Xn("CloudOS.Error.AuthDidNotConnect.Description"),primaryButton:{title:Xn("CloudOS.Button.OK.Title"),onActivate:function(){fr.sharedInstance.recordStat(new ur("cloudosAuthFailureReload")),window.location.reload()}},alternateButton:{title:Xn("CloudOS.Error.AuthDidNotConnect.Support"),onActivate:function(){Object(ae.a)(D("systemStatus"),{target:"_blank",features:[]})}},otherButton:{title:Xn("CloudOS.Authentication.SignOutButton.Title"),onActivate:function(){wZ.sharedInstance.unauthenticateUser(!1,!0),e.onRequestClose()}}})}function IW(){return r.createElement(uz,{message:Xn("CloudOS.Error.AuthDidNotConnect.Title"),description:Xn("CloudOS.Error.AuthDidNotConnect.Description"),primaryButton:{title:Xn("CloudOS.Button.OK.Title"),onActivate:function(){fr.sharedInstance.recordStat(new ur("cloudosAuthFailureReload")),window.location.reload()}},alternateButton:{title:Xn("CloudOS.Error.AuthDidNotConnect.Support"),onActivate:function(){Object(ae.a)(D("systemStatus"),{target:"_blank",features:[]})}}})}function wW(e){var t=bu(e.configuration),n=e.retryAfter?e.retryAfter<=3600?Xn("CloudOS.Error.ServiceLocked.Description.Hour",{applicationName:t}):Xn("CloudOS.Error.ServiceLocked.Description.HourOrMore",{applicationName:t}):Xn("CloudOS.Error.ServiceLocked.Description.NoETA",{applicationName:t});return r.createElement(uz,{message:Xn("CloudOS.Error.ServiceLocked.Title",{applicationName:t}),description:n,primaryButton:{title:Xn("CloudOS.Button.OK.Title"),onActivate:function(){var t=YV.cloudOSApplication.currentChildApplicationInfo;if(t){var n=ky.sharedInstance.getChildApplicationController(t);n&&ky.sharedInstance.terminateChildApplication(n,!0)}YV.cloudOSApplication.switchToSpringboard(),e.onRequestClose()}}})}function EW(e){return r.createElement(uz,{message:Xn("CloudOS.UnsavedChanges.Alert.Title"),description:Xn("CloudOS.UnsavedChanges.Alert.Description",{applicationName:e.applicationName}),primaryButton:{title:Xn("CloudOS.UnsavedChanges.Alert.SignOutButton"),onActivate:function(){e.onChoice(!0)}},alternateButton:{title:Xn("CloudOS.UnsavedChanges.Alert.DontSignOutButton"),onActivate:function(){e.onChoice(!1)}}})}function SW(){return(SW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function TW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function OW(e,t){return(OW=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PW(e){return r.createElement(AW,{showCreateAccount:vz(),showAccountNeedsSetupAlert:vz(),showChildApplicationErrorAlert:vz(),showServicesLockedAlert:vz(),showApplicationLockedAlert:vz(),showMailNotEnabledAlert:wh(),showUnsavedChangesAlert:vz(),showOfflineAuthenticationDidFailAlert:vz(),showOnlineAuthenticationDidFailAlert:vz(),showOnlineAndAuthenticatedAuthenticationDidFailAlert:vz(),showAccountMenu:oU(sU),showCompactAccountMenu:pf(sU,{cardProps:{className:"account-menu-compact"}})[0],showCreationMenu:oU(IL),showCompactCreationMenu:pf(IL,{cardProps:{className:"creation-menu-compact"}})[0],setShowSash:e.setShowSash,showChildApplicationModal:vz(),hideChildApplicationRef:e.hideChildApplicationRef,showAppSwitcher:oU(hL,{menuProps:{userPlan:Yf(),canNavigateToHomePage:!0}}),showCompactAppSwitcher:pf(hL,{menuProps:{userPlan:Yf(),canNavigateToHomePage:!0},cardProps:{closeAriaLabel:gc("VoiceOver.AppSwitcher.Close"),className:"app-switcher-menu-compact"}})[0],showStorageUsageWarning:oU(PL,kL()),showTrustBrowserAlert:wh(),showHelpMenu:oU(rL),showVerifyShareAccessModal:vz(),showTermsAndConditions:vz(),appleIdControllerRef:e.appleIdControllerRef,showInAppLogin:vz(),showLoginForSessionRetrieve:vz(),showErrorDialog:vz(),sizeClass:e.sizeClass})}n(1263);var xW,AW=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={hideVerifyShareAccessModalCallback:void 0,hideInAppLoginCallback:void 0,hideLoginForSessionRetrieveCallback:void 0},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,OW(t,n);var o,a,s=i.prototype;return s.componentDidMount=function(){YV.cloudOSApplication.delegate=this},s.componentWillUnmount=function(){YV.cloudOSApplication.delegate=null},s.render=function(){return null},s.createAccount=function(e){this.props.showCreateAccount((function(t){var n=t.hidePane;return r.createElement(sW,{onDismiss:n,createWidgetCancelled:e})}))},s.showAccountNeedsSetup=function(){this.props.showAccountNeedsSetupAlert((function(e){var t=e.hidePane;return r.createElement(qH,{onRequestClose:t})}))},s.showChildApplicationErrorAlert=function(e,t,n){this.props.showChildApplicationErrorAlert((function(i){var o=i.hidePane;return r.createElement(GH,{configuration:e,title:t,description:n,onRequestClose:o})}))},s.showServiceLockedAlert=function(e){var t=YV.cloudOSApplication.currentChildApplicationConfiguration;t&&this.props.showServicesLockedAlert((function(n){var i=n.hidePane;return r.createElement(wW,{configuration:t,retryAfter:e,onRequestClose:i})}))},s.showAlertForLockedApplication=function(e){this.props.showApplicationLockedAlert((function(t){var n=t.hidePane;return r.createElement(KH,{configuration:e,onRequestClose:n})}))},s.showMailNotEnabledAlert=function(e){this.props.showMailNotEnabledAlert({title:gc("CloudOS.Error.MailNotEnabled.Title"),description:gc("CloudOS.Error.MailNotEnabled.Description",{applicationName:bu(e)}),buttons:[{title:gc("CloudOS.Button.OK.Title"),action:"ok"}],onActionSelected:function(){}})},s.showUnsavedChangesAlert=function(e){var t=ky.sharedInstance.hasChildApplicationWithUnsavedChanges(),n=null==t?void 0:t.applicationConfiguration;if(n){var i=bu(n);this.props.showUnsavedChangesAlert((function(t){var n=t.hidePane;return r.createElement(EW,{applicationName:i,onChoice:function(t){e(t),n()}})}))}else e(!0)},s.authenticationDidFail=function(e){window.navigator.onLine?e?this.props.showOnlineAndAuthenticatedAuthenticationDidFailAlert((function(e){var t=e.hidePane;return r.createElement(CW,{onRequestClose:t})})):this.props.showOnlineAuthenticationDidFailAlert((function(){return r.createElement(IW,null)})):this.props.showOfflineAuthenticationDidFailAlert((function(){return r.createElement(_W,null)}))},s.showAccountMenu=function(e){this.props.sizeClass===f.COMPACT?this.props.showCompactAccountMenu():this.props.showAccountMenu(e)},s.showCreationMenu=function(e){this.props.sizeClass===f.COMPACT?this.props.showCompactCreationMenu():this.props.showCreationMenu(e)},s.showStorageUsageWarning=function(e){this.props.showStorageUsageWarning(e)},s.showHelpMenu=function(e){this.props.showHelpMenu(e)},s.hideEnvironmentInformation=function(){this.props.setShowSash(!1)},s.presentApplicationModal=function(e,t){var n=this;if(!this.props.hideChildApplicationRef.current){var i=gl.sharedInstance.getApplicationInfo(e);if(i&&ky.sharedInstance.canLaunchChildApplication(i)){var o=(null==t?void 0:t.options)||{},a=o.hash,s={launchSource:o.source,relativePath:o.route,hash:a,launchItem:o.launchItem};this.props.showChildApplicationModal((function(e){var t=e.hidePane,o=function(){t(),n.props.hideChildApplicationRef.current=void 0};return n.props.hideChildApplicationRef.current=o,r.createElement(fW,{applicationInfo:i,applicationContext:s,onClose:o})}),{animates:Fp.NONE})}}},s.showAppSwitcher=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,width:0,height:0};this.props.sizeClass===f.COMPACT?this.props.showCompactAppSwitcher():this.props.showAppSwitcher(e)},s.showTrustCredentialsOnLogout=function(e,t){this.props.showTrustBrowserAlert(function(e){var t=[{title:Xn("CloudOS.Authentication.TrustBrowserAndSignOutButton.Title"),action:"trust_and_signout"},{title:Xn("CloudOS.Button.Cancel.Title"),action:"cancel"},{title:Xn("CloudOS.Authentication.SignOutButton.Title"),action:"signout"}],n=[t[0],t[1],t[2]],r=[t[0],t[2]];return{className:"trust-browser-alert",animates:Fp.IN,title:Xn("CloudOS.Authentication.TrustBrowser.SignOut.Title"),description:Xn("CloudOS.Authentication.TrustBrowser.SignOut.Description"),buttons:e.hideCancelButton?r:n,defaultAction:"trust_and_signout",cancelAction:"cancel",onActionSelected:function(t){"trust_and_signout"===t?null==e.onChoice||e.onChoice(!0):"signout"===t?null==e.onChoice||e.onChoice(!1):"cancel"===t&&(null==e.onChoice||e.onChoice(null))}}}({onChoice:e,hideCancelButton:t}))},s.showVerifyShareAccessModal=function(e,t){var n=this;this.state.hideVerifyShareAccessModalCallback||this.props.showVerifyShareAccessModal((function(i){var o=i.hidePane;return n.setState({hideVerifyShareAccessModalCallback:o}),r.createElement("div",null,r.createElement(bW,{onComplete:function(){o(),YV.cloudOSApplication.switchToSpringboard()},stages:e,errorStage:t}))}))},s.hideVerifyShareAccessModal=function(){var e,t;null==(e=(t=this.state).hideVerifyShareAccessModalCallback)||e.call(t),this.setState({hideVerifyShareAccessModalCallback:void 0})},s.continueAuthentication=function(){var e;null==(e=this.props.appleIdControllerRef.current)||e.continueAuthentication()},s.showInAppLogin=function(e){var t=this;this.state.hideInAppLoginCallback||this.props.showInAppLogin((function(n){var i=n.hidePane;return t.setState({hideInAppLoginCallback:i}),r.createElement(az,SW({},e,{appleIdControllerRef:t.props.appleIdControllerRef}))}))},s.pauseInAppLogin=function(){document.querySelectorAll("ui-pane, ui-pane-backdrop").forEach((function(e){e.classList.add("hide")}))},s.unpauseInAppLogin=function(){document.querySelectorAll("ui-pane, ui-pane-backdrop").forEach((function(e){e.classList.remove("hide")}))},s.hideInAppLogin=function(){var e,t;null==(e=(t=this.state).hideInAppLoginCallback)||e.call(t),this.setState({hideInAppLoginCallback:void 0})},s.showLoginForSessionRetrieve=function(e){var t=this;this.state.hideLoginForSessionRetrieveCallback||this.props.showLoginForSessionRetrieve((function(n){var i=n.hidePane;return t.setState({hideLoginForSessionRetrieveCallback:i}),r.createElement(az,SW({},e,{appleIdControllerRef:t.props.appleIdControllerRef}))}))},s.hideLoginForSessionRetrieve=function(){var e,t;null==(e=(t=this.state).hideLoginForSessionRetrieveCallback)||e.call(t),this.setState({hideLoginForSessionRetrieveCallback:void 0})},s.showErrorDialog=function(e,t,n,i){this.props.showErrorDialog((function(){return r.createElement(cW,{applicationConfiguration:e,title:t,subtitle:n,description:i})}))},s.navigateToHomePage=function(){YV.cloudOSApplication.recordHomePageLinkStat(),sZ(eZ.home,gc("NavLinks.Home"))},o=i,(a=[{key:"isInAppLogin",get:function(){return!!this.state.hideInAppLoginCallback}}])&&TW(o.prototype,a),Object.defineProperty(o,"prototype",{writable:!1}),i}(r.Component),NW=(n(1264),function(e){return r.createElement("section",{"aria-label":"Breadcrumbs",className:"breadcrumbs"},r.createElement("ol",null,r.createElement("li",null,r.createElement("a",{href:"/",onClick:function(e){e.preventDefault(),e.stopPropagation(),YV.cloudOSApplication.switchToSpringboard()}},r.createElement(gW,{className:"apple-logo"}),gc("Application.Title"))),r.createElement("li",null,r.createElement(vT,{"aria-hidden":!0,layoutMode:"glyphBox",desiredFontSize:8,className:"chevron"}),r.createElement("span",{"aria-current":"page"},e.currentPageName))))});n(1265),function(e){e.EARLY_MORNING="0-6",e.MORNING="6-12",e.AFTERNOON="12-18",e.EVENING="18-0"}(xW||(xW={}));var RW=function(e){var t=Ts()("domain-redirect-page",e.className),n=r.useMemo((function(){return function(){var e=(new Date).getHours();return e<6?xW.EARLY_MORNING:e<12?xW.MORNING:e<18?xW.AFTERNOON:xW.EVENING}()}),[]),i=gc("CloudOS.Springboard.Greeting."+n),o=gc("CloudOS.RedirectedAuthentication.RedirectNeeded.Title",{currentDomain:e.currentDomain}),a=gc("CloudOS.RedirectedAuthentication.RedirectNeeded.Subtitle",{destinationDomain:e.destinationDomain}),s=gc("CloudOS.RedirectedAuthentication.RedirectNeeded.RedirectButton.Title",{destinationDomain:e.destinationDomain});return r.createElement("div",{className:t},r.createElement($M,{titleSize:"small",iconSize:"small",title:i}),r.createElement("div",{className:"redirect-title"},o),r.createElement("div",{className:"redirect-subtitle"},a),r.createElement(Wc,{className:"redirect-domain-button",onActivate:e.onRedirectToDomain,variant:"pill primary"},s))},DW=(n(1266),function(e){return Object(r.createElement)(_c,{originalProps:e,metadata:{name:"icloud",svgPath:"M105.225 3.22266C119.971 3.22266 131.494-7.56836 131.494-20.9961C131.494-31.25 125.586-40.1367 116.064-44.1406C116.162-65.918 100.488-81.6406 80.5176-81.6406C67.2852-81.6406 57.8613-74.5605 52.002-66.0156C39.9902-69.5312 26.9043-60.4004 26.6602-46.7285C15.625-44.9707 8.74023-35.1074 8.74023-23.1934C8.74023-8.83789 21.2891 3.22266 37.9883 3.22266ZM105.225-4.63867L37.9883-4.63867C25.6836-4.63867 16.6016-13.2324 16.6016-23.1934C16.6016-32.959 22.5098-40.7227 32.8613-40.7227C33.5449-40.7227 33.7891-41.0645 33.7891-41.6992C33.7891-56.7383 44.6289-61.1816 54.6387-57.9102C55.2246-57.7148 55.5664-57.8613 55.8594-58.3984C60.5957-66.8457 67.8711-73.7793 80.5176-73.7793C96.5332-73.7793 107.617-61.084 108.447-46.582C108.594-44.3359 108.447-41.6992 108.252-39.4043C108.203-38.7695 108.447-38.4277 109.033-38.2812C117.92-36.3281 123.633-29.834 123.633-20.9961C123.633-11.9141 115.625-4.63867 105.225-4.63867Z",layoutBox:{viewBox:"0 0 268.0201416015625 158.116943359375",width:268.0201416015625,height:158.116943359375,translateX:63.89510009765627,translateY:114.2884521484375,baseline:114.2884521484375,capline:43.8284912109375},glyphBox:{viewBox:"0 0 122.758056640625 92.8212890625",width:122.758056640625,height:92.8212890625,translateX:-8.735942382812482,translateY:81.640625,baseline:81.640625,capline:11.1806640625}}})});function kW(e){var t="CHN"===e.accountCountry?gc("CloudOS.TermsAndConditions.ChinaTerms.Description"):gc("CloudOS.TermsAndConditions.Description");return r.createElement(uz,{message:gc("CloudOS.TermsAndConditions.Title"),description:t,primaryButton:{title:gc("CloudOS.TermsAndConditions.AgreeButton.Title"),onActivate:function(){e.onAcceptTerms(!0)}},alternateButton:{title:gc("CloudOS.TermsAndConditions.CancelButton.Title"),onActivate:function(){e.onAcceptTerms(!1)}}})}function UW(e){var t=vz();return r.useEffect((function(){var e;null==(e=document.getElementsByTagName("ui-main-pane")[0])||e.removeAttribute("inert");for(var t=document.getElementsByClassName("show-modal-pane-centered"),n=0;n<t.length;n++){var r=t[n].style;r.background="transparent",r.pointerEvents="none"}}),[]),r.createElement("div",{className:"terms-and-conditions"},r.createElement(DW,{desiredFontSize:24,fill:"#0061e1",className:"cloud-image"}),r.createElement("div",{className:"terms-header"},r.createElement("div",{className:"terms-header-title"},e.isChina?r.createElement(r.Fragment,null,gc("Application.Title"),r.createElement(OB,{className:"china-terms-and-conditions-branding"}),r.createElement("div",null,gc("CloudOS.TermsAndConditions.Title.WithoutiCloud"))):r.createElement(r.Fragment,null,gc("CloudOS.TermsAndConditions.Title")))),r.createElement("div",{className:"content-scroll"},r.createElement("div",{className:"content-desc",dangerouslySetInnerHTML:{__html:e.termsDetails.iCloudTerms.content}})),r.createElement("div",{className:"terms-footer"},r.createElement(Wc,{variant:"block secondary",className:"download-button",onActivate:function(){var t=e.termsDetails,n=t.locale,r=t.country,i=hr(t.downloadICloudTerms,{locale:n,country:r});new lE("X-APPLE-TERMS-VALIDATE",Ne.sharedInstance.current.servicesDomain).download(new tE(i,"termsValidateToken"))}},gc("CloudOS.TermsAndConditions.DownloadCopyButton.Title")),r.createElement("div",{className:"button-groups"},r.createElement(Wc,{variant:"block tertiary",className:"disagree-button",onActivate:function(){window.location.reload(),e.onAcceptTerms(!1)}},gc("CloudOS.TermsAndConditions.DisagreeButton.Title")),r.createElement(Wc,{variant:"block primary",onActivate:function(){t((function(t){var n=t.hidePane;return r.createElement(kW,{onAcceptTerms:function(t){n(),t&&e.onAcceptTerms(!0)},accountCountry:e.accountCountry})}),{animates:Fp.IN})}},gc("CloudOS.TermsAndConditions.AgreeButton.Title")))))}function LW(e){return r.createElement("div",{className:"terms-and-conditions"},r.createElement(DW,{desiredFontSize:24,fill:"#0061e1",className:"cloud-image"}),r.createElement("div",{className:"terms-header"},r.createElement("div",{className:"terms-header-title"},gc("Application.Title"),r.createElement(OB,{className:"china-terms-and-conditions-branding"}))),r.createElement("div",{className:"content-scroll"},r.createElement("div",{className:"china-terms-label"},gc("CloudOS.TermsAndConditions.ChinaTerms.Paragraph.One")),r.createElement("div",{className:"china-terms-label"},gc("CloudOS.TermsAndConditions.ChinaTerms.Paragraph.Two"))),r.createElement("div",{className:"terms-footer china"},r.createElement(Wc,{variant:"block primary",onActivate:e.onContinue},gc("CloudOS.TermsAndConditions.ContinueButton.Title"))))}var MW=function(e){var t=r.useState(!1),n=t[0],i=t[1],o="CHN"!==e.accountCountry||n?r.createElement(UW,{onAcceptTerms:e.onAcceptTerms,accountCountry:e.accountCountry,termsDetails:e.termsDetails,isChina:"CHN"===e.accountCountry}):r.createElement(LW,{onContinue:function(){return i(!0)}});return r.createElement("div",{className:"terms-and-conditions-container"},o)};function jW(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return FW(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FW(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function FW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BW(){return(BW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function zW(e){return r.createElement("div",{className:Ts()("page-viewport",e.className),style:e.style},r.createElement("div",{className:Ts()("page-content")},e.children))}function HW(e){return r.createElement("div",{className:Ts()("flex-page-viewport",e.className),style:e.style},r.createElement("div",{className:Ts()("flex-page-content")},e.children))}function WW(e){var t,n=gl.sharedInstance.getApplicationConfiguration(e.applicationIdentifier),i=null==n?void 0:n.identifier,o=null;n&&(o="newspublisher"===i?bu(n):_u(n));var a=r.useRef(null);return r.useEffect((function(){var e=a.current;if(e){var t=null==n?void 0:n.applicationInfo;if(t){var r=ky.sharedInstance.getChildApplicationController(t);if(r){var i=r.applicationContext;if(i){var o=function(){s=window.setTimeout((function(){i.targetUIStateWhenLaunched=ug.ACTIVE_FOREGROUND,t&&ky.sharedInstance.launchChildApplication(t,{},void 0,!0)}),1e3)};e.addEventListener("animationend",o);var s=window.setTimeout((function(){i.targetUIStateWhenLaunched=ug.BACKGROUND,e.classList.add("load-child-application-main-fade-in")}),1e3);return i.targetUIStateWhenLaunched=ug.ACTIVE_FOREGROUND,function(){i.targetUIStateWhenLaunched=ug.BACKGROUND,e.removeEventListener("animationend",o),window.clearTimeout(s)}}}}}}),[n]),r.createElement(HW,{className:Ts()("load-child-application-route",e.className)},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",{className:"centering",ref:a},i&&r.createElement(Sd,{iconSize:100,applicationIdentifier:i}),o&&r.createElement("div",{className:"title"},o),!e.hadError&&r.createElement("div",{className:"loading"},gc("LoadingPage.Loading")),e.hadError&&r.createElement(r.Fragment,null,r.createElement("div",{className:"couldnt-open"},gc("LoadingPage.CouldntOpen")),r.createElement("div",{className:"problem"},gc("LoadingPage.Problem",{application:null!=(t=o)?t:""})),r.createElement(Wc,{className:"try-again",onActivate:function(){ky.sharedInstance.switchToApplication(e.applicationIdentifier,{})}},r.createElement(pA,{"aria-hidden":"true",desiredFontSize:12,layoutMode:"glyphBox"}),"\xa0",gc("LoadingPage.TryAgain")),r.createElement(uT,{className:"system-status",href:"https://www.apple.com/support/systemstatus/"},gc("LoadingPage.SystemStatus"))),r.createElement("div",{style:{flex:1}})),r.createElement("footer",null,r.createElement(UB,null)))}function VW(e){return r.createElement(zW,{className:Ts()("landing-page-route",e.className)},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",null,r.createElement(PB,{onSignInPressed:e.onSignInPressed,configuration:e.configuration,description:Ne.sharedInstance.isDomainCN?gc("CloudOS.LandingPage.description.gcbd"):gc("CloudOS.LandingPage.description")})),r.createElement("footer",null,r.createElement(UB,null)))}function ZW(e){var t=r.useState(!1),n=t[0],i=t[1];return r.createElement(HW,{className:Ts()("settings-page-route",e.className)},r.createElement(Ns,{value:Es.INTERNAL_APP},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN,allowFeedbackButton:!0})),r.createElement("main",null,r.createElement(BH,{onPageLoaded:sV,setIsNotICloudPlusUser:i})),r.createElement("footer",{className:n?"gray-theme":""},r.createElement(NW,{currentPageName:gc("Settings.DisplayName")}),r.createElement(UB,null)))}function qW(e){return r.createElement(HW,{className:Ts()("recovery-page-route",e.className)},r.createElement(Ns,{value:Es.INTERNAL_APP},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN,allowFeedbackButton:!0})),r.createElement("main",null,r.createElement(eB,null)),r.createElement("footer",null,r.createElement(NW,{currentPageName:gc("RecoveryPage.Title")}),r.createElement(UB,null)))}function KW(e){return r.createElement(HW,{className:Ts()("icloud-plus-page-route",e.className)},r.createElement(Ns,{value:Es.INTERNAL_APP},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN,allowFeedbackButton:!0})),r.createElement("main",null,r.createElement(RB,{onPageLoaded:sV})),r.createElement("footer",null,r.createElement(NW,{currentPageName:gc("ICloudPlusPage.Title")}),r.createElement(UB,null)))}function GW(e){var t=e.isBeneficiary?gc("StoragePage.Title.Lite"):gc("StoragePage.Title");return r.createElement(HW,{className:Ts()("storage-page-route",e.className)},r.createElement(Ns,{value:Es.INTERNAL_APP},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN,allowFeedbackButton:!0})),r.createElement("main",null,r.createElement(vB,{onPageLoaded:sV})),r.createElement("footer",null,r.createElement(NW,{currentPageName:t}),r.createElement(UB,null)))}function YW(e){var t=e.isBeneficiary?gc("PlanDetailsPage.Title.Lite"):gc("PlanDetailsPage.Title"),n=r.useState(!1),i=n[0],o=n[1];return r.createElement(HW,{className:Ts()("plan-page-route",e.className)},r.createElement(Ns,{value:Es.INTERNAL_APP},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN,allowFeedbackButton:!0})),r.createElement("main",null,r.createElement(_j,{onPageLoaded:sV,setIsNotICloudPlusUser:o})),r.createElement("footer",{className:i?"gray-theme":""},r.createElement(NW,{currentPageName:t}),r.createElement(UB,null)))}function QW(e){return r.createElement(HW,{className:e.className},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",null,r.createElement(VH,{mailDropDetail:e.details})),r.createElement("footer",null,r.createElement(UB,null)))}function XW(e){return r.createElement(HW,null,r.createElement(Ns,{value:Es.INTERNAL_APP},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",null,r.createElement(fA,{cantContinueAnyway:e.unsupportedFaceTimeCantContinueAnyway,handleContinueAnyway:e.handleFacetimeUnsupportedContinueAnyway})),r.createElement("footer",null,r.createElement(UB,null)))}function JW(e){var t,n;return r.createElement(HW,{className:e.className},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",{className:"centering"},r.createElement(Gz,{shareInfo:{applicationIdentifier:e.shareRecord.applicationIdentifier,displayName:Fw(e.shareRecord.initiatedByFirstName,e.shareRecord.initiatedByLastName,!0),shareTitle:null!=(t=e.shareRecord.shareTitle)?t:"",fileExtension:null!=(n=e.shareRecord.fileType)?n:"",ownerEmail:e.shareRecord.initiatedByEmail},isAuthenticated:e.isAuthenticated})),r.createElement("footer",null,r.createElement(UB,null)))}function $W(e){return r.createElement(HW,{className:e.className},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",null,r.createElement(ZH,{errorDescription:e.errorDescription,errorTitle:e.errorTitle,applicationIdentifier:e.applicationIdentifier})),r.createElement("footer",null,r.createElement(UB,null)))}function eV(e){var t;return r.createElement(HW,{className:e.className},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",{className:"centering"},r.createElement(Gz,{shareInfo:Object.assign({shareTitle:null!=(t=e.ckShareRecord.title)?t:"",displayName:Fw(e.ckShareRecord.ownerFirstName,e.ckShareRecord.ownerLastName,!0)},e.ckShareRecord),isAuthenticated:e.isAuthenticated,onSignInPressed:e.onSignInPressed})),r.createElement("footer",null,r.createElement(UB,null)))}function tV(e){return r.createElement(Sp,{scope:"spring-board",baseline:!0},r.createElement(Ns,{value:Es.HOMEPAGE},r.createElement(yp,null,r.createElement(Pm,{isInCustomizationMode:e.initiallyInCustomizeMode},r.createElement(ij,{className:e.className,isCNDomain:Ne.sharedInstance.isDomainCN,legalFooter:r.createElement(UB,null),onPageLoaded:sV,inlineBannerData:e.inlineBannerData})))))}function nV(e){return r.createElement(HW,{className:Ts()("redirect-to-domain-route",e.className)},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",null,r.createElement(RW,e.pageProps)),r.createElement("footer",null,r.createElement(UB,null)))}function rV(e){var t;return r.createElement(HW,{className:Ts()("unauthed-share-route",e.className)},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",null,r.createElement(AB,{onSignInPressed:e.onSignInPressed,sharerName:null==(t=e.shareRecord)?void 0:t.ownerName})),r.createElement("footer",null,r.createElement(UB,null)))}function iV(e){return r.createElement("main",null,r.createElement(hA,{wasTermsUpdatePerformed:e.wasTermsUpdatePerformed,onDismiss:e.onDismiss}))}function oV(e){return r.createElement(HW,{className:Ts()("terms-and-conditions-route",e.className)},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement("main",null,r.createElement(MW,e.pageProps)),r.createElement("footer",null,r.createElement(UB,null)))}function aV(e){return r.createElement("main",null,r.createElement(GB,e.interstitialPageProps))}function sV(){YV.cloudOSApplication.triggerPrefetchTileData(),YV.cloudOSApplication.initializePushConnection()}function cV(e){var t,n,i,o=e.rootState,a=null==(t=qf())||null==(n=t.details)||null==(i=n.beneficiaryInfo)?void 0:i.isBeneficiary;switch(o.kind){case"load-child-application":return r.createElement(WW,{className:e.className,applicationIdentifier:o.applicationIdentifier,hadError:o.hadError});case"landing-page":return r.createElement(VW,{className:e.className,onSignInPressed:o.onSignInPressed,configuration:o.configuration});case"unauthed-share":return r.createElement(rV,{onSignInPressed:o.onSignInPressed,shareRecord:o.shareRecord,className:e.className});case"redirect-to-domain":return r.createElement(nV,{className:e.className,pageProps:o.pageProps});case"springboard":return r.createElement(tV,{initiallyInCustomizeMode:o.initiallyInCustomizeMode,className:e.className,inlineBannerData:e.inlineBannerData});case"ck-share-acceptance":return r.createElement(eV,{className:e.className,ckShareRecord:o.ckShareRecord,isAuthenticated:o.isAuthenticated,onSignInPressed:o.onSignInPressed});case"share-acceptance":return r.createElement(JW,{className:e.className,shareRecord:o.shareRecord,isAuthenticated:o.isAuthenticated});case"share-acceptance-error":return r.createElement($W,BW({className:e.className},o));case"facetime-unsupported":return r.createElement(XW,{unsupportedFaceTimeCantContinueAnyway:o.unsupportedFaceTimeCantContinueAnyway,handleFacetimeUnsupportedContinueAnyway:o.handleFacetimeUnsupportedContinueAnyway});case"mail-drop":return r.createElement(QW,{className:e.className,isAuthenticated:o.isAuthenticated,details:o.details});case"terms-and-conditions":return r.createElement(oV,{className:e.className,pageProps:o.pageProps});case"terms-and-conditions-confirmation":return r.createElement(iV,{wasTermsUpdatePerformed:o.wasTermsUpdatePerformed,onDismiss:o.onDismiss});case"interstitial":return r.createElement(aV,{interstitialPageProps:o.interstitialPageProps});case"/plan":return r.createElement(YW,{className:e.className,isBeneficiary:a});case"/storage":return r.createElement(GW,{className:e.className,isBeneficiary:a});case"/recovery":return r.createElement(qW,{className:e.className});case"/icloudplus":return r.createElement(KW,{className:e.className});case"/settings":return r.createElement(ZW,{className:e.className});case"empty":return function(){var e=window.location.pathname;return["/ssoRedirect"].includes(e)}()?r.createElement(kB,{action:he.c(window.location.href).searchParams.get("action")||"manage_appleid"}):null;default:return null}}function uV(e){var t,n,i;!function(e){var t=r.useState("rgb(251, 251, 253)"),n=t[0],i=t[1];r.useEffect((function(){var e=document.head.querySelector('meta[name="theme-color"]');e instanceof HTMLMetaElement&&e.setAttribute("content",n)}),[n]);var o=e.kind,a="child-application"===e.kind?e.applicationIdentifier:"";r.useEffect((function(){switch(o){case"child-application":var e,t=gl.sharedInstance.getApplicationInfo(a);i(null!=(e=null==t?void 0:t.applicationThemeColor)?e:"rgb(245, 245, 247)");break;case"springboard":case eZ.home:case eZ.plan:case eZ.storage:case eZ.recovery:case eZ.shared:case eZ.restore:case eZ.icloudplus:case eZ.status:case eZ.settings:i("rgb(245, 245, 247)");break;case"load-child-application":default:i("rgb(251, 251, 253)")}}),[o,a])}(e.rootState);var o,a=r.useState(!0),s=a[0],c=a[1];(function(){var e=r.useRef(!1),t=vz();Jn()||function(e){gz.apply(this,arguments)}((function(n){e.current||(e.current=!0,t((function(t){var i=t.hidePane;return r.createElement(lz,{onAutoUpdateIgnore:function(){e.current=!1,i()},onAutoUpdateReload:function(){try{window.localStorage.setItem("didReloadToBuild",n)}catch(t){}window.location.reload(),e.current=!1,i()}})})))}))})(),o=!!e.hasChildApplicationWithUnsavedChanges,r.useEffect((function(){if(o){var e=function(e){var t,n=null==(t=ky.sharedInstance.hasChildApplicationWithUnsavedChanges())?void 0:t.applicationConfiguration;if(n){e.preventDefault();var r=gc("CloudOS.UnsavedChanges.Alert.Description",{applicationName:bu(n)});return e.returnValue=r,r}};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}}),[o]),r.useEffect((function(){var e=function(){"hidden"===document.visibilityState&&fr.sharedInstance.flushStats()};return window.addEventListener("visibilitychange",e),function(){window.removeEventListener("visibilitychange",e)}}),[]),r.useEffect((function(){var e=function(){YV.cloudOSApplication.notifyHostingStateDidChange(),gl.sharedInstance.update()},t=function(){for(var e,t=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return _z(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_z(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(YV.cloudOSApplication.serviceManager.serviceInstancesByIdentifier("com.apple.icloud.cloudos.legacyCloudOSApplicationService"));!(e=t()).done;){var n=e.value;n instanceof K_&&n.notifySizeClassDidChange(qc(),Qc())}},n=function(){YV.cloudOSApplication.notifyHostingStateDidChange()};return t(),Zc.addEventListener("change",e),Yc.addEventListener("change",e),window.addEventListener("resize",t),window.visualViewport&&(window.visualViewport.addEventListener("resize",n),window.visualViewport.addEventListener("scroll",n)),function(){Zc.removeEventListener("change",e),Yc.removeEventListener("change",e),window.removeEventListener("resize",t),window.visualViewport&&(window.visualViewport.removeEventListener("resize",n),window.visualViewport.removeEventListener("scroll",n))}}),[]);var u=r.useRef(null),l=r.useRef(),d=r.useRef(null),p=r.useRef();switch(e.rootState.kind){case"home-login":p.current||(p.current=e.homeLoginProps)}var f,h,m,g=r.useRef([]),v=r.useRef(1),y=r.useRef({kind:"empty"}),b=r.useState(null),_=b[0],C=b[1];if((f=y.current,h=e.rootState,f.kind!==h.kind||"child-application"===f.kind&&"child-application"===h.kind&&f.applicationIdentifier!==h.applicationIdentifier)&&((null==y?void 0:y.current.kind)!==eZ.icloudplus&&(null==y?void 0:y.current.kind)!==eZ.recovery||(l.current?null==l.current||l.current():document.querySelectorAll("ui-pane, ui-pane-backdrop").forEach((function(e){e.classList.add("hide")}))),C({content:r.createElement(cV,{key:v.current,rootState:y.current,className:"fade-out"}),state:y.current}),++v.current,"empty"===y.current.kind&&"empty"!==e.rootState.kind&&"springboard"!==e.rootState.kind&&("landing-page"!==e.rootState.kind||void 0!==(null==(m=e.rootState.configuration)?void 0:m.identifier)))){var I=!!wZ.sharedInstance.cloudOSUser,w=e.rootState.kind,E={source:w};switch(E.statCategory=I?B.USER:B.SESSION,w){case"load-child-application":E.childName=e.rootState.applicationIdentifier;break;case"landing-page":E.childName=null==(t=e.rootState.configuration)?void 0:t.identifier}ur.withEventAndLabel("load","deeplink",E).record()}y.current=e.rootState,r.useEffect((function(){var t=d.current;if(t){for(var n,r=[],i=[],o=jW(g.current);!(n=o()).done;){var a=n.value;e.remoteViewControllers.includes(a)||r.push(a)}for(var s,c=jW(e.remoteViewControllers);!(s=c()).done;){var u=s.value;g.current.includes(u)||i.push(u)}g.current=[].concat(e.remoteViewControllers);for(var l=0,p=i;l<p.length;l++){var f=p[l],h=f.iframe;t.appendChild(h),f.isConnected=!0}for(var m=0,v=r;m<v.length;m++){var y=v[m],b=y.iframe;t.removeChild(b),y.isConnected=!1}for(var C,I="child-application"===e.rootState.kind?e.rootState.applicationIdentifier:null,w="child-application"===(null==_?void 0:_.state.kind)?_.state.applicationIdentifier:null,E=jW(g.current);!(C=E()).done;){var S=C.value;S.controller.applicationConfiguration.identifier===I?(S.iframe.classList.add("fade-in"),S.iframe.classList.remove("fade-out"),S.iframe.removeAttribute("aria-hidden")):S.controller.applicationConfiguration.identifier===w?(S.iframe.classList.add("fade-out"),S.iframe.classList.remove("fade-in"),S.iframe.setAttribute("aria-hidden","")):(S.iframe.classList.remove("fade-in"),S.iframe.classList.remove("fade-out"),S.iframe.setAttribute("aria-hidden",""))}}}));var S=e.remoteViewControllers.some((function(e){return e.controller.applicationConfiguration.identifier===Du.identifier})),T=wm(),O=null==(n=qf())||null==(i=n.details)?void 0:i.dsid;r.useEffect((function(){_&&setTimeout((function(){C(null)}),800)}),[_]);var P=Kc();return r.createElement(r.Fragment,null,r.createElement(PW,{setShowSash:c,appleIdControllerRef:u,hideChildApplicationRef:l,sizeClass:P}),r.createElement(fc,{webServices:T,dsid:O},r.createElement("div",{className:"root-viewport"},r.createElement(bz,{to:e.notificationElement}),e.bannerData&&r.createElement(bk,{bannerData:e.bannerData}),S&&r.createElement(zH,null),r.createElement("div",{className:"root-component",ref:d},null==_?void 0:_.content,r.createElement(cV,{key:v.current,className:"fade-in",rootState:e.rootState,inlineBannerData:e.inlineBannerData}),p.current&&r.createElement(HW,{className:Ts()("home-login-route",{"fade-in":"home-login"===e.rootState.kind,"fade-out":"home-login"!==e.rootState.kind})},r.createElement(Ns,{value:Es.LOGIN},r.createElement(jL,{isCNDomain:Ne.sharedInstance.isDomainCN})),r.createElement(az,BW({},p.current,{appleIdControllerRef:u})),r.createElement("footer",null," ",r.createElement(UB,null)," ")),s&&r.createElement(sz,{onActivate:function(){return c(!1)}})))))}var lV=new nS.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:12e4}}});function dV(){var e=r.useState(""),t=e[0],n=e[1],i=r.useState(""),o=i[0],a=i[1],s=r.useState(YV.cloudOSApplication.rootComponentProps),c=s[0],u=s[1];return r.useEffect((function(){window.setTimeout((function(){var e,t=document.body.querySelector(".init-content");null==t||null==(e=t.parentElement)||e.removeChild(t)}),1e3)}),[]),r.useEffect((function(){var e=function(e){u(e)};return YV.cloudOSApplication.stateListeners.add(e),u(YV.cloudOSApplication.rootComponentProps),function(){YV.cloudOSApplication.stateListeners.delete(e)}}),[]),r.createElement(Sp,{scope:"app"},r.createElement(Ps,{value:{launchApp:function(e,t,n){var r;(function(e){e===Du.identifier&&(null==dA.sharedInstance.switchDriveToAppMode||dA.sharedInstance.switchDriveToAppMode())})(e),"modal"===(null==n?void 0:n.presentationStyle)?YV.cloudOSApplication.presentApplicationModal(e,t):ky.sharedInstance.switchToApplication(e,null!=(r=null==t?void 0:t.options)?r:{})}}},r.createElement(ks,{value:{ariaLiveText:t,setAriaLiveText:n}},r.createElement(Nm,{value:{modalToOpen:o,setModalToOpen:a}},r.createElement(Zp,null,r.createElement(nS.QueryClientProvider,{client:lV},r.createElement(gA,null),r.createElement(uV,c)))))))}function pV(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function fV(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){pV(o,r,i,a,s,"next",e)}function s(e){pV(o,r,i,a,s,"throw",e)}a(void 0)}))}}function hV(e,t){return mV.apply(this,arguments)}function mV(){return(mV=fV(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=_r.configuration.webServices,n?(s=null==o||null==(a=o.get("mccgateway"))?void 0:a.url)&&lV.prefetchQuery([vE.mailRecentThreads,t],(function(){return DN({webServices:{mccgateway:s},dsid:t})})):(u=null==o||null==(c=o.get("mail"))?void 0:c.url)&&lV.prefetchQuery([vE.mailRecentMessages,t],(function(){return kN({webServices:{mail:u},dsid:t})})),(l=null==o||null==(r=o.get("docws"))?void 0:r.url)&&lV.prefetchQuery(["icloud-drive-tile-res",t],(function(){return OS({webServices:{docws:l},dsid:t},6)})),(d=null==o||null==(i=o.get("ckdatabasews"))?void 0:i.url)&&(lV.prefetchQuery([vE.notesRecent,t],(function(){return _N({webServices:{ckdatabasews:d},dsid:t})})),fV(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,lV.fetchQuery([vE.photosPrimaryZone,t],(function(){return nN({webServices:{ckdatabasews:d},dsid:t})}));case 3:return n=e.sent,e.next=6,lV.prefetchQuery([vE.photosRecent,t],(function(){return rN({webServices:{ckdatabasews:d},dsid:t},n[0])}));case 6:return e.abrupt("return",e.sent);case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])})))());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gV=n(1294),vV=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},yV=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},bV=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(yV(arguments[t]));return e},_V=function(){function e(e){e.hasOwnProperty("processReference")&&(this.processReference=e.processReference),e.hasOwnProperty("proxyMethod")&&(this.proxyMethod=e.proxyMethod),e.hasOwnProperty("params")&&(this.params=e.params)}return e.every=function(e,t){return function(e,t){var n,r,i,o;try{for(var a=vV(e),s=a.next();!s.done;s=a.next())(f=s.value).validate()}catch(v){n={error:v}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var c=new Map,u=new Map,l=[];if(0===e.length)return Promise.resolve(t(u,c));try{for(var d=vV(e),p=d.next();!p.done;p=d.next()){var f,h=(f=p.value).proxyMethod,m=f.params,g=void 0===m?[]:m;l.push(h.apply(void 0,bV(g)))}}catch(y){i={error:y}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}return Promise.allSettled(l).then((function(n){return n.forEach((function(t,n){t&&t.isOK?u.set(e[n],t):c.set(e[n],t)})),t(u,c)}))}(e,t)},e.prototype.validate=function(){var e=this.processReference,t=this.proxyMethod;e||Object(Rg.a)("Required process reference value is not set"),t&&Object(Wg.c)(t)||Object(Rg.a)("Required process reference proxy method is not set")},e}(),CV=n(1290),IV=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return IV(t,e),Object.defineProperty(t.prototype,"childProcessReferences",{get:function(){var e=this,t=this._childProcessReferencesSet;if(t)return t;var n=(t=this._childProcessReferencesSet=new Set).add,r=t.delete;return t.add=function(r){var i=n.call(t,r);return e.childProcessReferenceWasAdded(r),i},t.delete=function(n){n instanceof zg||Object(Rg.a)("Can only delete ChildProcessReference instances");var i=r.call(t,n);return i&&e.childProcessReferenceWasRemoved(n),i},t},enumerable:!1,configurable:!0}),t.prototype.childProcessReferenceWasAdded=function(e){},t.prototype.childProcessReferenceWasRemoved=function(e){},t.prototype.hostingStateDidChange=function(e,t){var n,r,i=[],o=this.childProcessReferences;this._super.hostingStateDidChange&&this._super.hostingStateDidChange(e,t);try{for(var a=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),s=a.next();!s.done;s=a.next()){var c=s.value,u=c.processState,l=c.remoteProxy;if(Object(dg.c)(u,dg.a.RUNNING)){var d=new _V({processReference:c,proxyMethod:l?l.hostingStateDidChange:function(){},params:[e,t]});i.push(d)}}}catch(p){n={error:p}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return _V.every(i,(function(e,t){}))},t.mixins=[CV.a],t}(Hg.a),EV=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return EV(t,e),t.prototype.didEnterBackground=function(){var e,t,n=[],r=this.childProcessReferences;this._super.didEnterBackground&&this._super.didEnterBackground();try{for(var i=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),o=i.next();!o.done;o=i.next()){var a=o.value,s=a.processState,c=a.remoteProxy;if(Object(dg.c)(s,dg.a.RUNNING)&&Fg.a.isImplementedBy(c)){var u=new _V({processReference:a,proxyMethod:c.didEnterBackground});n.push(u)}}}catch(l){e={error:l}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return _V.every(n,(function(e,t){e.forEach((function(e,t){})),t.forEach((function(e,t){}))}))},t.mixins=[wV],t}(Hg.a),TV=function(){function e(){}return e.prototype.applicationWillFinishLaunching=function(e,t){},e.prototype.applicationDidFinishLaunching=function(e,t){},e}(),OV=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),PV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return OV(t,e),t.prototype.applicationDidBecomeActive=function(e){},t.prototype.applicationWillResignActive=function(e){},t.prototype.applicationDidEnterBackground=function(e){},t.prototype.applicationWillEnterForeground=function(e){},t}(TV),xV=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AV=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disableTouchScrolling=!1,t.uiStateChanged=new Tg.a(t),t._internalUIState=ug.NONE,t}return xV(t,e),t.main=function(e){var n=e.allowedRemoteOrigins,r=e.applicationClass,i=void 0===r?t:r,o=e.delegate,a=void 0===o?new PV:o;return gV.Application.main({allowedRemoteOrigins:n,applicationClass:i,delegate:a})},Object.defineProperty(t.prototype,"uiState",{get:function(){return this.internalUIState},enumerable:!1,configurable:!0}),t.prototype.run=function(){var t=this;return e.prototype.run.call(this).then((function(){t.parentProcessReference||t.invokeLater((function(){Object(dg.c)(t.processState,dg.a.NONE,dg.a.TERMINATED)||t._transitionRootApplicationToActiveForeground()}))}))},t.prototype.stop=function(){return this.internalUIState=ug.NONE,e.prototype.stop.call(this)},t.prototype.beginLaunching=function(t,n,r){var i=this;this._waitForWindowLoad().then((function(){e.prototype.beginLaunching.call(i,t,n,r)}))},t.prototype.didBecomeActive=function(){var e;Object(dg.b)(this.processState,dg.a.RUNNING),vg(this.uiState,ug.INACTIVE_FOREGROUND),this.internalUIState=ug.ACTIVE_FOREGROUND,null===(e=this.delegate)||void 0===e||e.applicationDidBecomeActive(this)},t.prototype.willResignActive=function(){var e;Object(dg.b)(this.processState,dg.a.RUNNING),vg(this.uiState,ug.ACTIVE_FOREGROUND),null===(e=this.delegate)||void 0===e||e.applicationWillResignActive(this),this.internalUIState=ug.INACTIVE_FOREGROUND},t.prototype.willEnterForeground=function(){var e=this;Object(dg.b)(this.processState,dg.a.RUNNING),vg(this.uiState,ug.NONE,ug.BACKGROUND),this.invokeLater((function(){return Promise.resolve().then((function(){var t;return null===(t=e.delegate)||void 0===t?void 0:t.applicationWillEnterForeground(e)})).then((function(){return e.internalUIState=ug.INACTIVE_FOREGROUND})).then((function(){return e._notifyParentThatProcessIsReadyToBeDisplayedIfNeeded()}))}))},t.prototype.didEnterBackground=function(){var e;Object(dg.b)(this.processState,dg.a.RUNNING),vg(this.uiState,ug.NONE,ug.INACTIVE_FOREGROUND),this.internalUIState=ug.BACKGROUND,null===(e=this.delegate)||void 0===e||e.applicationDidEnterBackground(this)},t.prototype.didReceiveSyntheticBrowserEvent=function(e){},Object.defineProperty(t.prototype,"internalUIState",{get:function(){return this._internalUIState},set:function(e){this._internalUIState=e,this.uiStateChanged.dispatch(e)},enumerable:!1,configurable:!0}),t.prototype._waitForWindowLoad=function(){return new Promise((function(e){"complete"===document.readyState?e():window.addEventListener("load",(function(){e()}))}))},t.prototype._createParentProcessReference=function(t){var n=e.prototype._createParentProcessReference.call(this,t);return n.createMessagingChannel(Sg,this,Eg),n},t.prototype._transitionRootApplicationToActiveForeground=function(){var e=this;this.uiStateChanged.addListener((function t(){e.uiState===ug.INACTIVE_FOREGROUND&&(e.uiStateChanged.removeListener(t),e.invokeLater((function(){return e.didBecomeActive()})))})),this.willEnterForeground()},t.prototype._notifyParentThatProcessIsReadyToBeDisplayedIfNeeded=function(){var e,t=this;Object(dg.b)(this.processState,dg.a.RUNNING),vg(this.uiState,ug.INACTIVE_FOREGROUND);var n=this.parentProcessReference;if(n&&n.isConnected)return null===(e=n.remoteProxy)||void 0===e?void 0:e.isReadyToBeDisplayed().then((function(e){return t.terminateIfMessagingResponseError(e)}))},t.mixins=[SV],t}(gV.Application),NV={url:he.c("https://www.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",cookiesDomain:"icloud.com",rootDomain:"www"},RV={url:he.c("https://www.icloud.com.cn/"),servicesDomain:"icloud.com.cn",domainLogo:"icloud.cn.logo",cookiesDomain:"icloud.com.cn",rootDomain:"www"},DV={url:he.c("https://beta.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:NV,cookiesDomain:"icloud.com",rootDomain:"beta"},kV={url:he.c("https://future.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:DV,cookiesDomain:"icloud.com",rootDomain:"future"},UV={url:he.c("https://carry.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",fallbackDomain:NV,cookiesDomain:"icloud.com",rootDomain:"carry"},LV={url:he.c("https://sprinkles.icloud.com/"),servicesDomain:"icloud.com",domainLogo:"icloud.logo",cookiesDomain:"icloud.com",rootDomain:"sprinkles"},MV=[NV,RV,DV,kV,UV,LV];function jV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var BV=function(){function e(){this.current=function(){for(var e,t=window.location.hostname,n=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return jV(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jV(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(MV);!(e=n()).done;){var r=e.value;if(r.url.hostname===t)return r}throw new Error("hostname "+t+" is not supported")}(),this.allowedRemoteOrigins=MV.map((function(e){return e.url.origin}))}var t,n;return e.prototype.findAvailableHostname=function(e){for(var t=this.current;t;t=t.fallbackDomain)if(e.includes(t))return t.url.hostname;return null},t=e,(n=[{key:"isDomainCN",get:function(){return this.current===RV}}])&&FV(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function zV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function HV(e,t){return(HV=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}BV.sharedInstance=new BV;var WV=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).processId=$n(),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,HV(t,n);var i,o,a=r.prototype;return a.launchApplication=function(){},a.childProcessReferenceWasAdded=function(e){YV.cloudOSApplication.serviceManager.attachRegisteredServicesToProcessReference(e,e.applicationConfiguration,e.historyState)},a.childProcessReferenceWasRemoved=function(e){YV.cloudOSApplication.serviceManager.removeServicesForProcessReference(e)},i=r,(o=[{key:"sessionInfo",get:function(){return YV.cloudOSApplication.sessionInfo},set:function(e){}},{key:"hostInfo",get:function(){return YV.cloudOSApplication.hostInfo},set:function(e){}}])&&zV(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(AV);function VV(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function ZV(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){VV(o,r,i,a,s,"next",e)}function s(e){VV(o,r,i,a,s,"throw",e)}a(void 0)}))}}function qV(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return KV(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KV(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function KV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}gV.Application.main({allowedRemoteOrigins:BV.sharedInstance.allowedRemoteOrigins,applicationClass:WV,isParent:!0});var YV=function(){var e,t,n=i.prototype;function i(){this.delegate=null,this.serviceManager=new nI,this.rootElement=void 0,this.paneProviderContainer=void 0,this._paneManager=void 0,this.bannerController=new aI,this.quotaController=new uI(Ne.sharedInstance.current.servicesDomain,es.fetchURL),this.meCardController=new i_(wZ.sharedInstance),this.coreTypesController=new Xm(Ne.sharedInstance.current),this.isTileDataPrefetched=!1,this.prefetchTileDataTimeout=null,this.isPushNotificationInitialized=!1,this.initializePushConnectionTimeout=null,this.childApplicationRemoteViewControllers=[],this.presentedChildApplicationRemoteViewController=null,this.beneficiaryBannerId=null,this.stateListeners=new Set,this.rootComponentProps={rootState:{kind:"empty"},remoteViewControllers:[]},window.__startFilteringErrors(BT,zT,HT),window.__startFilteringUnhandledRejections(WT,VT,ZT)}return n.localeOrRegionFormatChanged=function(){},n.showSpringboard=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"springboard",initiallyInCustomizeMode:e}}))},n.switchToNavLink=function(e,t){var n,r,i=wZ.sharedInstance,o=null==(n=i.cloudOSUser)?void 0:n.details;if(o){var a=o.completedAuthenticationStep;if(0!==a){var s=o.totalAuthenticationSteps;if(1===a&&2===s)return this.showHomeLoginViewController(),void i.authenticateUser();var c=ga(o);(e!==eZ.icloudplus||c)&&(!(null==(r=o.beneficiaryInfo)?void 0:r.isBeneficiary)||e!==eZ.settings&&e!==eZ.recovery&&e!==eZ.icloudplus)?this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:e,args:t}})):this.switchToSpringboard()}else this.showLandingPage()}else this.showLandingPage()},n.switchToSpringboard=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];ky.sharedInstance.setCurrentChildApplicationIdentifier(void 0,t),_r.title=Jn()?Xn("Application.Title.FaceTime"):Xn("Application.Title"),this.hideCurrentApplication();var r=wZ.sharedInstance,i=null==(e=r.cloudOSUser)?void 0:e.details;if(i){var o=i.completedAuthenticationStep;if(0!==o){var a=i.totalAuthenticationSteps;1===o&&2===a?(this.showHomeLoginViewController(),r.authenticateUser()):this.showSpringboard(n)}else this.showLandingPage()}else this.showLandingPage()},n.showAccountMenu=function(){var e,t={x:_r.isRTL?60:window.innerWidth-60,y:1,width:56,height:48};null==(e=this.delegate)||e.showAccountMenu(t)},n.presentApplicationModal=function(e,t){var n;null==(n=this.delegate)||n.presentApplicationModal(e,t)},n.showAppSwitcher=function(e){var t,n,r,i=null!=(t=null==(n=this.presentedChildApplicationRemoteViewController)?void 0:n.remoteInstanceName)?t:"",o={x:0,y:0,width:0,height:48};if([cl.generations[0].applicationName,Xu.generations[0].applicationName,Ku.generations[0].applicationName].includes(i)&&e&&null!=e&&e.width)o.x=e.x,o.width=e.width+300;else{var a=[Du.generations[0].applicationName,Hu.generations[0].applicationName,$u.generations[0].applicationName,tl.generations[0].applicationName];_r.isRTL&&a.includes(i)?(o.x=95,o.width=56):_r.isRTL?(o.x=window.innerWidth-410,o.width=500):(o.x=window.innerWidth-152,o.width=56)}null==(r=this.delegate)||r.showAppSwitcher(o)},n.showCreationMenu=function(){var e,t={x:_r.isRTL?116:window.innerWidth-116,y:1,width:56,height:48};null==(e=this.delegate)||e.showCreationMenu(t)},n.showStorageUsageWarning=function(e){var t;null==(t=this.delegate)||t.showStorageUsageWarning(e)},n.showHelpMenu=function(e){var t;null==(t=this.delegate)||t.showHelpMenu(e)},n.navigateToHomePage=function(){var e;null==(e=this.delegate)||e.navigateToHomePage()},n.removeEnvironmentInformation=function(){var e;null==(e=this.delegate)||e.hideEnvironmentInformation()},n.triggerPrefetchTileData=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this.isTileDataPrefetched)this.prefetchTileDataTimeout&&clearTimeout(this.prefetchTileDataTimeout);else{var r=function(){var t;e.isTileDataPrefetched=!0;var r=wZ.sharedInstance.cloudOSUser;n?hV(n.dsid,n.isThreadedUser):r&&null!=(t=r.details)&&t.dsid&&hV(r.details.dsid,null==r?void 0:r.isThreadingAvailable)};t?this.prefetchTileDataTimeout=setTimeout(r,7e3):(this.prefetchTileDataTimeout&&clearTimeout(this.prefetchTileDataTimeout),r())}},n.initializePushConnection=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isPushNotificationInitialized)this.initializePushConnectionTimeout&&clearTimeout(this.initializePushConnectionTimeout);else{var n=function(){e.isPushNotificationInitialized=!0;for(var t,n=[],r=[],i=qV(gl.sharedInstance.displayOrder);!(t=i()).done;){var o,a=t.value;if(!a.isDisabled){var s=a.applicationInfo.pushTopic;s&&n.push(s);var c=null==(o=a.applicationInfo.cloudKitInfo)?void 0:o.containerIdentifier;c&&r.push(c)}}UC.sharedInstance.initialize(n,r)};t?this.initializePushConnectionTimeout=setTimeout(n,7e3):(this.initializePushConnectionTimeout&&clearTimeout(this.initializePushConnectionTimeout),n())}},n.willFetchForAuthenticatedUser=function(e,t){this.triggerPrefetchTileData(!!bZ.sharedInstance.applicationIdentifier,{dsid:e,isThreadedUser:t})},n.presentTermsAndConditions=function(){var e=ZV(regeneratorRuntime.mark((function e(t,n,r){var i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null!=(i=this.delegate)&&i.isInAppLogin&&this.delegate.pauseInAppLogin(),e.abrupt("return",new Promise((function(e){o.setRootComponentProps(Object.assign({},o.rootComponentProps,{rootState:{kind:"terms-and-conditions",pageProps:{termsDetails:n,accountCountry:r,onAcceptTerms:function(t){var n,r;t&&(null!=(n=o.delegate)&&n.isInAppLogin?(o.setRootComponentProps(Object.assign({},o.rootComponentProps,{rootState:{kind:"child-application",applicationIdentifier:null!=(r=o.currentChildApplicationIdentifier)?r:""}})),o.delegate.unpauseInAppLogin()):o.setRootComponentProps(Object.assign({},o.rootComponentProps,{rootState:{kind:"home-login"}}))),e(t)}}}}))})));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.displayTermsAndConditionsSuccessConfirmation=function(e,t){var n=this;return new Promise((function(e){n.setRootComponentProps(Object.assign({},n.rootComponentProps,{rootState:{kind:"terms-and-conditions-confirmation",wasTermsUpdatePerformed:t,onDismiss:e}}))}))},n.accountNeedsSetUp=function(){var e;null==(e=this.delegate)||e.showAccountNeedsSetup()},n.showTrustCredentialsOnLogout=function(e,t){var n=this;return new Promise((function(e){var r;null==(r=n.delegate)||r.showTrustCredentialsOnLogout(e,t)}))},n.startInAppAuthentication=function(e,t){var n;fr.sharedInstance.recordStat(new ur("attemptToShowAuthWidget"));var r=_r.configuration.appleIdUrl,i=_r.configuration.trustTokens,o=bZ.sharedInstance.applicationIdentifier===ju.identifier;null==(n=this.delegate)||n.showInAppLogin({appleIdUrl:r,trustTokens:i,appleId:e,ignoreForceCRAuth:null!=t&&t,pauseBetweenSteps:o,applicationIconUrl:xT,isInAppLogin:!0})},n.validationDidSucceed=function(){var e=ZV(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c,u,l,d,p,f,h,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(QV(n,!0,!1),!(i=bZ.sharedInstance.redirectedAuthDetails)){e.next=10;break}if(i.accountName!==r.appleId){e.next=8;break}bZ.sharedInstance.redirectedAuthDetails=null,e.next=10;break;case 8:return fr.sharedInstance.recordStat(new ur("redirectedAuthConflict")),e.abrupt("return",t.unauthenticateUser(!0,!1));case 10:if(!XV(n)){e.next=12;break}return e.abrupt("return");case 12:if(this.showBeneficiaryBannerIfNeeded(r),o=bZ.sharedInstance.applicationIdentifier,gl.sharedInstance.update(),this.quotaController.start(),this.initializePushConnection(!0),JV(),!(a=bZ.sharedInstance.applicationParameter.mailDropDetail)){e.next=22;break}return this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"mail-drop",isAuthenticated:!0,details:a}})),e.abrupt("return");case 22:if(!(s=bZ.sharedInstance.applicationParameter.informationalPageDetails)){e.next=27;break}return c={relativePath:null==s?void 0:s.relativePath,hash:null==s?void 0:s.hash},sZ(s.route,s.title,!0,c),e.abrupt("return");case 27:if(u=Oy.sharedInstance,!(l=bZ.sharedInstance.vettingParameters)){e.next=32;break}return u.resolveVettingTokenForAuthenticatedUser(r,l),e.abrupt("return");case 32:if(d=bZ.sharedInstance.shortGuid,!(o&&d&&u.shouldResolveShortGuidForAuthenticatedUser(o))){e.next=36;break}return u.resolveShortGuidForAuthenticatedUser(r,d,o),e.abrupt("return");case 36:if(o){e.next=39;break}return this.showSpringboard(),e.abrupt("return");case 39:if(p=gl.sharedInstance.getApplicationConfiguration(o)){e.next=43;break}return this.couldNotLaunchApplication(null!=p?p:void 0),e.abrupt("return");case 43:if(ky.sharedInstance.canLaunchChildApplication(p.applicationInfo)){e.next=46;break}return this.couldNotLaunchApplication(p),e.abrupt("return");case 46:f=bZ.sharedInstance.applicationParameter.callDetails,performance.measure("cloudOS Time to Child Launch"),h={callDetails:f},o===Du.identifier&&(this.setRootComponentProps(Object.assign({},this.rootComponentProps,{startAppData:o})),m=dA.sharedInstance.getTileData(o),h.serializedTileData=m),h.timeBeforeLaunch=performance.now(),ky.sharedInstance.launchChildApplication(p.applicationInfo,h);case 52:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.validationDidFail=function(){var e,t=bZ.sharedInstance.applicationParameter.mailDropDetail;if(t)this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"mail-drop",isAuthenticated:!1,details:t}}));else{var n=Oy.sharedInstance;if(bZ.sharedInstance.vettingParameters)n.resolveVettingTokenForUnauthenticatedUser();else{var r=bZ.sharedInstance.applicationIdentifier,i=bZ.sharedInstance.shortGuid;if(r&&i&&n.shouldResolveShortGuidForUnauthenticatedUser(r))n.resolveShortGuidForUnauthenticatedUser(i,r);else{var o=r&&null!=(e=gl.sharedInstance.getApplicationConfiguration(r))?e:void 0;o&&ky.sharedInstance.canLaunchChildApplication(o.applicationInfo)?ky.sharedInstance.launchChildApplication(o.applicationInfo,{}):this.showLandingPage(o)}}}},n.authenticationDidCancel=function(e){var t;null==(t=this.delegate)||t.hideInAppLogin();for(var n,r=qV(this.serviceManager.serviceInstancesByIdentifier("com.apple.icloud.cloudos.authenticationService"));!(n=r()).done;){var i=n.value;i instanceof Wy&&i.updateAuthenticationDidCancel()}},n.authenticationStepDidComplete=function(){var e=ZV(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,c,u,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(gl.sharedInstance.update(),1===r&&((o=bZ.sharedInstance.applicationIdentifier)&&null!=(a=gl.sharedInstance.getApplicationConfiguration(o))&&a.applicationInfo.allowsOneFactorAuthenticationMode&&r<i&&!bZ.sharedInstance.relativePath?ky.sharedInstance.canLaunchChildApplication(a.applicationInfo)?ky.sharedInstance.launchChildApplication(a.applicationInfo,{}):this.couldNotLaunchApplication(a):r<i&&t.continueAuthentication()),s=n.details)for(c=this.serviceManager.serviceInstancesByIdentifier("com.apple.icloud.cloudos.authenticationService"),u=qV(c);!(l=u()).done;)(d=l.value)instanceof Wy&&d.updateAuthenticationState(s);case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),n.continueAuthentication=function(){var e;null==(e=this.delegate)||e.continueAuthentication()},n.authenticationDidComplete=function(){var e=ZV(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,c,u,l,d,p,f,h,m,g,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(QV(n,!1,i),!XV(n)){e.next=3;break}return e.abrupt("return");case 3:for(this.showBeneficiaryBannerIfNeeded(r),gl.sharedInstance.update(),this.quotaController.start(),this.initializePushConnection(!0),JV(),null==(o=this.delegate)||o.hideInAppLogin(),a=n.isAuthenticated,s=Oy.sharedInstance,c=s.currentShareRecord,u=bZ.sharedInstance.shortGuid,l=bZ.sharedInstance.applicationIdentifier,d=bZ.sharedInstance.applicationParameter.informationalPageDetails,c instanceof wy&&c.isPublicShare?s.acceptShare(a):bZ.sharedInstance.vettingParameters?s.resolveVettingTokenForAuthenticatedUser(r,bZ.sharedInstance.vettingParameters):l&&u&&s.shouldResolveShortGuidForAuthenticatedUser(l)?s.resolveShortGuidForAuthenticatedUser(r,u,l):d?(p={relativePath:null==d?void 0:d.relativePath,hash:null==d?void 0:d.hash},sZ(d.route,d.title,!0,p)):l?(f=gl.sharedInstance.getApplicationConfiguration(l))&&ky.sharedInstance.canLaunchChildApplication(f.applicationInfo)?ky.sharedInstance.launchChildApplication(f.applicationInfo,{}):this.couldNotLaunchApplication(null!=f?f:void 0):this.showSpringboard(),h=this.serviceManager.serviceInstancesByIdentifier("com.apple.icloud.cloudos.authenticationService"),m=qV(h);!(g=m()).done;)(v=g.value)instanceof Wy&&v.updateAuthenticationDidComplete(r);this.notifyHostingStateDidChange();case 19:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),n.authenticationDidFail=function(e,t){var n,r;fr.sharedInstance.recordStat(new ur("cloudosAuthFailure",t)),fr.sharedInstance.recordStat(new ur("cloudosAuthFailure."+t.errorType)),null==(n=this.delegate)||n.authenticationDidFail(!(null==(r=e.cloudOSUser)||!r.isAuthenticated))},n.userWillUnauthenticate=function(e){var t=this;return new Promise((function(e){var n,r=ky.sharedInstance.hasChildApplicationWithUnsavedChanges();(null==r?void 0:r.applicationConfiguration)?null==(n=t.delegate)||n.showUnsavedChangesAlert(e):e(!0)}))},n.userDidUnauthenticate=function(e){window.sessionStorage.removeItem("iCloud.hasSeenWelcomeBackPage");var t=bZ.sharedInstance.redirectedAuthDetails;t?e.redirectWithAuthDetails(t,window.location.hostname):Object(Qn.a)(window.location.origin)},n.startSessionRetrieve=function(e,t,n){var r;fr.sharedInstance.recordStat(new ur("attemptToShowAuthWidget"));var i=_r.configuration.appleIdUrl,o=_r.configuration.trustTokens,a=i;_r.configuration.appleIdUrlForSessionRetrieve&&(a=_r.configuration.appleIdUrlForSessionRetrieve),null==(r=this.delegate)||r.showLoginForSessionRetrieve({appleIdUrl:a,applicationIconUrl:xT,trustTokens:o,appleId:e,atStep:t,ignoreForceCRAuth:!1,isReauthenticateUser:!0,pauseBetweenSteps:1===t,signInLabel:n})},n.sessionRetrieveDidComplete=function(e){this.dismissSessionRetrieveLoginViewController()},n.reauthenticateDidCancel=function(e){this.dismissSessionRetrieveLoginViewController();var t=this.currentChildApplicationInfo;if(t){var n=ky.sharedInstance.getChildApplicationController(t);n&&ky.sharedInstance.terminateChildApplication(n,!0)}this.switchToSpringboard()},n.willFinishCreateAccountFlow=function(){},n.didFinishCreateAccountFlow=function(){},n.didCancelCreateAccountFlow=function(){},n.createAccount=function(e){var t;wZ.sharedInstance.cancelUserAuthenticate(),null==(t=this.delegate)||t.createAccount(e)},n.redirectUserToCorrectDomainToAuthenticate=function(e){var t,n=Ne.sharedInstance.isDomainCN?Xn("CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com.cn"):Xn("CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com"),r="icloud.com.cn"===e.toLowerCase(),i=Xn(r?"CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com.cn":"CloudOS.RedirectedAuthentication.RedirectNeeded.Domain.icloud.com");null==(t=this.delegate)||t.hideInAppLogin(),this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"redirect-to-domain",pageProps:{currentDomain:n,destinationDomain:i,onRedirectToDomain:function(){var t=bZ.sharedInstance.applicationUrl,n=Object(he.c)(t.href);n.protocol="https://",n.hostname="www."+e.toLowerCase(),Object(Qn.a)(n.href)}}}})),fr.sharedInstance.recordStat(new ur("redirectUserToCorrectDomainToAuthenticate",{currentDomain:n,domainToUse:e}))},n.configurationWasUpdated=function(e){this.notifyHostingStateDidChange(),gl.sharedInstance.update()},n.parametersDidChange=function(e){var t=this;gl.sharedInstance.update(),setTimeout((function(){var n=bZ.sharedInstance.applicationParameter.informationalPageDetails;if(n){var r={relativePath:null==n?void 0:n.relativePath,hash:null==n?void 0:n.hash};cZ(n.route,r)}else{var i=!e.applicationIdentifier&&Jn()?pl.identifier:e.applicationIdentifier;if("child-application"!==t.rootComponentProps.rootState.kind||t.currentChildApplicationIdentifier!==i){var o=wZ.sharedInstance.cloudOSUser;if(i){if(null==o||!o.isAuthenticated)return;ky.sharedInstance.updateApplicationHistoryState(window.history.state),ky.sharedInstance.switchToApplication(i)}else t.switchToSpringboard()}else i||t.switchToSpringboard()}}))},n.showChildApplicationRemoteViewController=function(e){var t;ST.sharedInstance.removeNotificationForChildApplication(e.applicationConfiguration.identifier);var n=this.presentedChildApplicationRemoteViewController,r=n!==e.remoteApplicationViewController;if((null==(t=e.remoteApplicationViewController)?void 0:t.displayMedium)===Jg.IFRAME){if("child-application"===this.rootComponentProps.rootState.kind&&n===e.remoteApplicationViewController)return;n&&r&&(n.isPresentedViewController=!1),e.remoteApplicationViewController.isPresentedViewController=!0,e.remoteApplicationViewController.transitionRemoteInstanceToActiveForeground(),this.presentedChildApplicationRemoteViewController=e.remoteApplicationViewController,this.setRootComponentProps(Object.assign({},this.rootComponentProps,{remoteViewControllers:[].concat(this.childApplicationRemoteViewControllers),rootState:{kind:"child-application",applicationIdentifier:e.applicationConfiguration.identifier}}))}else e.remoteApplicationViewController.transitionRemoteInstanceToActiveForeground()},n.childApplicationIsReadyToTerminateDidChange=function(e,t){var n=!!ky.sharedInstance.hasChildApplicationWithUnsavedChanges();n!==this.rootComponentProps.hasChildApplicationWithUnsavedChanges&&this.setRootComponentProps(Object.assign({},this.rootComponentProps,{hasChildApplicationWithUnsavedChanges:n}))},n.removeChildApplicationController=function(e){var t,n=this.childApplicationRemoteViewControllers.indexOf(e.remoteApplicationViewController);this.childApplicationRemoteViewControllers.splice(n,1),(null==(t=e.remoteApplicationViewController)?void 0:t.displayMedium)===Jg.IFRAME?this.setRootComponentProps(Object.assign({},this.rootComponentProps,{remoteViewControllers:[].concat(this.childApplicationRemoteViewControllers)})):e.remoteApplicationViewController.isConnected=!1},n.insertChildApplicationRemoteViewController=function(e){-1===this.childApplicationRemoteViewControllers.indexOf(e.remoteApplicationViewController)&&(this.childApplicationRemoteViewControllers.push(e.remoteApplicationViewController),e.remoteApplicationViewController.displayMedium===Jg.IFRAME?this.setRootComponentProps(Object.assign({},this.rootComponentProps,{remoteViewControllers:[].concat(this.childApplicationRemoteViewControllers),rootState:{kind:"load-child-application",applicationIdentifier:e.applicationConfiguration.identifier}})):e.remoteApplicationViewController.isConnected=!0)},n.childApplicationIsLoadingSlowly=function(e){},n.showChildApplicationErrorViewController=function(e,t,n){var r=this.rootComponentProps.rootState;if(function(e){var t,n=null==(t=il.applicationInfo.cloudKitInfo)?void 0:t.unrecoverableErrorTitleLocKey;return!!n&&e===gc(n)}(t))this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"share-acceptance-error",errorTitle:t,errorDescription:gc("CloudOS.Sharing.Unavailable.Description.Photo"),applicationIdentifier:e.applicationConfiguration.identifier}}));else if("load-child-application"===r.kind&&r.applicationIdentifier===e.applicationConfiguration.identifier)this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"load-child-application",applicationIdentifier:r.applicationIdentifier,hadError:!0}}));else{var i;this.redirectToHomeScreen(),null==(i=this.delegate)||i.showChildApplicationErrorAlert(e.applicationConfiguration,t,n)}},n.showChildApplicationDidFatalErrorDialog=function(){var e=ZV(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null==(i=wZ.sharedInstance.cloudOSUser)?void 0:i.details,s=a&&a.completedAuthenticationStep>0,c=t.applicationConfiguration){e.next=5;break}return e.abrupt("return");case 5:u=c.applicationInfo,l={applicationIdentifier:u.applicationName,applicationName:u.applicationName,localizedApplicationName:bu(c),radarComponentId:null!=(o=u.radarComponentId)?o:0,buildInfo:r},s?(this.switchToSpringboard(!0),Yr.showCrashReporterWithTerminationReasonAndInfo(n,r,l,!1)):Yr.showCrashReporterWithTerminationReasonAndInfo(n,r,l,!0);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),n.redirectChildApplicationForDocument=function(e,t){var n,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=null==(n=e.applicationConfiguration)?void 0:n.identifier;if(s){var c=null!=(r=null==(i=e.applicationConfiguration)||null==(o=i.applicationInfo)?void 0:o.supportedDomains)?r:[];if(0!==c.length){var u=Ne.sharedInstance.findAvailableHostname(c),l=hr("https://"+u+"/"+s+"/"+t,a);Object(ae.a)(l,{target:"_self",features:[]})}}},n.redirectToHomeScreen=function(){var e,t=null==(e=wZ.sharedInstance.cloudOSUser)?void 0:e.details;t&&t.completedAuthenticationStep>0?this.switchToSpringboard():Object(Qn.a)(window.location.origin)},n.showAlertForLockedApplication=function(e){var t;null==(t=this.delegate)||t.showAlertForLockedApplication(e)},n.showAlertForUnavailableMailService=function(e){var t;null==(t=this.delegate)||t.showMailNotEnabledAlert(e)},n.showBanner=function(e,t){this.setRootComponentProps(Object.assign({},this.rootComponentProps,{bannerData:t}))},n.removeBanner=function(){this.setRootComponentProps(Object.assign({},this.rootComponentProps,{bannerData:void 0}))},n.showInlineBanner=function(e,t){this.setRootComponentProps(Object.assign({},this.rootComponentProps,{inlineBannerData:t}))},n.alarmWasTriggered=function(e){var t=gl.sharedInstance.getApplicationConfiguration(e.applicationIdentifier);t&&ST.sharedInstance.enqueue({notificationType:DI.ALARM,applicationInfo:t.applicationInfo,applicationConfiguration:t,alarmTrigger:e,isDismissable:!1,omitWhenActive:!1})},n.authenticateWithShareInfo=function(e,t,n){t.isPublicShare?this.showShareAcceptanceViewController(e,t,n):this.showHomeLoginViewController(t)},n.signInAndAcceptShare=function(e,t){this.showHomeLoginViewController(t)},n.acceptShare=function(e,t,n){this.showShareAcceptanceViewController(e,t,n)},n.signInAndShowShareUnavailable=function(e){this.showHomeLoginViewController()},n.shareUnavailable=function(e,t,n){var r=!!bZ.sharedInstance.vettingParameters,i=r?Xn("CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Title"):Xn("CloudOS.Sharing.Unavailable.Title",{fileType:Bw(n)}),o=r?Xn("CloudOS.OutOfNetworkAcceptance.VerificationLinkExpired.Description"):Xn("CloudOS.Sharing.Unavailable.Description",{fileType:n});this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"share-acceptance-error",errorTitle:i,errorDescription:o,applicationIdentifier:null!=t?t:Du.identifier}}))},n.legacyShareUnavailable=function(e,t,n,r){var i=Xn("CloudOS.Sharing.Unavailable.Title",{fileType:t===cl.identifier?"Reminders List":Bw(n)}),o=function(){switch(r){case dy.SHARE_REQUEST_CAL_NO_LONGER_SHARED_STATUS:return Xn("CloudOS.Sharing.Unavailable.NoLongerShared.Description",{fileType:n});case dy.SHARE_REQUEST_USER_ALREADY_SHARING_CAL_STATUS:return Xn("CloudOS.Sharing.Unavailable.AlreadyAccepted.Description",{fileType:n});case dy.UNEXPECTED_ERROR:default:return Xn("CloudOS.Sharing.Unavailable.Description",{fileType:n})}}();this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"share-acceptance-error",errorTitle:i,errorDescription:o,applicationIdentifier:t}}))},n.shareWasAccepted=function(e,t){var n=this,r=t.applicationIdentifier,i=gl.sharedInstance.getApplicationConfiguration(r);if(i)if(fr.sharedInstance.recordStat(new ur(r+".didAcceptShare")),t instanceof py)ky.sharedInstance.switchToApplication(t.applicationIdentifier,{source:{reason:Cc.ITEMS_OPENED}});else if(t.isFolderSharing&&fr.sharedInstance.recordStat(new ur(r+".didAcceptSharedFolder",{isPublic:t.isPublicShare})),t.outOfNetworkParticipantList.length>0){var o,a,s,c=null==(o=wZ.sharedInstance.cloudOSUser)?void 0:o.details;this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"ck-share-acceptance",isAuthenticated:!0,fullName:null!=(a=null==c?void 0:c.fullName)?a:"",appleId:null!=(s=null==c?void 0:c.appleId)?s:"",wasShareAccepted:!0,ckShareRecord:t,onSignInPressed:function(){n.showHomeLoginViewController()}}}))}else{var u=ky.sharedInstance.canLaunchChildApplication(i.applicationInfo),l=r===Hu.identifier||r===$u.identifier||r===tl.identifier;u||l?ky.sharedInstance.switchToApplication(t.applicationIdentifier,{source:{reason:Cc.ITEMS_OPENED},queryParameters:l?{redirectReason:"off"}:void 0}):this.couldNotLaunchApplication(i)}},n.setupRegisteredServices=function(e,t,n){this.serviceManager.attachRegisteredServicesToProcessReference(e,t,n)},n.setupAdditionalServices=function(e,t,n){var r=new eI("com.apple.icloud.cloudos.StartupInfoService",(function(e,t,n){return new jT(e.applicationName,n)})),i=new eI("com.apple.icloud.cloudos.hostApplicationService",(function(e,t,n){return new UT(e,n)}));this.serviceManager.attachServicesToProcessReference(e,t,n,[i,r])},n.shareWasNotAccepted=function(e,t){var n,r=t.applicationIdentifier,i=r+".didDeclineShare";if(fr.sharedInstance.recordStat(new ur(i)),t.isFolderSharing){var o=r+".didDeclineSharedFolder";fr.sharedInstance.recordStat(new ur(o,{isPublic:!!t.isPublicShare}))}var a=this.currentChildApplicationInfo;a?ky.sharedInstance.replaceHistoryState(a,{},void 0,"",""):bZ.sharedInstance.replaceHistoryState({},_r.title,bZ.sharedInstance.applicationIdentifier,bZ.sharedInstance.relativePath,"",void 0),null==(n=this.delegate)||n.hideVerifyShareAccessModal(),this.switchToSpringboard()},n.upgradeToiCloudDrive=function(e){this.showError(void 0,Xn("CloudOS.Sharing.Error.UpgradeToiCloudDrive.Title"),Xn("CloudOS.Sharing.Error.UpgradeToiCloudDrive.SubTitle"),Xn("CloudOS.Sharing.Error.UpgradeToiCloudDrive.Description"))},n.upgradeToNotes=function(e){this.showError(void 0,Xn("CloudOS.Sharing.Error.UpgradeToNotes.Title"),Xn("CloudOS.Sharing.Error.UpgradeToNotes.SubTitle"))},n.showFaceTimeUnsupportedViewController=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new ur("faceTimeUnsupportedPage"),r=!!bZ.sharedInstance.applicationParameter.callDetails;return n.addAdditionalProperties({hasCallDetails:r}),fr.sharedInstance.recordStat(n),new Promise((function(n){e.setRootComponentProps(Object.assign({},e.rootComponentProps,{rootState:{kind:"facetime-unsupported",unsupportedFaceTimeCantContinueAnyway:t,handleFacetimeUnsupportedContinueAnyway:n}}))}))},n.verifyAccess=function(e){var t;null==(t=this.delegate)||t.showVerifyShareAccessModal([NT(e),RT()],function(){var e=Xn("CloudOS.OutOfNetworkAcceptance.Error.Title"),t=Xn("CloudOS.OutOfNetworkAcceptance.Error.Description"),n=Xn("CloudOS.OutOfNetworkAcceptance.VerifyAccess.Title"),i=Xn("CloudOS.OutOfNetworkAcceptance.DoneButton.Title");return function(o){var a=o&&o.phoneNumber?Xn("CloudOS.OutOfNetworkAcceptance.PhoneVettedError.Description",{phoneNumber:o.phoneNumber}):Xn("CloudOS.OutOfNetworkAcceptance.Error.Description");return{navigationHeaderTitle:n,primaryButtonTitle:i,renderContent:function(){return r.createElement("div",null,r.createElement("div",{className:"content-title"},e),r.createElement("div",{className:"content-desc"},a),r.createElement("div",{className:"content-desc"},t))}}}}())},n.signInAndResolveVettingToken=function(e){this.showHomeLoginViewController()},n.shareWasInvalid=function(){var e=bZ.sharedInstance.applicationIdentifier;if(e){var t=gl.sharedInstance.getApplicationConfiguration(e);t&&(ky.sharedInstance.canLaunchChildApplication(t.applicationInfo)?ky.sharedInstance.launchChildApplication(t.applicationInfo,{}):this.couldNotLaunchApplication(t))}},n.didReceivePushState=function(e,t){for(var n,r=qV(gl.sharedInstance.configurations);!(n=r()).done;){var i=n.value;if(e===i.applicationInfo.pushTopic){var o=ky.sharedInstance.getChildApplicationController(i.applicationInfo);o&&(o.badgeCount=t),wc.shared.setBadgeCount(i.applicationInfo,null!=t?t:null)}}},n.didReceivePushNotification=function(e,t,n){var r=e.ckInfo,i=e.topic,o=e.applicationIdentifier;oA.shared.didReceivePushNotification(e);for(var a,s=qV(gl.sharedInstance.configurations);!(a=s()).done;){var c,u=a.value,l=u.applicationInfo.pushTopic,d=u.applicationInfo.cloudKitInfo;if(i&&i===l||r&&d&&r.containerIdentifier===d.containerIdentifier||o===u.identifier){var p=dA.sharedInstance;e.topic===Vu.applicationInfo.pushTopic?p.markDataStateAsStale(Vu.identifier):e.topic===Ou.applicationInfo.pushTopic?p.markDataStateAsStale(Ou.identifier):(null==r?void 0:r.containerIdentifier)===(null==(c=u.applicationInfo.cloudKitInfo)?void 0:c.containerIdentifier)&&p.markDataStateAsStale(u.identifier),kI.sharedInstance.scheduleAlarms([u.identifier]),e.notification&&e.clientId!==_r.clientId&&ST.sharedInstance.enqueue({notificationType:DI.PUSH,applicationInfo:u.applicationInfo,applicationConfiguration:u,pushNotification:e,isDismissable:null!=t&&t,omitWhenActive:null!=n&&n}),ky.sharedInstance.getChildApplicationController(u.applicationInfo).handlePushNotification(e)}}},n.pushControllerDidDisconnect=function(e){zC.startPolling("com.apple.icloud.cloudos.legacyPollingService",this.serviceManager)},n.preferencesDidUpdate=function(){},n.showBeneficiaryBannerIfNeeded=function(e){if(e){var t=e.beneficiaryInfo;if(null!=t&&t.isBeneficiary){var n=t.beneficiaryExpiredTime;if(n){var r=new Intl.DateTimeFormat(a(),{dateStyle:"long"}).format(new Date(n)),i=function(){var n,i=null!=(n=e.firstName)?n:"",o={firstName:i,date:r},a=cy(i);return null!=t&&t.isBeneficiaryMultiple?Xn(a?"Banner.Beneficiary.Multiple.Description.NameIsCJK":"Banner.Beneficiary.Multiple.Description",o):Xn(a?"Banner.Beneficiary.Single.Description.NameIsCJK":"Banner.Beneficiary.Single.Description",o)}();this.beneficiaryBannerId=this.bannerController.setInlineBanner("",i,TT("HT212361"),Xn("Banner.Beneficiary.OptionalLink.Text"),"link")}}}},n.bannerActionDidClick=function(e){var t=TT(this.beneficiaryBannerId?"HT212361":"HT4847");Object(ae.a)(t)},n.showNotification=function(e,t){this.setRootComponentProps(Object.assign({},this.rootComponentProps,{notificationElement:t}))},n.removeNotification=function(){var e=ZV(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.setRootComponentProps(Object.assign({},this.rootComponentProps,{notificationElement:void 0}));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),n.notificationDidClick=function(e,t){ky.sharedInstance.switchToApplication(t,{source:{reason:Cc.NOTIFICATION}})},n.alarmDismissDidClick=function(e,t){kI.sharedInstance.acknowledgeAlarm(t)},n.alarmSnoozeDidClick=function(e,t){kI.sharedInstance.snoozeAlarm(t)},n.meCardDidChange=function(e,t){this.sendMeCardToApplications(t)},n.sendMeCardToApplications=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.meCardController.meCard;if(e){for(var t,n=this.serviceManager,r=n.serviceInstancesByIdentifier("com.apple.icloud.cloudos.meCardService"),i=qV(r);!(t=i()).done;){var o=t.value;o instanceof e_&&o.sendMeCard(e)}for(var a,s=n.serviceInstancesByIdentifier("com.apple.icloud.cloudos.legacyMeCardService"),c=qV(s);!(a=c()).done;){var u=a.value;u instanceof g_&&u.sendReceiveMeCard(e)}}},n.terminateAndDisableCurrentChildApplication=function(e){var t,n=this.currentChildApplicationConfiguration;n&&(n.isDisabled||(n.isDisabled=!0,e>0&&window.setTimeout((function(){n.isDisabled=!1}),1e3*e),null==(t=this.delegate)||t.showServiceLockedAlert(e)))},n.notifyHostingStateDidChange=function(){var e=WV.application;e&&Object(dg.c)(e.processState,dg.a.RUNNING)&&e.hostingStateDidChange(this.sessionInfo,this.hostInfo)},n.installServices=function(e){var t=new eI("com.apple.icloud.cloudos.telemetry",(function(e,t,n){return new PT(pr,n)}));e.registerServices([t]),function(e,t,n,r,i,o,a,s,c){var u=new eI("com.apple.icloud.cloudos.authenticationService",(function(e,t,n){return new Wy(i,n)})),l=new eI("com.apple.icloud.cloudos.urlRequestService",(function(e,t,r){return new Yy(n,e,r)})),d=new eI("com.apple.icloud.cloudos.contactsLookupService",(function(e,t,n){return new Yb(n)})),p=new eI("com.apple.icloud.cloudos.meCardService",(function(e,t,n){return new e_(s,n)})),f=new eI("com.apple.icloud.cloudos.legacyMeCardService",(function(e,t,n){return new g_(s,n)}),!0),h=new eI("com.apple.icloud.cloudos.quotaService",(function(e,t,n){return new O_(a,n)})),m=new eI("com.apple.icloud.cloudos.legacyQuotaService",(function(e,t,n){return new N_(a,n)}),!0),g=new eI("com.apple.icloud.cloudos.localeService",(function(e,t,n){return new w_(r,n)})),v=new eI("com.apple.icloud.cloudos.coretypesservice",(function(e,t,n){return new k_(c,n)})),y=new eI("com.apple.icloud.cloudos.legacyCoreTypesService",(function(e,t,n){return new L_(c,n)}),!0),b=new eI("com.apple.icloud.cloudos.bannerservice",(function(e,t,n){return new H_(o,n)})),_=new eI("com.apple.icloud.cloudos.preferencesService",(function(e,t,n){return new XC(n)})),C=new eI("com.apple.icloud.cloudos.composeService",(function(e,t,n){return new Ky(n)})),I=new eI("com.apple.icloud.cloudos.legacyAppUrlService",(function(e,t,n){return new VC(n)})),w=new eI("com.apple.icloud.cloudos.legacyPreferencesService",(function(e,t,n){return new $_(e,r,n)}),!0),E=new eI("com.apple.icloud.cloudos.legacyCloudKitResolutionService",(function(e,t,n){return new qC(n)}),!0),S=new eI("com.apple.icloud.cloudos.legacyRegionFormatter",(function(e,t,n){return new GC(n)}),!0),T=new eI("com.apple.icloud.cloudos.legacyTelemetryService",(function(e,r,i){return new tC(e,t,n,i)}),!0),O=new eI("com.apple.icloud.cloudos.legacyCloudOSApplicationService",(function(e,t,n){return new K_(e,t,o,n)}),!0),P=new eI("com.apple.icloud.cloudos.legacyPollingService",(function(e,t,n){return new zC(n)}),!0),x=new eI("com.apple.icloud.cloudos.LegacyStartupInfoService",(function(e,t,n){return new F_(e.applicationInfo.applicationName,n)}),!0);e.registerServices([u,l,p,f,d,g,h,m,v,y,b,_,C,I,E,w,S,T,O,P,x])}(e,pr,Oa.sharedInstance,Iv.sharedInstance,wZ.sharedInstance,this.bannerController,this.quotaController,this.meCardController,this.coreTypesController)},n.showError=function(){var e=ZV(regeneratorRuntime.mark((function e(t,n,r,i){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null==(o=this.delegate)||o.showErrorDialog(t,n,r,i);case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),n.setRootComponentProps=function(e){this.recordNavigationUserStat(e.rootState,this.rootComponentProps.rootState),this.rootComponentProps=e,this.stateListeners.forEach((function(t){return t(e)}))},n.recordHomePageLinkStat=function(){var e,t=!!wZ.sharedInstance.cloudOSUser,n=this.rootComponentProps.rootState.kind,r={source:n};switch(r.statCategory=t?B.USER:B.SESSION,n){case"child-application":r.childName=this.rootComponentProps.rootState.applicationIdentifier;break;case"landing-page":r.childName=null==(e=this.rootComponentProps.rootState.configuration)?void 0:e.identifier}ur.withEventAndLabel("click","homepage-link",r).record()},n.recordNavigationUserStat=function(e,t){var n,r,i,o,a,s,c,u=null!=(n=null!=(r=e.applicationIdentifier)?r:null==(i=e.configuration)?void 0:i.identifier)?n:"",l=null!=(o=null!=(a=t.applicationIdentifier)?a:null==(s=t.configuration)?void 0:s.identifier)?o:"";if(e.kind+"::"+u!==t.kind+"::"+l){var d=void 0,p=!!wZ.sharedInstance.cloudOSUser;switch(e.kind){case"load-child-application":case"child-application":p&&(d=ur.withEventAndLabel("child-application"===e.kind?"navigate":"load","child-application",{childName:e.applicationIdentifier}));break;case"springboard":d=ur.withEventAndLabel("navigate","spring-board");break;case"/plan":d=ur.withEventAndLabel("navigate","plan-page");break;case"/storage":d=ur.withEventAndLabel("navigate","storage-page");break;case"/recovery":d=ur.withEventAndLabel("navigate","recovery-page");break;case"/icloudplus":d=ur.withEventAndLabel("navigate","icloudplus-page");break;case"/settings":d=ur.withEventAndLabel("navigate","settings-page");break;case"landing-page":d=ur.withEventAndLabel("navigate","landing-page",{childName:null==(c=e.configuration)?void 0:c.identifier,statCategory:B.SESSION});break;default:return}d&&(d.addAdditionalProperties(Object.assign({statCategory:B.USER},d.additionalProperties)),fr.sharedInstance.recordStat(d))}},n.showLandingPage=function(e){var t,n=this,r=_r.configuration.appleIdUrl,i=_r.configuration.trustTokens,o=bZ.sharedInstance.redirectedAuthDetails,a=null!=(t=null==o?void 0:o.accountName)?t:"",s=!(null==o||!o.accountName),c=!1;e===ju&&(c=!0);var u={appleIdUrl:r,trustTokens:i,applicationIconUrl:xT,appleId:a,ignoreForceCRAuth:s,pauseBetweenSteps:c,configuration:e};this.setRootComponentProps(Object.assign({},this.rootComponentProps,{homeLoginProps:u,rootState:{kind:"landing-page",onSignInPressed:function(){n.showHomeLoginViewController()},configuration:e}})),wZ.sharedInstance.isRedirectedToCorrectDomain&&window.location.reload()},n.showHomeLoginViewController=function(e){var t=this,n=bZ.sharedInstance.redirectedAuthDetails,r="",i=!1;n&&(n.accountName&&(r=n.accountName,i=!0),bZ.sharedInstance.redirectedAuthDetails=null,fr.sharedInstance.recordStat(new ur("userWasRedirectToCorrectDomainToAuthenticate"))),fr.sharedInstance.recordStat(new ur("attemptToShowAuthWidget"));var o=_r.configuration.appleIdUrl,a=!1,s=bZ.sharedInstance.applicationIdentifier;s&&!e&&s===ju.identifier&&gl.sharedInstance.getApplicationConfiguration(s)&&(a=!0);var c=s?gl.sharedInstance.getApplicationConfiguration(s):void 0;e?this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"unauthed-share",onSignInPressed:function(){t.showHomeLoginViewController()},shareRecord:e}})):this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"home-login"},homeLoginProps:{appleIdUrl:o,trustTokens:_r.configuration.trustTokens,applicationIconUrl:xT,appleId:r,atStep:0,appName:void 0,ignoreForceCRAuth:i,pauseBetweenSteps:a,configuration:null!=c?c:void 0}})),this.hideCurrentApplication(),bZ.sharedInstance.isSignupRequested&&wZ.sharedInstance.createAccount()},n.couldNotLaunchApplication=function(e){var t,n,r=this;Jn()?function(e,t){var n=Xn(e?"CloudOS.Application.Title.FaceTime":"Application.Title.FaceTime"),r=function(){if(e){var t=bu(e);return Xn("CloudOS.Error.UnableToLoadApp.Title",{applicationName:t})}return Xn("CloudOS.Error.UnableToLoadiCloud.Title")}(),i=function(){var e=TT("HT210402");return t&&ma(t)?Xn("CloudOS.Error.UnableToLoadApp.iCloudLiteAccount.Description",{appleId:'<span class="user-email-label">'+(null==t?void 0:t.appleId)+"</span>",applicationTitle:n}):_.sharedInstance.deviceType===p.PHONE?Xn("CloudOS.Springboard.LearnMore.Phone.Text")+' <a target="_blank" href="'+e+'">'+Xn("CloudOS.Springboard.LearnMore.Phone.Link.Title")+"</a>":_.sharedInstance.deviceType===p.TABLET?Xn("CloudOS.Springboard.LearnMore.Tablet.Text")+' <a target="_blank" href="'+e+'">'+Xn("CloudOS.Springboard.LearnMore.Tablet.Link.Title")+"</a>":null}();YV.cloudOSApplication.showError(null!=e?e:void 0,r,null!=i?i:void 0)}(null!=e?e:null,null!=(t=null==(n=wZ.sharedInstance.cloudOSUser)?void 0:n.details)?t:null):this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"landing-page",configuration:e,onSignInPressed:function(){r.navigateToHomePage()}}}))},n.showShareAcceptanceViewController=function(e,t,n){var r,i=this,o=t.applicationIdentifier;fr.sharedInstance.recordStat(new ur(o+".didShowShareAcceptanceView"));var a,s,c=null==(r=wZ.sharedInstance.cloudOSUser)?void 0:r.details;t instanceof py?this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"share-acceptance",isAuthenticated:n,shareRecord:t}})):this.setRootComponentProps(Object.assign({},this.rootComponentProps,{rootState:{kind:"ck-share-acceptance",isAuthenticated:n,fullName:null!=(a=null==c?void 0:c.fullName)?a:"",appleId:null!=(s=null==c?void 0:c.appleId)?s:"",ckShareRecord:t,onSignInPressed:function(){i.showHomeLoginViewController()}}}))},n.dismissSessionRetrieveLoginViewController=function(){var e;null==(e=this.delegate)||e.hideLoginForSessionRetrieve()},n.hideCurrentApplication=function(){var e=this.presentedChildApplicationRemoteViewController;e&&e.iframe&&(e.isPresentedViewController=!1,e.remoteInstanceState===dg.a.RUNNING&&e.transitionRemoteInstanceToBackground(),this.presentedChildApplicationRemoteViewController=null)},e=i,(t=[{key:"currentChildApplicationIdentifier",get:function(){return ky.sharedInstance.currentChildApplicationIdentifier}},{key:"currentChildApplicationInfo",get:function(){return ky.sharedInstance.currentChildApplicationInfo}},{key:"currentChildApplicationConfiguration",get:function(){return ky.sharedInstance.currentChildApplicationConfiguration}},{key:"session",get:function(){var e;return{user:null==(e=wZ.sharedInstance.cloudOSUser)?void 0:e.details,webServices:_r.configuration.webServices}}},{key:"sessionInfo",get:function(){var e,t,n={};return null==(e=_r.configuration.webServices)||e.forEach((function(e,t){n[t]=e})),{dsInfo:null==(t=wZ.sharedInstance.cloudOSUser)?void 0:t.details,webServices:n}}},{key:"hostInfo",get:function(){var e=this,t=function(){var t=ky.sharedInstance.currentLoadingChildApplicationInfo,n=e.currentChildApplicationInfo||t,r=ky.sharedInstance.currentLoadingChildApplicationConfiguration,i=e.currentChildApplicationConfiguration||r;if(i&&n&&wZ.sharedInstance.cloudOSUser){var o=ky.sharedInstance.getChildApplicationController(n);if(o){var a=o.applicationContext,s=a.launchItem,c=a.launchSource;return Pv.getCloudOSState(n,i,o.currentHistoryState,s,null==c?void 0:c.reason)}}}();return{primaryInteractionMode:_r.primaryInteractionMode,platformType:_r.platformType,deviceType:_r.deviceType,regionFormat:{version:Iv.sharedInstance.regionFormatRulesVersion,rules:Iv.sharedInstance.regionFormattingRules,baseUrl:Iv.sharedInstance.regionFormatBaseUrl,localeMap:Iv.sharedInstance.regionFormatterLocaleMap},protocolVersion:_r.protocolVersion,buildNumber:_r.buildNumber,sizeClassHorizontal:qc(),sizeClassVertical:Qc(),visualViewport:Sv(),theme:_r.theme,locale:_r.locale,secondaryLocale:_r.secondaryLocale,clientId:_r.clientId,supportedLocales:Ev,localesSupportedByAllApplications:_r.childApplicationSupportedLocales,limitedExperienceMode:window.hasEnteredLimitedExperienceMode,cloudOSState:t}}}])&&GV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function QV(e,t,n){var r,i=up.getAccountPreferences();i&&fr.sharedInstance.recordStat(new ur("cloudosAuthSuccess",{accountLocale:i.locale,authenticationType:null==(r=e.details)?void 0:r.accountType,countryCode:e.countryCode,isExtendedLogin:e.isExtendedLogin,isTiburonLogin:n,userAccountType:e.details?ya(e.details):void 0,validateWasSuccessful:t}))}function XV(e){var t=Ne.sharedInstance.current;if(t===be&&!e.isCarryUser){var n=be.fallbackDomain;return n&&(_r.domain=n),!0}if(!bZ.sharedInstance.redirectedFromCarry&&t===me&&e.isCarryUser)return _r.domain=be,!0;var r=bZ.sharedInstance.postLoginRedirectUrl;return!!function(e){if(!e)return!1;var t=function(){try{return Object(he.c)(e)}catch(t){return null}}();if(!t)return!1;if("https:"!==t.protocol)return!1;var n=t.hostname;switch(Ne.sharedInstance.current){case Ce:case Ie:case we:case Ee:case Se:case Te:return!!n.match(/^.*\.apple\.com$/);case me:case ve:case ye:case be:return!!n.match(/^.*\.icloud\.com$/);case ge:return!!n.match(/^.*\.icloud\.com\.cn$/);default:throw new Error("Unrecognized services domain")}}(r)&&(Object(Qn.a)(r),!0)}function JV(){for(var e,t=[],n=qV(gl.sharedInstance.displayOrder);!(e=n()).done;){var r=e.value;t.push(r.identifier)}kI.sharedInstance.scheduleAlarms(t)}YV.cloudOSApplication=void 0;var $V,eZ,tZ=["to","name","children","className"];function nZ(){return(nZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}!function(e){e.home="",e.plan="/plan",e.storage="/storage",e.recovery="/recovery",e.shared="/shared",e.restore="/restore",e.icloudplus="/icloudplus",e.status="/status",e.settings="/settings"}(eZ||(eZ={}));var rZ=(($V={})[eZ.plan]="NavLinks.Plan",$V[eZ.storage]="NavLinks.Storage",$V[eZ.icloudplus]="NavLinks.ICloudPlus",$V[eZ.recovery]="NavLinks.DataRecovery",$V[eZ.settings]="NavLinks.Settings",$V);function iZ(e,t,n,i){return function(o){var a=mc(t),s=Us().setAriaLiveText,c=mc("VoiceOver.NavLinks.OpeningPage",{name:a}),u={},l=u.search,d=void 0===l?"":l,p=u.hash,f=void 0===p?"":p,h=e+d+f;return r.createElement("a",nZ({},o,{onClick:function(t){t.preventDefault(),i||t.stopPropagation(),s(c),sZ(e,a,void 0,{search:d,hash:f})},className:"unstyled-link nav-link",href:h}),r.createElement("span",null,a," ",n))}}function oZ(e){switch(e){case eZ.home:return"NavLinks.Home";case eZ.plan:return"NavLinks.Plan";case eZ.storage:return"NavLinks.Storage";case eZ.recovery:return"NavLinks.DataRecovery";case eZ.shared:return"NavLinks.Shared";case eZ.restore:return"NavLinks.Restore";case eZ.icloudplus:return"NavLinks.ICloudPlus";case eZ.status:return"NavLinks.Status";case eZ.settings:return"NavLinks.Settings"}}var aZ=function(e){var t=e.to,n=e.name,i=e.children,o=e.className,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,tZ),s=Us().setAriaLiveText,c=mc("VoiceOver.NavLinks.OpeningPage",{name:n});return r.createElement("a",nZ({},a,{onClick:function(e){e.preventDefault(),e.stopPropagation(),s(c),sZ(t,n)},href:t,className:Ts()(o,"nav-link")}),i)};function sZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{relativePath:"",hash:"",search:""},i=bZ.sharedInstance;i.pushHistoryState({},t,e,r.relativePath,r.hash,r.search),n&&cZ(e)}function cZ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{relativePath:"",hash:"",search:""};YV.cloudOSApplication.switchToNavLink(e,t)}function uZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}window.hasEnteredLimitedExperienceMode=window.hasEnteredLimitedExperienceMode||!1;var dZ=function(){function e(e){var t,n,r=this;this._applicationIdentifier=void 0,this._shortGuid=void 0,this._mailDropDetail=null,this._informationalPageDetails=null,this._relativePath=void 0,this._hash=void 0,this._url=void 0,this._redirectUrlPath=void 0,this._callDetails=null,this.supportsShareURLs=!1,this.userAgent=void 0,this.isEdge=void 0,this._isFirefoxiOS=void 0,this._isChrome=void 0,this.isSafari=void 0,this._isFirefox=void 0,this.isIE=void 0,this.isAndroid=void 0,this.isWindows=void 0,this.isMac=void 0,this.isIOS=void 0,this.isMobileSafari=void 0,this.osMajorVersion=0,this.osMinorVersion=0,this.osMicroVersion=0,this.browserFinders=function(){var e=r;return{safari:{get matches(){return e.isSafari},regexp:/version\/(\d+\.*\d+).*?safari/},mobilesafari:{get matches(){return e.isMobileSafari},regexp:/version\/(\d+\.*\d+).*?safari/},ios:{get matches(){return e.isMobileSafari},get version(){return e.osMajorVersion}},android:{get matches(){return!!/android/.test(e.userAgent)},regexp:/android (\d+\.*\d*)/},firefox:{get matches(){return e._isFirefox},regexp:/firefox\/(\d+\.*\d+)/},chrome:{get matches(){return e._isChrome},regexp:/chrome\/(\d+\.*\d+)/},opera:{get matches(){return!!/opera/.test(e.userAgent)},regexp:/version\/(\d+\.*\d+)/},ie:{get matches(){return e.isIE},regexp:/(msie |trident.*?rv:)(\d+\.*\d+)/},edge:{get matches(){return e.isEdge},regexp:/edge\/(\d+\.*\d+)/},crios:{get matches(){return!!e.userAgent.match(/\scrios\//)},regexp:/crios\/(\d+\.*\d+)/},fxios:{get matches(){return!!e.userAgent.match(/\sfxios\//)},regexp:/fxios\/(\d+\.*\d+)/},googlebot:{get matches(){return!!e.userAgent.match(/\sgooglebot\//)},regexp:/googlebot\/(\d+\.*\d+)/},mobilesafariwebview:{get matches(){return e.isMobileSafari&&!!e.userAgent.match(/^((?!safari).)*$/)},regexp:/applewebkit\/\d+\.*\d+.*mobile\/(\d+[A-z]*\d+)$/},facebookMessengeriOSwebview:{get matches(){return e.isMobileSafari&&!!e.userAgent.match(/fban\/messengerforios;/)},regexp:/applewebkit\/(\d+)[\.*\d+]+ .*mobile\/(\d+[A-z]*\d+).*fban\/messengerforios/}}}();var i=function(e){var t;if(-1===e.hash.indexOf("redirectingUserToCorrectDomain=true"))return e;var n=Object(he.c)(e.href),r=n.hash,i=r.indexOf("?"),o=r.substring(0,i);o.length<=1&&(o="");var a=r.substring(i);return n.hash=o,n.search=a,null==(t=window.top)||t.history.replaceState(history.state,document.title,n.href),n}(e);this._url=i;var o=e.pathname?ws(e.pathname):[],a=i.hash,s=window.navigator.userAgent.toLowerCase();this.userAgent=s,this.isEdge=/\sedge\//.test(s),this._isFirefoxiOS=!this.isEdge&&/fxios/.test(s),this._isChrome=!this.isEdge&&!this._isFirefoxiOS&&/chrome|crios/.test(s),this.isSafari=!this.isEdge&&!this._isFirefoxiOS&&!this._isChrome&&/safari/.test(s),this._isFirefox=this._isFirefoxiOS||!this.isEdge&&!this._isChrome&&!this.isSafari&&/firefox/.test(s),this.isIE=!this.isEdge&&!this._isChrome&&!this.isSafari&&!this._isFirefox&&/trident|msie/.test(s),this.isAndroid=!!/android/.test(s),this.isWindows=!!/windows/.test(s);var c=(s.match(/webkit\/(.+?) /)||[])[1],u=((s.split(/\s*[;)(]\s*/)||[])[1]||"").toLowerCase(),l=this.isMac=!!/macintosh/.test(s)||/mac os x/.test(s)&&!/like mac os x/.test(s),d=l&&_.sharedInstance.primaryInteractionMode===h.TOUCH&&!this._isChrome,p=this.isIOS="ipad"===u||u.indexOf("ipod")>=0||"iphone"===u||d;if(this.isMobileSafari=!!(/apple.*mobile/.test(s)&&p&&c)||d,d)this.osMajorVersion=13,this.osMinorVersion=0;else if(l){var f=s.match(/mac os x (\d+)[ _.](\d+)[ _.]?(\d+)?/);f&&(this.osMajorVersion=Number(f[1]),this.osMinorVersion=Number(f[2]),this.osMicroVersion=Number(f[3]||""))}else if(this.isWindows){var m=s.match(/windows[ a-z]+?(\d+)[ _.](\d+)/);m&&(this.osMajorVersion=Number(m[1]),this.osMinorVersion=Number(m[2]))}else if(p){var g=s.match(/\b(ipad|iphone|ipod)\b.*\bos (\d+)_(\d+)/i);g&&(this.osMajorVersion=Number(g[2]),this.osMinorVersion=Number(g[3]))}if(Jn()){if(0===o.length)return;this._applicationIdentifier="facetime";var v=a?function(e){for(var t,n={},r=[],i=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return uZ(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uZ(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(pZ(e).split("&"));!(t=i()).done;){var o=t.value.split("="),a=o[0],s=o[1];a&&s&&(n[a]=s,r.push(a+"="+s))}return{data:n,path:"#"+r.join("&")}}(a):{data:null,path:""};switch(o[0]){case"facetime":"join"===o[1]&&(this._callDetails=v.data,this._relativePath="join/",this._hash=a,this._url.hash=v.path);break;case"join":this._callDetails=v.data,this._relativePath="join/",this._hash=a,this._url.hash=v.path}}else{var y=["share","iclouddrive","notes","pages","numbers","keynote","reminders","photos","calendar","reminders"],b=new Set(["v","terms"]);if(0===o.length&&a&&a.length>0){var C=a,I=C.startsWith("#newspublisher");"#"!==C[0]||I||(C=C.substring(1));var w=C.split("/"),E=pZ(w[0]),S=y.indexOf(E)>=0;this.supportsShareURLs=S,b.has(E)||-1!==E.indexOf("postLoginRedirectUrl=")||("share"!==E&&(this._applicationIdentifier=pZ(E).toLowerCase()),w.length>1&&S?this._shortGuid=pZ(w[1]):(this._relativePath=w.slice(1).join("/"),this._hash=a),I||_.sharedInstance.primaryInteractionMode===h.TOUCH||(this._redirectUrlPath=hZ(E,this._relativePath,this._shortGuid)))}else if(o.length>0){var T=pZ(o[0]);switch(T){case"terms":break;case"v":this._shortGuid=pZ(o[1]);break;case"attachment":this._mailDropDetail=function(e){var t={downloadURL:null},n=e.indexOf("u=");if(n<0)return t;var r=e.substring(n+2),i=r.indexOf("&sz=");if(i<0)return t;var o=r.indexOf("&f=");if(o<0)return t;var a=r.indexOf("&uk=");if(a<0)return t;var s=parseInt(r.substring(i+"&sz=".length),10),c=(r=r.substring(0,i)).substring(o+"&f=".length),u=(r=r.substring(0,o)).substring(a+"&uk=".length);r=r.substring(0,a);var l=Object(he.c)(r.replace("${f}",c).replace("${uk}",u));return"https:"!==l.protocol?t:/((.*\.icloud-content.com)|(.*\.digitalhub.com))$/g.exec(l.hostname)?s<0?t:c?{downloadURL:l,size:s,title:c,fileType:c.indexOf(".")>=0?c.substring(c.lastIndexOf(".")+1):null}:t:t}(decodeURIComponent(e.toString())),this._applicationIdentifier="mail";break;case"plan":this._informationalPageDetails={route:eZ.plan,title:Xn("NavLinks.Plan"),relativePath:o.slice(1).join("/"),hash:a},this._applicationIdentifier="/plan";break;case"storage":this._informationalPageDetails={route:eZ.storage,title:Xn("NavLinks.Storage"),relativePath:o.slice(1).join("/"),hash:a},this._applicationIdentifier="/storage";break;case"recovery":this._informationalPageDetails={route:eZ.recovery,title:Xn("NavLinks.DataRecovery"),relativePath:o.slice(1).join("/"),hash:a},this._applicationIdentifier="/recovery";break;case"hidemyemail":case"customdomain":this._informationalPageDetails={route:eZ.icloudplus,title:Xn("NavLinks.ICloudPlus"),relativePath:o.slice(0).join("/"),hash:a},this._applicationIdentifier="/icloudplus";break;case"icloudplus":this._informationalPageDetails={route:eZ.icloudplus,title:Xn("NavLinks.ICloudPlus"),relativePath:o.slice(1).join("/"),hash:a},this._applicationIdentifier="/icloudplus";break;case"settings":this._informationalPageDetails={route:eZ.settings,title:Xn("NavLinks.Settings"),relativePath:o.slice(1).join("/"),hash:a},this._applicationIdentifier="/settings";break;case"ssoRedirect":break;default:var O=y.includes(T);if(this.supportsShareURLs=O,"share"!==T&&(this._applicationIdentifier=pZ(T).toLowerCase()),o.length>1&&"share"!==o[1]&&O)this._shortGuid=pZ(o[1]);else if(a&&a.length>1&&O)if(1===a.split("&").length)this._shortGuid=pZ(a);else{var P=a.match(/st=(.*)&i=(.*)/),x=P?"e"===P[1]?"calendar":"t"===P[1]?"reminders":null:null;if(this._shortGuid=P?P[2]:void 0,x&&x!==T){var A=window.location.href.replace(T,x);this._applicationIdentifier=x,window.history.replaceState(window.history.state,window.document.title,A)}}else this._relativePath=o.slice(1).join("/"),this._hash=a}}switch(this._applicationIdentifier){case"find-my-iphone":this._redirectUrlPath=hZ("/find",this._relativePath,this._shortGuid);break;case"notes2":case"notes3":this._redirectUrlPath=hZ("/notes",this._relativePath,this._shortGuid);break;case"drive":this._redirectUrlPath=hZ("/iclouddrive",this._relativePath,this._shortGuid);break;case"/settings":var N,R;"hidemyemail"!==(null==(t=this._informationalPageDetails)?void 0:t.relativePath)&&"customdomain"!==(null==(n=this._informationalPageDetails)?void 0:n.relativePath)||(this._redirectUrlPath=hZ("/icloudplus",null==(N=this._informationalPageDetails)?void 0:N.relativePath,null==(R=this._informationalPageDetails)?void 0:R.hash))}}}var t,n,r=e.prototype;return r.determineRedirectUrl=function(){var e,t=this.url.origin;return navigator.cookieEnabled||function(){try{return Is.a.set("COS_BOOTSTRAP_COOKIE_TEST","1"),"1"===Is.a.get("COS_BOOTSTRAP_COOKIE_TEST")}catch(e){return!1}}()?Jn()?null!=(e=this.relativePath)&&e.startsWith("join")&&!this.callDetails?"/":null:this.isBrowserVersionAtLeast({googlebot:0})||-1!==window.location.hash.indexOf("#terms")||-1!==window.location.hash.indexOf("postLoginRedirectUrl=")||this.isBrowserVersionAtLeast({fxios:21,firefox:21,crios:35,chrome:35,mobilesafari:10.1,safari:10.1,edge:79,ie:-1,android:-1,otherwise:!0})?null:_.sharedInstance.primaryInteractionMode===h.TOUCH?t+"/unsupported_mobile/":t+"/unsupported_browser/":t+"/enable_cookies/"},r.isBrowserVersionAtLeast=function(e){for(var t in e)if("otherwise"!==t){var n=this.browserFinders[t];if(n&&n.matches){var r=e[t];if("number"===typeof r){if(-1===r)return!1;var i=n.version;if(void 0!==i&&i>=r)return!0;var o,a=n.regexp;return!!(a&&Number((null==(o=this.userAgent.match(a))?void 0:o.slice(-1)[0])||0)>=r)}}}return!!e.otherwise},t=e,(n=[{key:"applicationIdentifier",get:function(){return this._applicationIdentifier}},{key:"shortGuid",get:function(){return this._shortGuid}},{key:"mailDropDetail",get:function(){return this._mailDropDetail}},{key:"informationalPageDetails",get:function(){return this._informationalPageDetails}},{key:"relativePath",get:function(){return this._relativePath}},{key:"hash",get:function(){return this._hash}},{key:"url",get:function(){return this._url}},{key:"redirectUrlPath",get:function(){return this._redirectUrlPath}},{key:"callDetails",get:function(){return this._callDetails}},{key:"isSafari12OrLower",get:function(){return!this.isBrowserVersionAtLeast({safari:13})}},{key:"isChrome",get:function(){return this._isChrome}},{key:"isFirefox",get:function(){return this._isFirefox}},{key:"isOnSupportedBrowserForFacetime",get:function(){return!!fZ()&&!(this.isAndroid&&!this._isChrome)}}])&&lZ(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function pZ(e){var t=e;if("#"===t[0]&&(t=t.substring(1)),t.indexOf("#")>=0){var n=t.split("#");t=n[0]}var r=t.indexOf("?");return r>0&&(t=t.substring(0,r)),t}function fZ(){return!!window.RTCRtpSender&&!!(window.RTCRtpSender.prototype.createEncodedStreams||window.SFrameTransform&&"transform"in window.RTCRtpSender.prototype)&&!!navigator.mediaDevices}function hZ(e,t,n){return e+(t?"/"+t:"")+(n?n.indexOf("#")>=0?"/"+n:"/#"+n:"")}function mZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var vZ,yZ,bZ=function(){var e,t,n=r.prototype;function r(e,t){var n=this;this.delegate=null,this._applicationParametersUrl=void 0,this._applicationParameter=void 0,this.needsTermsFlow=void 0,this.needsGameCenterTermsFlow=void 0,this.isDebug=void 0,this.redirectedAuthDetails=null,this.trackingFromPopState=!1,this.update=function(){var e,t=window.location.href,r=Object(he.c)(t);n._applicationParametersUrl=r,n._applicationParameter=new dZ(r),null==(e=n.delegate)||e.parametersDidChange(n)};var r,i=e.searchParams;"true"===i.get("redirectingUserToCorrectDomain")&&(this.redirectedAuthDetails={accountName:i.get("accountName"),accountCountryCode:i.get("accountCountryCode"),dsWebAuthToken:i.get("dsWebAuthToken"),extendedLogin:i.get("extendedLogin"),totalAuthenticationSteps:function(){var e=i.get("totalAuthenticationSteps"),t=e?parseInt(e):null;return"number"===typeof t?t:null}()},i.delete("redirectingUserToCorrectDomain"),i.delete("accountName"),i.delete("accountCountryCode"),i.delete("dsWebAuthToken"),i.delete("extendedLogin"),i.delete("totalAuthenticationSteps"),null==(r=window.top)||r.history.replaceState(history.state,document.title,e.href)),this._applicationParametersUrl=e,this._applicationParameter=new dZ(e),this.isDebug=t,window.addEventListener("popstate",(function(){n.trackingFromPopState=!0,n.update(),n.trackingFromPopState=!1})),window.addEventListener("hashchange",this.update);var o=ws(e.pathname+e.search);if(!o.length){var a=e.hash;o=ws("#"===a[0]?a.slice(1):a)}var s="terms"===o[0];this.needsTermsFlow=s,this.needsGameCenterTermsFlow=s&&"gc"===o[1]}return n.setChildApplication=function(e,t,n){var r,i,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Jn()?this.pushHistoryState(e,t,n,this.relativePath,this.hash,o?"":void 0):this.pushHistoryState(e,t,n,null!=(r=e.applicationRelativePath)?r:"",null!=(i=e.applicationHash)?i:"",o?"":void 0)},n.pushHistoryState=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.relativePath,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.applicationUrl.hash,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.applicationUrl.search;this.trackingFromPopState?this.replaceHistoryState(e,t,n,r,i,o):(_r.pushHistoryState(e,t,n,r,o,i),this.update())},n.replaceHistoryState=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.relativePath,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.applicationUrl.hash,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.applicationUrl.search,a=_r.replaceHistoryState(e,t,n,r,o,i);a&&this.update()},e=r,(t=[{key:"applicationUrl",get:function(){return this._applicationParametersUrl}},{key:"applicationParameter",get:function(){return this._applicationParameter}},{key:"applicationIdentifier",get:function(){var e,t=this._applicationParameter.applicationIdentifier;return this.isDeveloperMode&&null!=(e=this.applicationUrl.searchParams.get("appIdentifier"))?e:t}},{key:"relativePath",get:function(){return this._applicationParameter.relativePath}},{key:"hash",get:function(){return this._applicationParameter.hash}},{key:"shortGuid",get:function(){return this.isDeveloperMode?this.applicationUrl.searchParams.get("shortGuid"):this._applicationParameter.shortGuid}},{key:"showApps",get:function(){var e=this.applicationUrl.searchParams.get("showApps");if(!e)return null;for(var t,n=[],r=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return mZ(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mZ(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(","));!(t=r()).done;){var i=t.value,o=i.split(":");0!==i.length&&(1===o.length?n.push({identifier:o[0]}):n.push({identifier:o[0],generation:parseInt(o[1],10)}))}return 0===n.length?null:n}},{key:"locale",get:function(){return this.applicationUrl.searchParams.get("locale")}},{key:"port",get:function(){if(!this.isDeveloperMode)return null;var e=this.applicationUrl.searchParams.get("port");return e?parseInt(e,10):null}},{key:"showEnvironmentInfo",get:function(){return!Jn()&&"false"!==this.applicationUrl.searchParams.get("showEnvironmentInfo")}},{key:"redirectedFromCarry",get:function(){return"false"===this.applicationUrl.searchParams.get("carry")}},{key:"postLoginRedirectUrl",get:function(){var e=this.applicationUrl,t=e.hash.indexOf("postLoginRedirectUrl="),n=e.hash.substring(t+"postLoginRedirectUrl=".length);return-1!==t?decodeURIComponent(n):""}},{key:"isSignupRequested",get:function(){var e=this.applicationUrl.hash;return/[#&]signup(&.*)?$/.test(e)}},{key:"vettingParameters",get:function(){var e=this.applicationUrl.pathname+this.applicationUrl.search;if(!e)return null;var t=e.split("/");return"v"!==t[1]?null:{vettingToken:t[2],vettingStatus:t[3]}}},{key:"isDeveloperMode",get:function(){return!!this.isDebug&&"true"===this.applicationUrl.searchParams.get("developerMode")}}])&&gZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function _Z(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function CZ(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){_Z(o,r,i,a,s,"next",e)}function s(e){_Z(o,r,i,a,s,"throw",e)}a(void 0)}))}}function IZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}bZ.sharedInstance=new bZ(Object(he.c)(window.location.href),!1),function(e){e.UNKNOWN="UNKNOWN",e.UNAUTHENTICATED="UNAUTHENTICATED",e.AUTHENTICATING="AUTHENTICATING",e.PARTIALLY_AUTHENTICATED="PARTIALLY_AUTHENTICATED",e.AUTHENTICATED="AUTHENTICATED"}(vZ||(vZ={})),function(e){e.COULD_NOT_VALIDATE="Validate error",e.COULD_NOT_LOG_IN_STEP="Could not log in while processing authentication step",e.COULD_NOT_LOG_IN="Could not log in to account",e.COULD_NOT_LOG_IN_REAUTH="Could not log in to reauthenticate the user",e.TERMS_ACCEPTANCE_REQUIRED="Terms need to be accepted",e.RETRIEVING_TERMS_FAILURE="Could not get terms and conditions",e.ACCEPTING_TERMS_FAILURE="Terms could not be accepted",e.KVS_ERROR="Key value store error"}(yZ||(yZ={}));var wZ=function(){function e(){this.cloudOSUserObservers=new Set,this.authenticationStepObservers=new Set,this.authenticationState=vZ.UNKNOWN,this._cloudOSUser=null,this.delegate=void 0,this.configurations=[],this.previousDsidCookie=null,this.previousValidated=null,this.pendingUserAuthPromise=null,this.pendingUserAuthResolve=null,this.pendingSessionRetrievePromise=null,this.pendingSessionRetrieveResolve=null,this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null,this.currentLogoutPromise=null,this.isLogoutInProgress=!1,this.isRedirectedToCorrectDomain=!1,this.writeDsidCookie(),this.startPollingForCookieChange()}var t,n,r=e.prototype;return r.validateUser=function(){var e=CZ(regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,LZ((function(e,t){return n.showTermsIfNeeded(e,t)}),this.delegate);case 2:t=e.sent,e.t0=t.result,e.next="validation-error"===e.t0?6:"validation-failed"===e.t0?9:"validation-succeeded"===e.t0?13:22;break;case 6:return this.authenticationState=vZ.UNKNOWN,this.delegate.authenticationDidFail(this,t.errorInfo),e.abrupt("break",22);case 9:return this.authenticationState=vZ.UNAUTHENTICATED,this.delegate.validationDidFail(this),this.previousValidated=!1,e.abrupt("break",22);case 13:return this.authenticationState=vZ.AUTHENTICATED,this.cloudOSUser=_a.fromAuthenticationDataResponse(t.response),kZ(),QH(this.cloudOSUser.details),this.delegate.validationDidSucceed(this,this.cloudOSUser,this.cloudOSUser.details),this.previousValidated=!0,e.next=21,this.writeDsidCookie();case 21:return e.abrupt("break",22);case 22:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.processAuthenticationStep=function(){var e=CZ(regeneratorRuntime.mark((function e(t,n,r,i,o,a){var s,c,u,l,d,p,f,h,m=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o>a)){e.next=2;break}throw new Error("[AuthenticationController] processAuthenticationStep: invalid authentication steps "+o+" of "+a);case 2:if(!(o>2||a>2)){e.next=4;break}throw new Error("[AuthenticationController] invalid authenticationStep, totalAuthenticationStep: "+o+", "+a);case 4:if(u=null==(s=_r.configuration.urls)?void 0:s.accountLogin){e.next=7;break}throw new Error("[AuthenticationController] processAuthenticationStep: No accountLoginUrl found");case 7:if(1===o){e.next=20;break}if(this.isRedirectedToCorrectDomain){e.next=19;break}if(l=this.cloudOSUser){e.next=12;break}throw new Error("No cloudOSUser processing step 2 of authentication");case 12:if(d=null==l?void 0:l.details){e.next=15;break}throw new Error("No authenticatedUser processing step 2 of authentication");case 15:d.completedAuthenticationStep=o,d.totalAuthenticationSteps=a,this.delegate.authenticationStepDidComplete(this,l,o,a),this.authenticationStepObservers.forEach((function(e){return e.authenticationStepsDidChange()}));case 19:return e.abrupt("return");case 20:return e.next=22,os(u,r,i,!1);case 22:return p=e.sent,e.next=25,CZ(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p.isOK||p.isError){e.next=4;break}return n=_a.fromAuthenticationDataResponse(p),OZ(p,"processAuthenticationStep"),e.abrupt("return",n);case 4:if(403!==p.httpStatusCode||2!==p.error){e.next=7;break}return m.delegate.accountNeedsSetUp(m),e.abrupt("return",null);case 7:if(302!==p.httpStatusCode||!p.domainToUse){e.next=11;break}return m.isRedirectedToCorrectDomain=!0,m.delegate.redirectUserToCorrectDomainToAuthenticate(p.domainToUse,r,t,a),e.abrupt("return",null);case 11:return m.delegate.authenticationDidFail(m,TZ(yZ.COULD_NOT_LOG_IN_STEP,p.error)),e.abrupt("return",null);case 13:case"end":return e.stop()}}),e)})))();case 25:if(f=e.sent){e.next=28;break}return e.abrupt("return");case 28:return this.cloudOSUser=f,e.next=31,this.showTermsIfNeeded(f.termsUpdateNeeded,null!=(c=f.countryCode)?c:void 0);case 31:if(!0===(h=e.sent)){e.next=35;break}return this.delegate.authenticationDidFail(this,h),e.abrupt("return");case 35:this.authenticationState=vZ.PARTIALLY_AUTHENTICATED,this.delegate.authenticationStepDidComplete(this,f,o,a);case 37:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,o,a){return e.apply(this,arguments)}}(),r.processAuthenticationFinish=function(){var e=CZ(regeneratorRuntime.mark((function e(t,n,r,i,o,a){var s,c,u,l,d,p,f,h,m=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=this.cloudOSUser,d=function(){if(m.isRedirectedToCorrectDomain)return!0;if(!l)return!1;var e=l.details;if(!e)throw new Error("[AuthenticationController] processAuthenticationFinish: cloudOSUser.details is undefined");if(e.completedAuthenticationStep!==e.totalAuthenticationSteps)throw new Error("[AuthenticationController] processAuthenticationFinish: completedAuthenticationStep should equal totalAuthenticationSteps");return l.isAuthenticated&&!o&&!l.termsUpdateNeeded}(),e.next=4,CZ(regeneratorRuntime.mark((function e(){var n,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d){e.next=2;break}return e.abrupt("return",l);case 2:if(s=null==(n=_r.configuration.urls)?void 0:n.accountLogin){e.next=5;break}throw new Error("[AuthenticationController] processAuthenticationFinish: No accountLoginUrl found");case 5:return e.next=7,os(s,r,i,o,a);case 7:if(!(c=e.sent).isOK||c.isError){e.next=14;break}return u=_a.fromAuthenticationDataResponse(c),UC.sharedInstance.pushToken=null,OZ(c,"processAuthenticationFinish"),u.isTiburonLogin=r.dsMethod===Ho.TIBURON_LOGIN,e.abrupt("return",u);case 14:if(302!==c.httpStatusCode||!c.domainToUse){e.next=17;break}return m.delegate.redirectUserToCorrectDomainToAuthenticate(c.domainToUse,r,t,void 0),e.abrupt("return",null);case 17:return m.delegate.authenticationDidFail(m,TZ(yZ.COULD_NOT_LOG_IN,c.error)),e.abrupt("return",null);case 19:case"end":return e.stop()}}),e)})))();case 4:if(null!=(p=e.sent)&&p.isAuthenticated){e.next=7;break}return e.abrupt("return");case 7:return this.authenticationState=vZ.AUTHENTICATED,this.pendingUserAuthPromise&&(null==(f=this.pendingUserAuthResolve)||f.call(this,!0),this.pendingUserAuthPromise=null,this.pendingUserAuthResolve=null),this.cloudOSUser=p,e.next=12,PZ(this.delegate,null==(s=p.details)?void 0:s.dsid,null==(c=p.details)||null==(u=c.mailFlags)?void 0:u.isThreadingAvailable);case 12:if((h=e.sent).success){e.next=16;break}return this.delegate.authenticationDidFail(this,TZ(yZ.KVS_ERROR,h.error)),e.abrupt("return");case 16:return kZ(),QH(p.details),this.delegate.authenticationDidComplete(this,p,p.details,r.dsMethod===Ho.TIBURON_LOGIN),e.next=21,this.writeDsidCookie(o?14:void 0);case 21:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,o,a){return e.apply(this,arguments)}}(),r.redirectUserToCorrectDomain=function(){var e=CZ(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=u.length>3&&void 0!==u[3]?u[3]:1,c="www."+t.toLowerCase(),this.redirectWithAuthDetails({accountName:r,accountCountryCode:null!=(i=n.accountCountryCode)?i:null,dsWebAuthToken:null!=(o=n.dsWebAuthToken)?o:null,extendedLogin:null!=(a=n.extended_login)?a:null,totalAuthenticationSteps:s},c);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),r.redirectWithAuthDetails=function(e,t){var n=e.totalAuthenticationSteps,r=e.accountName,i=e.accountCountryCode,o=e.extendedLogin,a=hr(bZ.sharedInstance.applicationUrl.href,Object.assign({accountName:r,totalAuthenticationSteps:n},1===n?{accountCountryCode:i,extendedLogin:o}:{},{redirectingUserToCorrectDomain:"true"}));a.protocol="https://",a.hostname=t,Qn.a(a.href),t===window.location.hostname&&window.location.reload()},r.processAuthenticationError=function(e,t){this.authenticationState=vZ.UNAUTHENTICATED,this.pendingUserAuthResolve&&(this.pendingUserAuthResolve(!1),this.pendingUserAuthPromise=null),this.delegate.authenticationDidFail(this,TZ(e,t))},r.authenticateUser=function(e,t){var n=this;this.authenticationState===vZ.UNAUTHENTICATED||this.authenticationState===vZ.UNKNOWN?(this.authenticationState=vZ.AUTHENTICATING,this.pendingUserAuthPromise=new Promise((function(e){n.pendingUserAuthResolve=e})),this.delegate.startInAppAuthentication(e,t)):this.continueAuthentication()},r.continueAuthentication=function(){var e;return(this.authenticationState===vZ.PARTIALLY_AUTHENTICATED||this.authenticationState===vZ.AUTHENTICATING)&&(this.authenticationState=vZ.AUTHENTICATING,null==(e=this.delegate)||e.continueAuthentication(),!0)},r.cancelUserAuthenticate=function(){var e=CZ(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.authenticationState===vZ.AUTHENTICATING){e.next=3;break}return console.warn("[AuthenticationController] Cannot cancel authentication; unexpected AuthenticationState "+this.authenticationState),e.abrupt("return");case 3:this.updateAuthenticationState(),this.pendingSessionRetrieveResolve?(this.delegate.sessionRetrieveDidComplete(this),this.pendingSessionRetrieveResolve(null),this.pendingSessionRetrievePromise=null,this.pendingSessionRetrieveResolve=null):this.pendingReauthenticateResolve?(this.pendingReauthenticateResolve(!0),this.delegate.reauthenticateDidCancel(this),this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null):(this.pendingUserAuthResolve&&(this.pendingUserAuthResolve(!1),this.pendingUserAuthResolve=null,this.pendingUserAuthPromise=null),this.authenticationState=vZ.UNAUTHENTICATED,this.delegate.authenticationDidCancel(this));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.unauthenticateUser=function(){var e=CZ(regeneratorRuntime.mark((function e(t,n){var r,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isLogoutInProgress||!this.currentLogoutPromise){e.next=2;break}return e.abrupt("return",this.currentLogoutPromise);case 2:return this.isLogoutInProgress=!0,r=CZ(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(r=o.cloudOSUser)||!r.hsaTrustedBrowser||t){e.next=4;break}return e.abrupt("return",o.delegate.showTrustCredentialsOnLogout(o,n));case 4:if(!o.cloudOSUser){e.next=8;break}return e.abrupt("return",!!t&&o.cloudOSUser.hsaTrustedBrowser);case 8:return e.next=10,o.invalidateCachedAuthenticationDetails();case 10:return o.delegate.userDidUnauthenticate(o),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e)})))(),e.next=6,r;case 6:if(null!==(i=e.sent)){e.next=11;break}return this.isLogoutInProgress=!1,this.currentLogoutPromise=null,e.abrupt("return",!1);case 11:return this.currentLogoutPromise=CZ(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r;case 2:case"end":return e.stop()}}),e)})))(),e.next=14,this.delegate.userWillUnauthenticate(this);case 14:if(e.sent){e.next=19;break}return this.isLogoutInProgress=!1,this.currentLogoutPromise=null,e.abrupt("return",!0);case 19:return e.next=21,ss(i);case 21:if(e.sent){e.next=26;break}return this.isLogoutInProgress=!1,this.currentLogoutPromise=null,e.abrupt("return",!0);case 26:return e.next=28,this.invalidateCachedAuthenticationDetails();case 28:return this.delegate.userDidUnauthenticate(this),fr.sharedInstance.updateServiceUrl(),e.abrupt("return",!0);case 31:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),r.unauthenticateUserFromAllBrowsers=function(){var e=CZ(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.delegate.userWillUnauthenticate(this);case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,ss(!1,!0);case 7:return t=e.sent,e.next=10,this.invalidateCachedAuthenticationDetails();case 10:t.isOK&&this.delegate.userDidUnauthenticate(this);case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.reauthenticateUser=function(e){var t,n,r,i=this,o=null!=(t=this.pendingUserAuthPromise)?t:this.pendingReauthenticatePromise;if(o)return o;var a=this.authenticationState;if(a!==vZ.PARTIALLY_AUTHENTICATED&&a!==vZ.AUTHENTICATED)throw new Error("[AuthenticationController] Cannot reauthenticate the current user; unexpected AuthenticationState "+this.authenticationState);var s=this.cloudOSUser;this.authenticationState=vZ.AUTHENTICATING;var c=null==s||null==(n=s.details)?void 0:n.appleId;if(!c)throw new Error("appleId not available fo reauthenticateUser");var u=null==s||null==(r=s.details)?void 0:r.completedAuthenticationStep;this.delegate.startSessionRetrieve(c,u,e);var l=new Promise((function(e){i.pendingReauthenticateResolve=e}));return this.pendingReauthenticatePromise=l,l},r.performSecondaryAuth=function(){var e=CZ(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.authenticationState===vZ.PARTIALLY_AUTHENTICATED||this.authenticationState===vZ.AUTHENTICATED){e.next=2;break}throw new Error("[AuthenticationController] Cannot fully authenticate the current user; unexpected AuthenticationState "+this.authenticationState);case 2:if(a=null==(n=_r.configuration.urls)?void 0:n.accountLogin){e.next=5;break}throw new Error("accountLoginURL is undefined");case 5:if(s=null==(r=this.cloudOSUser)||null==(i=r.details)?void 0:i.appleId){e.next=8;break}throw new Error("apple_id missing for secondary auth");case 8:return e.next=10,os(a,{appName:null!=(o=YV.cloudOSApplication.currentChildApplicationIdentifier)?o:void 0,apple_id:s,password:t},void 0,void 0);case 10:return c=e.sent,e.abrupt("return",c.isOK);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.retrieveSession=function(e,t,n){var r=this,i=this.authenticationState;if(this.pendingSessionRetrievePromise)return this.pendingSessionRetrievePromise;if(i===vZ.PARTIALLY_AUTHENTICATED||i===vZ.AUTHENTICATED){this.authenticationState=vZ.AUTHENTICATING,this.delegate.startSessionRetrieve(e,t,n);var o=new Promise((function(e){r.pendingSessionRetrieveResolve=e}));return this.pendingSessionRetrievePromise=o,o}throw new Error("[AuthenticationController] Cannot authenticate for the given Apple ID; unexpected AuthenticationState "+this.authenticationState)},r.processSessionRetrieveFinish=function(){var e=CZ(regeneratorRuntime.mark((function e(t,n,r,i,o,a){var s,c,u,l,d,p,f,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.authenticationState===vZ.AUTHENTICATING){e.next=2;break}throw new Error("[AuthenticationController] Cannot unexpected AuthenticationState "+this.authenticationState+" in processSessionRetrieveFinish");case 2:if(this.updateAuthenticationState(),this.delegate.sessionRetrieveDidComplete(this),s=this.pendingSessionRetrievePromise,c=this.pendingReauthenticatePromise,!s||!c){e.next=8;break}throw new Error("[AuthenticationController] Both pending session retrieve and reauthenticate promise exist in processSessionRetrieveFinish");case 8:if(s||c){e.next=10;break}throw new Error("[AuthenticationController] No pending session retrieve or reauthenticate promise in processSessionRetrieveFinish");case 10:if(s&&(null==(u=this.pendingSessionRetrieveResolve)||u.call(this,r),this.pendingSessionRetrievePromise=null,this.pendingSessionRetrieveResolve=null),!c){e.next=19;break}if(d=null==(l=_r.configuration.urls)?void 0:l.accountLogin){e.next=15;break}throw new Error("accountLoginURL is null");case 15:return e.next=17,os(d,r,i,o,a);case 17:(p=e.sent).isOK?(null==(f=this.pendingReauthenticateResolve)||f.call(this,!0),this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null):(null==(h=this.pendingReauthenticateResolve)||h.call(this,!1),this.pendingReauthenticatePromise=null,this.pendingReauthenticateResolve=null,this.delegate.authenticationDidFail(this,TZ(yZ.COULD_NOT_LOG_IN_REAUTH,p.error)));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,o,a){return e.apply(this,arguments)}}(),r.createAccount=function(e){this.delegate.createAccount(e)},r.createAccountCompleted=function(){var e=CZ(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null==(n=_r.configuration.urls)?void 0:n.accountCreate){e.next=3;break}throw new Error("accountCreateURL is not defined");case 3:return this.delegate.willFinishCreateAccountFlow(),e.prev=4,i=_r.locale,e.next=8,EZ(i,t);case 8:if((o=e.sent).success){e.next=11;break}return e.abrupt("return");case 11:return a=o.termsDetails,e.next=14,this.delegate.presentTermsAndConditions(this,a,a.country);case 14:if(e.sent){e.next=17;break}return e.abrupt("return");case 17:if(s=a.iCloudTerms.version){e.next=20;break}return e.abrupt("return");case 20:return e.next=22,es.fetchURL(r,{method:"POST",body:JSON.stringify({createPayload:t,acceptedICloudTerms:s.toString()})});case 22:return e.next=24,this.validateUser();case 24:return e.prev=24,this.delegate.didFinishCreateAccountFlow(),e.finish(24);case 27:case"end":return e.stop()}}),e,this,[[4,,24,27]])})));return function(t){return e.apply(this,arguments)}}(),r.createAccountCanceled=function(){this.delegate.didCancelCreateAccountFlow()},r.processRepairDidStart=function(){this.authenticationState===vZ.UNAUTHENTICATED&&(this.authenticationState=vZ.AUTHENTICATING)},r.invalidateCachedAuthenticationDetails=function(){return UC.sharedInstance.pushToken=null,this.authenticationState=vZ.UNAUTHENTICATED,this.isRedirectedToCorrectDomain=!1,Is.a.remove("X-APPLE-WEB-ID",{domain:Ne.sharedInstance.current.cookiesDomain}),this.previousDsidCookie=null,up.invalidate(),_r.configuration.invalidateConfiguration()},r.showTermsIfNeeded=function(){var e=CZ(regeneratorRuntime.mark((function e(t,n){var r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=17;break}return e.next=3,EZ();case 3:if((i=e.sent).success){e.next=6;break}return e.abrupt("return",TZ(yZ.RETRIEVING_TERMS_FAILURE,i.error));case 6:return o=i.termsDetails,e.next=9,this.delegate.presentTermsAndConditions(this,o,n);case 9:if(a=null==(r=_r.configuration.urls)?void 0:r.repairDone){e.next=12;break}return e.abrupt("return",TZ(yZ.ACCEPTING_TERMS_FAILURE));case 12:return e.next=14,bs(a,o.iCloudTerms.version);case 14:if(e.sent){e.next=17;break}return e.abrupt("return",TZ(yZ.ACCEPTING_TERMS_FAILURE));case 17:if(!bZ.sharedInstance.needsTermsFlow){e.next=20;break}return e.next=20,this.delegate.displayTermsAndConditionsSuccessConfirmation(this,t);case 20:return e.abrupt("return",!0);case 21:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),r.updateAuthenticationState=function(){var e,t=null==(e=this.cloudOSUser)?void 0:e.details;if(!t)return this.authenticationState=vZ.UNAUTHENTICATED,void(this.cloudOSUser=null);var n=t.completedAuthenticationStep,r=t.totalAuthenticationSteps;this.authenticationState=0===n?vZ.UNAUTHENTICATED:n<r?vZ.PARTIALLY_AUTHENTICATED:vZ.AUTHENTICATED},r.writeDsidCookie=function(){var e=CZ(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,c,u,l,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.authenticationState,s=null==(n=this.cloudOSUser)||null==(r=n.details)?void 0:r.dsid,c=null==(i=this.cloudOSUser)||null==(o=i.details)?void 0:o.accountType,s&&c&&a!==vZ.UNKNOWN&&a!==vZ.UNAUTHENTICATED){e.next=5;break}return e.abrupt("return");case 5:return u=function(){switch(a){case vZ.PARTIALLY_AUTHENTICATED:case vZ.AUTHENTICATING:return c===Wo.HSA1||c===Wo.HSA2?1:c===Wo.MANAGED?3:0;case vZ.AUTHENTICATED:return 2}}(),l=(new TextEncoder).encode(""+s+u),e.next=9,crypto.subtle.digest("SHA-1",l);case 9:d=e.sent,p=Array.from(new Uint8Array(d)).map((function(e){return e.toString(16).padStart(2,"0")})).join("").toUpperCase(),Is.a.set("X-APPLE-WEB-ID",p,Object.assign({domain:Ne.sharedInstance.current.cookiesDomain},void 0!==t&&{expires:t})),this.previousDsidCookie=p;case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),r.startPollingForCookieChange=function(){var e=CZ(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.previousDsidCookie=AZ(),this.previousValidated=!!NZ();case 2:return e.next=5,Xo(1e3);case 5:if(t=AZ(),n=!!NZ(),t===this.previousDsidCookie&&n===this.previousValidated){e.next=19;break}if(this.previousValidated&&this.authenticationState===vZ.AUTHENTICATED&&(this.invalidateCachedAuthenticationDetails(),this.delegate.userDidUnauthenticate(this)),this.previousValidated=n,this.previousDsidCookie=t,!n||!t||this.authenticationState!==vZ.UNAUTHENTICATED){e.next=19;break}return e.prev=12,e.next=15,this.validateUser();case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(12);case 19:e.next=2;break;case 21:case"end":return e.stop()}}),e,this,[[12,17]])})));return function(){return e.apply(this,arguments)}}(),t=e,(n=[{key:"cloudOSUser",get:function(){return this._cloudOSUser},set:function(e){e!==this._cloudOSUser&&(this._cloudOSUser=e,this.cloudOSUserObservers.forEach((function(e){return e.cloudOSUserDidChange()})),fr.sharedInstance.updateAuthenticationState(e),FZ())}}])&&IZ(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function EZ(e,t){return SZ.apply(this,arguments)}function SZ(){return(SZ=CZ(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==(r=_r.configuration.urls)?void 0:r.getICloudTerms){e.next=3;break}return e.abrupt("return",{success:!1,error:null});case 3:return e.next=5,ms(i,t,n);case 5:if(!(o=e.sent).success){e.next=10;break}return e.abrupt("return",{success:!0,termsDetails:o.termsDetails});case 10:return e.abrupt("return",{success:!1,error:o.error});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function TZ(e,t){var n=function(){switch(e){case yZ.COULD_NOT_VALIDATE:return"COULD_NOT_VALIDATE";case yZ.COULD_NOT_LOG_IN_STEP:return"COULD_NOT_LOG_IN_STEP";case yZ.COULD_NOT_LOG_IN:return"COULD_NOT_LOG_IN";case yZ.COULD_NOT_LOG_IN_REAUTH:return"COULD_NOT_LOG_IN_REAUTH";case yZ.TERMS_ACCEPTANCE_REQUIRED:return"TERMS_ACCEPTANCE_REQUIRED";case yZ.RETRIEVING_TERMS_FAILURE:return"RETRIEVING_TERMS_FAILURE";case yZ.ACCEPTING_TERMS_FAILURE:return"ACCEPTING_TERMS_FAILURE";case yZ.KVS_ERROR:return"KVS_ERROR";case Vo.TIMEOUT:return"TIMEOUT";case Vo.INVALID_DATA:return"INVALID_DATA";case Vo.UNABLE_TO_CONTINUE_AUTHENTICATION:return"UNABLE_TO_CONTINUE_AUTHENTICATION";default:return"UNKNOWN"}}();return Object.assign({errorType:n,message:e},void 0!==t&&{info:t})}function OZ(e,t){return _r.configuration.updateConfiguration(e.environment,e.applications,e.webServices,e.urls,e.accountCreateEnabled,e.trustTokens,e.isPCSKeyDeleted,e.rawResponse,e.httpStatusCode,t)}function PZ(e,t,n){return xZ.apply(this,arguments)}function xZ(){return(xZ=CZ(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,c,u,l,d,p,f,h,m,g,v,y,b,_;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n&&(null==t||t.willFetchForAuthenticatedUser(n,r)),fr.sharedInstance.updateServiceUrl(),YV.cloudOSApplication.meCardController.refreshMeCard(),o=gl.sharedInstance.displayOrder.map((function(e){return e.applicationInfo.authBagId})),e.next=6,up.initialize();case 6:if(a=e.sent,up.initializeAppPreferences(o),a.isOK){e.next=10;break}return e.abrupt("return",{success:!1,error:a.error});case 10:return s=up.getAccountPreferences(),c=null==s?void 0:s.locale,u=null==s?void 0:s.secondaryLocale,l=null!=(i=null==s?void 0:s.regionFormat)?i:null,d=null==s?void 0:s.timeZone,p=Iv.sharedInstance,f=p.regionFormatterLocaleMap,h=p.hasSecondaryLocales,m=ru(),g=au(m),v=f[g],y=v?v.toLowerCase():m,b=h.includes(g)?"en-us":null,_=Intl.DateTimeFormat().resolvedOptions().timeZone,!s||c===m&&l===y&&u===b&&d===_||(s.locale=m,s.regionFormat=y,s.secondaryLocale=b,s.timeZone=_,up.setAccountPreferences(s)),b&&(_r.secondaryLocale=b),e.abrupt("return",{success:!0});case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function AZ(){var e;return null!=(e=Is.a.get("X-APPLE-WEB-ID"))?e:null}function NZ(){var e;return null!=(e=Is.a.get("X-APPLE-WEBAUTH-VALIDATE"))?e:null}wZ.sharedInstance=new wZ;var RZ,DZ=!1;function kZ(){return UZ.apply(this,arguments)}function UZ(){return(UZ=CZ(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!DZ){e.next=2;break}return e.abrupt("return");case 2:DZ=!0;case 3:return e.next=6,Xo(84e4);case 6:return e.next=8,rs();case 8:e.next=3;break;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function LZ(e,t){return MZ.apply(this,arguments)}function MZ(){return(MZ=CZ(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,u,l,d,p,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,CZ(regeneratorRuntime.mark((function e(){var t,n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.__earlyValidationPromise){e.next=18;break}return t=window.__earlyValidationPromise,delete window.__earlyValidationPromise,e.next=5,t;case 5:if(!(n=e.sent)){e.next=18;break}if(i=n[0],o=n[1],!i||200!==i.status){e.next=13;break}if(la(o)){e.next=12;break}return e.abrupt("return",oa("Failed to validate JSON response"));case 12:return e.abrupt("return",fa(o,o,i.status));case 13:if(!(i&&401===i.status||421===i.status||403===i.status)){e.next=17;break}if(sa(o)){e.next=16;break}return e.abrupt("return",oa("Failed to validate JSON response"));case 16:return e.abrupt("return",pa(o,o,i.status));case 17:return e.abrupt("return",oa("Invalid authentication response code "+(null!=(r=null==i?void 0:i.status)?r:null)));case 18:return e.next=20,rs();case 20:return e.abrupt("return",e.sent);case 21:case"end":return e.stop()}}),e)})))();case 2:if((u=e.sent).isOK){e.next=5;break}return e.abrupt("return",{result:"validation-error",errorInfo:TZ(yZ.COULD_NOT_VALIDATE,u.error),response:u});case 5:if(l=null!=(r=u.environment)?r:"PROD",d=_r.buildNumber,Zn(l,d),OZ(u,"validateUser"),jZ(u)){e.next=12;break}return e.abrupt("return",{result:"validation-failed",response:u});case 12:return e.next=14,t(u.termsUpdateNeeded,null!=(i=null==(o=u.authenticatedUserDetails)?void 0:o.countryCode)?i:void 0);case 14:if(!0===(p=e.sent)){e.next=17;break}return e.abrupt("return",{result:"validation-error",errorInfo:p,response:u});case 17:return e.next=19,PZ(n,null==(a=u.authenticatedUserDetails)?void 0:a.dsid,null==(s=u.authenticatedUserDetails)||null==(c=s.mailFlags)?void 0:c.isThreadingAvailable);case 19:if((f=e.sent).success){e.next=22;break}return e.abrupt("return",{result:"validation-error",errorInfo:TZ(yZ.KVS_ERROR,f.error),response:u});case 22:return e.abrupt("return",{result:"validation-succeeded",response:u});case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jZ(e){return!!e.isAuthenticated&&0!==e.completedAuthenticationStep&&e.completedAuthenticationStep===e.totalAuthenticationSteps}function FZ(){var e=function(){var e,t,n=wZ.sharedInstance.cloudOSUser;return{applicationIdentifier:_r.applicationName,localizedApplicationName:Jn()?Xn("Application.Title.FaceTime"):Xn("Application.Title"),radarComponentId:759510,buildInfo:__CW_BUILD_INFO,environmentInfo:_r.configuration.environment,dsid:null==n||null==(e=n.details)?void 0:e.dsid,appleId:null==n||null==(t=n.details)?void 0:t.appleId,isAppleInternal:null==n?void 0:n.isAppleInternal}}(),t=new ei(e);RZ=t,Mr=e}function BZ(){if(void 0===RZ)throw"getExceptionHandlerDelegate called before initialization.";return RZ}function zZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(1267);var HZ,WZ,VZ,ZZ=function(){var e,t,n=r.prototype;function r(){this.shouldIncludeRedirectData=!0,this.shoulIncludeConnectionData=!0,this.shouldIncludeRequestData=!0,this.shouldIncludeDOMData=!0,this.stats=this._getPerformanceData(),this.stats=this._getPerformanceData()}return n.createWith=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=r.sharedInstance;o.shouldIncludeRedirectData=e,o.shoulIncludeConnectionData=t,o.shouldIncludeRequestData=n,o.shouldIncludeDOMData=i},n._getPerformanceData=function(){var e=new Map;if(window&&window.performance&&window.performance.timing){var t=window.performance.timing,n=t.navigationStart,r=t.domainLookupStart,i=t.domainLookupEnd,o=t.connectStart,a=t.connectEnd,s=t.secureConnectionStart,c=t.fetchStart,u=t.requestStart,l=t.responseStart,d=t.responseEnd,p=t.loadEventStart,f=t.loadEventEnd,h=t.domLoading,m=t.domInteractive,g=t.domContentLoadedEventStart,v=t.domContentLoadedEventEnd,y=this.shouldIncludeRedirectData,b=this.shoulIncludeConnectionData,_=this.shouldIncludeDOMData,C=this.shouldIncludeRequestData;y&&(e.set("redirectTime",c-n),e.set("appCacheTime",c-n)),b&&(e.set("dnsLookupTime",i-r),e.set("tcpTime",a-o),e.set("secureConnectionStart",s>0?a-s:0)),_&&(e.set("processingTime",p-h),e.set("timeToLoadDOMContent",v-g),e.set("timeBeforeUserCanInteract",m-h)),C&&(e.set("fetchTime",d-c),e.set("requestTime",l-a),e.set("totalDocumentRequestTime",d-u),e.set("documentDownloadTime",d-l),e.set("timeToFirstByteOfDocument",l-u)),e.set("totalPageLoadTime",f-n)}return e},e=r,(t=[{key:"statsHash",get:function(){var e=this.stats,t={};return e?(e.forEach((function(e,n){t[n]=e})),t):t}}])&&zZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function qZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KZ(e){return{AFTER_PAINT:"chunk-"+e+"-after-paint",EXEC_START:"chunk-"+e+"-exec-start",EXEC_SYNC_END:"chunk-"+e+"-exec-sync-end",RAF:"chunk-"+e+"-raf",START_DOM_CREATION:"chunk-"+e+"-dom-creation"}}function GZ(){for(var e,t=window.performance.getEntries()||[],n=KZ("(.*)"),r=new RegExp(n.EXEC_START),i=[],o=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return qZ(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qZ(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(e=o()).done;){var a=e.value.name.match(r);a&&i.push(a[1])}var s=i.filter((function(e){var t=KZ(e);try{return performance.measure(e+"-dom-creation",t.START_DOM_CREATION,t.EXEC_SYNC_END),performance.measure(e+"-eval-exec",t.EXEC_START,t.RAF),performance.measure(e+"-raf-paint",t.RAF,t.AFTER_PAINT),performance.measure(e+"-process-time",t.EXEC_START,t.AFTER_PAINT),Object.values(t).forEach((function(e){return performance.clearMarks(e)})),!0}catch(n){return!1}})).map((function(e){var n,r=function(e,t){var n=new RegExp("(^|/)"+t+".js");return e.find((function(e){return e.name.match(n)}))||{startTime:void 0,responseEnd:void 0,connectStart:void 0,connectEnd:void 0,domainLookupStart:void 0,domainLookupEnd:void 0}}(t,e),i=r.startTime,o=void 0===i?0:i,a=r.responseEnd,s=void 0===a?0:a,c=r.domainLookupStart,u=void 0===c?0:c,l=r.domainLookupEnd,d=void 0===l?0:l,p=r.connectStart,f=void 0===p?0:p,h=r.connectEnd,m=s-o,g=d-u,v=(void 0===h?0:h)-f,y=performance.getEntriesByName(e+"-process-time")[0]||{},b=y.startTime,_=void 0===b?0:b,C=y.duration,I=void 0===C?0:C,w=performance.getEntriesByName(e+"-eval-exec")[0]||{},E=w.startTime,S=void 0===E?0:E,T=w.duration,O=void 0===T?0:T,P=performance.getEntriesByName(e+"-dom-creation")[0]||{},x=P.startTime,A=void 0===x?0:x,N=P.duration,R=void 0===N?0:N,D=performance.getEntriesByName(e+"-raf-paint")[0]||{},k=D.startTime,U=void 0===k?0:k,L=D.duration,M=void 0===L?0:L;return(n={})[e+"FetchStart"]=Math.round(o),n[e+"FetchDuration"]=Math.round(m),n[e+"DomainLookupDuration"]=Math.round(g),n[e+"ConnectDuration"]=Math.round(v),n[e+"ExecStart"]=Math.round(S),n[e+"ExecDuration"]=Math.round(O),n[e+"ProcessStart"]=Math.round(_),n[e+"ProcessDuration"]=Math.round(I),n[e+"ProcessDelay"]=Math.round(_-s),n[e+"DomCreationStart"]=Math.round(A),n[e+"DomCreationDuration"]=Math.round(R),n[e+"PaintStart"]=Math.round(U),n[e+"PaintDuration"]=Math.round(M),n[e+"PaintEndTime"]=Math.round(_+I),n}));return Object.assign.apply(Object,[{}].concat(s))}function YZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}if(ZZ.sharedInstance=new ZZ,function(e){e.REGULAR="REGULAR",e.SHARE="SHARE"}(WZ||(WZ={})),function(e){e.REGULAR="REGULAR",e.VETTING="VETTING"}(VZ||(VZ={})),void 0===(null==(HZ=window.performance)?void 0:HZ.clearMarks)){void 0===window.performance&&(window.performance={});var QZ=function(){},XZ=function(){return{}},JZ=function(){return[]};window.performance.mark=XZ,window.performance.measure=XZ,window.performance.clearMarks=QZ,window.performance.clearMeasures=QZ,window.performance.getEntries=JZ,window.performance.getEntriesByName=JZ,window.performance.getEntriesByType=JZ}function $Z(){var e=window.matchMedia("(prefers-color-scheme: dark)").matches,t=new ur("didLaunch").timeFromProcessStart().end(),n=function(){try{var e=GZ();return Object.entries(e).filter((function(e){return e[0],!!e[1]})).reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})}catch(t){return{}}}()||{},r=ZZ.sharedInstance.statsHash||{},i=WZ.REGULAR,o=null;bZ.sharedInstance.vettingParameters?(i=WZ.SHARE,o=VZ.VETTING):(bZ.sharedInstance.shortGuid||bZ.sharedInstance.applicationParameter.mailDropDetail)&&(i=WZ.SHARE,o=VZ.REGULAR);var a=bZ.sharedInstance.applicationIdentifier,s=Object.assign({},r,n,{darkMode:e,launchPath:i});o&&(s.sharePath=o),a&&(s.applicationIdentifier=a),t.addAdditionalProperties(s),fr.sharedInstance.recordStat(t);var c=n.mainProcessDuration;isNaN(c)||fr.sharedInstance.recordPerfStat(new lr("didLaunch.mainProcessDuration",{duration:c}));var u=n.mainFetchDuration+n.mainProcessDelay;isNaN(u)||fr.sharedInstance.recordPerfStat(new lr("didLaunch.timeTillExecution",{duration:u}));var l=r.tcpTime+r.timeToFirstByteOfDocument;isNaN(l)||fr.sharedInstance.recordPerfStat(new lr("didLaunch.timeTillFetch",{duration:l})),fr.sharedInstance.recordPerfStat(new lr("didLaunch.totalPageLoadTime",{duration:s.totalPageLoadTime,isUsedForLoadBucketing:!0,loadedAppName:_r.applicationName}))}function eq(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function tq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}FZ(),function(){!function(){var e=function(){document.body.classList.add("clicking")};window.addEventListener("pointerdown",e),window.addEventListener("mousedown",e),window.addEventListener("keyup",(function(e){switch(e.key){case"Tab":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":document.body.classList.remove("clicking")}}))}();var e=bZ.sharedInstance.applicationParameter,t=e.redirectUrlPath;t&&window.location.replace(t);var n=e.determineRedirectUrl();if(n)window.location.replace(n);else{var i=new YV;YV.cloudOSApplication=i,i.installServices(i.serviceManager);var a=ru();fr.sharedInstance=new fr(_r.applicationName,_r.masteringNumber,_r.buildNumber,_r.hostname,a),function(e){if(window.PerformanceObserver){var t=function(t){for(var n,r=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return YZ(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?YZ(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t.getEntries());!(n=r()).done;){var i=n.value,o=i.name?i.entryType+"."+i.name:i.entryType,a=i.toJSON();a.duration=a.startTime,a.startTime=0,e.recordPerfStat(new lr(o,a))}};try{new PerformanceObserver(t).observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(t).observe({type:"paint",buffered:!0})}catch(n){}}}(fr.sharedInstance),wZ.sharedInstance.delegate=i,_r.configuration.delegate=i,bZ.sharedInstance.delegate=i,ky.sharedInstance.delegate=i,Oy.sharedInstance.delegate=i,UC.sharedInstance.delegate=i,kI.sharedInstance.delegate=i,ST.sharedInstance.delegate=i,up.delegate=i,i.bannerController.delegate=i,i.meCardController.delegate=i;var s=bZ.sharedInstance.locale;s?Iv.sharedInstance.setCurrentLocaleAndRegionFormat(s,_r.locale):Iv.sharedInstance.setCurrentLocaleAndRegionFormat(a,a),Iv.sharedInstance.delegates.push(i);var c=window.document.body,u=window.document.documentElement;u.setAttribute("data-primary-interaction-mode",_.sharedInstance.primaryInteractionMode.toLowerCase()),u.setAttribute("data-device-type-class",_.sharedInstance.deviceType.toLowerCase());var l=Qo.locale;u.lang!==l&&u.setAttribute("lang",l);var d=T(l)?w.RTL:w.LTR;u.dir!==d&&u.setAttribute("dir",d),function(){var e=bZ.sharedInstance.applicationParameter.isMac,t=bZ.sharedInstance.applicationParameter.isIOS;if(e||t){var n=bZ.sharedInstance.applicationParameter.osMajorVersion,r=bZ.sharedInstance.applicationParameter.osMinorVersion;e&&(n<10||10===n&&r<14)||t&&n<12||document.body.setAttribute("apple-system-font-capable","true")}}();var p=document.querySelector('meta[name="viewport"]'),f=p||document.createElement("meta");f.content="width=device-width, initial-scale=1, viewport-fit=cover",p||(f.name="viewport",document.head.appendChild(f)),Jn()&&document.documentElement.classList.add("facetime-dark");var h,m=document.createElement("div");c.appendChild(m),o.render(r.createElement(dV,null),m),window.setTimeout($Z,1e3),gl.sharedInstance.initialize();for(var g,v=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return tq(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tq(e,void 0):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(gl.sharedInstance.configurations);!(g=v()).done;){var y=g.value;wZ.sharedInstance.configurations.push(y)}Jn()?(h=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=bZ.sharedInstance.applicationParameter.isOnSupportedBrowserForFacetime){e.next=7;break}return e.next=4,i.showFaceTimeUnsupportedViewController();case 4:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:n=bZ.sharedInstance.applicationParameter.callDetails,ky.sharedInstance.launchChildApplication(pl.applicationInfo,n?{callDetails:n,deviceNotNecessarilySupported:!t}:{});case 9:case"end":return e.stop()}}),e)})),function(){var e=this,t=arguments;return new Promise((function(n,r){var i=h.apply(e,t);function o(e){eq(i,n,r,o,a,"next",e)}function a(e){eq(i,n,r,o,a,"throw",e)}o(void 0)}))})():function(){var e=window.location.pathname;return["/ssoRedirect"].includes(e)}()||wZ.sharedInstance.validateUser()}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return ae}));var r,i=n(703),o=n(709),a=n(720),s=n(1299),c=n(717),u=n(700),l=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="ServiceError",t.isServiceError=!0,t}return l(t,e),t}(Error),p=n(713),f=n(701);!function(e){e.NONE="NONE",e.OK="OK",e.NOT_FOUND="NOT_FOUND",e.DISCONNECTED="DISCONNECTED",e.CANCELED="CANCELED",e.BAD_REQUEST="BAD_REQUEST",e.TIMEOUT="TIMEOUT",e.ERROR="ERROR",e.CONFLICT="CONFLICT",e.UNDEFINED_ERROR_TYPE="UNDEFINED_ERROR_TYPE",e.METHOD_NOT_FOUND="METHOD_NOT_FOUND"}(r||(r={}));var h=function(){function e(e){void 0===e&&(e={}),this.status=e.status||r.NONE,this.data=e.data,this.error=e.error}return e.createOK=function(){return new e({status:r.OK})},e.createWithOptionalData=function(t){return new e({status:r.OK,data:t})},e.createFromError=function(t){var n=Object(f.a)(t);return n?t instanceof Error||(n.message=JSON.stringify(t),n.stack=(new Error).stack):n={message:"No error specified",stack:(new Error).stack},new e({status:m(t),error:n})},e.prototype.serialize=function(){return{status:this.status,data:this.data,error:this.error}},e.deserialize=function(t){return new e(t)},e}();function m(e){var t=r.ERROR;return e instanceof Error||(t=r.UNDEFINED_ERROR_TYPE),t}var g=n(719),v=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},y=function(){function e(e){if(this.connectRetryInterval=500,this.connectRetryTimeout=5e3,this.exportedInterface=void 0,this.isConnected=!1,!e.serviceIdentifier)throw new d("ServiceConnection - no service identifier specified");if(!e.serviceVersion)throw new d("ServiceConnection - no service version specified");this.serviceIdentifier=e.serviceIdentifier,this.serviceVersion=e.serviceVersion,this._serviceSupport=e.serviceSupport}return Object.defineProperty(e.prototype,"serviceIdentifierAndVersion",{get:function(){return this.serviceIdentifier+"@"+this.serviceVersion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localProcessIdentifier",{get:function(){return this._serviceSupport?this._serviceSupport.processId:void 0},enumerable:!1,configurable:!0}),e.createWithServiceIdentifierAndVersionString=function(t,n){var r=t.split("@");return new e({serviceIdentifier:r[0],serviceVersion:r[1],serviceSupport:n})},e.prototype.connect=function(){if(!this.remoteObjectInterfaceMethods)throw new d("ServiceConnection - no remote object interface specified");return this._pDidConnect=new g.a,this._doConnect(this.connectRetryInterval,this.connectRetryTimeout),this._pDidConnect},e.prototype._doConnect=function(e,t){var n=this;this._serviceSupport.connectServiceConnection(this).then((function(i){if(i.status===r.OK){var o=i.data,a=o.remoteObjectProxy,s=o.remoteProcessIdentifier;a&&s?(n._setRemoteObjectProxyAndProcessIdentifier(a,s),n.isConnected=!0,n._pDidConnect.resolve(h.createWithOptionalData({remoteObjectProxy:n.remoteObjectProxy}))):n._pDidConnect.resolve(new h({status:r.UNDEFINED_ERROR_TYPE}))}else i.status===r.NOT_FOUND?t>0?setTimeout((function(){return n._doConnect(e,t-e)}),e):n._pDidConnect.resolve(new h({status:r.TIMEOUT})):n._pDidConnect.resolve(new h({status:r.UNDEFINED_ERROR_TYPE}))}))},e.prototype._setRemoteObjectProxyAndProcessIdentifier=function(e,t){var n,i,o,a,s=this.remoteObjectInterfaceMethods,l=this.serviceIdentifierAndVersion,d=this.localProcessIdentifier;this.remoteProcessIdentifier=t;var f=this;if(Object(c.a)(e,s)){var m={},g=function(t){m[t]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e[t].apply(e,n).then((function(e){return h.createWithOptionalData(e)}))}};try{for(var y=v(s),b=y.next();!b.done;b=y.next())g(b.value)}catch(w){n={error:w}}finally{try{b&&!b.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}this.remoteObjectProxy=m}else if(p.a.isImplementedBy(e)){m={};var _=function(n){m[n]=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e.invokeServiceMethod(d,l,t,n,i).then((function(e){if(e.status!==u.a.OK||!e.data)return f.isConnected=!1,new h({status:r.UNDEFINED_ERROR_TYPE});var t=h.deserialize(e.data);return t.status===r.NOT_FOUND?(f.isConnected=!1,t):t.status===r.OK?t:(f.isConnected=!1,new h({status:r.UNDEFINED_ERROR_TYPE}))}))}};try{for(var C=v(s),I=C.next();!I.done;I=C.next())_(I.value)}catch(E){o={error:E}}finally{try{I&&!I.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}this.remoteObjectProxy=m}},e}(),b=function(){function e(){this._serviceListenerMap=new Map,this._serviceProxyMap=new Map,this._connectionMap=new Map}return e.prototype.setServiceListener=function(e,t){this._serviceListenerMap.set(e,t)},e.prototype.hasServiceListener=function(e){return this._serviceListenerMap.has(e)},e.prototype.getServiceListener=function(e){return this._serviceListenerMap.get(e)},e.prototype.setServiceProxy=function(e,t){this._serviceProxyMap.set(e,t)},e.prototype.getServiceProxy=function(e){return this._serviceProxyMap.get(e)},e.prototype.hasServiceProxy=function(e){return this._serviceProxyMap.has(e)},e.prototype.clearServiceProxy=function(e){this._serviceProxyMap.delete(e)},e.prototype.addServiceConnection=function(e){var t=e.serviceIdentifierAndVersion,n=e.remoteProcessIdentifier;this._connectionMap.has(t)||this._connectionMap.set(t,new Map),this._connectionMap.get(t).set(n,e)},e.prototype.getServiceConnection=function(e,t){return this.hasServiceConnection(e,t)?this._connectionMap.get(e).get(t):null},e.prototype.hasServiceConnection=function(e,t){return this._connectionMap.has(e)&&this._connectionMap.get(e).has(t)},e.prototype.clearServiceConnection=function(e,t){if(this.hasServiceConnection(e,t))return this._connectionMap.get(e).delete(t)},e}(),_=n(702),C=n(1307),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._serviceRegistry=new b,t}return I(t,e),t.prototype.addServiceListener=function(e){var t=this._serviceRegistry,n=e.serviceIdentifierAndVersion;if(!n)throw new d("listener.serviceIdentifier required when adding a service listener");return t.hasServiceListener(n)?Promise.resolve(h.createOK()):this._hasParent?this._registerServiceWithParent(n).then((function(i){return i.status===r.OK&&t.setServiceListener(n,e),i})):(t.setServiceListener(n,e),Promise.resolve(h.createOK()))},t.prototype.isDuplicateServiceListener=function(e){var t=this._serviceRegistry,n=e.serviceIdentifierAndVersion;return t.hasServiceListener(n)},t.prototype.connectServiceConnection=function(e){var t=this,n=e.serviceIdentifierAndVersion,i=this.processId;return this._connectToService(i,n).then((function(i){if(i.status===r.NOT_FOUND||i.status===r.UNDEFINED_ERROR_TYPE)return i;if(!i.data)return new h({status:r.UNDEFINED_ERROR_TYPE});var o=null;if(t._serviceRegistry.hasServiceProxy(n))o=t._serviceRegistry.getServiceProxy(n);else{if(!t._serviceRegistry.hasServiceConnection(n,e.localProcessIdentifier))return new h({status:r.UNDEFINED_ERROR_TYPE});o=t._serviceRegistry.getServiceConnection(n,e.localProcessIdentifier).exportedObject}return h.createWithOptionalData({remoteProcessIdentifier:i.data.remoteProcessIdentifier,remoteObjectProxy:o})}))},t.prototype.registerService=function(e,t){var n=this,i=this._serviceRegistry;if(i.hasServiceListener(t))return Promise.resolve(new h({status:r.CONFLICT}).serialize());if(i.hasServiceProxy(t)){var o=i.getServiceProxy(t);return o.probeServiceRegistration(t).then((function(a){return a.status===u.a.OK&&a.data?h.deserialize(a.data).status!==r.OK?(i.clearServiceProxy(t),n.registerService(e,t)):o.processId!==e?new h({status:r.CONFLICT}).serialize():new h({status:r.OK}).serialize():(i.clearServiceProxy(t),n.registerService(e,t))}))}if(this._hasParent)return this._registerServiceWithParent(t).then((function(o){if(o.status===r.OK){var a=n._getChildProxyWithIdentifier(e);i.setServiceProxy(t,a)}return o.serialize()}));var a=this._getChildProxyWithIdentifier(e);return i.setServiceProxy(t,a),Promise.resolve(new h({status:r.OK}).serialize())},t.prototype.probeServiceRegistration=function(e){var t=this._serviceRegistry;return(t.hasServiceListener(e)?Promise.resolve(h.createOK()):t.hasServiceProxy(e)?t.getServiceProxy(e).probeServiceRegistration(e).then((function(e){return e.status===u.a.OK&&e.data?h.deserialize(e.data):new h({status:r.NOT_FOUND})})):Promise.resolve(new h({status:r.NOT_FOUND}))).then((function(e){return e.serialize()}))},t.prototype.connectToService=function(e,t){return this._connectToService(e,t).then((function(e){return e.serialize()}))},t.prototype.invokeServiceMethod=function(e,t,n,i,o){var a=this._serviceRegistry;if(a.hasServiceConnection(t,e)){var s=a.getServiceConnection(t,e);if(s.localProcessIdentifier!==n)return Promise.resolve(new h({status:r.NOT_FOUND}).serialize());var c=s.exportedObject,u=c[i];return Object(_.c)(u)?new Promise((function(e){u.apply(c,o).then((function(t){e(h.createWithOptionalData(t).serialize())}))})):Promise.resolve(new h({status:r.METHOD_NOT_FOUND}).serialize())}return a.hasServiceProxy(t)?a.getServiceProxy(t).invokeServiceMethod(e,t,n,i,o).then((function(e){return e.data})):Promise.resolve(new h({status:r.NOT_FOUND}).serialize())},t.prototype._registerServiceWithParent=function(e){return this._getParentProxy().registerService(this.processId,e).then((function(e){if(e.status!==u.a.OK||!e.data)return new h({status:r.UNDEFINED_ERROR_TYPE});var t=h.deserialize(e.data);return t.status===r.CONFLICT?new h({status:r.CONFLICT}):t.status!==r.OK?new h({status:r.UNDEFINED_ERROR_TYPE}):t}))},t.prototype._connectToService=function(e,t){var n=this._serviceRegistry;if(n.hasServiceConnection(t,e)){var i=n.getServiceConnection(t,e);return Promise.resolve(h.createWithOptionalData({remoteProcessIdentifier:i.localProcessIdentifier}))}if(n.hasServiceListener(t)){var o=n.getServiceListener(t);return(i=y.createWithServiceIdentifierAndVersionString(t,this)).remoteProcessIdentifier=e,o.shouldAcceptNewConnection(i),n.addServiceConnection(i),Promise.resolve(h.createWithOptionalData({remoteProcessIdentifier:i.localProcessIdentifier}))}if(n.hasServiceProxy(t))return n.getServiceProxy(t).connectToService(e,t).then((function(e){return e.status===u.a.OK&&e.data?h.deserialize(e.data):new h({status:r.UNDEFINED_ERROR_TYPE})}));if(this._hasParent){var a=this._getParentProxy();return a.connectToService(e,t).then((function(e){if(e.status!==u.a.OK||!e.data)return new h({status:r.UNDEFINED_ERROR_TYPE});var i=h.deserialize(e.data);return i.status===r.OK&&n.setServiceProxy(t,a),i}))}return Promise.resolve(new h({status:r.NOT_FOUND}))},t.prototype._getParentProxy=function(){return this._createGraphMessagingTransport().parentProxy},t.prototype._getChildProxyWithIdentifier=function(e){return this._createGraphMessagingTransport().getChildProxy(e)},Object.defineProperty(t.prototype,"_hasParent",{get:function(){return!!this.parentProcessReference},enumerable:!1,configurable:!0}),t}(C.a),E=n(708),S=n(1300),T=n(714),O=n(711),P=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localProtocol=T.a,t.remoteProtocol=O.a,t}return P(t,e),Object.defineProperty(t.prototype,"localProtocolTarget",{get:function(){return this.delegate},enumerable:!1,configurable:!0}),t.prototype.notifyChildApplicationIsReady=function(){var e=this;return Object(o.b)(this.processState,o.a.LOADING),this._processState=o.a.LOADED,this.remoteProxy.isReadyToReceiveMessages().then((function(t){return t.isOK&&(Object(o.b)(e.processState,o.a.LOADED),e._processState=o.a.RUNNING),t}))},t}(S.a),A=n(712),N=function(){function e(e){if(this.responses=[],!e)throw new i.a("[GraphMessagingGroupResponse] no responses specified");this.responses=e}return Object.defineProperty(e.prototype,"allResponsesAreOK",{get:function(){for(var e=!0,t=0,n=this.responses.length;t<n;t++)if(this.responses[t].status!==u.a.OK){e=!1;break}return e},enumerable:!1,configurable:!0}),e}(),R=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},D=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},k=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(D(arguments[t]));return e},U=function(){function e(e,t,n){var r,o,a,s;if(!e)throw new i.a("[GraphMessagingGroupProxy] No proxies specified");if(!t)throw new i.a("[GraphMessagingGroupProxy] No protocol metadata specified");try{for(var c=R(e),u=c.next();!u.done;u=c.next()){var l=D(u.value,2),d=l[0],p=l[1];if(!t.isImplementedBy(p))throw new i.a("[GraphMessagingGroupProxy] Proxy "+d+" does not implement protocol class")}}catch(v){r={error:v}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}this.identifier=n,this.proxies=e,this.protocolMetadata=t;var f=function(t){Object.defineProperty(h,t,{value:function(){for(var n,r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=[],s=[],c=new N(s),u=0;try{for(var l=R(e),d=l.next();!d.done;d=l.next()){var p=D(d.value,2),f=p[0],h=p[1],m=this.createProxyForMethod(f,h,t,i);try{a.push(m[t].apply(m,k(i)))}catch(g){s[u]=g}u++}}catch(v){n={error:v}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return Promise.allSettled(a).then((function(t){for(var n=t.map((function(e){return"fulfilled"===e.status?e.value:e.reason})),r=0,i=0,o=e.size;i<o;i++)s[i]||(s[i]=n[r],r++);return c}))}})},h=this;try{for(var m=R(t.protocolMethodNames),g=m.next();!g.done;g=m.next())f(g.value)}catch(y){a={error:y}}finally{try{g&&!g.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return e.prototype.createProxyForMethod=function(e,t,n,r){return t},e}(),L=function(){function e(e){var t=e||{};this.status=t.status||u.a.NONE,this.error=t.error,this.data=t.data}return e.createFromSerializedData=function(e){if(!e)throw new i.a("[GraphMessagingResponse] createFromSerializedData - no data specified");var t=Object.getPrototypeOf(e);if(t&&t!==Object.prototype)throw new i.a("[GraphMessagingResponse] createFromSerializedData - data is an object, was expecting a data hash");var n=new this;return n.deserialize(e),n},e.prototype.deserialize=function(e){if(!e)throw new i.a("[GraphMessagingResponse] deserialize - no data specified");var t=e.status;if(!t)throw new i.a("[GraphMessagingResponse] deserialize - no status specified");this.status=t;var n=e.data;n&&(this.data=n);var r=e.error;r&&(this.error=r)},e.prototype.serialize=function(){var e={status:this.status},t=this.data;t&&(e.data=t);var n=this.error;return n&&(e.error=n),e},e}(),M=function(){function e(e,t){if(!e)throw new i.a("[GraphMessagingTransport] No graph messaging proxy protocol specified");if(!t)throw new i.a("[GraphMessagingTransport] No protocol class specified");this.graphMessagingProxyProtocol=e,this.protocolMetadata=t}return Object.defineProperty(e.prototype,"parentProxy",{get:function(){var e=this._parentProxy;if(!e){var t=this.graphMessagingProxyProtocol,n=t.parentProxy;if(n){var r=t.identifier,i=t.parentIdentifier;e=this._parentProxy=this.createParentProxy(n,r,i)}}return e},enumerable:!1,configurable:!0}),e.prototype.getChildGroupProxy=function(e){var t=this._childGroupProxy;if(!t){var n=this.graphMessagingProxyProtocol,r=new Map(n.childProxyMap);if(r&&r.size>0){var i=n.identifier;r.delete(e),r&&r.size>0&&(t=this._childGroupProxy=this.createChildGroupProxy(r,i))}}return t},e.prototype.getChildProxy=function(e){return this.graphMessagingProxyProtocol.childProxyMap.get(e)},e.prototype.createParentProxy=function(e,t,n){return e},e.prototype.createChildGroupProxy=function(e,t){return new U(e,this.protocolMetadata,t)},e.prototype.createGraphMessagingResponse=function(e){return L.createFromSerializedData({status:e})},e}(),j=n(707),F=function(){function e(){this._localHandlersSet=new Set,this._registeredIdentifiersSet=new Set}return Object.defineProperty(e.prototype,"localHandlers",{get:function(){return Object.freeze(Array.from(this._localHandlersSet))},enumerable:!1,configurable:!0}),e.prototype.addHandler=function(e){var t=!1;return this._localHandlersSet.has(e)||(t=!0,this._localHandlersSet.add(e)),t},e.prototype.removeHandler=function(e){return this._localHandlersSet.delete(e)},Object.defineProperty(e.prototype,"registeredIdentifiers",{get:function(){return Object.freeze(Array.from(this._registeredIdentifiersSet))},enumerable:!1,configurable:!0}),e.prototype.addIdentifier=function(e){var t=!1;return this._registeredIdentifiersSet.has(e)||(this._registeredIdentifiersSet.add(e),t=!0),t},e.prototype.removeIdentifier=function(e){return this._registeredIdentifiersSet.delete(e)},e.prototype.isEmpty=function(){return 0===this._localHandlersSet.size&&0===this._registeredIdentifiersSet.size},e}(),B=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},z=function(){function e(){this._map=new Map}return e.prototype.registerLocalHandler=function(e,t){if(!e)throw new i.a("[MessagingHandlersMap] registerLocalHandler: No key specified");if(!t)throw new i.a("[MessagingHandlersMap] registerLocalHandler: No handler specified");var n=!1,r=this._map.get(e);return r?n=r.isEmpty():(r=new F,this._map.set(e,r),n=!0),r.addHandler(t),n},e.prototype.getLocalHandlers=function(e){if(!e)throw new i.a("[MessagingHandlersMap] getLocalHandlers: No key specified");var t=this._map.get(e);return t?t.localHandlers:[]},e.prototype.unregisterLocalHandler=function(e,t){if(!e)throw new i.a("[MessagingHandlersMap] unregisterLocalHandler: No key specified");if(!t)throw new i.a("[MessagingHandlersMap] unregisterLocalHandler: No handler specified");var n=!1,r=this._map.get(e);return r&&(r.removeHandler(t),(n=r.isEmpty())&&this._map.delete(e)),n},e.prototype.registerIdentifier=function(e,t){if(!e)throw new i.a("[MessagingHandlersMap] registerIdentifier: No key specified");if(!t)throw new i.a("[MessagingHandlersMap] registerIdentifier: No identifier specified");var n=!1,r=this._map.get(e);return r?n=r.isEmpty():(r=new F,this._map.set(e,r),n=!0),r.addIdentifier(t),n},e.prototype.getRegisteredIdentifiers=function(e){if(!e)throw new i.a("[MessagingHandlersMap] getRegisteredIdentifiers: No key specified");var t=this._map.get(e);return t?t.registeredIdentifiers:[]},e.prototype.unregisterIdentifier=function(e,t){if(!e)throw new i.a("[MessagingHandlersMap] unregisterIdentifier: No key specified");if(!t)throw new i.a("[MessagingHandlersMap] unregisterIdentifier: No identifier specified");var n=!1,r=this._map.get(e);return r&&(r.removeIdentifier(t),(n=r.isEmpty())&&this._map.delete(e)),n},e.prototype.serialize=function(){var e,t,n=[];try{for(var r=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._map),i=r.next();!i.done;i=r.next()){var o=B(i.value,2),a=o[0],s=o[1],c={topic:a,registeredLocalHandlerCount:s.localHandlers.length,subscribedNodes:s.registeredIdentifiers};n.push(c)}}catch(u){e={error:u}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e}(),H=function(){function e(e){void 0===e&&(e={}),this.childRequests=e.childRequests||[]}return e.deserialize=function(t){if(!t)throw new i.a("[GraphMessagingTracingResponse] deserialize - no data specified");var n=new e;n.identifier=t.identifier;var r=t.parentRequest;r&&(n.parentRequest=W.deserialize(r));var o=t.childRequests;if(o)for(var a=0,s=o.length;a<s;a++){var c=o[a];n.childRequests.push(W.deserialize(c))}var u=t.responseData;u&&(n.responseData=u);var l=t.error;return l&&(n.error=l),n},e.prototype.serialize=function(){var e={identifier:this.identifier},t=this.responseData;t&&(e.responseData=t);var n=this.error;n&&(e.error=n);var r=this.parentRequest;r&&(e.parentRequest=r.serialize());var i=this.childRequests;if(i.length>0){e.childRequests=[];for(var o=0,a=i.length;o<a;o++)e.childRequests.push(i[o].serialize())}return e},e}(),W=function(){function e(e){void 0===e&&(e={}),this.timeStarted=e.timeStarted||Date.now()}return Object.defineProperty(e.prototype,"elapsedTimeMS",{get:function(){return this.timeEnded?this.timeEnded-this.timeStarted:NaN},enumerable:!1,configurable:!0}),e.deserialize=function(t){if(!t)throw new i.a("[GraphMessagingTracingRequest] deserialize - no data specified");var n=new e;n.requestedIdentifier=t.requestedIdentifier,n.operationName=t.operationName,n.arguments=t.arguments,n.timeStarted=t.timeStarted,n.timeEnded=t.timeEnded;var r=t.response;return r&&(n.response=H.deserialize(r)),n},e.prototype.serialize=function(){if(this.timeEnded=Date.now(),!this.response)throw new i.a("[GraphMessagingTracingRequest] serialize - no response");return{requestedIdentifier:this.requestedIdentifier,operationName:this.operationName,arguments:this.arguments,timeStarted:this.timeStarted,timeEnded:this.timeEnded,elapsedTimeMS:this.elapsedTimeMS,response:this.response.serialize()}},e}(),V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createFromSerializedData=function(t){return e.createFromSerializedData.call(this,t)},t.prototype.deserialize=function(t){e.prototype.deserialize.call(this,t);var n=t.tracingDetails;n&&(this.tracingDetails=H.deserialize(n))},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this),n=this.tracingDetails;return n&&(t.tracingDetails=n.serialize()),t},t}(L),q=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},K=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(q(arguments[t]));return e},G=function(){function e(e,t,n,r,o){var a,s;this.identifier=t,this.requestedIdentifier=n,this.originalProxy=e,this.response=r;var c=function(e){Object.defineProperty(l,e,{value:function(){for(var t,o=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var c=new W;return c.requestedIdentifier=n,c.arguments=a,c.operationName=e,this.willMakeTracingRequest(c),(t=this.originalProxy)[e].apply(t,K(a)).then((function(t){var a=null,s=null;if(t.status===u.a.OK){var l=t.data;if(!(s=(a=Z.createFromSerializedData(l)).tracingDetails))throw new i.a("[TracingProxy] "+e+" no tracing response found for request")}else(a=new Z).status=t.status,a.error=t.error,(s=new H).identifier=n,s.error=t.error;return c.response=s,a.tracingDetails=r,o.didReceiveTracingResponse(c,a),t.data=a.serialize(),t}))}})},l=this;try{for(var d=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(o.protocolMethodNames),p=d.next();!p.done;p=d.next())c(p.value)}catch(f){a={error:f}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}}return e.prototype.willMakeTracingRequest=function(e){},e.prototype.didReceiveTracingResponse=function(e,t){},e}(),Y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.willMakeTracingRequest=function(e){this.response.childRequests.push(e)},t.prototype.didReceiveTracingResponse=function(e,t){},t}(G),X=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),J=function(e){function t(t,n,r,o){var a=e.call(this,t,o,n)||this;if(!n)throw new i.a("[GraphMessagingGroupProxy] No identifier specified");if(!r)throw new i.a("[GraphMessagingGroupProxy] No response specified");return a.response=r,a}return X(t,e),t.prototype.createProxyForMethod=function(e,t,n,r){return new Q(t,this.identifier,e,this.response,this.protocolMetadata)},t}(U),$=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype.willMakeTracingRequest=function(e){this.response.parentRequest=e},t.prototype.didReceiveTracingResponse=function(e,t){},t}(G),te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.response=new H,i.response.identifier=t.identifier,i.response.responseData=r,i}return te(t,e),t.prototype.createParentProxy=function(e,t,n){return new ee(e,t,n,this.response,this.protocolMetadata)},t.prototype.createChildGroupProxy=function(e,t){return new J(e,t,this.response,this.protocolMetadata)},t.prototype.createGraphMessagingResponse=function(e){var t=new Z;return t.status=e,t.tracingDetails=this.response,t},t}(M),re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ie=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subscriptionMap=new z,t}return re(t,e),Object.defineProperty(t.prototype,"identifer",{get:function(){return this._identifier},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{set:function(e){this._identifier=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentIdentifier",{get:function(){return this._parentIdentifier},set:function(e){this._parentIdentifier=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentProxy",{get:function(){return this._parentProxy},set:function(e){this._parentProxy=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childProxyMap",{get:function(){return this._childProxyMap},set:function(e){this._childProxyMap=e},enumerable:!1,configurable:!0}),t.prototype.subscribeToTopic=function(e,t){if(!e)throw new i.a("PublishSubscribeSupport: [subscribeToTopic] no topic specified");if(!t)throw new i.a("PublishSubscribeSupport: [subscribeToTopic] no handler specified");var n=null,r=this._subscriptionMap.registerLocalHandler(e,t),o=this._createGraphMessagingTransport(),a=o.parentProxy;if(r&&a)n=a.subscribeIdentifierToTopic(e,this.identifier).then((function(e){var t=o.createGraphMessagingResponse(e.status);return t.error=e.error,t}));else{var s=o.createGraphMessagingResponse(u.a.OK);n=Promise.resolve(s)}return n},t.prototype.publishMessageOnTopic=function(e,t){if(!e)throw new i.a("PublishSubscribeSupport: [publishMessageOnTopic] no topic specified");if(!t)throw new i.a("PublishSubscribeSupport: [publishMessageOnTopic] no message specified");var n=this.identifier,r=this._createGraphMessagingTransport();this._publishMessageToLocallyRegisteredHandlers(e,t);var o=r.getChildGroupProxy(n),a=r.parentProxy;if(o)return o.publishMessageOnTopicFromIdentifier(e,t,n).then((function(i){return a?a.publishMessageOnTopicFromIdentifier(e,t,n).then((function(e){return r.createGraphMessagingResponse(u.a.OK)})):r.createGraphMessagingResponse(u.a.OK)}));if(a)return a.publishMessageOnTopicFromIdentifier(e,t,n).then((function(e){return r.createGraphMessagingResponse(u.a.OK)}));var s=r.createGraphMessagingResponse(u.a.OK);return Promise.resolve(s)},t.prototype.unsubscribeFromTopic=function(e,t){if(!e)throw new i.a("PublishSubscribeSupport: [unsubscribeFromTopic] no topic specified");if(!t)throw new i.a("PublishSubscribeSupport: [unsubscribeFromTopic] no handler specified");var n=null,r=this._subscriptionMap.unregisterLocalHandler(e,t),o=this._createGraphMessagingTransport(),a=o.parentProxy;if(r&&a)n=a.unsubscribeIdentifierFromTopic(e,this.identifier).then((function(e){var t=o.createGraphMessagingResponse(e.status);return t.error=e.error,t}));else{var s=o.createGraphMessagingResponse(u.a.OK);n=Promise.resolve(s)}return n},t.prototype.subscribeIdentifierToTopic=function(e,t){var n=null;if(!e)throw new i.a("PublishSubscribeSupport: [subscribeIdentifierToTopic] no topic specified");if(!t)throw new i.a("PublishSubscribeSupport: [subscribeIdentifierToTopic] no subscribing identifier specified");var r=this._subscriptionMap.registerIdentifier(e,t),o=this._createGraphMessagingTransport(),a=o.parentProxy;if(r&&a)n=a.subscribeIdentifierToTopic(e,this.identifier).then((function(e){var t=o.createGraphMessagingResponse(e.status);return t.error=e.error,t.serialize()}));else{var s=o.createGraphMessagingResponse(u.a.OK);n=Promise.resolve(s.serialize())}return n},t.prototype.publishMessageOnTopicFromIdentifier=function(e,t,n){var r=this;if(!e)throw new i.a("PublishSubscribeSupport: [publishMessageOnTopicFromIdentifier] no topic specified");if(!t)throw new i.a("PublishSubscribeSupport: [publishMessageOnTopicFromIdentifier] no message specified");if(!n)throw new i.a("PublishSubscribeSupport: [publishMessageOnTopicFromIdentifier] no publisher identifier specified");var o=this._createGraphMessagingTransport();this._publishMessageToLocallyRegisteredHandlers(e,t);var a=o.getChildGroupProxy(n),s=o.parentProxy,c=this.identifier;return a?a.publishMessageOnTopicFromIdentifier(e,t,c).then((function(i){return s&&r.parentIdentifier!==n?s.publishMessageOnTopicFromIdentifier(e,t,c).then((function(e){return o.createGraphMessagingResponse(e.status).serialize()})):o.createGraphMessagingResponse(u.a.OK).serialize()})):s&&this.parentIdentifier!==n?s.publishMessageOnTopicFromIdentifier(e,t,c).then((function(e){return o.createGraphMessagingResponse(e.status).serialize()})):o.createGraphMessagingResponse(u.a.OK).serialize()},t.prototype.unsubscribeIdentifierFromTopic=function(e,t){var n=null;if(!e)throw new i.a("PublishSubscribeSupport: [unsubscribeIdentifierFromTopic] no topic specified");if(!t)throw new i.a("PublishSubscribeSupport: [unsubscribeIdentifierFromTopic] no subscriber identifier specified");var r=this._subscriptionMap.unregisterIdentifier(e,t),o=this._createGraphMessagingTransport(),a=o.parentProxy;if(r&&a)n=a.unsubscribeIdentifierFromTopic(e,this.identifier).then((function(e){var t=o.createGraphMessagingResponse(e.status);return t.error=e.error,t.serialize()}));else{var s=o.createGraphMessagingResponse(u.a.OK);n=Promise.resolve(s.serialize())}return n},t.prototype._publishMessageToLocallyRegisteredHandlers=function(e,t){var n=this._subscriptionMap.getLocalHandlers(e);if(n)for(var r=0,i=n.length;r<i;r++)(0,n[r])(e,t)},t.prototype._createGraphMessagingTransport=function(){return new ne(this,A.a,this._subscriptionMap.serialize())},t}(C.a),oe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ae=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.parentProcessReferenceClass=x,t.parentProcessReferenceDelegate=t,t.processStateChanged=new j.a(t),t.sessionInfoChanged=new j.a(t),t._sessionInfo={},t.hostInfoChanged=new j.a(t),t._hostInfo={},t.processInfo={},t._internalProcessState=o.a.NONE,t._launchData={},t}return oe(t,e),Object.defineProperty(t.prototype,"processState",{get:function(){return this.internalProcessState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStarted",{get:function(){return Object(o.c)(this.processState,o.a.LOADING,o.a.LOADED,o.a.RUNNING)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTerminated",{get:function(){return Object(o.c)(this.processState,o.a.TERMINATED)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionInfo",{get:function(){return this._sessionInfo},set:function(e){this._sessionInfo=e,this.sessionInfoChanged.dispatch(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostInfo",{get:function(){return this._hostInfo},set:function(e){this._hostInfo=e,this.hostInfoChanged.dispatch(e)},enumerable:!1,configurable:!0}),t.prototype.messagingResponseErrorTerminationMethod=function(e,t){return this.terminateWithReasonAndInfo(e,t)},t.prototype.start=function(){var e=this;Object(o.b)(this.processState,o.a.NONE),this.internalProcessState=o.a.LOADING;var t=this.parentProcessReferenceClass,n=this.channel;if(t){var r=this._createParentProcessReference(n);r.connect(),r.notifyChildApplicationIsReady().then((function(t){t.isOK?e.internalProcessState=o.a.LOADED:e.terminateIfMessagingResponseError(t)}))}else this.internalProcessState=o.a.LOADED},t.prototype.stop=function(){var e=this;Object(o.b)(this.processState,o.a.LOADING,o.a.LOADED,o.a.RUNNING),this.internalProcessState=o.a.UNLOADING,this.cancelInvokeLaterMethods();var t=this.parentProcessReference,n=Promise.resolve();return t&&(this.parentProcessReference=void 0,t.isConnected&&(n=n.then((function(){return t.disconnect()}))),n=n.then((function(){return t.isTerminated||t.terminate()}))),n.then((function(){return e.internalProcessState=o.a.UNLOADED}))},t.prototype.terminate=function(){Object(o.b)(this.processState,o.a.UNLOADED),this.internalProcessState=o.a.TERMINATED,this.channel&&!this.channel.isDisconnected&&this.channel.disconnect(),this.processId=void 0,this.parentProcessId=void 0,this.hostInfo=void 0,this.sessionInfo=void 0,this.processInfo=void 0,this.channel=void 0},t.prototype.terminateWithReasonAndInfo=function(e,t){var n,r=this;void 0===t&&(t={}),t&&!Object(_.d)(t)?Object(E.a)("terminateWithReasonAndInfo optional info argument should be a hash"):t.buildInfo||(t.buildInfo=globalThis.__CW_BUILD_INFO);var i=this.parentProcessReference;return i&&i.isConnected&&(null===(n=i.remoteProxy)||void 0===n||n.didEnd(e,t)),(this.isStarted?this.stop():Promise.resolve()).then((function(){return r.isTerminated||r.terminate()}))},t.prototype.beginLaunching=function(e,t,n){var r=this;if(Object(o.b)(this.processState,o.a.LOADED),this._updateHostingAndSessionInfo(e,t),!n.launchOptions)throw new i.a("Invalid launchOptions");if(!n.launchOptions.launchReason)throw new i.a("Missing launchOptions.launchReason");n.launchOptions=Object.freeze(n.launchOptions),this.processInfo=Object.freeze(n),this.parentProcessId=n.parentProcessId,this.processId=n.processId,this.parentProcessReference&&(this.parentProcessReference.processId=n.parentProcessId),this.invokeLater((function(){return Promise.resolve().then((function(){return r.run()})).then((function(){return r.internalProcessState=o.a.RUNNING})).then((function(){return r._notifyParentThatProcessDidFinishLaunchingIfNeeded()}))}))},t.prototype.openItems=function(e){},t.prototype.hostingStateDidChange=function(e,t){Object(o.b)(this.processState,o.a.RUNNING),this._updateHostingAndSessionInfo(e,t)},Object.defineProperty(t.prototype,"internalProcessState",{get:function(){return this._internalProcessState},set:function(e){this._internalProcessState=e,this.processStateChanged.dispatch(e)},enumerable:!1,configurable:!0}),t.prototype._createParentProcessReference=function(e){var t=this.parentProcessReferenceClass,n=this.parentProcessReferenceDelegate,r=this.parentProcessId;t&&n||Object(E.a)("A parentProcessReferenceClass and a parentProcessReferenceDelegate are required to create a ParentProcessReference.");var i=new t;return i.processId=r,i.delegate=n,i.channel=e,this.parentProcessReference=i,i},t.prototype._updateHostingAndSessionInfo=function(e,t){Object(o.b)(this.processState,o.a.LOADED,o.a.RUNNING),this.sessionInfo=Object.freeze(e),this.hostInfo=Object.freeze(t)},t.prototype._notifyParentThatProcessDidFinishLaunchingIfNeeded=function(){var e=this;Object(o.b)(this.processState,o.a.RUNNING);var t=this.parentProcessReference,n=this._launchData;if(t&&t.isConnected)return t.remoteProxy.didFinishLaunching(n).then((function(t){return e.terminateIfMessagingResponseError(t)}))},t.prototype._createGraphMessagingTransport=function(){return new M(this,A.a)},Object.defineProperty(t.prototype,"identifier",{get:function(){return this.processId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentIdentifier",{get:function(){return this.parentProcessId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentProxy",{get:function(){return this.parentProcessReference?this.parentProcessReference.remoteProxy:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childProxyMap",{get:function(){var e,t,n=new Map,r=this.childProcessReferences;if(r)try{for(var i=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),o=i.next();!o.done;o=i.next()){var a=o.value;n.set(a.processId,a.remoteProxy)}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n},enumerable:!1,configurable:!0}),t.mixins=[s.a,ie,a.a,w],t}(C.a)},function(e,t,n){"use strict";n.r(t),n.d(t,"InterpolatedString",(function(){return o.a})),n.d(t,"FontBaseline",(function(){return r})),n.d(t,"getFontMetrics",(function(){return p})),n.d(t,"getFontValues",(function(){return a})),n.d(t,"isReactElement",(function(){return f.a})),n.d(t,"reactNodeNameForLogging",(function(){return h.a})),n.d(t,"updateRef",(function(){return m.a})),n.d(t,"useDependencyTracer",(function(){return y})),n.d(t,"useFontMetrics",(function(){return b})),n.d(t,"useFontValues",(function(){return _})),n.d(t,"HORIZONTAL_SIZE_CLASS_THRESHOLD",(function(){return C.a})),n.d(t,"useHorizontalSizeClass",(function(){return C.d})),n.d(t,"HorizontalSizeClassOverrideContext",(function(){return C.b})),n.d(t,"HorizontalSizeClassThresholdContext",(function(){return C.c})),n.d(t,"useIsMounted",(function(){return I})),n.d(t,"useOnReady",(function(){return w})),n.d(t,"usePointerPrecision",(function(){return S})),n.d(t,"PointerPrecisionOverrideContext",(function(){return T})),n.d(t,"useHasHover",(function(){return O})),n.d(t,"HasHoverOverrideContext",(function(){return P})),n.d(t,"useReducedMotion",(function(){return x})),n.d(t,"ReducedMotionOverrideContext",(function(){return A})),n.d(t,"useRerender",(function(){return N.a})),n.d(t,"useSuperRef",(function(){return R.a})),n.d(t,"VERTICAL_SIZE_CLASS_THRESHOLD",(function(){return D})),n.d(t,"useVerticalSizeClass",(function(){return k})),n.d(t,"VerticalSizeClassOverrideContext",(function(){return U})),n.d(t,"VerticalSizeClassThresholdContext",(function(){return L})),n.d(t,"useIsOnline",(function(){return M})),n.d(t,"assertContext",(function(){return j}));var r,i,o=n(866);function a(e){var t=window.getComputedStyle(e),n={font:t.getPropertyValue("font"),lineHeight:parseFloat(t.getPropertyValue("line-height")),fontFamily:t.getPropertyValue("font-family"),fontSize:parseFloat(t.getPropertyValue("font-size")),fontStretch:t.getPropertyValue("font-stretch"),fontStyle:t.getPropertyValue("font-style"),fontVariant:t.getPropertyValue("font-variant"),fontWeight:parseInt(t.getPropertyValue("font-weight"))};if(!n.font){var r=[n.fontStyle,n.fontVariant,n.fontWeight,"100%"===n.fontStretch?"normal":n.fontStretch,n.fontSize+"px / "+n.lineHeight+"px",n.fontFamily];n.font=""+r.join(" ")}return n}!function(e){e.TOP="top",e.HANGING="hanging",e.MIDDLE="middle",e.ALPHABETIC="alphabetic",e.IDEOGRAPHIC="ideographic",e.BOTTOM="bottom"}(r||(r={}));var s=new Map,c=new(function(){function e(){this.font=""}return e.prototype._buildKey=function(e){return this.font+"-"+e},e.prototype.get=function(e){return s.get(this._buildKey(e))},e.prototype.set=function(e,t){s.set(this._buildKey(e),t)},e.prototype.has=function(e){return s.has(this._buildKey(e))},e}());function u(e,t){for(var n=e.length,r=n,i=0;i<n;i+=4)if(255!==e[i]){r=i/4/t;break}return r}function l(e,t){for(var n=0,r=e.length-4;r>=0;r-=4)if(255!==e[r]){n=r/4/t;break}return n}function d(e,t,n,o){void 0===o&&(o=r.ALPHABETIC);var a=i.height,s=i.width;return e.clearRect(0,0,s,a),e.fillStyle="white",e.fillRect(-1,-1,s+2,a+2),e.fillStyle="black",e.font=t,e.textBaseline=o,e.fillText(n,s/2,a/2,s),e.getImageData(0,0,s,a).data}function p(e,t){i||(i=document.createElement("canvas"));var n=a(t),o=n.font,s=n.lineHeight;if(c.font=o,c.has(e))return c.get(e);var p=i.getContext("2d");i.width=s,i.height=2*s;var f=c.get(r.ALPHABETIC);if(f||(f=function(e,t,n){var r,i,o;i=u(r=d(e,t,"N"),n);var a=l(r,n)-i;i=u(r=d(e,t,"x"),n);var s=(o=l(r,n))-i,c=n/2+a/2;return{capline:c-a,meanline:c-s,baseline:c,capHeight:a,xHeight:s,renderedBaseline:o}}(p,o,s),c.set(r.ALPHABETIC,f)),e===r.ALPHABETIC)return f;var h=l(d(p,o,"N",e),s),m=h-f.renderedBaseline,g={capline:f.capline+m,meanline:f.meanline+m,baseline:f.baseline+m,capHeight:f.capHeight,xHeight:f.xHeight,renderedBaseline:h};return c.set(e,g),g}var f=n(698),h=n(867),m=n(686),g=n(572),v=n.n(g);function y(e,t,n){void 0===n&&(n=console.error);for(var r=v.a.useRef(t),i=[],o=0,a=Object.entries(t);o<a.length;o++){var s=a[o],c=s[0],u=s[1];Object.is(u,r.current[c])||i.push(c)}r.current=t,i.length>0&&n("change "+e+" triggered by: "+i.join(", "))}function b(e){void 0===e&&(e=r.ALPHABETIC);var t=Object(g.useState)({capline:0,meanline:0,baseline:0,capHeight:0,xHeight:0,renderedBaseline:0}),n=t[0],i=t[1];return[Object(g.useCallback)((function(t){t&&i(p(e,t))}),[e]),n]}function _(){var e=Object(g.useState)({font:"",lineHeight:0,fontFamily:"",fontSize:0,fontStretch:"",fontStyle:"",fontVariant:"",fontWeight:0}),t=e[0],n=e[1];return[Object(g.useCallback)((function(e){e&&n(a(e))}),[]),t]}var C=n(695);function I(){var e=Object(g.useRef)(!1);return Object(g.useLayoutEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),Object(g.useCallback)((function(){return e.current}),[])}function w(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Object(g.useRef)(e);r.current=e;var i=Object(g.useState)((function(){return t.map((function(e){var t,n={name:e,status:"pending",callback:function(){n.status="called",t()},promise:new Promise((function(e){return t=e}))};return n}))}))[0],o=I();return Object(g.useEffect)((function(){Promise.all(i.map((function(e){return e.promise}))).then((function(){o()&&r.current()}))}),[i,o]),i.reduce((function(e,t){var n=t.name,r=t.callback;return e[n]=r,e}),{})}var E=n(696);function S(){var e=Object(g.useContext)(T),t=Object(E.a)("(pointer: coarse)"),n=Object(E.a)("(pointer: none)");return e||(t?"pointer-coarse":n?"pointer-none":"pointer-fine")}var T=Object(g.createContext)(void 0);function O(){var e=Object(g.useContext)(P),t=Object(E.a)("(hover: hover)");return void 0!==e?e:t}var P=Object(g.createContext)(void 0);function x(){var e=Object(E.a)("(prefers-reduced-motion)"),t=Object(g.useContext)(A);return void 0!==t?t:e}var A=v.a.createContext(void 0),N=n(641),R=n(685),D=480;function k(){var e=Object(g.useContext)(U),t=Object(g.useContext)(L),n=Object(E.a)("screen and (max-height: "+t+"px)");return e||(n?"compact":"regular")}var U=v.a.createContext(void 0),L=v.a.createContext(D);function M(){var e=Object(g.useState)((function(){return window.navigator.onLine})),t=e[0],n=e[1];return Object(g.useEffect)((function(){var e=function(){return n(window.navigator.onLine)};return window.addEventListener("online",e),window.addEventListener("offline",e),function(){window.removeEventListener("online",e),window.removeEventListener("offline",e)}}),[]),t}function j(e,t,n){if(void 0===e)throw new Error("Tried to use "+t+" outside of "+(n?"<"+n+">":"its provider")+". Please ensure that "+(n?"<"+n+">":"its provider")+" exists above this component in the React tree.\n\n(If this component is being presented by usePane() or useModalPane(), make sure that "+(n?"<"+n+">":"the "+t+" provider")+" also wraps <UIPaneContainer>.)\n\nTo learn more about using React contexts, check out https://reactjs.org/docs/context.html and https://kentcdodds.com/blog/how-to-use-react-context-effectively.")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r=n(703),i=n(699),o=n(700),a=n(702),s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e};function u(e,t){var n,o,s=Object.assign({},e),u=function(t){var n=e[t];if(!Object(a.c)(n))throw new r.a("Protocol method name "+t+" is not a Function");s[t]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{var o=e[t].apply(e,c(n));return o?Object(a.h)(o)?o.then((function(e){return i.a.createWithOptionalData(e).serialize()})).catch((function(e){if(e&&!e.isMessagingError)throw e;return i.a.createFromError(e).serialize()})):Promise.resolve(i.a.createWithOptionalData(o).serialize()):Promise.resolve(i.a.createWithOptionalData().serialize())}catch(s){if(s&&!s.isMessagingError)throw s;return Promise.resolve(i.a.createFromError(s).serialize())}}};try{for(var l=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),d=l.next();!d.done;d=l.next())u(d.value)}catch(p){n={error:p}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return s}var l,d=n(708),p=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){e[e.PARSE_ERROR=-32700]="PARSE_ERROR",e[e.INVALID_REQUEST=-32600]="INVALID_REQUEST",e[e.METHOD_NOT_FOUND=-32601]="METHOD_NOT_FOUND",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.INTERNAL_ERROR=-32603]="INTERNAL_ERROR"}(l||(l={}));var f,h=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.name=r,i}return p(t,e),t.prototype.toJSON=function(){return"["+this.code+"] "+this.name+": "+this.message},t}(Error),m=(p((function(e){return f.call(this,e,l.PARSE_ERROR,"Parse error")||this}),f=h),function(e){p((function(t){return e.call(this,t,l.INVALID_REQUEST,"Invalid request")||this}),e)}(h),function(e){function t(t){return e.call(this,t,l.METHOD_NOT_FOUND,"Method not found")||this}return p(t,e),t}(h)),g=function(e){function t(t){return e.call(this,t,l.INVALID_PARAMS,"Invalid params")||this}return p(t,e),t}(h),v=function(e){function t(t){return e.call(this,t,l.INTERNAL_ERROR,"Internal error")||this}return p(t,e),t}(h),y=function(){function e(){this.jsonRpcVersion="2.0"}return e.prototype.generateCallMessageFor=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={jsonrpc:this.jsonRpcVersion,id:_(),method:e};return t.length>0&&(r.params=t),r},e.prototype.generateNotificationMessageFor=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={jsonrpc:this.jsonRpcVersion,method:e};return t.length>0&&(r.params=t),r},e.prototype.generateErrorMessageFor=function(e,t){var n;n=t instanceof h?t.code:l.INTERNAL_ERROR;var r=t.message,i=t.data,o={jsonrpc:this.jsonRpcVersion,id:e,error:{code:n,message:r}};return Object(a.d)(i)&&(o.error.data=i),o},e.prototype.generateResultMessageFor=function(e,t){return{jsonrpc:this.jsonRpcVersion,id:e,result:t}},e.prototype.toJSON=function(){return""+this},e.sharedInstance=new e,e}(),b=0;function _(){return"JsonRpcMessageFormatterV2:"+ ++b}var C=n(718),I=function(){function e(e){this.messageFormatter=y.sharedInstance,this.serializer=C.a.sharedInstance,this.channel=e,this.incomingMessageListener=this.incomingMessageListener.bind(this)}return e.prototype.addChannelListeners=function(){this.channel.incomingMessage.addListener(this.incomingMessageListener)},e.prototype.removeChannelListeners=function(){this.channel.incomingMessage.removeListener(this.incomingMessageListener)},e.prototype.incomingMessageListener=function(e){var t=this.serializer.decode(e.context);Object(a.a)(t)&&this.shouldHandleMessage(t)&&this.handleMessage(t)},e.prototype.toJSON=function(){return""+this},e.prototype.destroy=function(){this.removeChannelListeners()},e}(),w=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t.prototype.hasHandlerForProcedure=function(e){return Object(a.a)(O(e,this))},t.prototype.registerProcedure=function(e,t,n){!function(e,t,n,r){var i=r.channel,o=T.get(i);o||(o=new Map,T.set(i,o));var a=o.get(e);a&&Object(d.a)("A handler for '"+e+"' was already registered on this channel",{procedureName:e,registration:a}),o.set(e,{listener:r,target:t,handlerMethodName:n})}(e,t,n=n||e,this)},t.prototype.registerProcedures=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];Array.isArray(i)?this.registerProcedure(i[0],t,i[1]):this.registerProcedure(i,t)}},t.prototype.unregisterProcedure=function(e){var t=this.channel,n=T.get(t);n&&n.get(e).listener===this&&(n.delete(e),0===n.size&&n.delete(t))},t.prototype.unregisterProcedures=function(e){var t=this;e.forEach((function(e){t.unregisterProcedure(e)}))},t.prototype.unregisterAllProcedures=function(){var e=T.get(this.channel);if(e)for(var t=e.entries(),n=void 0;n=t.next().value;){var r=n[0];n[1].listener===this&&e.delete(r)}},t.prototype.shouldHandleMessage=function(e){var t=this;return(Array.isArray(e)?e:[e]).filter((function(e){return e&&Object(a.a)(e.jsonrpc)&&e.jsonrpc===t.messageFormatter.jsonRpcVersion&&Object(a.a)(e.method)})).length>0},t.prototype.handleMessage=function(e){var t,n=this,r=Array.isArray(e),i=r?e:[e],o=(t=P,function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=new Promise((function(r,i){setTimeout((function(){try{var o=t.apply(e,n);r(o)}catch(a){i(a)}}),0)}));return i}),s=this.messageFormatter,c=[],u={};return i.forEach((function(e){var t=e.id,r=o(e,n).then((function(e){u[t]=e!==N?function(e,t,n){return Object(a.a)(t)?e.generateResultMessageFor(t,n):{}}(s,t,e):N})).catch((function(e){if(u[t]=x(s,t,e),!(e instanceof h))throw e}));c.push(r)})),Promise.all(c).then((function(){n.channel.isDisconnected||A(n,i,u,r)}),(function(e){throw n.channel.isDisconnected||A(n,i,u,r),e}))},t.prototype.destroy=function(){this.unregisterAllProcedures(),e.prototype.destroy.call(this)},t}(I),T=new Map;function O(e,t){var n=T.get(t.channel);if(n){var r=n.get(e);if(r&&r.listener===t)return r}return null}function P(e,t){var n=e.method,r=e.params,i=void 0===r?[]:r;if(t.channel.isDisconnected)return N;if(Object(a.a)(i)&&!Array.isArray(i))throw(c=new g("JSON-RPC calls in JavaScript cannot support `params` as an Object, only as an Array")).data={message:e},c;var o=O(n,t);if(!o){if(function(e,t){var n=T.get(t);return!!n&&!!n.get(e)}(n,t.channel))return N;throw(c=new m("A JSON-RPC registration was not found for method `"+n+"`.")).data={message:e,listener:t},c}var s=o.target;if(!s)throw(c=new m("The JSON-RPC target was not found")).data={message:e,listener:t},c;var c,u=s[o.handlerMethodName];if(!u)throw(c=new m("The JSON-RPC method was not found")).data={message:e,listener:t},c;return u.call.apply(u,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(E(arguments[t]));return e}([s],i))}function x(e,t,n){return Object(a.a)(t)?e.generateErrorMessageFor(t,n):{}}function A(e,t,n,r){var i=e.messageFormatter,o=[];if(t.forEach((function(e){var t=e.id;if(Object(a.a)(t)){var r=n[t];if(r)r!==N&&o.push(r);else{var s=new v("The JSON-RPC call was part of a batch which failed due to a fatal error thrown by another call.");r=x(i,t,s)}}})),o.length>0){var s=r?o:o[0];e.channel.send(e.serializer.encode(s))}}var N=Symbol("Do not reply"),R=n(719),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},U=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(k(arguments[t]));return e},L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.callRemoteProcedure=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.channel;j(i,e);var o=new R.a,a=(t=this.messageFormatter).generateCallMessageFor.apply(t,U([e],n));return F(o,a.id,this),i.send(this.serializer.encode(a)),o},t.prototype.sendNotification=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.channel;j(i,e);var o=(t=this.messageFormatter).generateNotificationMessageFor.apply(t,U([e],n));i.send(this.serializer.encode(o))},t.prototype.shouldHandleMessage=function(e){return!!e&&Object(a.a)(e.jsonrpc)&&e.jsonrpc===this.messageFormatter.jsonRpcVersion&&(Object(a.a)(e.result)||Object(a.a)(e.error))},t.prototype.handleMessage=function(e){var t=function(e,t){var n=M[e];if(n&&n[1]===t)return delete M[e],n[0]}(e.id,this);if(t){if(Object(a.a)(e.result))return function(e,t){t.resolve(e.result)}(e,t),t;if(Object(a.a)(e.error))return function(e,t){t.reject(e.error)}(e,t),t}},t}(I),M={};function j(e,t){e&&!e.isDisconnected||Object(d.a)('Attempted to call "'+t+'" without a connected channel.',{methodName:t,sender:this})}function F(e,t,n){M[t]&&M[t][1]===n&&Object(d.a)("A handler was already registered for response for message id",{messageId:t,handler:n}),M[t]=[e,n]}var B=n(717),z=n(705),H=function(e,t){if(!t)throw new r.a("ProtocolTarget: no protocol target specified");this.protocolMetadata=e,this.protocolTarget=t},W=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},V=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(W(arguments[t]));return e},Z=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},q=function(){function e(e,t){this.channel=e,this.connectionTimeout=t||3e4}return e.prototype.setListener=function(e,t,n){if(!Object(B.a)(n,t))throw new r.a("MessagingChannel: The specified protocol class target does not implement specified protocol methods");this._listenerProtocolTarget=new H(new z.a(e,t),n)},e.prototype.setConnection=function(e,t,n){this._connectionProtocolTarget=new H(new z.a(e,t),n)},e.prototype.start=function(){var e=this._listenerProtocolTarget,t=this._connectionProtocolTarget;if(!e&&!t)throw new r.a("Messaging channel has not been configured");var n=this.channel,i=this.connectionTimeout;e&&this._configureListener(n,e),t&&this._configureConnection(n,i,t)},e.prototype.stop=function(){var e=this,t=e.connection,n=e._connectionProtocolTarget,r=e._connectionPendingPromises,a=e.listener,s=e._listenerProtocolTarget;if(a&&(s||Object(d.a)("MessagingChannel listener exists without a corresponding protocol metadata"),this._unregisterListenerMethods(a,s),this.listener=void 0,this._listenerProtocolTarget=void 0),t&&(n||Object(d.a)("MessagingChannel connection exists without a corresponding protocol metadata"),this.connection=void 0,this._connectionProtocolTarget=void 0,this._connectionPendingPromises=void 0,null===r||void 0===r?void 0:r.size)){var c=Array.from(r),u=new i.a({status:o.a.DISCONNECTED});return c.every((function(e){return e.resolve(u)})),Promise.allSettled(c).then((function(e){return e&&e.length||0}))}return Promise.resolve(0)},e.prototype._constructRPCMethodName=function(e,t){if(!e)throw new r.a("MessagingUtils - no class name specified");if(!t)throw new r.a("MessagingUtils - no method name specified");return e+"-"+t},e.prototype._createJsonRpcListener=function(e){return new S(e)},e.prototype._createJsonRpcCaller=function(e){return new L(e)},Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){e!==this._listener&&(this._listener&&this._listener.destroy(),this._listener=e,e&&e.addChannelListeners())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},set:function(e){this._connection&&this._connection.removeChannelListeners(),this._connection=e,e&&e.addChannelListeners()},enumerable:!1,configurable:!0}),e.prototype._configureListener=function(e,t){this.listener=this._setupJsonRpcListener(e,t)},e.prototype._configureConnection=function(e,t,n){this.connection=this._setupJsonRpcCaller(e,t,n)},e.prototype._setupJsonRpcCaller=function(e,t,n){var r,a,s=this;this._connectionPendingPromises||(this._connectionPendingPromises=new Set);var c=this._connectionPendingPromises,u=n.protocolMetadata,l=u.protocolName,p=u.protocolMethodNames,f=n.protocolTarget,h=f.constructor.name,m=this._createJsonRpcCaller(e);this.connection=m;var g=function(e){var n=v._constructRPCMethodName(l,e);f[e]=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];s.connection||Object(d.a)("["+h+" => OUTBOUND] MessagingChannel has no connection --\x3e '"+l+"."+e+"'");var u=new R.a;c.add(u),m.callRemoteProcedure.apply(m,V([n],r)).then((function(e){u.resolve(i.a.deserialize(e))})).catch((function(e){u.resolve(i.a.createFromError(e))}));var p=setTimeout((function(){u.resolve(new i.a({status:o.a.TIMEOUT}))}),t);return u.finally((function(){globalThis.clearTimeout(p),c.delete(u)})),u}},v=this;try{for(var y=Z(p),b=y.next();!b.done;b=y.next())g(b.value)}catch(_){r={error:_}}finally{try{b&&!b.done&&(a=y.return)&&a.call(y)}finally{if(r)throw r.error}}return m},e.prototype._setupJsonRpcListener=function(e,t){var n,i,o=t.protocolMetadata,s=o.protocolName,c=o.protocolMethodNames,l=t.protocolTarget,d=this._createJsonRpcListener(e);this.listener=d;var p=u(l,c);try{for(var f=Z(c),h=f.next();!h.done;h=f.next()){var m=h.value,g=this._constructRPCMethodName(s,m),v=p[m];if(!Object(a.c)(v))throw new r.a("Protocol method name "+m+" is not a Function");d.registerProcedure(g,p,m)}}catch(y){n={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return d},e.prototype._unregisterListenerMethods=function(e,t){var n,r,i=t.protocolMetadata,o=i.protocolName,s=i.protocolMethodNames,c=u(t.protocolTarget,s);try{for(var l=Z(s),p=l.next();!p.done;p=l.next()){var f=p.value,h=this._constructRPCMethodName(o,f),m=c[f];Object(a.c)(m)||Object(d.a)("Protocol method name "+f+" is not a Function"),e.unregisterProcedure(h)}}catch(g){n={error:g}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}},e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"t",(function(){return r})),n.d(t,"loadUrl",(function(){return i.a})),n.d(t,"openUrl",(function(){return o.a})),n.d(t,"parseJson",(function(){return a.b})),n.d(t,"parseResponseJson",(function(){return a.c})),n.d(t,"ParseJsonError",(function(){return a.a})),n.d(t,"parseUrl",(function(){return s.c})),n.d(t,"getBaseUrlStr",(function(){return s.a})),n.d(t,"parsePageUrl",(function(){return s.b})),n.d(t,"safelyOpenURL",(function(){return c})),n.d(t,"safelyRedirectToURL",(function(){return u})),n.d(t,"safeURL",(function(){return l})),n.d(t,"urlWithValidatedProtocol",(function(){return d}));var r=n(591),i=n(586),o=n(582),a=n(590),s=n(1296);function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];try{var r=Object(s.b)(e);return Object(o.a)(r,{target:t,features:n})}catch(i){return}}function u(e){try{var t=Object(s.b)(e);Object(i.a)(t)}catch(n){}}function l(e){try{var t;return null==(t=Object(s.b)(e))?void 0:t.toString()}catch(n){return null}}function d(e){var t=Object(s.b)(e,{dangerouslyAllowProtocols:["javascript"]});return t?[t.protocol.slice(0,-1),t.href]:["https","https:"+e]}},function(e,t,n){"use strict";n.r(t),n.d(t,"Application",(function(){return I}));var r=n(703),i=n(709),o=n(1290),a=n(1306);function s(){return window!==window.parent}function c(){if(window.opener)try{return!!window.opener.document.location.href}catch(e){return!1}return!1}var u=n(715),l=n(708),d=n(1298),p=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"outgoingWindow",{get:function(){var e=window.parent,t=window.opener;return e||t?{actualOutgoingWindow:e||t,postMessage:function(e,t){var n=this.actualOutgoingWindow;if(n.postMessage)return n.postMessage(e,t)}}:null},enumerable:!1,configurable:!0}),t}(d.a),h=n(1301),m=n(642),g=n(710),v=n(1295),y=n(716),b=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},C=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},I=function(e){function t(n){var r=e.call(this)||this;if(r._parentChannelProtocolClass=f,r.allowedRemoteOrigins=n.allowedRemoteOrigins,t.application)throw new Error("Only one application may be instantiated per JS context.");return t.application=r,r.isParent=void 0!==n.isParent&&n.isParent,r}return b(t,e),t.main=function(e){var n=new(e.applicationClass||t)({allowedRemoteOrigins:e.allowedRemoteOrigins,isParent:e.isParent});return n.delegate=e.delegate,n.setup(),n},Object.defineProperty(t.prototype,"applicationName",{get:function(){var e=this.processInfo;return e?e.processName:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"primaryInteractionMode",{get:function(){return this._primaryInteractionMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"platformType",{get:function(){return this._platformType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceType",{get:function(){return this._deviceType},enumerable:!1,configurable:!0}),t.prototype.setup=function(){var e=this;if(Object(i.b)(this.processState,i.a.NONE),s()||!this.isParent&&c()){var t=this.allowedRemoteOrigins,n=function(){if(s()){var e=null;return e=window.location!==window.parent.location?document.referrer:document.location.href,new a.a(e).origin}if(c())try{return e=window.opener.document.location.href,new a.a(e).origin}catch(t){throw"Opener window cannot be accessed"}return null}();this.channel=new this._parentChannelProtocolClass({allowedRemoteOrigins:t,remoteOrigin:n}),this.start(),c()&&window.addEventListener("beforeunload",(function(){e.terminateWithReasonAndInfo(y.a.USER_INITIATED,{})}))}else{this.parentProcessReferenceClass=void 0,this.start();var r=h.a.sharedInstance,o={primaryInteractionMode:r.primaryInteractionMode,platformType:r.platformType,deviceType:r.deviceType},l={processId:Object(v.a)(),launchOptions:{launchReason:u.a.USER_LAUNCH}};this.beginLaunching({},o,l)}},t.prototype.run=function(){return _(this,void 0,void 0,(function(){var e,t,n;return C(this,(function(r){switch(r.label){case 0:return e=this.delegate,t=this.processInfo,n=null===t||void 0===t?void 0:t.launchOptions,[4,Promise.resolve()];case 1:return r.sent(),[4,this.configureApplication()];case 2:return r.sent(),e?[4,e.applicationWillFinishLaunching(this,n)]:[3,4];case 3:r.sent(),r.label=4;case 4:return[4,this.launchApplication(n)];case 5:return r.sent(),e?[4,e.applicationDidFinishLaunching(this,n)]:[3,7];case 6:r.sent(),r.label=7;case 7:return[2]}}))}))},t.prototype.launchApplication=function(e){console.log(e)},t.prototype.configureApplication=function(){return _(this,void 0,void 0,(function(){var e,t,n,o;return C(this,(function(a){if(Object(i.b)(this.processState,i.a.LOADED),e=this.hostInfo,t=null===e||void 0===e?void 0:e.primaryInteractionMode,n=null===e||void 0===e?void 0:e.platformType,o=null===e||void 0===e?void 0:e.deviceType,!t||!Object.keys(m.a).includes(t))throw new r.a("hostInfo must include a valid primary interaction mode");return this._primaryInteractionMode=t,this._platformType=n,this._deviceType=o,[2]}))}))},t.prototype.createMessagingChannel=function(e,t,n){var r=this.parentProcessReference;return r&&r.channel||Object(l.a)("Unable to connect to parent. Can not create MessagingChannel"),r.createMessagingChannel(e,t,n),r.remoteProxy},t.mixins=[o.a],t}(g.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,i=Uint8Array||Array;r=window.crypto&&window.crypto.getRandomValues?function(e){window.crypto.getRandomValues(e)}:function(e){for(var t,n,r,i=0;i<16;)for(n=Math.random(),t=0;t<4;i++,t++)r=0|(n*=256),e[i]=r,n-=r};var o,a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(){var e;return e=(e=o)||new i(16),r(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(e){var t,n,r="";for(t=0;t<16;t++)n=e[t],r+=a[n>>4],r+=a[15&n],3!==t&&5!==t&&7!==t&&9!==t||(r+="-");return r}(o=e)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=Symbol("isSafeUrl");function i(e){return!0===e[r]}function o(e){var t=e;return t[r]=!0,t}var a=Object.freeze(["javascript","data"]);function s(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e instanceof URL&&i(e))return e;var r=new URL(e,n.base||void 0),s=r.protocol.slice(0,-1);if(a.includes(s)&&(null==(t=n.dangerouslyAllowProtocols)||!t.includes(s)))throw Error("Bad URL protocol!");return o(r)}function c(){var e;return(null==(e=globalThis.document.querySelector("base"))?void 0:e.href)||globalThis.location.href}function u(e,t){return s(e,Object.assign({},t,{base:c()}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(t,n){var r=e.call(this,"Invalid state transition.  Expected state: "+t+", actual: "+n)||this;return r.name="InvalidStateTransitionError",r}return r(t,e),t}(Error),o=n(1305),a=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e};function c(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return!!t.find((function(t){return t===e}))}function u(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!c.apply(void 0,s([e],t))){var r=new i(t.join(", "),String(e)),a=Object(o.c)(r,2,7);throw r.message=r.message+" => "+a.join(","),r}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(707),i=n(708),o=n(702),a=n(1306),s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e},u=function(){function e(e){this.isDisconnectedChanged=new r.a(this),this.incomingMessage=new r.a(this),this.outgoingMessage=new r.a(this),this._isDisconnected=!0,this._messageHandler=null,this.autoconnect=void 0===e.autoconnect||e.autoconnect,this._messageHandler=this._defaultMessageHandler.bind(this);var t=e&&e.allowedRemoteOrigins;t&&(e.allowedRemoteOrigins=c(t)),this.allowedRemoteOrigins=e.allowedRemoteOrigins,this.remoteOrigin=e.remoteOrigin,l(this.allowedRemoteOrigins,this.remoteOrigin),e.outgoingWindow?this.outgoingWindow=e.outgoingWindow:this.outgoingWindowDidChange()}return Object.defineProperty(e.prototype,"isDisconnected",{get:function(){return this._isDisconnected},set:function(e){this._isDisconnected=e,this.isDisconnectedChanged.dispatch()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outgoingWindow",{get:function(){return this._outgoingWindow},set:function(e){this._outgoingWindow=e,this.outgoingWindowDidChange()},enumerable:!1,configurable:!0}),e.prototype.connect=function(){var e=this;if(this.isDisconnected){this.outgoingWindow&&this.outgoingWindow.postMessage||Object(i.a)("The `outgoingWindow` must be configured and support `postMessage()`");var t=this._messageHandler;this._messageHandler=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e,o=i.allowedRemoteOrigins,a=i.remoteOrigin;l(o,a),t.apply(void 0,c(n))},window.addEventListener("message",this._messageHandler),this.isDisconnected=!1}},e.prototype.disconnect=function(){this.isDisconnected||(window.removeEventListener("message",this._messageHandler),this.isDisconnected=!0)},e.prototype.send=function(e){this.isDisconnected&&Object(i.a)("Cannot send message because the channel has not been connected.",this);var t=this.allowedRemoteOrigins,n=this.remoteOrigin;l(t,n),this.outgoingWindow.postMessage(e,n),this.outgoingMessage.dispatch({context:e})},e.prototype._defaultMessageHandler=function(e){var t=e.originalEvent,n=(t||e).origin,r=this.outgoingWindow,i=e.source,s=r===i;try{s||(s=r.actualOutgoingWindow===i)}catch(c){s=!1}s&&function(e,t){if("*"===e||"*"===t)return!0;var n=a.a.parse(e),r=a.a.parse(t);if(Object(o.b)(n.protocol)||Object(o.b)(r.protocol)||n.protocol!==r.protocol)return!1;if(Object(o.b)(n.hostname)||Object(o.b)(r.hostname)||n.hostname!==r.hostname)return!1;if(e===t)return!0;var i=n.port;Object(o.b)(i)&&(i="https:"===n.protocol?"443":"80");var s=r.port;return Object(o.b)(s)&&(s="https:"===r.protocol?"443":"80"),i===s}(n,this.remoteOrigin)&&this.incomingMessage.dispatch({context:(t||e).data})},e.prototype.outgoingWindowDidChange=function(){this.outgoingWindow?this.autoconnect&&this.connect():this.disconnect()},e}(),l=function(e,t){if(!t)throw new Error("Cannot leverage `SafeWindowPostMessageChannel` without a defined `remoteOrigin`.");if("*"===t)throw new Error('Cannot leverage `SafeWindowPostMessageChannel` whose `remoteOrigin` is "*".');if(!e)throw new Error("Cannot leverage `SafeWindowPostMessageChannel` without a defined `allowedRemoteOrigins` array.");if(!e.includes(t))throw new Error('Cannot leverage this `SafeWindowPostMessageChannel`, the `remoteOrigin` "'+t+'" is not present in the `allowedRemoteOrigins` array.');e.forEach((function(e){if(!d(e))throw new Error('The value "'+e+'" does not conform to the "https://" protocol, and therefore is not permitted in the `allowedRemoteOrigins` array.')}))},d=function(e){return e&&"https://"===e.substr(0,8)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1307),i=n(1305),o=n(716),a=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.terminateIfMessagingResponseError=function(e){var t=this.messagingResponseErrorTerminationMethod,n=!1;if(!e.isDisconnected&&!e.isCanceled&&!e.isOK){var r=globalThis.__CW_BUILD_INFO;t.call.apply(t,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}([this],function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=globalThis.__CW_BUILD_INFO);var r=o.a.USER_INITIATED,a=o.a.MESSAGING_TIMEOUT,s=o.a.DISCONNECTED,c=o.a.UNCAUGHT_EXCEPTION;e.isOK?c=r:e.isTimeout?c=a:e.isDisconnected&&(c=s);var u=Object(i.a)(e.serialize(),t+1);return u.buildInfo=n,[c,u]}(e,2,r))),n=!0}return n},t}(r.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r,i=n(1292),o=n(709),a=n(720),s=n(708),c=n(702);!function(e){e.LISTENER="LISTENER",e.CONNECTION="CONNECTION",e.BIDIRECTIONAL="BIDIRECTIONAL"}(r||(r={}));var u=n(710),l=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remoteProxy={},t.connectionTimeout=3e4,t.messagingChannelClass=i.a,t._internal_processState=o.a.NONE,t._messagingChannels=new Set,t}return l(t,e),Object.defineProperty(t.prototype,"processId",{get:function(){return this._processId},set:function(e){this._processId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"processState",{get:function(){return this._processState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return Object(o.c)(this.processState,o.a.LOADING,o.a.LOADED,o.a.RUNNING)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTerminated",{get:function(){return Object(o.c)(this.processState,o.a.TERMINATED)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localProtocolTarget",{get:function(){return this._localProtocolTarget},set:function(e){this._localProtocolTarget=e},enumerable:!1,configurable:!0}),t.prototype.connect=function(){Object(o.b)(this.processState,o.a.NONE),this._processState=o.a.LOADING;var e=this.localProtocol,t=this.localProtocolTarget,n=this.remoteProtocol,r=this.connectionTimeout;this.primaryMessagingChannel=this.createMessagingChannel(e,t,n,r)},t.prototype.disconnect=function(){var e=this;Object(o.b)(this.processState,o.a.LOADING,o.a.LOADED,o.a.RUNNING),this._processState=o.a.UNLOADING;var t=Array.from(this._messagingChannels);return this.cancelInvokeLaterMethods(),this._messagingChannels.clear(),(t.length?Promise.allSettled(t.map((function(e){return e.stop()}))):Promise.resolve()).then((function(){e._processState=o.a.UNLOADED}))},t.prototype.terminate=function(){Object(o.b)(this.processState,o.a.UNLOADED),this._processState=o.a.TERMINATED;var e=this.remoteProxy,t=function(){Object(s.a)("The remote proxy is no longer connected.")};e&&Object.keys(e).forEach((function(n){Object(c.c)(e[n])&&(e[n]=t)})),this.channel=void 0,this.remoteProxy=void 0,this._messagingChannels.clear()},t.prototype.createListenerOnlyMessagingChannel=function(e,t,n,i){return this._createMessagingChannel({type:r.LISTENER,localProtocol:e,localProtocolTarget:t,timeoutMS:n,messagingChannelClass:i})},t.prototype.createConnectionOnlyMessagingChannel=function(e,t,n){this._createMessagingChannel({type:r.CONNECTION,remoteProtocol:e,timeoutMS:t,messagingChannelClass:n})},t.prototype.createMessagingChannel=function(e,t,n,i,o){return this._createMessagingChannel({type:r.BIDIRECTIONAL,localProtocol:e,localProtocolTarget:t,remoteProtocol:n,timeoutMS:i,messagingChannelClass:o})},Object.defineProperty(t.prototype,"_processState",{get:function(){return this._internal_processState},set:function(e){this._internal_processState=e},enumerable:!1,configurable:!0}),t.prototype._createMessagingChannel=function(e){this._validateRequiredProperties(e);var t=r.BIDIRECTIONAL,n=r.LISTENER,i=r.CONNECTION,o=this.channel,a=this.remoteProxy,s=this._messagingChannels,c=this.messagingChannelClass;e.messagingChannelClass&&(c=e.messagingChannelClass);var u=new c(o);e.type!==t&&e.type!==n||u.setListener(e.localProtocol.protocolName,e.localProtocol.protocolMethodNames,e.localProtocolTarget),e.type!==t&&e.type!==i||u.setConnection(e.remoteProtocol.protocolName,e.remoteProtocol.protocolMethodNames,a);var l=e.timeoutMS;return l&&(u.connectionTimeout=l),u.start(),s.add(u),u},t.prototype._validateRequiredProperties=function(e){var t=this.delegate,n=this.remoteProxy,i=this.channel,o=this.messagingChannelClass,a=r.BIDIRECTIONAL,c=r.LISTENER,u=r.CONNECTION;t||Object(s.a)("A delegate is required"),i&&!i.isDisconnected||Object(s.a)("A connected ChannelProtocol implementation is required"),"object"!==typeof n&&Object(s.a)("A remoteProxy Object is required"),o||Object(s.a)("A MessagingChannel Class is required."),e.type!==a&&e.type!==c||(e.localProtocol||Object(s.a)("A valid localProtocol is required"),e.localProtocolTarget||Object(s.a)("A localProtocolTarget is required")),e.type!==a&&e.type!==u||e.remoteProtocol||Object(s.a)("A valid remoteProtocol is required")},t.prototype.subscribeIdentifierToTopic=function(e,t){return p().subscribeIdentifierToTopic(e,t)},t.prototype.publishMessageOnTopicFromIdentifier=function(e,t,n){return p().publishMessageOnTopicFromIdentifier(e,t,n)},t.prototype.unsubscribeIdentifierFromTopic=function(e,t){return p().unsubscribeIdentifierFromTopic(e,t)},t.prototype.registerService=function(e,t){return p().registerService(e,t)},t.prototype.connectToService=function(e,t){return p().application.connectToService(e,t)},t.prototype.invokeServiceMethod=function(e,t,n,r,i){return p().invokeServiceMethod(e,t,n,r,i)},t.prototype.probeServiceRegistration=function(e){return p().probeServiceRegistration(e)},t.mixins=[a.a],t}(u.a);function p(){return n(1294).Application.application}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return a})),function(e){e.IOS="IOS",e.ANDROID="ANDROID",e.WINDOWS="WINDOWS",e.MAC="MAC",e.LINUX="LINUX",e.CHROMEOS="CHROMEOS",e.UNKNOWN="UNKNOWN"}(r||(r={}));var i=n(721),o=n(642),a=function(){function e(){this.platformType=function(){var e=window.navigator.userAgent;if(!e)throw new TypeError("Expected user agent!");return/ipad|ipod|iphone/i.test(e)?r.IOS:/android/i.test(e)?r.ANDROID:/mac/i.test(e)&&!/like mac/i.test(e)?"ontouchstart"in window||"createTouch"in window.document?r.IOS:r.MAC:/windows/i.test(e)?r.WINDOWS:/\bcros\b/i.test(e)?r.CHROMEOS:/\blinux\b/i.test(e)?r.LINUX:r.UNKNOWN}(),this.isAndroid=this.platformType===r.ANDROID,this.isWindows=this.platformType===r.WINDOWS,this.isMac=this.platformType===r.MAC,this.isiOS=this.platformType===r.IOS,this.primaryInteractionMode=this.isiOS||this.isAndroid?o.a.TOUCH:o.a.MOUSE,this.isTouch=this.primaryInteractionMode===o.a.TOUCH,this.isMouse=this.primaryInteractionMode===o.a.MOUSE,this.deviceType=this.isMouse?i.a.DESKTOP:Math.min(window.screen.width,window.screen.height)>667?i.a.TABLET:i.a.PHONE,this.isiPad=this.isiOS&&this.deviceType===i.a.TABLET,this.isiPhoneOriPod=this.isiOS&&this.deviceType===i.a.PHONE}return Object.defineProperty(e,"sharedInstance",{get:function(){var t=e._sharedInstance;return void 0===t?this._sharedInstance=new e:t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"current",{get:function(){return this.platformType},enumerable:!1,configurable:!0}),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1308),i=n(812),o=n(813),a=n(818),s=n(817),c=n(811),u=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=Object(o.a)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),Object(i.i)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){clearTimeout(this.gcTimeout),this.gcTimeout=void 0},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,o=this.state.data,a=Object(i.c)(e,o);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,o,a))?a=o:!1!==this.options.structuralSharing&&(a=Object(i.s)(o,a)),this.dispatch({data:a,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),a},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(i.l).catch(i.l):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!Object(i.w)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,o,a=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return null==(u=this.retryer)||u.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var l=this.observers.find((function(e){return e.options.queryFn}));l&&this.setOptions(l.options)}var d=Object(i.b)(this.queryKey),p=Object(i.d)(),f={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(f,"signal",{enumerable:!0,get:function(){if(p)return a.abortSignalConsumed=!0,p.signal}});var h,m,g={fetchOptions:t,options:this.options,queryKey:d,state:this.state,fetchFn:function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(f)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(h=this.options.behavior)||h.onFetch(g)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=g.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=g.fetchOptions)?void 0:m.meta}),this.retryer=new c.b({fn:g.fetchFn,abort:null==p||null==(o=p.abort)?void 0:o.bind(p),onSuccess:function(e){a.setData(e),null==a.cache.config.onSuccess||a.cache.config.onSuccess(e,a),0===a.cacheTime&&a.optionalRemove()},onError:function(e){Object(c.d)(e)&&e.silent||a.dispatch({type:"error",error:e}),Object(c.d)(e)||(null==a.cache.config.onError||a.cache.config.onError(e,a),Object(s.a)().error(e)),0===a.cacheTime&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),a.a.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof e.initialData?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r="undefined"!==typeof t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,r;switch(t.type){case"failed":return Object(o.a)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return Object(o.a)({},e,{isPaused:!0});case"continue":return Object(o.a)({},e,{isPaused:!1});case"fetch":return Object(o.a)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Object(o.a)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(r=t.dataUpdatedAt)?r:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return Object(c.d)(i)&&i.revert&&this.revertState?Object(o.a)({},this.revertState):Object(o.a)({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Object(o.a)({},e,{isInvalidated:!0});case"setState":return Object(o.a)({},e,t.state);default:return e}},e}(),l=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}Object(r.a)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,o=t.queryKey,a=null!=(r=t.queryHash)?r:Object(i.f)(o,t),s=this.get(a);return s||(s=new u({cache:this,queryKey:o,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o),meta:t.meta}),this.add(s)),s},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;a.a.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=Object(i.m)(e,t)[0];return"undefined"===typeof n.exact&&(n.exact=!0),this.queries.find((function(e){return Object(i.k)(n,e)}))},n.findAll=function(e,t){var n=Object(i.m)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return Object(i.k)(n,e)})):this.queries},n.notify=function(e){var t=this;a.a.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;a.a.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;a.a.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(n(815).a)},function(e,t,n){"use strict";var r=n(818),i=n(575),o=n.n(i).a.unstable_batchedUpdates;r.a.setBatchNotifyFunction(o)},function(e,t,n){"use strict";var r=n(817),i=console;Object(r.b)(i)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));var r=function(){function e(e){void 0===e&&(e={});var t=e&&e.userAgent;t||(t=window.navigator.userAgent),t=t.toLowerCase();var n,r,i,o,a,s=/\sedge\//.test(t),c=!s&&/fxios/.test(t),u=!s&&!c&&/chrome|crios/.test(t),l=!s&&!c&&!u&&/safari/.test(t),d=c||!s&&!u&&!l&&/firefox/.test(t),p=!s&&!u&&!l&&!d&&/trident|msie/.test(t),f=s,h=!f&&/applewebkit/.test(t)&&!/edge/.test(t),m=!f&&!h&&/trident/.test(t),g=!f&&!h&&!m&&/gecko/.test(t);s?(n=t.match(/(?:edge).(\d+)\.(\d+)/),o=t.match(/(?:edge).(\d+)/)):(n=t.match(/(?:chrome|crios|version|firefox|fxios|msie|rv).(\d+)\.(\d+)/),o=t.match(/(?:applewebkit|gecko|trident).(\d+)/));var v=s||p;n&&(r=parseInt(n[1],10),i=parseInt(n[2],10)),o&&(a=parseInt(o[1])),this.isChrome=u,this.isSafari=l,this.isSafari12OrLower=Boolean(l&&r&&r<13),this.isFirefox=d,this.isEdge=s,this.isIE=p,this.isEdgeOrIE=v,this.isIE9OrLower=Boolean(p&&r&&r<10),this.isIE8OrLower=Boolean(p&&r&&r<9),this.majorVersion=r,this.minorVersion=i,this.isEdgeHTML=f,this.isWebKit=h,this.isGecko=g,this.isTrident=m,this.engineMajorVersion=a}return e.sharedInstance=new e,e}(),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=r.sharedInstance;function a(e,t){void 0===t&&(t=1);var n=e?i({},e):{},r=new Error;return n.calleeStack=s(r.stack,t),n}function s(e,t){var n;if(void 0===t&&(t=1),e){var r=t;(o.isChrome||o.isEdge||o.isIE)&&r++;var i=e.split("\n");r<i.length&&(n=i.splice(r).join("\n"))}return n}function c(e,t,n){for(var r=[],i=t;i<n;i++)r.push(u(e.stack,i));return r}function u(e,t){void 0===t&&(t=1);var n=s(e,t);if(n){var r=n.split("\n")[0].trim();if(o.isChrome)return function(e){var t=e.match(/^at\s+(.+)\s+\(/);return Array.isArray(t)&&t[1]||"(anonymous function)"}(r);if(o.isEdge||o.isIE)return function(e){var t=e.match(/^at\s+(.+)\s+\(/);return Array.isArray(t)&&t[1]||"(unknown function)"}(r);if(o.isSafari)return function(e){var t=e.match(/^(.+)@/);return Array.isArray(t)&&t[1]||"(anonymous function)"}(r);if(o.isFirefox)return function(e){var t=e.match(/^(.+)@/);return Array.isArray(t)&&t[1]||"(anonymous function)"}(r)}return"(unknown function)"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=/[-/\\^$*+?.()|[\]{}]/g;function i(e){return function(e,t,n){if(!e)return"";if("string"!==typeof e)try{e=e.toString()}catch(r){return""}return e.replace(t,n)}(e,r,"\\$&")}var o=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(){function e(t){if("string"===typeof t)t=e.parse(t);else if(t&&t.constructor===window.Location){for(var n={},r=void 0,i=void 0,o=e.components,a=0,s=o.length;a<s;a++)"query"===(i=r=o[a])&&(r="search"),n[i]=t[r];t=n}else if(t&&t.constructor!==Object)throw new y("A URLParser object cannot be created with the data provided: "+JSON.stringify(t));for(var i in t)t.hasOwnProperty(i)&&(this[i]=t[i])}return e.parse=function(e){var t,n,r,i,o,a=e.match(s),c={},u=this.components;if(a)for(r=0,i=u.length;r<i;r++)(t=a[r+1])&&(n=u[r],o=this.componentCleaners[n],c[n]=o?o(t):t);return c},e.parseQuery=function(e,t){var n={};if("string"!==typeof e)return n;if(""===(e=e.replace(c,"")))return n;t=void 0===t?this.shouldUseFormEncoding:t;for(var r=e.split("&"),i=0,o=r.length;i<o;i++){var a=r[i].split("="),s=a[0],u=a[1],l=!1;p.test(s)&&(s=s.replace(p,""),l=!0),u=this.parseValue(m(u,t));var d=n[s];d?(Array.isArray(d)?d.push(u):d=[d,u],u=d):l&&(u=[u]),n[s]=u}return n},e.parseValue=function(e){if(e&&u.test(e)){for(var t=e.split(","),n=t.length-1;n>=0;n--)t[n]=g(t[n]);return t}return g(e)},e.formatQuery=function(e,t){if(e&&e.constructor!==Object)return"";t=void 0===t?this.shouldUseFormEncoding:t;var n,r,i,o,a=Object.keys(e),s="";for(i=0,o=a.length;i<o;i++)r=e[n=a[i]],i>0&&(s+="&"),s+=h(n,t),null!==r&&void 0!==r&&(s+="="+(r=h(this.formatValue(r),t)));return i>0?"?"+s:""},e.formatValue=function(e){if(Array.isArray(e)){for(var t=e.length-1;t>=0;t--)e[t]=v(e[t]);return e.join(",")}return v(e)},Object.defineProperty(e.prototype,"href",{get:function(){var t,n,r,i,o,a="",s=e.components;for(n=0,r=s.length;n<r;n++)(t=this[i=s[n]])&&(a+=(o=e.componentFormatters[i])?o(t):t);return a},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){var e=this.port,t=this.hostname;return e&&(t=(t||"")+":"+e),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){var t=this.host,n=this.protocol;return n&&(t=e.componentFormatters.protocol(n)+(t||"")),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){var e=this.query,t=this.pathname;return e&&(t=(t||"")+e),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"queryObject",{get:function(){return e.parseQuery(this.query)},set:function(t){this.query=t?e.formatQuery(t):void 0},enumerable:!1,configurable:!0}),e.prototype.isInDomain=function(e){var t=this.hostname;if(!t||""===e)return!1;var n=new RegExp("(^|\\.)"+i(e)+"$","i");return!!t.match(n)},e.prototype.setQueryParameter=function(e,t){return this.query?(this.removeQueryParameter(e),this.appendQueryParameter(e,t)):this.appendQueryParameter(e,t)},e.prototype.appendQueryParameter=function(t,n){var r=this.query||"?";return"?"!==r&&(r+="&"),r+=h(t,e.shouldUseFormEncoding)+(null!==n&&void 0!==n?"="+h(e.formatValue(n),e.shouldUseFormEncoding):""),this.query=r,this},e.prototype.removeQueryParameter=function(e){var t=this.query;if(!t)return this;var n=this._regexpForQueryParameterKey(e),r=t.replace(n,""),i=r[0];return r?"?"!==i&&("&"===i&&(r=r.substr(1)),r="?"+r):r=void 0,this.query=r,this},e.prototype.getQueryParameter=function(t){var n=this.query;if(n){var r=this._regexpForQueryParameterKey(t).exec(n);if(r){var i=r[3];if(void 0!==i)return m(i,e.shouldUseFormEncoding)}}},e.prototype._regexpForQueryParameterKey=function(t){var n=i(t)+"|"+i(h(t,e.shouldUseFormEncoding));return new RegExp("(^|\\?|&)("+n+")(?:=([^&]*))?(?=&|$)","g")},e.prototype.setMultipleQueryParameters=function(e){for(var t in e)e.hasOwnProperty(t)&&this.setQueryParameter(t,e[t]);return this},e.prototype.toString=function(){return this.href},e.prototype.toJSON=function(){return""+this},e.shouldUseFormEncoding=!1,e.components=["protocol","auth","hostname","port","pathname","query","hash"],e.componentFormatters={protocol:function(e){return e+(f[e]?"":"//")},auth:function(e){return e+"@"},port:function(e){return":"+e}},e.componentCleaners={protocol:function(e){return e.replace("//","")},auth:function(e){return e.replace("@","")}},e}(),s=/^(.*?:\/\/)?([^:/?]*:?[^:/?]*@+)?([^:/?]*):?(\d*)?([^?#]*)?(\??[^#]*)(#?.*)?$/,c=/^\?/,u=/,/,l=/%20/g,d=/\+/g,p=/\[\]$/,f={"mailto:":!0},h=function(e,t){var n=encodeURIComponent(""+e);return t?n.replace(l,"+"):n},m=function(e,t){if(!e)return e;var n=decodeURIComponent(""+e);return t?n.replace(d," "):n};function g(e){try{return JSON.parse(e)}catch(t){return e}}function v(e){return""+e}var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(710),i=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e},u=function(){function e(){if(this instanceof e)throw new TypeError("Cannot instantiate Mixin. Use static `applyMixin` or utility `applyMixins` to imbue a target class with this mixin\u2019s properties. Then, instantiate the class instead.");if(arguments.length>0)throw new Error("There is no need to pass arguments to the super() in a customized Mixin constructor. These constructors run isolated from the primary constructor chain of the class.")}return Object.defineProperty(e,"Class",{get:function(){var e;return this._Class||(this._Class=((e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r.a)).mixins=[this],e))},enumerable:!1,configurable:!0}),e.prototype.constructMixins=function(){var t,n;if(this instanceof e)throw new Error("Method `constructMixins` must be called on an instance of a class definition that has received a Mixin. It cannot be called on a Mixin itself. For Mixins with relevant constructors, the recipient classes\u2019 constructors must call this method.");var r=this.hasOwnProperty("_constructedTSMixins")?this._constructedTSMixins:this._constructedTSMixins=this._constructedTSMixins?this._constructedTSMixins.slice():[],i=this.constructor._appliedTSMixins;try{for(var o=a(i),s=o.next();!s.done;s=o.next()){var c=s.value;r.includes(c)||(c.call(this),r.push(this))}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.hasMixin=function(e){return this.constructor.hasMixin(e)},e.hasMixin=function(t){if(this.prototype instanceof e)throw new Error("Method `hasMixin` may only be called on class definitions, not Mixins themselves.");return this._appliedTSMixins&&this._appliedTSMixins.includes(t)||this._super.hasMixin&&this._super.hasMixin.call(this,t)},e.mixInto=function(t){var n,r;if(!t||t.prototype instanceof e)throw new Error("Mixins may only be applied to class definitions. To use a Mixin in another Mixin, include it in the `static mixins` array.");if(!function(e,t){var n=e;return!(!(null===n||void 0===n?void 0:n.hasMixin)||!n.hasMixin(t))}(t,this)){var i=this.mixins;if(i)try{for(var o=a(i),s=o.next();!s.done;s=o.next())s.value.mixInto(t)}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}l(t.prototype,[e.prototype,this.prototype]),l(t,[e,this]),function(e,t){var n=e;(n.hasOwnProperty("_appliedTSMixins")&&n._appliedTSMixins||(n._appliedTSMixins=(n._appliedTSMixins||[]).slice())).push(t)}(t,this)}},e}();function l(e,t){var n=Object.getPrototypeOf(e),r=e instanceof Function?n===Function.prototype?function(){}:function(e){function t(){return e.apply(this,c(arguments))||this}return i(t,e),t}(n):Object.create(n);d(r,t),Object.setPrototypeOf(e,r);var o=Object.getOwnPropertyDescriptors(e);for(var a in o)if(o.hasOwnProperty(a)&&!v[a]){var s=Object.getOwnPropertyDescriptor(e,a);if(s){if(!1===s.configurable)throw new Error("Cannot override non-configureable property `"+a+"`.");delete e[a]}}else delete o[a];d(e,o)}function d(e,t){var n=Array.isArray(t)?function(e){var t,n,r={};try{for(var i=a(e),s=i.next();!s.done;s=i.next()){var c=s.value;r=o(o({},r),Object.getOwnPropertyDescriptors(c))}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(t):t;for(var r in n)if(n.hasOwnProperty(r)&&!v[r]){var i=f(e,r),s=p(r,n[r],0,e);if(!1===(null===i||void 0===i?void 0:i.configurable))throw new Error("Cannot override non-configureable property `"+r+"`.");Object.defineProperty(e,r,s)}return e}function p(e,t,n,r){return"function"===typeof t.value||t.get||t.set?function(e,t,n,r){if(y[e])return t;t=o({},t);for(var i=function(e){var n=t[e];if("function"!==typeof n)return"continue";n=g.get(n)||n;var i=function(){var e=this._super;this._super=h(this,r);var t=n.apply(this,arguments);return this._super=e,t};g.set(i,n),t[e]=i},a="value";a;a="value"===a?"get":"get"===a?"set":"")i(a);return t}(e,t,0,r):t}function f(e,t){for(;e;){var n=Object.getOwnPropertyDescriptor(e,t);if(n)return n;e=Object.getPrototypeOf(e)}}function h(e,t){if(!t||t===Object.prototype)return null;var n=m.get(e);n||m.set(e,n=new WeakMap);var r=n.get(t);return r||n.set(t,r=function(e,t){var n=Object.getPrototypeOf(t),r=Object.create(h(e,n)),i=Object.getOwnPropertyDescriptors(n);for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&!v[a]){var s=i[a],c=s.value,u=s.get,l=s.set,d="function"===typeof c,p=s;(d||u||l)&&(p=o({},p),d&&(p.value=c.bind(e)),u&&(p.get=u.bind(e)),l&&(p.set=l.bind(e))),Object.defineProperty(r,a,p)}return r}(e,t)),r}var m=new WeakMap,g=new WeakMap,v=Object.assign(Object.create(null),{_super:!0,Class:!0,_class:!0,mixins:!0,mixInto:!0,prototype:!0,constructor:!0,Constructor:!0,_appliedTSMixins:!0,call:!0,apply:!0}),y=Object.assign(Object.create(null),{constructMixins:!0})},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return i}))}]));